_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 |
|---|---|---|---|---|---|---|---|---|
1c5817883849f09b9b3354decbedbeb533ea84acfb11895b33bc35f1af9748c1 | Helium4Haskell/helium | UHA_Range.hs | # OPTIONS_GHC -fno - warn - orphans #
{-| Module : UHA_Range
License : GPL
Maintainer :
Stability : experimental
Portability : portable
-}
module Helium.Syntax.UHA_Range where
import Helium.Syntax.UHA_Syntax
import Lvm.Common.Id(Id, stringFromId)
import Helium.Utils.Utils(internalEr... | null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/src/Helium/Syntax/UHA_Range.hs | haskell | | Module : UHA_Range
License : GPL
Maintainer :
Stability : experimental
Portability : portable
------------------------------------------------------------
------------------------------------------------------------
!!!Name
!!!Name
------------------------------------------------... | # OPTIONS_GHC -fno - warn - orphans #
module Helium.Syntax.UHA_Range where
import Helium.Syntax.UHA_Syntax
import Lvm.Common.Id(Id, stringFromId)
import Helium.Utils.Utils(internalError)
import Data.Maybe(isJust)
import Data.List(sort, partition)
instances for Range and Position
instance Show Range where
show... |
30a42648cbf9cd1669ee55a6ec74e7b9ab297e8d895240c6edd7203cc562110c | monadfix/ormolu-live | CoAxiom.hs | ( c ) The University of Glasgow 2012
# LANGUAGE CPP , DataKinds , DeriveDataTypeable , GADTs , KindSignatures ,
ScopedTypeVariables , StandaloneDeriving , RoleAnnotations #
ScopedTypeVariables, StandaloneDeriving, RoleAnnotations #-}
-- | Module for coercion axioms, used to represent typ... | null | https://raw.githubusercontent.com/monadfix/ormolu-live/d8ae72ef168b98a8d179d642f70352c88b3ac226/ghc-lib-parser-8.10.1.20200412/compiler/types/CoAxiom.hs | haskell | | Module for coercion axioms, used to represent type family instances
and newtypes
# SOURCE #
# SOURCE #
# SOURCE #
or , written using concrete - ish syntax --
or, written using concrete-ish syntax --
The index of the branch in the list of branches
promoted data type
By using type synonyms for the promoted cons... | ( c ) The University of Glasgow 2012
# LANGUAGE CPP , DataKinds , DeriveDataTypeable , GADTs , KindSignatures ,
ScopedTypeVariables , StandaloneDeriving , RoleAnnotations #
ScopedTypeVariables, StandaloneDeriving, RoleAnnotations #-}
module CoAxiom (
BranchFlag, Branched, Unbranc... |
df95b33e20e6bb5d17e530145e7110be596ad41b61132a8704f3311156108ec7 | erlangonrails/devdb | ringo_cmd.erl | -module(ringo_cmd).
-export([create/1, put/1]).
request(Name, Chunk, Msg) ->
DomainID = ringo_util:domain_id(Name, Chunk),
io:fwrite("DomainID: ~b~n", [DomainID]),
[First|_] = Nodes = ringo_util:ringo_nodes(),
io:fwrite("Nodes: ~w~n", [Nodes]),
ok = gen_server:cast({ringo_node, ... | null | https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/ringo/ring/test/ringo_cmd.erl | erlang | -module(ringo_cmd).
-export([create/1, put/1]).
request(Name, Chunk, Msg) ->
DomainID = ringo_util:domain_id(Name, Chunk),
io:fwrite("DomainID: ~b~n", [DomainID]),
[First|_] = Nodes = ringo_util:ringo_nodes(),
io:fwrite("Nodes: ~w~n", [Nodes]),
ok = gen_server:cast({ringo_node, ... | |
45546e0e9f49e4f1955b1364b46ebbcf85252c580ef416686289eae3682c56f3 | ntoronto/pict3d | typed-types.rkt | #lang typed/racket/base
(require (except-in "ffi.rkt" cast ->))
(provide GLVector
GLPointer
GLSync
gl-vector?
gl-pointer?
GLsync?
gl-vector->info
gl-vector->cpointer
default-gl-procedure-loader
set-gl-procedure-loader!)
;; A "gl-vector"... | null | https://raw.githubusercontent.com/ntoronto/pict3d/09283c9d930c63b6a6a3f2caa43e029222091bdb/typed/opengl/typed-types.rkt | racket | A "gl-vector" is any homogenous vector of a type which is used with the OpenGL API. | #lang typed/racket/base
(require (except-in "ffi.rkt" cast ->))
(provide GLVector
GLPointer
GLSync
gl-vector?
gl-pointer?
GLsync?
gl-vector->info
gl-vector->cpointer
default-gl-procedure-loader
set-gl-procedure-loader!)
(define-type GLV... |
516bccfb8dc887cf8b9b2747a9b004e92370ea1e12cf4f4d8ccffd548c710830 | Stedi-Public-Archive/cdk-clj | alpha.clj | (ns stedi.cdk.alpha
(:refer-clojure :exclude [import])
(:require [clojure.java.browse :as browse]
[clojure.spec.alpha :as s]
[clojure.string :as string]
[stedi.jsii.alpha :as jsii]))
(def ^:private docs-prefix
"")
(defn browse
"Browse to CDK documentation by CDK fqn, CDK ob... | null | https://raw.githubusercontent.com/Stedi-Public-Archive/cdk-clj/8de0174c47ef456f0c22a6bec0ca9845844cc818/src/stedi/cdk/alpha.clj | clojure | Opening module documentation
open core module
also opens core module
Opening class documentation
can open docs from a class
can also open docs from an instance | (ns stedi.cdk.alpha
(:refer-clojure :exclude [import])
(:require [clojure.java.browse :as browse]
[clojure.spec.alpha :as s]
[clojure.string :as string]
[stedi.jsii.alpha :as jsii]))
(def ^:private docs-prefix
"")
(defn browse
"Browse to CDK documentation by CDK fqn, CDK ob... |
e67583e9253367327f82454de2b269a872072d91035d7d84dd1c3d8125f95bcd | skanev/playground | 05.scm | SICP exercise 4.05
;
; Scheme allows additional syntax for cond clauses, (<test> => <recipient>).
; If <test> evaluates to a true value, then <recipient> is evaluated. Its
value must be a procedure of one argument ; this procedure is then invoked on
; the value of the <test>, and the result is returned as the value... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/04/05.scm | scheme |
Scheme allows additional syntax for cond clauses, (<test> => <recipient>).
If <test> evaluates to a true value, then <recipient> is evaluated. Its
this procedure is then invoked on
the value of the <test>, and the result is returned as the value of the cond
expession. For example
(else false))
syntax.... | SICP exercise 4.05
( cond ( ( assoc ' b ( ( a 1 ) ( b 2 ) ) ) = )
returns 2 . Modify the handling of cond so that it supports this extended
(require r5rs/init)
(define (cond? exp) (tagged-list? exp 'cond))
(define (cond-clauses exp) (cdr exp))
(define (cond-else-clause? clause)
(eq? (cond-predicate claus... |
ccfbbba2e47bbac6617d29e29fcc91d62d6e4ffd9d34518a25a1808febb2a56b | hamidreza-s/Tnesia | tnesia_tql_linter_SUITE.erl | -module(tnesia_tql_linter_SUITE).
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
-include("tnesia.hrl").
-compile(export_all).
%%====================================================================
%% CT Callbacks
%%==============================================================... | null | https://raw.githubusercontent.com/hamidreza-s/Tnesia/52a3a88a52b423fbc5959978c0bba61654166d47/test/tnesia_tql_linter_SUITE.erl | erlang | ====================================================================
CT Callbacks
====================================================================
--------------------------------------------------------------------
suite | groups | all
--------------------------------------------------------------------
--------... | -module(tnesia_tql_linter_SUITE).
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
-include("tnesia.hrl").
-compile(export_all).
suite() -> [{timetrap, {seconds, 20}}].
groups() -> [].
all() ->
[ {exports, Functions} | _ ] = ?MODULE:module_info(),
[ FName || {FName, _}... |
44d906886f0bf157b8ba6de25df7f6d2ba00462032d4a8fcbc5931b55fbe9a85 | morpheusgraphql/morpheus-graphql | API.hs | # LANGUAGE DataKinds #
{-# LANGUAGE OverloadedStrings #-}
module Server.API where
import Data.Data (Typeable)
import Data.Morpheus (deriveApp)
import Data.Morpheus.Types
import Scalars (Markdown (..))
import Server.Blog
resolvePost ::
Monad m =>
ID ->
m (Post m)
resolvePost (ID x) =
pure
Post
{ tit... | null | https://raw.githubusercontent.com/morpheusgraphql/morpheus-graphql/ed74aac7fb79d5752c1e6ce88807daab78ca2574/examples/code-gen-docs/src/Server/API.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE DataKinds #
module Server.API where
import Data.Data (Typeable)
import Data.Morpheus (deriveApp)
import Data.Morpheus.Types
import Scalars (Markdown (..))
import Server.Blog
resolvePost ::
Monad m =>
ID ->
m (Post m)
resolvePost (ID x) =
pure
Post
{ title = pure x,
body = pure $ ... |
95e8a3d986eefbaf7713c4f48244c9820ea31e99d1cc151fc9e5f9fa1fd65e5e | mejgun/haskell-tdlib | FoundChatMessages.hs | {-# LANGUAGE OverloadedStrings #-}
-- |
module TD.Data.FoundChatMessages where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified TD.Data.Message as Message
import qualified Utils as U
-- |
| Contains a list of messages found by a search in a given chat @total_count Approximat... | null | https://raw.githubusercontent.com/mejgun/haskell-tdlib/dc380d18d49eaadc386a81dc98af2ce00f8797c2/src/TD/Data/FoundChatMessages.hs | haskell | # LANGUAGE OverloadedStrings #
|
|
|
|
| |
module TD.Data.FoundChatMessages where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified TD.Data.Message as Message
import qualified Utils as U
| Contains a list of messages found by a search in a given chat @total_count Approximate total number of messages found ; -1 if unkn... |
5b2db2f61aff7009092cfcce3a8a58011579ec1cf71d2d327aaff299ba7da85b | marick/fp-oo | arrows.clj | Exercise 1
(-> [1] first inc list)
Exercise 2
(-> [1] first inc (* 3) list)
Exercise 3
;; An extra pair of parentheses is needed to "protect" the `fn` from `->`:
(-> 3
((fn [n] (* 2 n)))
inc)
Exercise 5
(-> (+ 1 2) (* 3) (+ 4))
| null | https://raw.githubusercontent.com/marick/fp-oo/434937826d794d6fe02b3e9a62cf5b4fbc314412/solutions/arrows.clj | clojure | An extra pair of parentheses is needed to "protect" the `fn` from `->`: | Exercise 1
(-> [1] first inc list)
Exercise 2
(-> [1] first inc (* 3) list)
Exercise 3
(-> 3
((fn [n] (* 2 n)))
inc)
Exercise 5
(-> (+ 1 2) (* 3) (+ 4))
|
9ecc9968ffb0c0b07cea4b25c5d24179668085edf78e54b02a83ddf1bfee839c | karlhof26/gimp-scheme | FU_edges_photoframe.scm | ; FU_edges_photoframe.scm
version 3.2 [ gimphelp.org ]
last modified / tested by
02/03/2014 on GIMP-2.8.10
03/09/2020 on GIMP-2.10.20
;
; --------------------------------------------------------------------
Edited on 12/01/2007 by to fix UNDO functionality
; when NOT working on a copy. Menu location also... | null | https://raw.githubusercontent.com/karlhof26/gimp-scheme/bcaaae384fa57fd919607d5599989e6dfcc7f7c7/FU_edges_photoframe.scm | scheme | FU_edges_photoframe.scm
--------------------------------------------------------------------
when NOT working on a copy. Menu location also changed.
12/15/2008 -
pulled use with alpha layer until I get it to behave - PS
10/15/2010 - fixed undo glitch that left stray "select all" if undone.
====================... | version 3.2 [ gimphelp.org ]
last modified / tested by
02/03/2014 on GIMP-2.8.10
03/09/2020 on GIMP-2.10.20
Edited on 12/01/2007 by to fix UNDO functionality
tested on GIMP-2.4.1
udated again for gimp-2.6 by
C:\Program Files\GIMP 2\share\gimp\2.0\scripts
C:\Users\YOUR - NAME\.gimp-2.8\scripts
... |
08d537ff34884689452364450908a3db51946da55108e1b84a543daa3b653b93 | 39aldo39/klfc | Action.hs | # LANGUAGE UnicodeSyntax , NoImplicitPrelude #
module Layout.Action
( Action(..)
) where
import BasePrelude hiding (Alt, Control)
import Util (HumanReadable(..))
import Data.Aeson (ToJSON, FromJSON, toJSON, parseJSON)
data Action
-- Top row
= Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | ... | null | https://raw.githubusercontent.com/39aldo39/klfc/83908c54c955b9c160b999bc8f0892401ba4adbf/src/Layout/Action.hs | haskell | Top row
Movement
Miscellaneous
Media control
Browser control
Applications
Power management
Mouse keys
Extra function keys
International keys | # LANGUAGE UnicodeSyntax , NoImplicitPrelude #
module Layout.Action
( Action(..)
) where
import BasePrelude hiding (Alt, Control)
import Util (HumanReadable(..))
import Data.Aeson (ToJSON, FromJSON, toJSON, parseJSON)
data Action
= Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12
|... |
81284b62fce6932e15d48f65781aea89be9da66787194513a6b6307aa03b7a38 | scrive/log | Logger.hs | -- | The 'Logger' type - implementation details.
{-# OPTIONS_HADDOCK hide #-}
module Log.Internal.Logger (
Logger(..)
, execLogger
, waitForLogger
, shutdownLogger
, withLogger
) where
import Control.Exception
import Log.Data
-- | An object used for communication with a logger thread that
outputs ' L... | null | https://raw.githubusercontent.com/scrive/log/85609445b303fea79881c41d8d7212b2c84ee81d/log-base/src/Log/Internal/Logger.hs | haskell | | The 'Logger' type - implementation details.
# OPTIONS_HADDOCK hide #
| An object used for communication with a logger thread that
stdout (depending on the back-end chosen).
^ Wait for the logger to output all messages
in its input queue (in the case logging is
done asynchronously).
^ Kill the logger thread. Su... | module Log.Internal.Logger (
Logger(..)
, execLogger
, waitForLogger
, shutdownLogger
, withLogger
) where
import Control.Exception
import Log.Data
outputs ' LogMessage 's using e.g. PostgreSQL , Elasticsearch or
data Logger = Logger {
^ Output a ' LogMessage ' .
, loggerWaitForWrite :: !(IO ())
, ... |
c32e8c295f487d62da51d91d0b9a43a4579faa47f3bf88edcc84fe2de84a18dd | RichiH/git-repair | Branch.hs | git branch stuff
-
- Copyright 2011 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2011 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
{-# LANGUAGE BangPatterns #-}
module Git.Branch where
import Common
import Git
import Git.Sha
import Git.Command... | null | https://raw.githubusercontent.com/RichiH/git-repair/c61b677e7a67a286df34c0629c52aeae9be9299a/Git/Branch.hs | haskell | # LANGUAGE BangPatterns #
The current branch, which may not really exist yet.
Check if it's possible to fast-forward from the old
- ref to the new ref.
-
- This requires there to be a path from the old to the new.
cannot fast-forward.
divergent fail
better
worse
same
Commit via the usual git command.
Com... | git branch stuff
-
- Copyright 2011 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2011 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Git.Branch where
import Common
import Git
import Git.Sha
import Git.Command
import qualified Git.Ref
impo... |
f267dd386ed3bfc8dcbaf1280aa7e02f88c197356493fae02603af29b1512226 | rowangithub/DOrder | split.ml | let rec loop i j k n b =
if (n < 2 * k) then
let n = n + 1 in
let i, j =
if (b = 1) then i+1, j else i, j+1 in
let b = 1 - b in
loop i j k n b
Hack : add n mod 2 = 0 as a predicate
else if (n mod 2 = 0) then assert (i = j)
else ()
add a qualifier b = 0 || b = 1 to
encode boolean variables using... | null | https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/tests/folprograms/invgen/split.ml | ocaml | let rec loop i j k n b =
if (n < 2 * k) then
let n = n + 1 in
let i, j =
if (b = 1) then i+1, j else i, j+1 in
let b = 1 - b in
loop i j k n b
Hack : add n mod 2 = 0 as a predicate
else if (n mod 2 = 0) then assert (i = j)
else ()
add a qualifier b = 0 || b = 1 to
encode boolean variables using... | |
e6fe9074eae0d670e959aa1a917fcfcaf6da9eaca2a30c7468f5a99458f0807f | FlowForwarding/lincx | linc_us3_queue_sup.erl | %%------------------------------------------------------------------------------
Copyright 2012 FlowForwarding.org
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%... | null | https://raw.githubusercontent.com/FlowForwarding/lincx/7795923b51fa1e680511669f4a27404b2ed1f1dc/apps/linc_us3/src/linc_us3_queue_sup.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, eithe... | Copyright 2012 FlowForwarding.org
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author Erlang Solutions Ltd. < >
2012 FlowForwarding.org
-module(linc_us3_queue_sup).
-behaviour(supervisor).
-export([start_link/1... |
93cd99b07162e9f37bd62a4c5e2211e25641ea924d7eac90fea459f9fbd27884 | andrejbauer/alg | error.ml | (** Error reporting. *)
* Exception [ Error ( loc , err , msg ) ] indicates an error of type [ err ] with
error message [ msg ] , occurring at position [ loc ] .
error message [msg], occurring at position [loc]. *)
exception Error of (Common.position * string * string)
* [ error loc err_type ] raises an err... | null | https://raw.githubusercontent.com/andrejbauer/alg/95715bb1bf93fcc534a8d6c7c96c8913dc03de0c/src/error.ml | ocaml | * Error reporting.
* Common error kinds. |
* Exception [ Error ( loc , err , msg ) ] indicates an error of type [ err ] with
error message [ msg ] , occurring at position [ loc ] .
error message [msg], occurring at position [loc]. *)
exception Error of (Common.position * string * string)
* [ error loc err_type ] raises an error of type [ err_type ] ... |
78db8d0a5d576b46ebce37e061556790650b7982fc8e6b824791beb53d85c4fd | WeiDUorg/weidu | arch_osx.ml | This file has been edited by , a.k.a . ,
starting from 18 December 2012 and WeiDU 231.06 .
starting from 18 December 2012 and WeiDU 231.06. *)
Note added due to LGPL terms .
This file was edited by , AKA The Bigg , starting from
6 November 2005 . All changes for this file are listed in
... | null | https://raw.githubusercontent.com/WeiDUorg/weidu/ccd4840d77a1140c35026260691b0795702afed3/src/arch_osx.ml | ocaml | Mac OSX Arch-Specific Definitions
no slash removal: helps make shell scripts work better
how to view a text file
let view_command = "open -a /Applications/TextEdit.app/"
backslash_to_slash hopefully sorts this out | This file has been edited by , a.k.a . ,
starting from 18 December 2012 and WeiDU 231.06 .
starting from 18 December 2012 and WeiDU 231.06. *)
Note added due to LGPL terms .
This file was edited by , AKA The Bigg , starting from
6 November 2005 . All changes for this file are listed in
... |
f4c8f5c61fca7006bd4c9bf50cc207b5e7962a149ec1fd0658c59cf3141b9499 | libguestfs/supermin | ext2fs.mli | supermin 5
* Copyright ( C ) 2009 - 2014 Red Hat Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of the License , or
* ( at your option ) any later ... | null | https://raw.githubusercontent.com/libguestfs/supermin/fd9f17c7eb63979af882533a0d234bfc8ca42de3/src/ext2fs.mli | ocaml | supermin 5
* Copyright ( C ) 2009 - 2014 Red Hat Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of the License , or
* ( at your option ) any later ... | |
a0816d65e151ed249f9cffcf5a3ac98e14639ed8dc78666518b8e90395cf3ce9 | janestreet/core_unix | iobuf_unix.mli | open! Core
open! Iobuf
module Unix := Core_unix
type ok_or_eof =
| Ok
| Eof
[@@deriving compare, sexp_of]
(** [Iobuf] has analogs of various [Bigstring] functions. These analogs advance by the
amount written/read. *)
val input : ([> write ], seek) t -> In_channel.t -> ok_or_eof
val read : ([> write ], seek)... | null | https://raw.githubusercontent.com/janestreet/core_unix/abfad608bb4ab04d16478a081cc284a88c3b3184/iobuf_unix/src/iobuf_unix.mli | ocaml | * [Iobuf] has analogs of various [Bigstring] functions. These analogs advance by the
amount written/read.
* Do not change these [Iobuf]'s [buf]s or limits before calling
[recvmmsg_assume_fd_is_nonblocking].
* Write from the iobuf to the specified channel without changing the iobuf
window. Returns the ... | open! Core
open! Iobuf
module Unix := Core_unix
type ok_or_eof =
| Ok
| Eof
[@@deriving compare, sexp_of]
val input : ([> write ], seek) t -> In_channel.t -> ok_or_eof
val read : ([> write ], seek) t -> Unix.File_descr.t -> ok_or_eof
val read_assume_fd_is_nonblocking
: ([> write ], seek) t
-> Unix.File_des... |
214f343d02180d1514b8407540b60af369f3d0b9ff55bf34df8bdaf2b6a6e8ec | Lambda-Logan/faker | Hacker.hs | |
Module : Faker . Hacker
Description : Module for generating fake data related to IT
Copyright : ( c ) , 2014 - 2018
License : MIT
Maintainer :
Stability : experimental
Portability : POSIX
Fake data
Module : Faker.Hacker
Description : Module for generat... | null | https://raw.githubusercontent.com/Lambda-Logan/faker/8935346192e67631b97c1a52f6644ba5ed48a1a2/src/Faker/Hacker.hs | haskell | * Functions for generate fake data related to IT
| Returns some smart IT phrase, i.e.
the FTP generating"
| Part of 'Faker.Hacker.saySomethingSmart' function.
| Part of 'Faker.Hacker.saySomethingSmart' function.
Returns random IT adjective, i.e. "primary"
| Part of 'Faker.Hacker.saySomethingSmart' function.
Ret... | |
Module : Faker . Hacker
Description : Module for generating fake data related to IT
Copyright : ( c ) , 2014 - 2018
License : MIT
Maintainer :
Stability : experimental
Portability : POSIX
Fake data
Module : Faker.Hacker
Description : Module for generat... |
d45cf0a6ab65b3c6f212d0b64803075292cc8b36a28f2d52c5556d1412243218 | mstksg/backprop-learn | FVector.hs | {-# LANGUAGE DataKinds #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE GADTs #
# LANGUAGE InstanceSigs #
{-# LANGUAGE KindSignatures #-}
# LANGUAGE LambdaCase #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANG... | null | https://raw.githubusercontent.com/mstksg/backprop-learn/59aea530a0fad45de6d18b9a723914d1d66dc222/old/src/Numeric/BLAS/FVector.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE KindSignatures #
# LANGUAGE RankNTypes #
# LANGUAGE TypeOperators #
some wasted work here in re-computing the product,
but premature optimization blah blah | # LANGUAGE DeriveGeneric #
# LANGUAGE GADTs #
# LANGUAGE InstanceSigs #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
module Numeric.BLAS.FVector (
FV(..)
) where
import Data.Finite
i... |
a8f80650063d081bcf577e8103a7a643dc0137aec77a0ec0406c02e632b77936 | elginer/Delve | VarApp.hs |
The Delve Programming Language
Copyright 2009
Distributed under the terms of the GNU General Public License v3 , or ( at your option ) any later version .
This file is part of Delve .
Delve is free software : you can redistribute it and/or modify
it under the terms of the GNU Ge... | null | https://raw.githubusercontent.com/elginer/Delve/997c25d2c43ac3ab06f7d70304a59f4a8d5f9670/src/VarApp.hs | haskell | A compiler from plain core, into VarCore - similar to core, but with only simple expressions and variables allowed in applications and matches
assign var variables to a core program
fold over statements assigning a variable to each expression used in an application
fold over exec-stmts assigning a variable to eac... |
The Delve Programming Language
Copyright 2009
Distributed under the terms of the GNU General Public License v3 , or ( at your option ) any later version .
This file is part of Delve .
Delve is free software : you can redistribute it and/or modify
it under the terms of the GNU Ge... |
38004f64d403e586129a76ffabc0f0a328be0935c6abe350bb4b7f416baa8933 | saltlang/saltlang | Language.hs | Copyright ( c ) 2015 . All rights reserved .
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions
-- are met:
--
1 . Redistributions of source code must retain the above copyright
-- notice, this list of conditions and ... | null | https://raw.githubusercontent.com/saltlang/saltlang/f3478904139f19373f23824f25d28e8be745dc60/test/library/Tests/Language.hs | haskell |
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
notice, this list of conditions and the following disclaimer.
notice, this list of conditions and the following disclaimer in the
documentation and/or other ma... | Copyright ( c ) 2015 . All rights reserved .
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
3 . Neither the name of the author nor the names of any contributors
THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTO... |
9220eb4a6a921f096f719ad458500e1bc6b995506c8ef8e1d5df0bf2749c1c17 | jelly-beam/verl | verl_parser_SUITE.erl | -module(verl_parser_SUITE).
-compile(export_all).
-hank([{unnecessary_function_arguments, all}]).
-include_lib("common_test/include/ct.hrl").
all() ->
[parse_version_test, parse_requirement_test].
% match against opaque
-dialyzer({[no_opaque, no_return], parse_version_test/1}).
parse_version_test(_Cfg) ->
{... | null | https://raw.githubusercontent.com/jelly-beam/verl/1481cd5e93706c517d41ef2f3db9e8a8c61fbc2f/test/verl_parser_SUITE.erl | erlang | match against opaque | -module(verl_parser_SUITE).
-compile(export_all).
-hank([{unnecessary_function_arguments, all}]).
-include_lib("common_test/include/ct.hrl").
all() ->
[parse_version_test, parse_requirement_test].
-dialyzer({[no_opaque, no_return], parse_version_test/1}).
parse_version_test(_Cfg) ->
{ok, {1, 2, 3, [], []}} ... |
e917c7cbbf0af0673da170d779d403734191d17c44f93bc523bc2855cddf8a86 | samedhi/firemore | test_runner.cljs | (ns firemore.test-runner
(:require
[cljs.test :as t :include-macros true]
[cljs-test-display.core]
[firemore.authentication-test]
[firemore.core-test]
[firemore.firebase-test]
[firemore.firestore-test]
[firemore.hydrator-test]))
(enable-console-print!)
(def successful (atom false))
(def comple... | null | https://raw.githubusercontent.com/samedhi/firemore/8a1829efbe9cbed367f1d49d0e92e01c5aa20ad5/test/firemore/test_runner.cljs | clojure | (ns firemore.test-runner
(:require
[cljs.test :as t :include-macros true]
[cljs-test-display.core]
[firemore.authentication-test]
[firemore.core-test]
[firemore.firebase-test]
[firemore.firestore-test]
[firemore.hydrator-test]))
(enable-console-print!)
(def successful (atom false))
(def comple... | |
7907f40dfe3b86672107aee72a18013e82900dbe1925f878a772598363d9734f | Mallku2/lua-redex-model | constructs.rkt | #lang racket
(require redex
"../../grammar.rkt"
"../../executionEnvironment.rkt"
"../../Relations/fullProgs.rkt"
"../../Desugar/parser.rkt")
(define (ok? red)
(and (eq? (length red) 1)
(redex-match core-lang
(σ : θ : \;)
(first red))))
(define ... | null | https://raw.githubusercontent.com/Mallku2/lua-redex-model/13a1b8cacbdc72a1b5cb1a1f140f21cc974d71c3/Tests/LuaTests/constructs.rkt | racket | ) | #lang racket
(require redex
"../../grammar.rkt"
"../../executionEnvironment.rkt"
"../../Relations/fullProgs.rkt"
"../../Desugar/parser.rkt")
(define (ok? red)
(and (eq? (length red) 1)
(redex-match core-lang
(first red))))
(define (lua-constructs-test-suite)... |
2d86ec2599ac0e93411d6a5897ed6f3dd1f036e8788d875904446624d385b91d | job-streamer/job-streamer-agent | entity_test.clj | (ns job-streamer.agent.entity-test
(:require [job-streamer.agent.entity :refer :all]
[clojure.test :refer :all])
(:import [org.jsoup Jsoup]
[org.jsoup.parser Tag Parser]))
(deftest has-listeners-test
(testing "has listeners"
(is (has-listeners?
(some-> (Jsoup/parse "<job id... | null | https://raw.githubusercontent.com/job-streamer/job-streamer-agent/82de7ec5d0e1b0b0fc47db7facd7d790b8db7715/test/clj/job_streamer/agent/entity_test.clj | clojure | (ns job-streamer.agent.entity-test
(:require [job-streamer.agent.entity :refer :all]
[clojure.test :refer :all])
(:import [org.jsoup Jsoup]
[org.jsoup.parser Tag Parser]))
(deftest has-listeners-test
(testing "has listeners"
(is (has-listeners?
(some-> (Jsoup/parse "<job id... | |
f1f16d035c598cd307c7c3925afaaa5467abe72e8947b5950898e19372ef4816 | sbcl/sbcl | interface.lisp | (cl:in-package :sb-posix)
(defmacro define-protocol-class
(name alien-type superclasses slots &rest options)
(let ((to-protocol (intern (format nil "ALIEN-TO-~A" name)))
(to-alien (intern (format nil "~A-TO-ALIEN" name))))
`(progn
(export ',name :sb-posix)
(defclass ,name ,superclasses
... | null | https://raw.githubusercontent.com/sbcl/sbcl/b32c31b686decd912f2d7bb92a4d7fa8d833dc54/contrib/sb-posix/interface.lisp | lisp | FIXME: slotds in source are more complicated in general
FIXME: baroque construction of intricate fragility
Some systems may need C-level wrappers, which can live in the
runtime (so that save-lisp-and-die can produce standalone
variable.
filesystem access
need to do this here because we can't do it in the DEFPAC... | (cl:in-package :sb-posix)
(defmacro define-protocol-class
(name alien-type superclasses slots &rest options)
(let ((to-protocol (intern (format nil "ALIEN-TO-~A" name)))
(to-alien (intern (format nil "~A-TO-ALIEN" name))))
`(progn
(export ',name :sb-posix)
(defclass ,name ,superclasses
... |
71d5dde3f801faecd5edadf37656ad0e1da56941ac7a0f7a320d5742030d7e58 | janestreet/merlin-jst | printast.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/janestreet/merlin-jst/980b574405617fa0dfb0b79a84a66536b46cd71b/upstream/ocaml_414/parsing/printast.mli | ocaml | ************************************************************************
OCaml
... | , projet Para , INRIA Rocquencourt
Copyright 1999 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
* Raw printer for { ! b Warning :} this module is unstable and part of
{ { ! Compiler_libs}compiler... |
d99b98d7ee728061306f87ecef2d5690b2d38e8f582b8ca07762dcd42c5f8c9a | heidegger/JSConTest | BaseContract.mli | * Module that represents the Base Contracts .
This means , Contracts that do not contain
other contracts
@author :
This means, Contracts that do not contain
other contracts
@author: Phillip Heidegger
*)
(** a base contracts *)
type t =
| BUndf
| BVoid
| BNull
| BTop
| BSB... | null | https://raw.githubusercontent.com/heidegger/JSConTest/7c807a76af998da25775fba1f5cbe1cf8031d121/ocaml/contracts/BaseContract.mli | ocaml | * a base contracts
* Creates a string representation for a base contract | * Module that represents the Base Contracts .
This means , Contracts that do not contain
other contracts
@author :
This means, Contracts that do not contain
other contracts
@author: Phillip Heidegger
*)
type t =
| BUndf
| BVoid
| BNull
| BTop
| BSBool of bool
| BBool
... |
c8ece667994714e836e0745c2b5042d238e849de5c745b91adab9c14438dde4d | deadpendency/deadpendency | GitPath.hs | module Common.Model.Git.GitPath
( GitPath (..),
)
where
import Common.Aeson.Aeson
import Data.Aeson
newtype GitPath = GitPath
{ _ntText :: Text
}
deriving stock (Show, Generic, Eq, Ord)
instance ToJSON GitPath where
toJSON = genericToJSON cleanJSONOptions
toEncoding = genericToEncoding cleanJSONOptions... | null | https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/common/src/Common/Model/Git/GitPath.hs | haskell | module Common.Model.Git.GitPath
( GitPath (..),
)
where
import Common.Aeson.Aeson
import Data.Aeson
newtype GitPath = GitPath
{ _ntText :: Text
}
deriving stock (Show, Generic, Eq, Ord)
instance ToJSON GitPath where
toJSON = genericToJSON cleanJSONOptions
toEncoding = genericToEncoding cleanJSONOptions... | |
48fbcb99063396ea8b6a95f0c6a36d9263a44451d806cb59997868aac6fdbdd1 | RDTK/generator | release.lisp | ;;;; release.lisp ---
;;;;
Copyright ( C ) 2012 - 2019 Jan Moringen
;;;;
Author : < >
(cl:in-package #:jenkins.scripting)
(defmacro with-modification ((label old &optional (new old))
&body body)
(with-gensyms (temp)
`(let ((,temp ,old))
(prog1
(progn ,@body)... | null | https://raw.githubusercontent.com/RDTK/generator/8d9e6e47776f2ccb7b5ed934337d2db50ecbe2f5/lib/jenkins.api/src/scripting/release.lisp | lisp | release.lisp ---
Modify environment variables.
Update ssh upload target directories.
Example | Copyright ( C ) 2012 - 2019 Jan Moringen
Author : < >
(cl:in-package #:jenkins.scripting)
(defmacro with-modification ((label old &optional (new old))
&body body)
(with-gensyms (temp)
`(let ((,temp ,old))
(prog1
(progn ,@body)
(format t "~2@T~24A ~@... |
de814ca9c3854aef8556fd86ce1995593af57c069dd1b1d565cd8b4fdc35971f | icicle-lang/icicle-ambiata | Resumable.hs | -- | Check whether a query can be implemented as a "resumable computation"
-- with a finite lookbehind/history.
--
-- This ends up being quite a simple check (simpler than I expected):
-- we descend into the query, looking through function definitions,
-- and stop when we find a window, a latest, or a fold.
--
-- If we... | null | https://raw.githubusercontent.com/icicle-lang/icicle-ambiata/9b9cc45a75f66603007e4db7e5f3ba908cae2df2/icicle-source/src/Icicle/Source/Checker/Resumable.hs | haskell | | Check whether a query can be implemented as a "resumable computation"
with a finite lookbehind/history.
This ends up being quite a simple check (simpler than I expected):
we descend into the query, looking through function definitions,
and stop when we find a window, a latest, or a fold.
If we find a fold tha... | # LANGUAGE PatternGuards #
# LANGUAGE NoImplicitPrelude #
module Icicle.Source.Checker.Resumable (
checkResumableQ
, checkResumableX
) where
import Icicle.Source.Checker.Base
import Icicle.Source.Checker.Error
import Icicle.Source.Query
import ... |
1f922d5a8dd4b1ddca4af65f294ec20c0c3f94cbf31b4276a2037548ece1232b | jspahrsummers/RxHaskell | Command.hs | {-# LANGUAGE Safe #-}
# LANGUAGE ScopedTypeVariables #
module Signal.Command ( Command
, CommandPolicy(..)
, newCommand
, canExecute
, executing
, execute
, values
,... | null | https://raw.githubusercontent.com/jspahrsummers/RxHaskell/19550bb692a6a6e56314fe3aebb1303a22e577ed/Signal/Command.hs | haskell | # LANGUAGE Safe #
| Determines a command's behavior.
^ The command can only be executed once at a time.
Attempts to 'execute' while the command is already running will fail.
^ The command can be executed concurrently any number of times.
| A signal triggered in response to some action, typically UI-related.
| C... | # LANGUAGE ScopedTypeVariables #
module Signal.Command ( Command
, CommandPolicy(..)
, newCommand
, canExecute
, executing
, execute
, values
, onExecute
... |
32a0080ae8bfc177460328015e4cb33b7a3ff64ea23028c6d901f7fd27eb9951 | irastypain/sicp-on-language-racket | exercise_2_05.rkt | #lang racket
(require "../lib/base.rkt"
"../lib/fast-expt.rkt")
; Набор процедур для представления пары неотрицательных
целых чисел как произведение 2^a * 3^b
; Конструктор неотрицательного целого числа
Если один из аргументов отрицателен , процедура
возвращает -1
(define (cons a b)
(if (or (< a 0) ... | null | https://raw.githubusercontent.com/irastypain/sicp-on-language-racket/0052f91d3c2432a00e7e15310f416cb77eeb4c9c/src/chapter02/exercise_2_05.rkt | racket | Набор процедур для представления пары неотрицательных
Конструктор неотрицательного целого числа
При неположительном значении value порождается ошибка | #lang racket
(require "../lib/base.rkt"
"../lib/fast-expt.rkt")
целых чисел как произведение 2^a * 3^b
Если один из аргументов отрицателен , процедура
возвращает -1
(define (cons a b)
(if (or (< a 0) (< b 0))
-1
(* (fast-expt 2 a) (fast-expt 3 b))))
(define (car pair)
(decomposition 2... |
9cae4605f3f94c46034e346307bfaa2b79103824f672ee1cf7682c3aaf3135b0 | xmonad/X11 | Xlib.hs | -----------------------------------------------------------------------------
-- |
-- Module : Graphics.X11.Xlib
Copyright : ( c ) , 1999 - 2003
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer :
-- Stability : provisional
-- Portability : portable
--
A collecti... | null | https://raw.githubusercontent.com/xmonad/X11/52c34b4dfe1155022de6985304cd59c0398fbb39/Graphics/X11/Xlib.hs | haskell | ---------------------------------------------------------------------------
|
Module : Graphics.X11.Xlib
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : provisional
Portability : portable
The library aims to provide a direct translation of the X
</>. Let ... | Copyright : ( c ) , 1999 - 2003
A collection of FFI declarations for interfacing with Xlib .
binding into so the most important documentation you
should read is /The Xlib Programming Manual/ , available online at
module Graphics.X11.Xlib
module Graphics.X11.Types,
Display(..), Scre... |
f760826bb809d7ab548da9b6a5a4c0428bd326cfcc4ab74c98dddc67ad389aa2 | wilkerlucio/pathom3 | plugins.cljc | (ns com.wsscode.pathom3.connect.built-in.plugins
(:require
[com.fulcrologic.guardrails.core :refer [>def]]
[com.wsscode.log :as l]
[com.wsscode.misc.coll :as coll]
[com.wsscode.misc.time :as time]
[com.wsscode.pathom3.connect.indexes :as pci]
[com.wsscode.pathom3.connect.operation :as pco]
... | null | https://raw.githubusercontent.com/wilkerlucio/pathom3/d7bf1a3de5136e060b758fb6cc5b24208a614ffc/src/main/com/wsscode/pathom3/connect/built_in/plugins.cljc | clojure | (ns com.wsscode.pathom3.connect.built-in.plugins
(:require
[com.fulcrologic.guardrails.core :refer [>def]]
[com.wsscode.log :as l]
[com.wsscode.misc.coll :as coll]
[com.wsscode.misc.time :as time]
[com.wsscode.pathom3.connect.indexes :as pci]
[com.wsscode.pathom3.connect.operation :as pco]
... | |
7ca23dd560fa7a4351062723f4ab80ccdbb42d361e338b83e02994c97a00bf2d | amnh/poy5 | prealigned_benchmark.ml | A program to benchmark different algorithms of POY for various datasets .
let () =
FileStream.do_broadcast := false
let run_command_get_tree_cost commands =
Phylo.parsed_run (PoyCommand.of_parsed false commands);
match Phylo.Runtime.trees () with
| [tree] ->
let tree =
... | null | https://raw.githubusercontent.com/amnh/poy5/da563a2339d3fa9c0110ae86cc35fad576f728ab/src/utils/prealigned_benchmark.ml | ocaml | First prepare the data | A program to benchmark different algorithms of POY for various datasets .
let () =
FileStream.do_broadcast := false
let run_command_get_tree_cost commands =
Phylo.parsed_run (PoyCommand.of_parsed false commands);
match Phylo.Runtime.trees () with
| [tree] ->
let tree =
... |
d1df23317b016c0f6f4c0c18b10aa282b5ad3825c7d944da4264400804ff2eb7 | well-typed/large-records | FreshT.hs | # LANGUAGE GeneralizedNewtypeDeriving #
-- | Fresh name generation
module Data.Record.Anon.Internal.Plugin.Source.FreshT (
-- * Monad definition
FreshT -- opaque
, runFreshT
, runFreshHsc
-- * Generate fresh names
, fresh
, freshVar
) where
import Control.Monad.Reader
import Data.Record.Anon.In... | null | https://raw.githubusercontent.com/well-typed/large-records/fb983aa136c2602499c2421323bd52b6a54b7c9a/large-anon/src/Data/Record/Anon/Internal/Plugin/Source/FreshT.hs | haskell | | Fresh name generation
* Monad definition
opaque
* Generate fresh names
----------------------------------------------------------------------------
----------------------------------------------------------------------------
-----------------------------------------------------------------------------}
| Fresh ... | # LANGUAGE GeneralizedNewtypeDeriving #
module Data.Record.Anon.Internal.Plugin.Source.FreshT (
, runFreshT
, runFreshHsc
, fresh
, freshVar
) where
import Control.Monad.Reader
import Data.Record.Anon.Internal.Plugin.Source.GhcShim
Monad definition
Monad definition
newtype FreshT m a = WrapFreshT {... |
5c1f5883ea427e6576e7057d5b1ecb362ef746e11998dd39ba3f2a33a25aaec2 | tree-sitter/haskell-tree-sitter | Example.hs | # LANGUAGE TemplateHaskell #
module TreeSitter.Example (tests) where
import Control.Monad.IO.Class
import Foreign
import Foreign.C.Types
import Hedgehog
import TreeSitter.Cursor
import TreeSitter.Node
import TreeSitter.Parser
tests :: IO Bool
tests = checkSequential $$(discover)
prop_TSNode_sizeOf = property $
siz... | null | https://raw.githubusercontent.com/tree-sitter/haskell-tree-sitter/8a5a2b12a3c36a8ca7e117fff04023f1595e04e7/tree-sitter/test/TreeSitter/Example.hs | haskell | # LANGUAGE TemplateHaskell #
module TreeSitter.Example (tests) where
import Control.Monad.IO.Class
import Foreign
import Foreign.C.Types
import Hedgehog
import TreeSitter.Cursor
import TreeSitter.Node
import TreeSitter.Parser
tests :: IO Bool
tests = checkSequential $$(discover)
prop_TSNode_sizeOf = property $
siz... | |
c543df6015042b439c71aac9e6c414a1c8d3596bd1a8d8a94818ef40e0bc1982 | lisp-mirror/cl-tar | extract.lisp | ;;;; This is part of cl-tar. See README.md and LICENSE for more information.
(in-package #:tar-simple-extract)
(defvar *deferred-links*)
(defun simple-extract-archive (archive
&key
(directory *default-pathname-defaults*)
... | null | https://raw.githubusercontent.com/lisp-mirror/cl-tar/8369f16b51dfe04dc68c2ebf146c769d4bc7d471/src/simple-extract/extract.lisp | lisp | This is part of cl-tar. See README.md and LICENSE for more information. |
(in-package #:tar-simple-extract)
(defvar *deferred-links*)
(defun simple-extract-archive (archive
&key
(directory *default-pathname-defaults*)
(absolute-pathnames :error)
(device-pathna... |
4ecbd9321df216f61a77113d57082ce8b6b71f3ebbddd241db2e33b19eca92c4 | lispbuilder/lispbuilder | globals.lisp |
(in-package #:sdl-examples)
| null | https://raw.githubusercontent.com/lispbuilder/lispbuilder/589b3c6d552bbec4b520f61388117d6c7b3de5ab/lispbuilder-sdl/examples/globals.lisp | lisp |
(in-package #:sdl-examples)
| |
081e2231483802bf78e3c7fca9f7b600ffbc53c016c898f46070532977f91082 | lokedhs/cl-rabbit | amqp.lisp | (in-package :cl-rabbit)
(define-condition rabbitmq-error (error)
()
(:documentation "General superclass for rabbitmq errors"))
(define-condition rabbitmq-library-error (rabbitmq-error)
((error-code :type keyword
:initarg :error-code
:reader rabbitmq-library-err... | null | https://raw.githubusercontent.com/lokedhs/cl-rabbit/9603204715bb13f09243dc286c5ad4bd51b4fd7b/src/amqp.lisp | lisp | Send an ack to the server to indicate that the close message was received
API calls
Unwind form (only when an error was thrown)
ELSE: No properties argument
ELSE: body is nil, send a blank struct
Currently disabled, since it leaves the input buffer in an unpredictable state | (in-package :cl-rabbit)
(define-condition rabbitmq-error (error)
()
(:documentation "General superclass for rabbitmq errors"))
(define-condition rabbitmq-library-error (rabbitmq-error)
((error-code :type keyword
:initarg :error-code
:reader rabbitmq-library-err... |
b38cf6aab108799691e26e27d48c353148004dbcb0c5257d2abe8adb62d61c1b | theia-ide/racket-language-server | notifications.rkt | #lang racket/base
(require racket/class
racket/list
racket/match
data/interval-map
"conversion.rkt"
"lsp.rkt"
"jsonrpc.rkt"
"../lang/document.rkt"
"../lang/lexer.rkt")
(define (on-trace doc)
(define doc-text (document->text% doc))
(racket/colo... | null | https://raw.githubusercontent.com/theia-ide/racket-language-server/e397a130676504fc8b053e6b1f48d49b77b9ad98/protocol/notifications.rkt | racket | Publish diagnostics notification
Racket colorize notification | #lang racket/base
(require racket/class
racket/list
racket/match
data/interval-map
"conversion.rkt"
"lsp.rkt"
"jsonrpc.rkt"
"../lang/document.rkt"
"../lang/lexer.rkt")
(define (on-trace doc)
(define doc-text (document->text% doc))
(racket/colo... |
087e2c68151595c25f3fdd75f2d8ae46a4d171f6264b72effa2255b8d27f17c0 | incoherentsoftware/defect-process | AttackProjectile.hs | module Enemy.All.Turret.AttackProjectile
( mkTurretAttackProjectile
) where
import Control.Monad (when)
import Control.Monad.IO.Class (MonadIO)
import Data.Functor ((<&>))
import qualified Data.List as L
import qualified Data.Set as S
import Attack.Hit
import Collision
import Configs
import... | null | https://raw.githubusercontent.com/incoherentsoftware/defect-process/8797aad1d93bff5aadd7226c39a48f45cf76746e/src/Enemy/All/Turret/AttackProjectile.hs | haskell | module Enemy.All.Turret.AttackProjectile
( mkTurretAttackProjectile
) where
import Control.Monad (when)
import Control.Monad.IO.Class (MonadIO)
import Data.Functor ((<&>))
import qualified Data.List as L
import qualified Data.Set as S
import Attack.Hit
import Collision
import Configs
import... | |
ebd81be9e8761e8afd62214ebeab921a8621cfb02c0d01bfdd41fb13ea26cf4a | nikita-volkov/rebase | Num.hs | module Rebase.GHC.Num
(
module GHC.Num
)
where
import GHC.Num
| null | https://raw.githubusercontent.com/nikita-volkov/rebase/7c77a0443e80bdffd4488a4239628177cac0761b/library/Rebase/GHC/Num.hs | haskell | module Rebase.GHC.Num
(
module GHC.Num
)
where
import GHC.Num
| |
7b7daa7a18cc84e42c1ce69fb7c4879965760ec434c765f8ba18e11ac6155b69 | danidiaz/red-black-record | tests.hs | # LANGUAGE DataKinds ,
TypeOperators ,
TypeFamilies ,
TypeApplications ,
DeriveGeneric ,
StandaloneDeriving ,
UndecidableInstances ,
KindSignatures ,
PartialTypeSignatures ,
FlexibleCon... | null | https://raw.githubusercontent.com/danidiaz/red-black-record/e78e315cb7356d0a8f98752cd4e4956f19636e85/tests/tests.hs | haskell | # OPTIONS_GHC -Wno-partial-type-signatures #
same as the order of the cases.
same as the order of the cases.
non-existent entry
we can delete entries that don't exist
we can re-add the exact same entry
sequences of actions for tests
| # LANGUAGE DataKinds ,
TypeOperators ,
TypeFamilies ,
TypeApplications ,
DeriveGeneric ,
StandaloneDeriving ,
UndecidableInstances ,
KindSignatures ,
PartialTypeSignatures ,
FlexibleCon... |
66512892b905b6ec06bca684afe29facb710afd36414ec7a67197e22b15298e1 | emqx/emqx | emqx_ee_connector_redis.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2022 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%--------------------------------------------------------------------
-module(emqx_ee_connector_redis).
-include_lib("emqx/include/logger.hrl").
-include_lib("snabbkaf... | null | https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/lib-ee/emqx_ee_connector/src/emqx_ee_connector_redis.erl | erlang | --------------------------------------------------------------------
--------------------------------------------------------------------
callbacks of behaviour emqx_resource
-------------------------------------------------------------------------------------------------
resource callbacks
------------------------... | Copyright ( c ) 2022 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
-module(emqx_ee_connector_redis).
-include_lib("emqx/include/logger.hrl").
-include_lib("snabbkaffe/include/snabbkaffe.hrl").
-behaviour(emqx_resource).
-export([
callback_mode/0,
on_start/2,
on_stop/2,
on_query/3,
on... |
a472313def0ec9cc37fa748dab673b78a21c570fb78071f1502a14f51e58017e | MaartenFaddegon/Hoed | BreadthFirst2Sound.hs | # LANGUAGE TemplateHaskell , Rank2Types #
import Debug.Hoed.Pure
data Tree a = Node a (Tree a) (Tree a) | Leaf a
$(observedTypes "breadthFirst" [ [t| forall a . Tree a|], [t| forall a . [a] |] ])
breadthFirst :: Tree a -> [a]
breadthFirst = $(observeTempl "breadthFirst") (\tree -> fold [tree])
where
fold [] = []... | null | https://raw.githubusercontent.com/MaartenFaddegon/Hoed/8769d69e309928aab439b22bc3f3dbf5452acc77/examples/BreadthFirst/BreadthFirst2Sound.hs | haskell | # LANGUAGE TemplateHaskell , Rank2Types #
import Debug.Hoed.Pure
data Tree a = Node a (Tree a) (Tree a) | Leaf a
$(observedTypes "breadthFirst" [ [t| forall a . Tree a|], [t| forall a . [a] |] ])
breadthFirst :: Tree a -> [a]
breadthFirst = $(observeTempl "breadthFirst") (\tree -> fold [tree])
where
fold [] = []... | |
36cf51b301b7c63665308af055f96e4e6af75ad97a60658169ca1d8a2b9afff2 | project-oak/hafnium-verification | AbstractInterpreter.mli |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/absint/AbstractInterpreter.mli | ocaml | * type of an intraprocedural abstract interpreter
* invariant map from node id -> state representing postcondition for node id
* compute and return invariant map for the given procedure starting from [initial]
* extract the postcondition for a node id from the given invariant map
* extract the precondition for a no... |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... |
bb86ef076f0bea1b6ab771a417bb47b9ab752d6f1d3c9fca40a40611c2c02394 | TrustInSoft/tis-kernel | collection.mli | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/wp/qed/src/collection.mli | ocaml | ************************************************************************
... | This file is part of .
is a fork of Frama - C. All the differences are :
Copyright ( C ) 2016 - 2017
is released under GPLv2
This file is part of WP plug - in of Frama - C.
Copyright ( C ) 2007 - 2015 ... |
3040d3e952c6d5518aea2eee11a19831fda17fdc95ad7a01ec93b73a843ea669 | soegaard/metapict | histogram.rkt | #lang racket/base
(provide complete-histogram-from-observations
)
(require racket/format
racket/match
racket/list
math/statistics
math/distributions
"arrow.rkt"
"axis.rkt"
"curve.rkt"
"def.rkt"
"device.rkt"
"d... | null | https://raw.githubusercontent.com/soegaard/metapict/47ae265f73cbb92ff3e7bdd61e49f4af17597fdf/metapict/histogram.rkt | racket | draw a box in system s, where (x0,y0) and (x1,y0+h) are opposite corners
convert a list of bounds into a list of domains
Convert a list of bounds bs, to a list of gap sizes.
The gap size of [a;b] is b-a.
Compute the min_b gapsize(b).
start point of interval domain
end point of interval domain
a2 coordinates
Th... | #lang racket/base
(provide complete-histogram-from-observations
)
(require racket/format
racket/match
racket/list
math/statistics
math/distributions
"arrow.rkt"
"axis.rkt"
"curve.rkt"
"def.rkt"
"device.rkt"
"d... |
3e5fef90ee0320b9c8ddca78da429dde018444005e80d6810d2ba75352f93762 | takikawa/racket-ppa | info.rkt | #lang info
(define collection "expander")
(define deps `(["base" #:version "8.4.0.2"]
"zo-lib"
"compiler-lib"))
(define build-deps `("at-exp-lib"))
(define pkg-desc "Racket's implementation of macros, modules, and top-level evaluation")
(define pkg-authors '(mflatt))
| null | https://raw.githubusercontent.com/takikawa/racket-ppa/5f2031309f6359c61a8dfd1fec0b77bbf9fb78df/src/expander/info.rkt | racket | #lang info
(define collection "expander")
(define deps `(["base" #:version "8.4.0.2"]
"zo-lib"
"compiler-lib"))
(define build-deps `("at-exp-lib"))
(define pkg-desc "Racket's implementation of macros, modules, and top-level evaluation")
(define pkg-authors '(mflatt))
| |
83b0c00fd43232437ba123c985804c32fa8f6f309058eb8531ea04e56784667c | rollacaster/sketches | mouse_acceleration.cljs | (ns sketches.nature-of-code.vectors.mouse-acceleration
(:require [quil.core :as q :include-macros true]
[sketches.vector :as v]
[quil.middleware :as md]))
(defn setup []
(q/ellipse-mode :center)
{:acceleration [0 0]
:velocity [0 0]
:location [0 0]})
(defn update-state [{:keys [velo... | null | https://raw.githubusercontent.com/rollacaster/sketches/ba79fccf2a37139de9193ed2ea7a6cc04b63fad0/src/sketches/nature_of_code/vectors/mouse_acceleration.cljs | clojure | (ns sketches.nature-of-code.vectors.mouse-acceleration
(:require [quil.core :as q :include-macros true]
[sketches.vector :as v]
[quil.middleware :as md]))
(defn setup []
(q/ellipse-mode :center)
{:acceleration [0 0]
:velocity [0 0]
:location [0 0]})
(defn update-state [{:keys [velo... | |
b0cf7fcdf7e75889f991de4bec64b54a07c466cf4a57c714097504bb0e10b8ef | avillega/generative-art | 10_print.clj | (ns generative-artistry.10-print
(:require [quil.core :as q]
[generative-artistry.utils :refer :all]
[generative-artistry.draw-utils :refer :all]))
(def step 1)
(defn n-closest-elements [n p points]
(->> points
(sort #(compare (distance p %1) (distance p %2)))
(take n)))
(def... | null | https://raw.githubusercontent.com/avillega/generative-art/cd3be0a40ff9a7972b875df0e9e8f6981e45ee40/src/generative_artistry/10_print.clj | clojure | (ns generative-artistry.10-print
(:require [quil.core :as q]
[generative-artistry.utils :refer :all]
[generative-artistry.draw-utils :refer :all]))
(def step 1)
(defn n-closest-elements [n p points]
(->> points
(sort #(compare (distance p %1) (distance p %2)))
(take n)))
(def... | |
132a6482e5794b73a0ab1f8275e514bdf08c398b7dde4f0f3d6981931462d1be | binaryage/chromex | logging.clj | (ns chromex.logging)
; ---------------------------------------------------------------------------------------------------------------------------
; logging - these need to be macros to preserve source location for devtools
(defmacro log [& args]
`(do (.log js/console ~@args) nil))
(defmacro info [& args]
`(do (... | null | https://raw.githubusercontent.com/binaryage/chromex/33834ba5dd4f4238a3c51f99caa0416f30c308c5/src/lib/chromex/logging.clj | clojure | ---------------------------------------------------------------------------------------------------------------------------
logging - these need to be macros to preserve source location for devtools | (ns chromex.logging)
(defmacro log [& args]
`(do (.log js/console ~@args) nil))
(defmacro info [& args]
`(do (.info js/console ~@args) nil))
(defmacro error [& args]
`(do (.error js/console ~@args) nil))
(defmacro warn [& args]
`(do (.warn js/console ~@args) nil))
(defmacro group [& args]
`(do (.group j... |
f7ba70b7c41942e64d976b4e736190f2400e1143c41f08fdecb88cda6740c970 | fortytools/holumbus | PortRegistryDaemon.hs | -- ----------------------------------------------------------------------------
|
Module : Holumbus . PortRegistryDaemon
Copyright : Copyright ( C ) 2009
License : MIT
Maintainer : ( )
Stability : experimental
Portability : portable
Version : 0.1
This module pr... | null | https://raw.githubusercontent.com/fortytools/holumbus/4b2f7b832feab2715a4d48be0b07dca018eaa8e8/distribution/Programs/PortRegistryDaemon/PortRegistryDaemon.hs | haskell | ----------------------------------------------------------------------------
----------------------------------------------------------------------------
------------------------------------------------------------ |
|
Module : Holumbus . PortRegistryDaemon
Copyright : Copyright ( C ) 2009
License : MIT
Maintainer : ( )
Stability : experimental
Portability : portable
Version : 0.1
This module provides the PortRegistryDeamonm , which is the Portregistry and a server console ... |
61fdb2b87aa947da70cd75efd9e935c496d45adc61f3166d435a25921c6af4f1 | GumTreeDiff/cgum | parsing_stat.ml |
* Copyright 2014 , INRIA
*
* This file is part of Cgen . Much of it comes from Coccinelle , which is
* also available under the GPLv2 license
*
* Cgen is free software : you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free So... | null | https://raw.githubusercontent.com/GumTreeDiff/cgum/8521aa80fcf4873a19e60ce8c846c886aaefb41b/parsing_c/parsing_stat.ml | ocaml | if do .mli:
val print_parsing_stat_list: parsing_stat list -> unit
***************************************************************************
Stat
***************************************************************************
if want to know exactly what was passed through, uncomment:
*
* mutable passing_t... |
* Copyright 2014 , INRIA
*
* This file is part of Cgen . Much of it comes from Coccinelle , which is
* also available under the GPLv2 license
*
* Cgen is free software : you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free So... |
49a936ad9d3d2642cf9985fcf8614e8b18c704631640f9f9f971190ae45cf618 | hyperfiddle/electric | demo_4_webview.cljc | (ns user.demo-4-webview
"Electric fullstack query/view composition with client/server transfer"
(:require #?(:clj [datascript.core :as d])
[hyperfiddle.electric :as e]
[hyperfiddle.electric-dom2 :as dom]
[hyperfiddle.electric-ui4 :as ui]))
; A database backed webview with reacti... | null | https://raw.githubusercontent.com/hyperfiddle/electric/8d7fe2fa540b7e16a38d3d8202dc1790da15cb2b/src-docs/user/demo_4_webview.cljc | clojure | A database backed webview with reactive updates.
The webview is subscribed to the database, which updates with each transaction.
Run a transaction (from the REPL) and see the connected tabs update live.
state survives reload
reactive "database value" | (ns user.demo-4-webview
"Electric fullstack query/view composition with client/server transfer"
(:require #?(:clj [datascript.core :as d])
[hyperfiddle.electric :as e]
[hyperfiddle.electric-dom2 :as dom]
[hyperfiddle.electric-ui4 :as ui]))
:clj (doto (d/create... |
830f03f4fbe82bb46e04b673803d48ebfa26de3ea06b0a551cd3b892e21cd29b | hikettei/cl-waffe | optimizer.lisp |
(in-package :cl-waffe.optimizers)
; modelからParameterの検索をする
(defmacro is-waffe-model (model)
; Parameterの値に、defmodelを介して定義したわけではないが以下のslotを持つ構造体があると積む
`(and (slot-exists-p ,model 'cl-waffe:parameters)
(slot-exists-p ,model 'cl-waffe:hide-from-tree)
(slot-exists-p ,model 'cl-waffe:forward)
... | null | https://raw.githubusercontent.com/hikettei/cl-waffe/534fe4223ea486de6cf57801f041b65ed8594488/source/optimizers/optimizer.lisp | lisp | modelからParameterの検索をする
Parameterの値に、defmodelを介して定義したわけではないが以下のslotを持つ構造体があると積む |
(in-package :cl-waffe.optimizers)
(defmacro is-waffe-model (model)
`(and (slot-exists-p ,model 'cl-waffe:parameters)
(slot-exists-p ,model 'cl-waffe:hide-from-tree)
(slot-exists-p ,model 'cl-waffe:forward)
(slot-exists-p ,model 'cl-waffe:backward)))
(defun find-parameters (model)
(let ((... |
e3ed55fa26de07366b52cdbda04b7fd4ad788a0b5c5b63a4541d7e07e2c8c183 | wies/grasshopper | puf.mli | (**************************************************************************)
(* *)
Copyright ( C )
(* *)
(* This software is free software;... | null | https://raw.githubusercontent.com/wies/grasshopper/108473b0a678f0d93fffec6da2ad6bcdce5bddb9/src/util/puf.mli | ocaml | ************************************************************************
This software is free software; you can redistribute it and/or
described in file LICENSE.... | Copyright ( C )
modify it under the terms of the GNU Library General Public
License version 2.1 , with the special exception on linking
type t
val create : int -> t
val find : t -> int -> int
val union : t -> int -> int -> t
|
4d62a0049e610114f9d2f6005387f9c2098fa4fe3456c1f3b7378b5924d635f4 | ujamjar/hardcaml | verilog_ext.ml |
* hardcaml - hardware design in OCaml
*
* ( c ) 2014 MicroJamJar Ltd
*
* Author(s ):
* Description :
*
* hardcaml - hardware design in OCaml
*
* (c) 2014 MicroJamJar Ltd
*
* Author(s):
* Description:
*
*)
open HardCaml
let write chan circ =
let b = Verilog.write circ in
... | null | https://raw.githubusercontent.com/ujamjar/hardcaml/65f32f543348e81cbb7f6d0e77f1f1203bf4e335/archive/verilog_ext.ml | ocaml | write this module
find instantiations |
* hardcaml - hardware design in OCaml
*
* ( c ) 2014 MicroJamJar Ltd
*
* Author(s ):
* Description :
*
* hardcaml - hardware design in OCaml
*
* (c) 2014 MicroJamJar Ltd
*
* Author(s):
* Description:
*
*)
open HardCaml
let write chan circ =
let b = Verilog.write circ in
... |
3d6a615007a5388231a6660f43612879d5d33fd788ef43ce50f866cddf0687f5 | HachiSecurity/plc-llvm | Monad.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE GeneralisedNewtypeDeriving #
module Hachi.Compiler.CodeGen.Monad (
ConstantTy(..),
CodeGenSt(..),
CodeGen(..),
MonadCodeGen,
mkFresh,
extendScope,
updateEnv,
localFreeVars,
currentFreeVars
) where
-----------------------------------------... | null | https://raw.githubusercontent.com/HachiSecurity/plc-llvm/c99c8d58ec7cbbb8942604338cfde00ad23e7f13/compiler/src/Hachi/Compiler/CodeGen/Monad.hs | haskell | # LANGUAGE ConstraintKinds #
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
| Enumerates all supported types of constants. This would technically be a
great candidate for a data family, but we'd then end up wi... | # LANGUAGE GeneralisedNewtypeDeriving #
module Hachi.Compiler.CodeGen.Monad (
ConstantTy(..),
CodeGenSt(..),
CodeGen(..),
MonadCodeGen,
mkFresh,
extendScope,
updateEnv,
localFreeVars,
currentFreeVars
) where
import Control.Monad.Reader
import Data.IORef
import Data.Kind
import qu... |
ed3aba98950b1328df1e2c7fa37033b86b0e50a123924d4f17f922fe7ea97b41 | cbaggers/rtg-math | non-consing.lisp | (in-package :rtg-math.projection.non-consing)
;;------------------------------------------------------------
Checked against GLM 's perspectiveRH
(defn perspective-radian-fov ((mat-to-mutate mat4)
(width single-float) (height single-float)
(near single-flo... | null | https://raw.githubusercontent.com/cbaggers/rtg-math/29fc5b3d0028a4a11a82355ecc8cca62662c69e0/projection/perspective/non-consing.lisp | lisp | ------------------------------------------------------------
note: is right handed
------------------------------------------------------------ | (in-package :rtg-math.projection.non-consing)
Checked against GLM 's perspectiveRH
(defn perspective-radian-fov ((mat-to-mutate mat4)
(width single-float) (height single-float)
(near single-float) (far single-float)
(fov singl... |
c9a09c8b556e16cd70419de28401d14f5c9e7b58b46c58975508c066b832739a | yetibot/yetibot | sleep.clj | (ns yetibot.commands.sleep
(:require
[taoensso.timbre :refer [info warn error]]
[yetibot.core.hooks :refer [cmd-hook]]))
(def max-sleep 10000)
(defn sleep-cmd
"sleep <n> # sleep for <n> milliseconds up to 10,000"
{:yb/cat #{:util}}
[{:keys [match]}]
(let [wait (min max-sleep (read-string match))]
... | null | https://raw.githubusercontent.com/yetibot/yetibot/2fb5c1182b1a53ab0e433d6bab2775ebd43367de/src/yetibot/commands/sleep.clj | clojure | (ns yetibot.commands.sleep
(:require
[taoensso.timbre :refer [info warn error]]
[yetibot.core.hooks :refer [cmd-hook]]))
(def max-sleep 10000)
(defn sleep-cmd
"sleep <n> # sleep for <n> milliseconds up to 10,000"
{:yb/cat #{:util}}
[{:keys [match]}]
(let [wait (min max-sleep (read-string match))]
... | |
9a55806a9cbae12bc429aa42aba5c4223da62ec706cfb19d342378e7103a753d | racket/gui | delay.rkt | #lang racket/base
(require "../../lock.rkt"
"queue.rkt")
(provide
(protect-out do-request-flush-delay
do-cancel-flush-delay))
;; Auto-cancel schedules a cancel of a request flush
;; on event boundaries. It makes sense if you don't
trust a program to un - delay important refreshes ,
;; but a... | null | https://raw.githubusercontent.com/racket/gui/d1fef7a43a482c0fdd5672be9a6e713f16d8be5c/gui-lib/mred/private/wx/common/delay.rkt | racket | Auto-cancel schedules a cancel of a request flush
on event boundaries. It makes sense if you don't
but auto-cancel is currently disabled because
bad refresh-delay effects are confined to the enclosing
window on all platforms.
in atomic mode | #lang racket/base
(require "../../lock.rkt"
"queue.rkt")
(provide
(protect-out do-request-flush-delay
do-cancel-flush-delay))
trust a program to un - delay important refreshes ,
(define AUTO-CANCEL-DELAY? #f)
(define (do-request-flush-delay win disable enable)
(atomically
(let ([req (... |
8361fe925b0628e06b1904dbab6103feac1544afce95922769cd47c011e81f9f | Cumulus/Cumulus | config_db.ml |
Copyright ( c ) 2012
Permission is hereby granted , free of charge , to any person obtaining a copy of
this software and associated documentation files ( the " Software " ) , to deal in
the Software without restriction , including without limitation the rights to
use , copy , modify , merge , publish , dis... | null | https://raw.githubusercontent.com/Cumulus/Cumulus/3b6de05d76c57d528e052aa382f98e40354cf581/src/base/db/config_db.ml | ocaml |
Copyright ( c ) 2012
Permission is hereby granted , free of charge , to any person obtaining a copy of
this software and associated documentation files ( the " Software " ) , to deal in
the Software without restriction , including without limitation the rights to
use , copy , modify , merge , publish , dis... | |
b59e101906f9ca8c2a49cc2d8d2dbc7663ff70e655921d62e387a1bb53a885c1 | clingen-data-model/genegraph | gene_validity_refactor.clj | (ns genegraph.transform.gene-validity-refactor
(:require [genegraph.database.load :as l]
[genegraph.util :refer [str->bytestream]]
[genegraph.database.query :as q :refer [select construct ld-> ld1-> declare-query]]
[genegraph.transform.types :refer [transform-doc src-path add-model... | null | https://raw.githubusercontent.com/clingen-data-model/genegraph/5f11fdb3aedf763e22f6e3dbcdb6abe367880c61/src/genegraph/transform/gene_validity_refactor.clj | clojure | frontmatter
;; common prefixes
; declare attributes with @id , @vocab types
;; Category names
Case control
segregation
Experimental evidence types
rescue
model systems
functional alteration
;; evidence strength
investigate the use of this
Maybe this should not exist in published records?
Zygosity
SOP ver... | (ns genegraph.transform.gene-validity-refactor
(:require [genegraph.database.load :as l]
[genegraph.util :refer [str->bytestream]]
[genegraph.database.query :as q :refer [select construct ld-> ld1-> declare-query]]
[genegraph.transform.types :refer [transform-doc src-path add-model... |
8e529d47be5e6a8f7588c078b4f5084078c7547735ac0aef2245cf19ddd733ee | 8c6794b6/haskell-sc-scratch | SampleData2.hs | # LANGUAGE NoMonomorphismRestriction #
module SampleData where
import Control.Monad
import Data.Function (fix)
import System.Random
import System.FilePath
import Data.Binary (encode, decode)
import Sound.OpenSoundControl
import Sound.SC3
import Sound.SC3.ID
import Sound.SC3.Lepton
import Sound.SC3.Lepton.Pattern.Cli... | null | https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/Scratch/Misc/SampleData2.hs | haskell | ,("freq",
----------------------------------------------------------------------------
Communicating with pattern server
----------------------------------------------------------------------------
Testing behaviour of finite patterns
----------------------------------------------------------------------------
Fini... | # LANGUAGE NoMonomorphismRestriction #
module SampleData where
import Control.Monad
import Data.Function (fix)
import System.Random
import System.FilePath
import Data.Binary (encode, decode)
import Sound.OpenSoundControl
import Sound.SC3
import Sound.SC3.ID
import Sound.SC3.Lepton
import Sound.SC3.Lepton.Pattern.Cli... |
df6a54136d987eaaf7da026d696fbec70e372c3aa53eda5a21364a4fee630aef | earl-ducaine/cl-garnet | run-pixmap-lab.lisp |
(defpackage :pixmap-lab
(:use :common-lisp :kr)
(:export do-go do-stop))
(in-package :pixmap-lab)
(defun draw-triangle-on-window ()
(do-go)
(let ((my-array
(dotimes (i (* 50 50))
(gem::draw-on-window
top-win
i
(list
(row-major-aref my-array (* i 3))
(row-major-aref my-ar... | null | https://raw.githubusercontent.com/earl-ducaine/cl-garnet/f0095848513ba69c370ed1dc51ee01f0bb4dd108/bone-yard/run-pixmap-lab.lisp | lisp | (defun run-draw-on-window () |
(defpackage :pixmap-lab
(:use :common-lisp :kr)
(:export do-go do-stop))
(in-package :pixmap-lab)
(defun draw-triangle-on-window ()
(do-go)
(let ((my-array
(dotimes (i (* 50 50))
(gem::draw-on-window
top-win
i
(list
(row-major-aref my-array (* i 3))
(row-major-aref my-ar... |
ec24443b2c6b40e14035780d0025af7a0dde5ff02633d6213dd6afdb6655f301 | simonmar/parconc-examples | parlist.hs | module ParList where
import Control.Parallel.Strategies hiding (parList, evalList)
-- <<evalList
evalList :: Strategy a -> Strategy [a]
evalList strat [] = return []
evalList strat (x:xs) = do
x' <- strat x
xs' <- evalList strat xs
return (x':xs')
-- >>
-- <<parList
parList :: Strategy a -> Strategy [a]
p... | null | https://raw.githubusercontent.com/simonmar/parconc-examples/840a3f508f9bb6e03961e1b90311a1edd945adba/parlist.hs | haskell | <<evalList
>>
<<parList
>> | module ParList where
import Control.Parallel.Strategies hiding (parList, evalList)
evalList :: Strategy a -> Strategy [a]
evalList strat [] = return []
evalList strat (x:xs) = do
x' <- strat x
xs' <- evalList strat xs
return (x':xs')
parList :: Strategy a -> Strategy [a]
parList strat = evalList (rparWith... |
f6eb62c62330a47ab986e720c45fcee19c7a592a8b74ff7917392c73980439ec | dhruvp/angular-phonecat-re-frame | server.clj | (ns phonecat-re-frame.server
(:require [phonecat-re-frame.handler :refer [app]]
[ring.adapter.jetty :refer [run-jetty]])
(:gen-class))
(defn -main [& args]
(let [port (Integer/parseInt (or (System/getenv "PORT") "3000"))]
(run-jetty app {:port port :join? false})))
| null | https://raw.githubusercontent.com/dhruvp/angular-phonecat-re-frame/f2410203ce1c0946058544099f2d3556280b48de/src/clj/phonecat_re_frame/server.clj | clojure | (ns phonecat-re-frame.server
(:require [phonecat-re-frame.handler :refer [app]]
[ring.adapter.jetty :refer [run-jetty]])
(:gen-class))
(defn -main [& args]
(let [port (Integer/parseInt (or (System/getenv "PORT") "3000"))]
(run-jetty app {:port port :join? false})))
| |
3049e46d62642a028cade13286a665b0c3a13f095016be655c99959c0b2921d2 | 15Galan/asignatura-204 | LinearStack.hs | -------------------------------------------------------------------------------
-- Last-In First-Out Stack
--
Data Structures . en Informática . UMA .
, 2012
-------------------------------------------------------------------------------
module DataStructures.Stack.LinearStack
( Stack
, empty
, isEmpty
... | null | https://raw.githubusercontent.com/15Galan/asignatura-204/894f33ff8e0f52a75d8f9ff15155c656f1a8f771/Recursos/data.structures/haskell/DataStructures/Stack/LinearStack.hs | haskell | -----------------------------------------------------------------------------
Last-In First-Out Stack
-----------------------------------------------------------------------------
Showing a stack
Stack equality | Data Structures . en Informática . UMA .
, 2012
module DataStructures.Stack.LinearStack
( Stack
, empty
, isEmpty
, push
, pop
, top
) where
import Data.List(intercalate)
import Test.QuickCheck
data Stack a = Empty | Node a (Stack a)
empty :: Stack a
empty = Empty
isEmpty :: Stack a -> Bool
i... |
8f22b282c1b1c612e721f98282f30d16c69a371055890a1b58ad82b9f2e99d64 | remyzorg/pendulum | main_example.ml | open Firebug
let error f = Printf.ksprintf
(fun s -> Firebug.console##error (Js.string s); failwith s) f
let debug f = Printf.ksprintf
(fun s -> Firebug.console##log(Js.string s)) f
let alert f = Printf.ksprintf
(fun s -> Dom_html.window##alert(Js.string s); failwith s) f
let (@>) s coerce =
Js.Opt.get ... | null | https://raw.githubusercontent.com/remyzorg/pendulum/a532681c6f99d77129e31fbe27cc56c396a7c63c/examples/checksubmit/main_example.ml | ocaml | open Firebug
let error f = Printf.ksprintf
(fun s -> Firebug.console##error (Js.string s); failwith s) f
let debug f = Printf.ksprintf
(fun s -> Firebug.console##log(Js.string s)) f
let alert f = Printf.ksprintf
(fun s -> Dom_html.window##alert(Js.string s); failwith s) f
let (@>) s coerce =
Js.Opt.get ... | |
76f93d42fbf0399d4c92038040365b7e3f857ec1972c64c9826f2e55f00d37c5 | evturn/haskellbook | notes.hs | -- `do` notation
-- main = do
[ 1 ]
-- x1 <- getLine
[ 2 ] [ 3 ] [ 4 ]
-- x2 <- getLine
[ 5 ]
-- return (x1 ++ x2)
[ 6 ] [ 7 ]
1 . ` do ` introduces the block of IO actions .
2 . ` x1 ` is a variable representing the value obtained from the IO action ` getLine `
3 . ` < - `... | null | https://raw.githubusercontent.com/evturn/haskellbook/3d310d0ddd4221ffc5b9fd7ec6476b2a0731274a/13/notes.hs | haskell | `do` notation
main = do
x1 <- getLine
x2 <- getLine
return (x1 ++ x2)
the string the user inputs will be the value bound to the `x1` name. |
[ 1 ]
[ 2 ] [ 3 ] [ 4 ]
[ 5 ]
[ 6 ] [ 7 ]
1 . ` do ` introduces the block of IO actions .
2 . ` x1 ` is a variable representing the value obtained from the IO action ` getLine `
3 . ` < - ` binds the variable on the left to the result of the IO action on the right .
4 . ` g... |
7b77489542f70c13fef0b5e82c9065221b4f24037b73b2ea64df97410bf32c8d | hiroshi-unno/coar | TB_Classifier.ml | open Core
open Common
open Common.Ext
open Common.Util
open Ast
open Ast.LogicOld
open PCSatCommon
open Template.Function
module Config = struct
type kind =
| Ord_DNF of Template.PredicateDNF.Config.t ext_file
| Ord_Flex of Template.PredicateFlex.Config.t ext_file
| WF of Template.WFPredicate.Config.t ex... | null | https://raw.githubusercontent.com/hiroshi-unno/coar/90a23a09332c68f380efd4115b3f6fdc825f413d/lib/PCSat/classification/TB_Classifier.ml | ocaml | TODO : generate fenv
TODO:generate qdeps
let quals = TruthTable.qualifiers tt in
(Set.Poly.to_list quals)
Debug.print @@ lazy (ExAtom.str_of atom ^ " on " ^ Formula.str_of phi ^ " couldn't be evaluated. This may cause a violation of the progress property.");
parameters of parametric candidate | open Core
open Common
open Common.Ext
open Common.Util
open Ast
open Ast.LogicOld
open PCSatCommon
open Template.Function
module Config = struct
type kind =
| Ord_DNF of Template.PredicateDNF.Config.t ext_file
| Ord_Flex of Template.PredicateFlex.Config.t ext_file
| WF of Template.WFPredicate.Config.t ex... |
88bb5c2e8a6c51a8d3b22342b771f3285f4282939c85c3c223fff8e8bc22a144 | tiensonqin/lymchat | report.clj | (ns api.handler.report
(:require [api
[schemas :refer :all]
[util :refer [doc]]]
[api.db
[report :as report]
[util :refer [default-db]]]
[api.services.slack :refer [error]]
[environ-plus.core :refer [env]]
[plumbing.co... | null | https://raw.githubusercontent.com/tiensonqin/lymchat/824026607d30c12bc50afb06f677d1fa95ff1f2f/api/src/api/handler/report.clj | clojure | (ns api.handler.report
(:require [api
[schemas :refer :all]
[util :refer [doc]]]
[api.db
[report :as report]
[util :refer [default-db]]]
[api.services.slack :refer [error]]
[environ-plus.core :refer [env]]
[plumbing.co... | |
9359e78f0b82472180dad26b36d0da4494d3f3fb21a6337f2ae9a974cfdeb89f | larandaA/hgraphs | Mst.hs | module Data.Graph.Abstract.Algorithm.Mst
( kruskal, prim
) where
import Control.Monad
import Data.Graph.Abstract (Graph)
import Data.Graph.Abstract.Accessor
import qualified Data.Graph.Abstract.Accessor.Algorithm.Mst as Mst
markEdges :: [Edge s] -> Accessor s e v (Graph Bool v)
markEdges es = do
... | null | https://raw.githubusercontent.com/larandaA/hgraphs/322b5cdfafbae851b4251c907e2c81b82cf02d4a/src/Data/Graph/Abstract/Algorithm/Mst.hs | haskell | module Data.Graph.Abstract.Algorithm.Mst
( kruskal, prim
) where
import Control.Monad
import Data.Graph.Abstract (Graph)
import Data.Graph.Abstract.Accessor
import qualified Data.Graph.Abstract.Accessor.Algorithm.Mst as Mst
markEdges :: [Edge s] -> Accessor s e v (Graph Bool v)
markEdges es = do
... | |
feb76768e5d7945caf9a953a8ba89e75e756beadd21712031dd54bd76cf8d634 | davdar/maam | DerivingJoinLattice.hs | module FP.DerivingJoinLattice where
import FP.Core
import FP.TH
import Language.Haskell.TH
-- makeJoinLatticeLogic [C, D] ty [a, b] con [f1ty, f2ty] := [|
instance ( JoinLattice f1ty , JoinLattice f2ty ) = > JoinLattice ( ty a b ) where
-- bot = con null null
con x1 x2 \/ con y1 y2 = con ( x1 \/ y1 ) ( ... | null | https://raw.githubusercontent.com/davdar/maam/2cc3ff3511a7a4daadcd44c60c4b08862c01e183/src/FP/DerivingJoinLattice.hs | haskell | makeJoinLatticeLogic [C, D] ty [a, b] con [f1ty, f2ty] := [|
bot = con null null
|] | module FP.DerivingJoinLattice where
import FP.Core
import FP.TH
import Language.Haskell.TH
instance ( JoinLattice f1ty , JoinLattice f2ty ) = > JoinLattice ( ty a b ) where
con x1 x2 \/ con y1 y2 = con ( x1 \/ y1 ) ( x2 \/ y2 )
makeJoinLatticeLogic :: (Monad m, MonadQ m) => Cxt -> Name -> [TyVarBndr] -> Nam... |
fc4981354076c84c615e7fbbc909b23e63d0112aea40fe3a60dece5c505fbcdd | VoyagerInnovations/esmpp | esmpp_status.erl | @private This contains the atom equivalents of all SMPP statuses
-module(esmpp_status).
-include("command_statuses.hrl").
-export([
to_atom/1
]).
@private
to_atom(?ESME_ROK) -> ok;
to_atom(?ESME_RINVMSGLEN) -> invalid_message_length;
to_atom(?ESME_RINVCMDLEN) -> invalid_command_length;... | null | https://raw.githubusercontent.com/VoyagerInnovations/esmpp/708875621f6456a93a3002612423fd68d85ffe82/src/esmpp_status.erl | erlang | @private This contains the atom equivalents of all SMPP statuses
-module(esmpp_status).
-include("command_statuses.hrl").
-export([
to_atom/1
]).
@private
to_atom(?ESME_ROK) -> ok;
to_atom(?ESME_RINVMSGLEN) -> invalid_message_length;
to_atom(?ESME_RINVCMDLEN) -> invalid_command_length;... | |
4ea733b21a5a08e21fc148a871459084e1d7ea33eca2c2f371533ab1438ce210 | aprolog-lang/aprolog | types.mli | Alpha - Prolog
(* Basic type definitions shared among several modules *)
type var = Var.var;;
type name = Var.var;;
type sym = string;;
type name_sort = Nstbl.path;;
type data_sort = Nstbl.path;;
type kind = TypeK
| NameK (* illegal as result kind *)
| ArrowK of kind * kind
;;
type ty = IdTy of Nstbl.path
... | null | https://raw.githubusercontent.com/aprolog-lang/aprolog/410327a615919eb6827d71661e69de14279b8c50/src/types.mli | ocaml | Basic type definitions shared among several modules
illegal as result kind | Alpha - Prolog
type var = Var.var;;
type name = Var.var;;
type sym = string;;
type name_sort = Nstbl.path;;
type data_sort = Nstbl.path;;
type kind = TypeK
| ArrowK of kind * kind
;;
type ty = IdTy of Nstbl.path
| NameTy of name_sort
| DataTy of data_sort * ty list
| UnitTy
| PairTy of ty * ty
| Ab... |
b009195cae7a0dee3a3a2824d173525ad1e36780c204bd1a97a0225f190c696a | input-output-hk/ouroboros-network | ChainDB.hs | {-# LANGUAGE DeriveTraversable #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE RecordWildCards #
{-# LANGUAGE TypeFamilies #-}
module Test.Util.ChainDB (
MinimalChainDbArgs (..)
, NodeDBs (..)
, emptyNodeDBs
, fromMinimalChainDbArgs
, mkTestChunkInfo
) where
import Control.Tracer (null... | null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/358880057f1d6d86cc385e8475813ace3b9ebef6/ouroboros-consensus-test/src/Test/Util/ChainDB.hs | haskell | # LANGUAGE DeriveTraversable #
# LANGUAGE TypeFamilies #
| A vector with an element for each database of a node
| Minimal set of arguments for creating a ChainDB instance for testing purposes.
^ Specifies the layout of the ImmutableDB on disk.
^ The initial ledger state.
^ Keeps track of non-lexically scoped... | # LANGUAGE FlexibleContexts #
# LANGUAGE RecordWildCards #
module Test.Util.ChainDB (
MinimalChainDbArgs (..)
, NodeDBs (..)
, emptyNodeDBs
, fromMinimalChainDbArgs
, mkTestChunkInfo
) where
import Control.Tracer (nullTracer)
import Data.Functor.Identity (Identity)
import ... |
d31dce2d9eaf5444dbe25ffb34770a40fbc6b9d49ec5e20e315ab20d2954fa8e | BinaryAnalysisPlatform/bap | x86_env.ml | open Core_kernel[@@warning "-D"]
open Bap.Std
open X86_types
type multimodereg = { v32: var; v64: var }
let gv mode { v32; v64 } = match mode with
| X86 -> v32
| X8664 -> v64
(* new multi-mode variable *)
let nmv n32 t32 n64 t64 = { v32=Var.create n32 t32; v64=Var.create n64 t64; }
(* registers *)
let rbp = nm... | null | https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/253afc171bbfd0fe1b34f6442795dbf4b1798348/lib/x86_cpu/x86_env.ml | ocaml | new multi-mode variable
registers
XXX why is eip here?
XXX why is eflags here?
segment registers let bases
condition flag bits
floating point registers
prefix names
Prefixes that we can usually handle automatically
* registers
* segment registers let bases
r8 -> r15
* registers
* segment register... | open Core_kernel[@@warning "-D"]
open Bap.Std
open X86_types
type multimodereg = { v32: var; v64: var }
let gv mode { v32; v64 } = match mode with
| X86 -> v32
| X8664 -> v64
let nmv n32 t32 n64 t64 = { v32=Var.create n32 t32; v64=Var.create n64 t64; }
let rbp = nmv "EBP" reg32_t "RBP" reg64_t
let rsp = nmv "E... |
456a787c8803d924e4d2e62eb37d9296f1d8aee330a4b2cdc3eaa57892a780ce | nrnrnr/qc-- | ast.mli | (*
Machine generated. Edit at your own risk
Reproduce with the following
--line_width=74
--no_action=false
--output_directory=.
--pickler=sexp
--view=OCaml
*)
(* module type Ast*)
type name = (StdPrims.std_string)
and conv = (StdPrims.std_string)
and hint = (StdPrims.std_string)
and reg = (StdPrims.s... | null | https://raw.githubusercontent.com/nrnrnr/qc--/ec56191b669729e7ce8181a2bd97a912842ea716/gen/ast.mli | ocaml |
Machine generated. Edit at your own risk
Reproduce with the following
--line_width=74
--no_action=false
--output_directory=.
--pickler=sexp
--view=OCaml
module type Ast | type name = (StdPrims.std_string)
and conv = (StdPrims.std_string)
and hint = (StdPrims.std_string)
and reg = (StdPrims.std_string)
and target = (StdPrims.std_string)
and alias_set = (StdPrims.std_string)
and size = (StdPrims.std_int)
and align = (StdPrims.std_int)
and aligned = (StdPrims.std_int)
a... |
c8836e2dc62ab697721de2c137ea29a979ebceb663bf2b4c3fceea6ed9597afa | JHU-PL-Lab/jaylang | neg1.ml | let g (x:int) (y:unit) = x
let twice f (x:unit->int) (y:unit) = f (f x) y
let neg x (y:unit) = - x ()
let main n =
if n>=0 then
let z = twice neg (g n) () in
assert (z>=0)
else ()
| null | https://raw.githubusercontent.com/JHU-PL-Lab/jaylang/484b3876986a515fb57b11768a1b3b50418cde0c/benchmark/cases/mochi_origin/mochi/neg1.ml | ocaml | let g (x:int) (y:unit) = x
let twice f (x:unit->int) (y:unit) = f (f x) y
let neg x (y:unit) = - x ()
let main n =
if n>=0 then
let z = twice neg (g n) () in
assert (z>=0)
else ()
| |
48c44530569b875cc3840008c758050cda034b9c0f0a8baf01459ff980bf74ab | clojurecademy/clojurecademy | config.clj | (ns clojurecademy.util.config
(:refer-clojure :exclude [get])
(:require [clojure.java.io :as io]
[cpath-clj.core :as cp]))
(def conf (atom nil))
(def clojure-jobs (atom nil))
(defn init!
[]
(doseq [[path uris] (cp/resources (io/resource "config.edn"))
:let [uri (first uris)]]
(rese... | null | https://raw.githubusercontent.com/clojurecademy/clojurecademy/97dc7f9b91a90a3f30ca5a3de88542c90a50ce01/src/clj/clojurecademy/util/config.clj | clojure | (ns clojurecademy.util.config
(:refer-clojure :exclude [get])
(:require [clojure.java.io :as io]
[cpath-clj.core :as cp]))
(def conf (atom nil))
(def clojure-jobs (atom nil))
(defn init!
[]
(doseq [[path uris] (cp/resources (io/resource "config.edn"))
:let [uri (first uris)]]
(rese... | |
395096a05b5b94f48988bf954ac0b931c7da0f3df81a33d8a483ef93b7655411 | mcimini/Gradualizer | TypeSystemForCC.hs | module TypeSystemForCC where
import TypeSystem
import Static
dyntype :: Term
dyntype = (Constructor "dyn" [])
blame :: Term -> Term
blame label = (Constructor "blame" [label])
typeOfCC :: String
typeOfCC = typeOf ++ "CC"
sig_castCalculus :: [SignatureEntry]
sig_castCalculus = [Decl typeOfCC "o" Nothing Nothing [Si... | null | https://raw.githubusercontent.com/mcimini/Gradualizer/9868c18590d6fc864f69b8136ac24616cb5df8ff/TypeSystemForCC.hs | haskell | module TypeSystemForCC where
import TypeSystem
import Static
dyntype :: Term
dyntype = (Constructor "dyn" [])
blame :: Term -> Term
blame label = (Constructor "blame" [label])
typeOfCC :: String
typeOfCC = typeOf ++ "CC"
sig_castCalculus :: [SignatureEntry]
sig_castCalculus = [Decl typeOfCC "o" Nothing Nothing [Si... | |
82771d01ab34dfcd925add3d1473be6c2f1a79c196950a0eb6d1c2db3d751469 | lambdacube3d/lambdacube-quake3 | Material.hs | # LANGUAGE DeriveGeneric , StandaloneDeriving , TypeSynonymInstances , FlexibleInstances #
module GameEngine.Data.Material where
import Data.Binary
import GHC.Generics (Generic)
import LambdaCube.Linear
type Vec3 = V3 Float
type Vec4 = V4 Float
data Entity
= Entity
{ eAmbientLight :: Vec4
, eDirecte... | null | https://raw.githubusercontent.com/lambdacube3d/lambdacube-quake3/2fbc17eeea7567f2876d86a7ccce4bd8c8e1927c/game-engine/GameEngine/Data/Material.hs | haskell | default: front
parser internals
parser internals | # LANGUAGE DeriveGeneric , StandaloneDeriving , TypeSynonymInstances , FlexibleInstances #
module GameEngine.Data.Material where
import Data.Binary
import GHC.Generics (Generic)
import LambdaCube.Linear
type Vec3 = V3 Float
type Vec4 = V4 Float
data Entity
= Entity
{ eAmbientLight :: Vec4
, eDirecte... |
81931156bf123c29ac208729806f9cb5be379ca7d34d9526593cf619b32bab8e | ndmitchell/shake | Pool.hs | # LANGUAGE TupleSections #
| Thread pool implementation . The three names correspond to the following
-- priority levels (highest to lowest):
--
-- * 'addPoolException' - things that probably result in a build error,
-- so kick them off quickly.
--
-- * 'addPoolResume' - things that started, blocked, and may hav... | null | https://raw.githubusercontent.com/ndmitchell/shake/99c5a7a4dc1d5a069b13ed5c1bc8e4bc7f13f4a6/src/General/Pool.hs | haskell | priority levels (highest to lowest):
* 'addPoolException' - things that probably result in a build error,
so kick them off quickly.
* 'addPoolResume' - things that started, blocked, and may have open
resources in their closure.
* 'addPoolStart' - rules that haven't yet started.
-------------------------... | # LANGUAGE TupleSections #
| Thread pool implementation . The three names correspond to the following
* ' addPoolBatch ' - rules that might batch if other rules start first .
module General.Pool(
Pool, runPool,
addPool, PoolPriority(..),
increasePool, keepAlivePool
) where
import Control.Concurren... |
6ae7e04f5187b73eaa41651cce34400adf5a894d6398ce88b9b1fa24c2821dbe | CryptoKami/cryptokami-core | Delegation.hs | | Reexport module
# OPTIONS_GHC -F -pgmF autoexporter #
| null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/delegation/src/Pos/Delegation.hs | haskell | | Reexport module
# OPTIONS_GHC -F -pgmF autoexporter #
| |
966465b09691ca1fcf69e75c4be8af582b2b96d3f5580cfd09c7b9ad418afb11 | kanru/cl-mustache | ci.lisp | ;;;; ci.lisp --- CI Script
Copyright ( C ) 2013 ( 陳侃如 )
Author(s ): ( 陳侃如 ) < >
;;; Permission is hereby granted, free of charge, to any person obtaining a
;;; copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction , including without l... | null | https://raw.githubusercontent.com/kanru/cl-mustache/f5501e4372900813a9be4a557764b41636a7e250/t/ci.lisp | lisp | ci.lisp --- CI Script
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
the rights to use, copy, modify, merge, publish, distribute, sublicense,
Software is furnished to do so, subject to the following conditions:
The... |
Copyright ( C ) 2013 ( 陳侃如 )
Author(s ): ( 陳侃如 ) < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WIT... |
ef59f24400f5342ef47464adf99f45ab0b1f683a24b0fa25d1e2a6dad574ddca | samrushing/irken-compiler | t28.scm | ;; -*- Mode: Irken -*-
(define x (:thing 1 2 #\A))
(define y (:other "testing"))
(define myfun
(:thing _ two _) -> two
(:other _) -> 19
)
(:zorb
(myfun x)
(myfun y)
(myfun (:thing 7 12 #\X))
)
| null | https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/vm/tests/t28.scm | scheme | -*- Mode: Irken -*- |
(define x (:thing 1 2 #\A))
(define y (:other "testing"))
(define myfun
(:thing _ two _) -> two
(:other _) -> 19
)
(:zorb
(myfun x)
(myfun y)
(myfun (:thing 7 12 #\X))
)
|
a69b9497e492aae9d04fe4b9b7e23481f4dc1b9422e5ab2762b86aff41182ee5 | pfdietz/ansi-test | adjust-array.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sun Feb 15 07:27:22 2004
;;;; Contains: Tests of ADJUST-ARRAY
(defun listify-form (form)
(cond
((integerp form) `'(,form))
((null form) nil)
((and (consp form)
(eq (car form) 'quote)
(consp (cadr form)))
form)
(t `(let ((x ,for... | null | https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/arrays/adjust-array.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of ADJUST-ARRAY
2-d arrays
Adjust an adjustable array
Strings
2-d arrays
2-d arrays
Adjustable bit vector tests
FIXNME float array tests
Error cases | Author :
Created : Sun Feb 15 07:27:22 2004
(defun listify-form (form)
(cond
((integerp form) `'(,form))
((null form) nil)
((and (consp form)
(eq (car form) 'quote)
(consp (cadr form)))
form)
(t `(let ((x ,form)) (if (listp x) x (list x))))))
(defmacro def-adjust-arra... |
1bc58f2715c75d31ed7cf3a553f002d0431826de56538d6f3c3e60715dd610c6 | ktakashi/sagittarius-scheme | ecdsa.scm | -*- mode : scheme ; coding : utf-8 ; -*-
;;;
;;; sagittarius/crypto/keys/operations/asymmetric/ecdsa.scm - ECDSA key op
;;;
Copyright ( c ) 2022 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;;... | null | https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/3a973b75337ff83f421f8eedcb6de544d78fb583/ext/crypto/sagittarius/crypto/keys/operations/asymmetric/ecdsa.scm | scheme | coding : utf-8 ; -*-
sagittarius/crypto/keys/operations/asymmetric/ecdsa.scm - ECDSA key op
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above cop... | Copyright ( c ) 2022 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
#!nounbound
(library (sagittarius crypto keys opera... |
1a0953176547468b336fc87cadd52c756e2df2523a2764da639d1136ce0c0401 | bos/rwh | dynexc.hs | {-- snippet sqlerror --}
ch20 / dynexc.hs
{-# LANGUAGE DeriveDataTypeable #-}
import Data.Dynamic
import Control.Exception
data SqlError = SqlError {seState :: String,
seNativeError :: Int,
seErrorMsg :: String}
deriving (Eq, Show, Read, Typeable)... | null | https://raw.githubusercontent.com/bos/rwh/7fd1e467d54aef832f5476ebf5f4f6a898a895d1/examples/ch20/dynexc.hs | haskell | - snippet sqlerror -
# LANGUAGE DeriveDataTypeable #
- /snippet sqlerror -
- snippet catch -
| Like 'catchSql', with the order of arguments reversed.
- /snippet catch
- snippet handleSqlError -
- /snippet handleSqlError -
- snippet throwSql -
- /snippet throwSql - | ch20 / dynexc.hs
import Data.Dynamic
import Control.Exception
data SqlError = SqlError {seState :: String,
seNativeError :: Int,
seErrorMsg :: String}
deriving (Eq, Show, Read, Typeable)
| Execute the given IO action .
If it raises a ' SqlEr... |
98e43dff60d54f00866063d113d168a9a11a9e668e1d2a18fe9815d533a30659 | garrigue/lablgl | glut.ml | (* ==== types ==== *)
type button_t =
| LEFT_BUTTON
| MIDDLE_BUTTON
| RIGHT_BUTTON
| OTHER_BUTTON of int
type mouse_button_state_t =
| DOWN
| UP
type special_key_t =
| KEY_F1
| KEY_F2
| KEY_F3
| KEY_F4
| KEY_F5
| KEY_F6
| KEY_F7
| KEY_F8
| KEY_F9
| KEY_... | null | https://raw.githubusercontent.com/garrigue/lablgl/d76e4ac834b6d803e7a6c07c3b71bff0e534614f/LablGlut/src/glut.ml | ocaml | ==== types ====
directional keys
for undefined keys
| DISPLAY_MODE_POSSIBLE : use getBool
same as in glut.h
| LAYER_IN_USE : use layerGetInUse
| TRANSPARENT_INDEX : use layerGetTransparentIndex
Basic arrows.
Symbolic cursor shapes.
Directional cursors.
Sizing cursors.
inherit cursor from parent w... |
type button_t =
| LEFT_BUTTON
| MIDDLE_BUTTON
| RIGHT_BUTTON
| OTHER_BUTTON of int
type mouse_button_state_t =
| DOWN
| UP
type special_key_t =
| KEY_F1
| KEY_F2
| KEY_F3
| KEY_F4
| KEY_F5
| KEY_F6
| KEY_F7
| KEY_F8
| KEY_F9
| KEY_F10
| KEY_F11
... |
8d001eeffe9504b05f0f161b184d7e2124cdea226447bcae890197dba1c07292 | dinosaure/art | fiber.mli | type 'a t
type 'a ivar
val return : 'a -> 'a t
val ( >>= ) : 'a t -> ('a -> 'b t) -> 'b t
val ( >>| ) : 'a t -> ('a -> 'b) -> 'b t
val ( >>> ) : unit t -> unit t -> unit t
val both : 'a t -> 'b t -> ('a * 'b) t
val fork : (unit -> 'a t) -> 'a ivar t
val fork_and_join : (unit -> 'a t) -> (unit -> 'b t) -> ('a * ... | null | https://raw.githubusercontent.com/dinosaure/art/40af4c34a2e2ec9632cb73a74ac2ec0fd7f62a81/test/fiber.mli | ocaml | type 'a t
type 'a ivar
val return : 'a -> 'a t
val ( >>= ) : 'a t -> ('a -> 'b t) -> 'b t
val ( >>| ) : 'a t -> ('a -> 'b) -> 'b t
val ( >>> ) : unit t -> unit t -> unit t
val both : 'a t -> 'b t -> ('a * 'b) t
val fork : (unit -> 'a t) -> 'a ivar t
val fork_and_join : (unit -> 'a t) -> (unit -> 'b t) -> ('a * ... | |
87f1fc5d42c62edec09bc7537e739a561c6dd478c11a55347f7c58cbb9a0228a | metachord/mctrace | mctrace_server.erl | -*- Mode : Erlang ; tab - width : 2 -*-
%%%-------------------------------------------------------------------
@author < >
( C ) 2011 ,
%%% @doc
%%%
%%% @end
Created : 9 May 2011 by < >
%%%-------------------------------------------------------------------
-module(mctrace_server).
-author('Maxim Tre... | null | https://raw.githubusercontent.com/metachord/mctrace/7f65a23aed2c714a84f2e42c915bfdf0c1e356cd/src/mctrace_server.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API
gen_server callbacks
Store to ETS
so handle it in that way
SEND
Use process own behaviour if behaviour of destination is unknown
Ignore
RECEIVE
Remove from ET... | -*- Mode : Erlang ; tab - width : 2 -*-
@author < >
( C ) 2011 ,
Created : 9 May 2011 by < >
-module(mctrace_server).
-author('Maxim Treskin <>').
-include("mctrace.hrl").
-behaviour(gen_server).
-export([
start/0,
init_tracing/1,
terminate_tracing/0
]).
-expor... |
cc9ed9773473f6bf7b0236a98a6b6a0a06a642909346f084d83a9932c5e1329e | Eonblast/Scalaxis | rt_SUITE_rt_chord.erl | 2010 - 2011 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
di... | null | https://raw.githubusercontent.com/Eonblast/Scalaxis/10287d11428e627dca8c41c818745763b9f7e8d4/test/rt_SUITE_rt_chord.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 - 2011 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(rt_SUITE_rt_chord).
-author('').
-vsn('$Id$').
-compile(export_all).
-include("unittest.hrl").
-include("sc... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.