_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 |
|---|---|---|---|---|---|---|---|---|
ada6ab6818a8ff9aac461caf5a53bcb7ab50af4f4a6416fbcaa299a69121cc27 | cachix/cachix | Orphans.hs | # OPTIONS_GHC -Wno - orphans #
module Cachix.Client.Config.Orphans where
import qualified Dhall
import qualified Dhall.Core
import Protolude hiding (toS)
import Protolude.Conv
import Servant.Auth.Client
instance Dhall.FromDhall Token where
autoWith _ = Dhall.strictText {Dhall.extract = ex}
where
ex (Dhal... | null | https://raw.githubusercontent.com/cachix/cachix/4c9397689598a3f2ea6123ddc556a105fe7b4c9c/cachix/src/Cachix/Client/Config/Orphans.hs | haskell | # OPTIONS_GHC -Wno - orphans #
module Cachix.Client.Config.Orphans where
import qualified Dhall
import qualified Dhall.Core
import Protolude hiding (toS)
import Protolude.Conv
import Servant.Auth.Client
instance Dhall.FromDhall Token where
autoWith _ = Dhall.strictText {Dhall.extract = ex}
where
ex (Dhal... | |
4f348fc0afce7824acd5bd938915914dadd97d087449d96f95727811f1ed0127 | IBM/wcs-ocaml | context_spel.ml |
* This file is part of the Watson Conversation Service OCaml API project .
*
* Copyright 2016 - 2017 IBM Corporation
*
* 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... | null | https://raw.githubusercontent.com/IBM/wcs-ocaml/b237b7057f44caa09d36e466be015e2bc3173dd5/wcs-lib/context_spel.ml | ocaml | * Context utilities. |
* This file is part of the Watson Conversation Service OCaml API project .
*
* Copyright 2016 - 2017 IBM Corporation
*
* 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... |
17a606cc75f6dfaa02878bdf12702a7489f2ab3b3823f95c481af48cd6ea5238 | fukamachi/.lem | 10-vi.lisp | (defpackage #:lem-my-init/modes/vi
(:use #:cl
#:lem
#:lem-vi-mode))
(in-package #:lem-my-init/modes/vi)
(lem-vi-mode:vi-mode)
(define-key *minibuf-keymap* "C-w" 'lem-vi-mode.commands:vi-kill-last-word)
| null | https://raw.githubusercontent.com/fukamachi/.lem/524f6f669fdc50a8fbddfbdc5d7e29ae945dacfd/modes/10-vi.lisp | lisp | (defpackage #:lem-my-init/modes/vi
(:use #:cl
#:lem
#:lem-vi-mode))
(in-package #:lem-my-init/modes/vi)
(lem-vi-mode:vi-mode)
(define-key *minibuf-keymap* "C-w" 'lem-vi-mode.commands:vi-kill-last-word)
| |
8109d80ae4c3c729009bf270b8dbb33be6ce239d9188679840c34b76fca033b9 | tomjaguarpaw/haskell-opaleye | Operators.hs | {-# LANGUAGE Arrows #-}
# LANGUAGE FlexibleContexts #
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE TypeSynonymInstances #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FunctionalDependencies #
# LANGUAGE DataKinds #
We can probably disable ConstraintKinds and TypeSynonymInstances
when we move to ... instead of... | null | https://raw.githubusercontent.com/tomjaguarpaw/haskell-opaleye/5c5e1dafe998d7ed713d1cc019bee87811093dea/src/Opaleye/Operators.hs | haskell | # LANGUAGE Arrows #
# LANGUAGE ConstraintKinds #
# LANGUAGE TypeSynonymInstances #
* Restriction operators
* Numerical operators
operators (e.g.. '*', '/', '+', '-') on them and you can create
* Equality operators
* Comparison operators
* Numerical operators
* Conditional operators
* Logical operators
* Text o... | # LANGUAGE FlexibleContexts #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FunctionalDependencies #
# LANGUAGE DataKinds #
We can probably disable ConstraintKinds and TypeSynonymInstances
when we move to ... instead of PG ..
module Opaleye.Operators
(
where_
, restrict
, restrictExists
, restrictNot... |
d446425e0b8f29120007e8d271cc2df1e153b2bafade829af1975ab17914309e | janestreet/core | core_bin_prot.mli | open! Import
include module type of Bin_prot
module Writer : sig
type 'a t = 'a Bin_prot.Type_class.writer =
{ size : 'a Size.sizer
; write : 'a Write.writer
}
val to_string : 'a t -> 'a -> string
val to_bytes : 'a t -> 'a -> bytes
end
module Reader : sig
type 'a t = 'a Bin_prot.Type_class.reader... | null | https://raw.githubusercontent.com/janestreet/core/b0be1daa71b662bd38ef2bb406f7b3e70d63d05f/core/src/core_bin_prot.mli | ocaml | open! Import
include module type of Bin_prot
module Writer : sig
type 'a t = 'a Bin_prot.Type_class.writer =
{ size : 'a Size.sizer
; write : 'a Write.writer
}
val to_string : 'a t -> 'a -> string
val to_bytes : 'a t -> 'a -> bytes
end
module Reader : sig
type 'a t = 'a Bin_prot.Type_class.reader... | |
179eb9df39ccb67c477ce56a8f168bc900f746154034104929184fdec99fd2eb | aws-beam/aws-erlang | aws_connectcampaigns.erl | %% WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
See -beam/aws-codegen for more details .
@doc Provide APIs to create and manage Amazon Connect Campaigns .
-module(aws_connectcampaigns).
-export([create_campaign/2,
create_campaign/3,
delete_campaign/3,
delete_campaign/4,
delete_co... | null | https://raw.githubusercontent.com/aws-beam/aws-erlang/699287cee7dfc9dc8c08ced5f090dcc192c9cba8/src/aws_connectcampaigns.erl | erlang | WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
====================================================================
API
====================================================================
This API is idempotent.
@doc Deletes a connect instance config from the specified AWS account.
@doc Describes the specific campai... | See -beam/aws-codegen for more details .
@doc Provide APIs to create and manage Amazon Connect Campaigns .
-module(aws_connectcampaigns).
-export([create_campaign/2,
create_campaign/3,
delete_campaign/3,
delete_campaign/4,
delete_connect_instance_config/3,
delete_conne... |
ff286d9e594718fce92fb4a459de7f604df69dcbc823e56fad5013fb39da40b9 | ghc/packages-Cabal | cabal.test.hs | import Test.Cabal.Prelude
main = cabalTest $ do
cabal "v2-build" ["p"]
| null | https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-testsuite/PackageTests/InternalLibraries/cabal.test.hs | haskell | import Test.Cabal.Prelude
main = cabalTest $ do
cabal "v2-build" ["p"]
| |
6a949f16a23bd75529d7de5a59ed7c7cc6eed37245c198fda2e3257e99cee68b | pflanze/chj-schemelib | memcmp-test.scm | Copyright 2018 by < >
;;; This file is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License ( GPL ) as published
by the Free Software Foundation , either version 2 of the License , or
;;; (at your option) any later version.
(require easy
mem... | null | https://raw.githubusercontent.com/pflanze/chj-schemelib/59ff8476e39f207c2f1d807cfc9670581c8cedd3/memcmp-test.scm | scheme | This file is free software; you can redistribute it and/or modify
(at your option) any later version.
covered; XX should it return an error value instead? False but
error, ever ? | Copyright 2018 by < >
it under the terms of the GNU General Public License ( GPL ) as published
by the Free Software Foundation , either version 2 of the License , or
(require easy
memcmp
test)
(TEST
> (memcmp:substring=? "foo" 0 "bar" 0 0)
#t
> (memcmp:substring=? "foo" 0 "bar" 0 1)
#f
> (m... |
482aa288b7f7142c346fe4bf63183dc34e46f15292c39cee3986cb70ca897488 | melange-re/melange | js_record_map.ml |
open J
let [@inline] unknown _ x = x
let [@inline] option sub self = fun v ->
match v with
| None -> None
| Some v -> Some (sub self v)
let rec list sub self = fun x ->
match x with
| [] -> []
| x::xs ->
let v = sub self x in
v :: list sub self xs
type iter = {
ident : ident fn;
module_id : modul... | null | https://raw.githubusercontent.com/melange-re/melange/24083b39f10d8df40a786d890d7530b514ba70a4/jscomp/core/js_record_map.ml | ocaml |
open J
let [@inline] unknown _ x = x
let [@inline] option sub self = fun v ->
match v with
| None -> None
| Some v -> Some (sub self v)
let rec list sub self = fun x ->
match x with
| [] -> []
| x::xs ->
let v = sub self x in
v :: list sub self xs
type iter = {
ident : ident fn;
module_id : modul... | |
33f77ad23cc3595fd06dd29758ee000fd550f6beb8cebeeba46602ff27272c85 | caisah/sicp-exercises-and-examples | ex.3.69.scm | Write a procedure triples that takes three infinite streams s , t , and u , and produces
the stream of triples ( si , tj , uk ) such that i < = j < = k. Use triples to generate
the stream of all Pythagorean triples of positive integers , ie , the triples ( i , j , k )
;; such that i <= j, and i^2 + j^2 = k^2.
(d... | null | https://raw.githubusercontent.com/caisah/sicp-exercises-and-examples/605c698d7495aa3474c2b6edcd1312cb16c5b5cb/3.5.3-exploiting_the_stream_paradigm/ex.3.69.scm | scheme | such that i <= j, and i^2 + j^2 = k^2. | Write a procedure triples that takes three infinite streams s , t , and u , and produces
the stream of triples ( si , tj , uk ) such that i < = j < = k. Use triples to generate
the stream of all Pythagorean triples of positive integers , ie , the triples ( i , j , k )
(define (interleave s1 s2)
(if (stream-nul... |
813f954da27d5c0de5680a5a4eab05307a5d0e5159ef2c9515c9761e17f05d79 | skanev/playground | 27.scm | SICP exercise 3.27
;
; Memoization (also called tabulation) is a technique that enables a procedure
; to record, in a local table, values that have previously been computed. This
; technique can make a vast difference in the performance of a program. A
memoized procedure a table in which values of previous calls a... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/03/27.scm | scheme |
Memoization (also called tabulation) is a technique that enables a procedure
to record, in a local table, values that have previously been computed. This
technique can make a vast difference in the performance of a program. A
stored using as keys the arguments that produced the values. When the
see if the value i... | SICP exercise 3.27
memoized procedure a table in which values of previous calls are
memoized procedure is asked to compute a value , it first checks the table to
( (= n 1 ) 1 )
( (= n 1 ) 1 )
| |
| | ...
| ... |
a0a45bc1f73e65d1c5772a20b8a56306489075560dfc14ae78ff34e21bd2f034 | StarGazerM/ppa-in-code | du-chain.rkt | ;; Define-Use chains
;; link the label to where use it
< >
2020 Syracuse
#lang racket
(require "tiny-lang.rkt"
"flow.rkt"
"live-variable.rkt")
;; find all path from src to dst
(define (find-all-path s* src dst)
(define flow-set (flow s*))
(define (next-label lc)
(for/fold ([res '(... | null | https://raw.githubusercontent.com/StarGazerM/ppa-in-code/0c04c50e64118a9468f24427bca11280775c9d74/dataflow/du-chain.rkt | racket | Define-Use chains
link the label to where use it
find all path from src to dst
definition clear path of a varible is the dataflow path do not contain assignment to that variable
originally only take x and l
ud,du : Var* × Lab* → P(Lab*)
if x is not defined inside current S* but not modified in S*
(define (du s*... |
< >
2020 Syracuse
#lang racket
(require "tiny-lang.rkt"
"flow.rkt"
"live-variable.rkt")
(define (find-all-path s* src dst)
(define flow-set (flow s*))
(define (next-label lc)
(for/fold ([res '()])
([edge (in-list flow-set)])
(if (equal? (first edge) lc)
... |
3d8866eea2a43c247a1c216d2b8fa33a6c3cfd05d60e91d0ecb827b010c98d61 | bgusach/exercises-htdp2e | ex-141.rkt | #lang htdp/bsl
; List-of-string -> String
concatenate all strings in l into one long string
(check-expect (cat '()) "")
(check-expect (cat (cons "a" (cons "b" '()))) "ab")
(check-expect
(cat (cons "ab" (cons "cd" (cons "ef" '()))))
"abcdef")
(define (cat l)
(cond
[(empty? l) ""]
[else (string-appen... | null | https://raw.githubusercontent.com/bgusach/exercises-htdp2e/c4fd33f28fb0427862a2777a1fde8bf6432a7690/ex-141.rkt | racket | List-of-string -> String | #lang htdp/bsl
concatenate all strings in l into one long string
(check-expect (cat '()) "")
(check-expect (cat (cons "a" (cons "b" '()))) "ab")
(check-expect
(cat (cons "ab" (cons "cd" (cons "ef" '()))))
"abcdef")
(define (cat l)
(cond
[(empty? l) ""]
[else (string-append (first l) (cat (rest l)))... |
a20dbcb8e61ac04d1fb1c2e1b03bbd491173a49c67cee6b634c5620d872968c2 | Paczesiowa/hsenv | String.hs | module Util.String (padTo) where
padTo :: String -> Int -> String
padTo s n | length s < n = take n $ s ++ repeat ' '
| otherwise = s
| null | https://raw.githubusercontent.com/Paczesiowa/hsenv/b904436e10bde707a7838661a5ec30de430ca2b9/src/Util/String.hs | haskell | module Util.String (padTo) where
padTo :: String -> Int -> String
padTo s n | length s < n = take n $ s ++ repeat ' '
| otherwise = s
| |
a167b92f540b86bf225bc2bfe6f3d488377ae91b1202df085ab51de00c957fda | maxtuno/tooloud | project.clj | (defproject tooloud "0.1.0-SNAPSHOT"
:description "Overtone Dubstep Template"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.5.0-alpha3"]
[overtone "0.8.0-SNAPSHOT"]]) | null | https://raw.githubusercontent.com/maxtuno/tooloud/136cdb516066879565280167e914c37e3d731466/project.clj | clojure | (defproject tooloud "0.1.0-SNAPSHOT"
:description "Overtone Dubstep Template"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.5.0-alpha3"]
[overtone "0.8.0-SNAPSHOT"]]) | |
9edbd32f606e21c2d9284b9ebe68003140944e609c834b2dd90d139e4c566065 | buntine/Simply-Scheme-Exercises | 19-5.scm | Rewrite the true - for - all ? procedure from Exercise 8.10 . Do not use every ,
; keep, or accumulate
; Not sure if I've cheated here. I reimplemented keep, but it's recursive.
(define (keep2 pred sent)
(if (word? sent)
(combine pred sent word "")
(combine pred sent se '())))
(define (combine pred sent ... | null | https://raw.githubusercontent.com/buntine/Simply-Scheme-Exercises/c6cbf0bd60d6385b506b8df94c348ac5edc7f646/19-implementing-higher-order-functions/19-5.scm | scheme | keep, or accumulate
Not sure if I've cheated here. I reimplemented keep, but it's recursive. | Rewrite the true - for - all ? procedure from Exercise 8.10 . Do not use every ,
(define (keep2 pred sent)
(if (word? sent)
(combine pred sent word "")
(combine pred sent se '())))
(define (combine pred sent combiner null-value)
(cond
((empty? sent) null-value)
((pred (first sent))
(combi... |
80d89f194d8201dacb71152dfd27aab05b9999075b3f9b20b4ae99410e926d8c | tolysz/ghcjs-stack | Validate.hs | module Distribution.Client.Dependency.Modular.Validate (validateTree) where
-- Validation of the tree.
--
-- The task here is to make sure all constraints hold. After validation, any
-- assignment returned by exploration of the tree should be a complete valid
-- assignment, i.e., actually constitute a solution.
impor... | null | https://raw.githubusercontent.com/tolysz/ghcjs-stack/83d5be83e87286d984e89635d5926702c55b9f29/special/cabal/cabal-install/Distribution/Client/Dependency/Modular/Validate.hs | haskell | Validation of the tree.
The task here is to make sure all constraints hold. After validation, any
assignment returned by exploration of the tree should be a complete valid
assignment, i.e., actually constitute a solution.
In practice, most constraints are implication constraints (IF we have made
a number of choi... | module Distribution.Client.Dependency.Modular.Validate (validateTree) where
import Control.Applicative
import Control.Monad.Reader hiding (sequence)
import Data.List as L
import Data.Map as M
import Data.Set as S
import Data.Traversable
import Prelude hiding (sequence)
import Language.Haskell.Extension (Extension, L... |
d3df2fd36c12d1d02db6922fbfcfffb74beb84a5ff86d1c68289c18c5f390852 | matterhorn-chat/matterhorn | Core.hs | # LANGUAGE DeriveGeneric #
{-# LANGUAGE DeriveAnyClass #-}
module Matterhorn.Types.Core
( Name(..)
, ChannelListEntry(..)
, ChannelListEntryType(..)
, ChannelSelectMatch(..)
, LinkTarget(..)
, MessageId(..)
, messageIdPostId
, ChannelListGroupLabel(..)
, channelListGroupNames
, MessageSelectState... | null | https://raw.githubusercontent.com/matterhorn-chat/matterhorn/19a73ce833a8a8de3616cf884c03e9f08a4db0a7/src/Matterhorn/Types/Core.hs | haskell | # LANGUAGE DeriveAnyClass #
| This 'Name' type is the type used in 'brick' to identify various
parts of the interface.
^ The rendering of messages for the specified message interface
(by editor name)
^ The message editor for the specified channel's main message
interface
^ A wrapper name for reporting the extent... | # LANGUAGE DeriveGeneric #
module Matterhorn.Types.Core
( Name(..)
, ChannelListEntry(..)
, ChannelListEntryType(..)
, ChannelSelectMatch(..)
, LinkTarget(..)
, MessageId(..)
, messageIdPostId
, ChannelListGroupLabel(..)
, channelListGroupNames
, MessageSelectState(..)
, HelpScreen(..)
)
wher... |
b6336ca9ac64daa139cdcb792063d9877a0521c0c6ebd685a57a8d57b98d3f71 | startalkIM/ejabberd | p1_prof.erl | %%%-------------------------------------------------------------------
%%% File : p1_prof.erl
Author : < >
Description : Handy wrapper around eprof and
%%%
Created : 23 Jan 2010 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2019 ProcessOne
%%%
%%% This program is free software; you can redistr... | null | https://raw.githubusercontent.com/startalkIM/ejabberd/718d86cd2f5681099fad14dab5f2541ddc612c8b/deps/p1_utils/src/p1_prof.erl | erlang | -------------------------------------------------------------------
File : p1_prof.erl
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the imp... | Author : < >
Description : Handy wrapper around eprof and
Created : 23 Jan 2010 by < >
ejabberd , Copyright ( C ) 2002 - 2019 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a... |
5e4737b103d17903e3e44e49b4a3ffde614c6b58f1c929588eb9f74d6e7c19eb | dym/movitz | conditions.lisp | ;;;;------------------------------------------------------------------
;;;;
Copyright ( C ) 2001 - 2005 ,
Department of Computer Science , University of Tromso , Norway .
;;;;
;;;; For distribution policy, see the accompanying file COPYING.
;;;;
;;;; Filename: conditions.lisp
;;;; Description:
... | null | https://raw.githubusercontent.com/dym/movitz/56176e1ebe3eabc15c768df92eca7df3c197cb3d/losp/muerte/conditions.lisp | lisp | ------------------------------------------------------------------
For distribution policy, see the accompanying file COPYING.
Filename: conditions.lisp
Description:
Created at: Wed Nov 20 15:47:04 2002
-----------------------------------------------------------... | Copyright ( C ) 2001 - 2005 ,
Department of Computer Science , University of Tromso , Norway .
Author : < >
$ I d : conditions.lisp , v 1.29 2009 - 07 - 19 18:54:32 ffjeld Exp $
(require :muerte/basic-macros)
(provide :muerte/conditions)
(in-package muerte)
(defparameter *break-on-signals* ... |
bb39588b22e8723e6db4fd66b00f30b6f6ae4da734cfaaad070898447b9320a3 | otakar-smrz/elixir-fm | Lookup.hs | -- |
--
-- Module : Elixir.Lookup
Copyright : 2005 - 2016
-- License : GPL
--
-- Maintainer : otakar-smrz users.sf.net
-- Stability : provisional
-- Portability : portable
--
-- "ElixirFM"
module Elixir.Lookup where
import Elixir.Data
import Elixir.Lexicon
import Elixir.Inflect
import E... | null | https://raw.githubusercontent.com/otakar-smrz/elixir-fm/fae5bab6dd53c15d25c1e147e7787b2c254aabf0/Haskell/ElixirFM/Elixir/Lookup.hs | haskell | |
Module : Elixir.Lookup
License : GPL
Maintainer : otakar-smrz users.sf.net
Stability : provisional
Portability : portable
"ElixirFM"
(\ _ e -> flip all q ((flip elem . map (map toLower)) (reflex e)))
(\ _ e -> any (flip elem q) (reflex e))
(\ _ e -> any (flip all (map (map toLower) x) . ... | Copyright : 2005 - 2016
module Elixir.Lookup where
import Elixir.Data
import Elixir.Lexicon
import Elixir.Inflect
import Elixir.Derive
import Elixir.Pretty
import Encode.Arabic
import Data.Char
import Data.List hiding (lookup)
import Prelude hiding (lookup)
instance Pretty [Clips] => Pretty (Stri... |
0d7686fb7fced92818a4dbd07b8a9b5121139c3de95d794b25b6a89a571b2434 | Vaguery/klapaucius | core.clj | (ns push.interpreter.core
(:require [push.util.stack-manipulation :as stack]
[push.util.code-wrangling :as util]
[push.util.exceptions :as oops]
[push.router.core :as router]
[push.util.scratch :as scratch]
[push.type.defin... | null | https://raw.githubusercontent.com/Vaguery/klapaucius/17b55eb76feaa520a85d4df93597cccffe6bdba4/src/push/interpreter/core.clj | clojure | reconfigure
manipulating Interpreter state
returns true if
otherwise it | (ns push.interpreter.core
(:require [push.util.stack-manipulation :as stack]
[push.util.code-wrangling :as util]
[push.util.exceptions :as oops]
[push.router.core :as router]
[push.util.scratch :as scratch]
[push.type.defin... |
46d591a4aa2ed1cfd0c4404815e77c1ede72211852bc0bd8eb9cc98a28d9e4a0 | locusmath/locus | aut.clj | (ns locus.algebra.group.core.aut
(:require [locus.set.logic.core.set :refer :all]
[locus.set.logic.structure.protocols :refer :all]
[locus.set.copresheaf.structure.core.protocols :refer :all]
[locus.set.mapping.general.core.object :refer :all]
[locus.set.mapping.general... | null | https://raw.githubusercontent.com/locusmath/locus/b232579217be4e39458410893827a84d744168e4/src/clojure/locus/algebra/group/core/aut.clj | clojure | Let C be a category, then the set of all isomorphisms of C forms a wide subcategory called
the underlying groupoid of C. It follows that every category has an underlying groupoid.
The automorphism group of an object X in a category is the hom class Hom(X,X) of X
in the underlying groupoid. It follows that the defin... | (ns locus.algebra.group.core.aut
(:require [locus.set.logic.core.set :refer :all]
[locus.set.logic.structure.protocols :refer :all]
[locus.set.copresheaf.structure.core.protocols :refer :all]
[locus.set.mapping.general.core.object :refer :all]
[locus.set.mapping.general... |
1bbca73211ac46995be004facbc517c2cc2d2ec6c4c59b6729df0234676ef521 | xh4/web-toolkit | entity-file.lisp | (in-package :http)
(defclass file-entity (entity)
((file
:initarg :file
:initform nil
:reader entity-file)))
(defmethod print-object ((entity file-entity) stream)
(print-unreadable-object (entity stream :type t :identity t)
(let ((pathname (entity-body entity)))
(format stream "~S" pathname)... | null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/http/entity-file.lisp | lisp | (in-package :http)
(defclass file-entity (entity)
((file
:initarg :file
:initform nil
:reader entity-file)))
(defmethod print-object ((entity file-entity) stream)
(print-unreadable-object (entity stream :type t :identity t)
(let ((pathname (entity-body entity)))
(format stream "~S" pathname)... | |
a17cbdf421658f22865853375af11cce79b251d3acc5d5176684189766646dd6 | wavewave/hxournal | EventConnect.hs | -----------------------------------------------------------------------------
-- |
-- Module : Application.HXournal.Coroutine.EventConnect
Copyright : ( c ) 2011 , 2012
--
-- License : BSD3
Maintainer : < >
-- Stability : experimental
Portability : GHC
--
--------------------------------... | null | https://raw.githubusercontent.com/wavewave/hxournal/b8eb538a2d1a474cc74bc0b5f5c7f251dafe75b9/lib/Application/HXournal/Coroutine/EventConnect.hs | haskell | ---------------------------------------------------------------------------
|
Module : Application.HXournal.Coroutine.EventConnect
License : BSD3
Stability : experimental
---------------------------------------------------------------------------
|
|
|
|
| | Copyright : ( c ) 2011 , 2012
Maintainer : < >
Portability : GHC
module Application.HXournal.Coroutine.EventConnect where
import Graphics.UI.Gtk hiding (get,set,disconnect)
import Application.HXournal.Type.Event
import Application.HXournal.Type.Canvas
import Application.HXournal.Type.XournalState
... |
29d40bf04fa0ef6e20d87ff65ec2582b799d63d9cbec95fce5637922081497be | mroman42/mikrokosmos | Types.hs | module Stlc.Types
( Type (Tvar, Arrow, Times, Union, Unitty, Bottom)
, typeinference
, typeinfer
, unify
, applyctx
, emptyctx
, incrementindices
, variables
, normalizeTemplate
, applynormalization
, Top (Top)
, Context
, Variable
, Substitution
)
where
import Control.Monad
import Lambda... | null | https://raw.githubusercontent.com/mroman42/mikrokosmos/fa3f9d5ebd9d62a6be44731ae867d020aa082a69/source/Stlc/Types.hs | haskell | | A type context is a map from deBruijn indices to types. Given
any lambda variable as a deBruijn index, it returns its type.
| A type variable is an integer.
| A type substitution is a function that can be applied to any type
to get a new one.
types; that is, the function type.
| Creates the substitution given ... | module Stlc.Types
( Type (Tvar, Arrow, Times, Union, Unitty, Bottom)
, typeinference
, typeinfer
, unify
, applyctx
, emptyctx
, incrementindices
, variables
, normalizeTemplate
, applynormalization
, Top (Top)
, Context
, Variable
, Substitution
)
where
import Control.Monad
import Lambda... |
2ef400fc5d85bce762bfe2d8589c75edcd502bb8d01da27c84391c4e8958fb57 | eareese/htdp-exercises | 226-predicate-color-states.rkt | ;;---------------------------------------------------------------------------------------------------
#lang htdp/bsl
(require 2htdp/image)
A FSM is one of :
; – '()
– ( cons Transition FSM )
(define-struct transition [current next])
; A Transition is a structure:
( make - transition FSM - State FSM - Stat... | null | https://raw.githubusercontent.com/eareese/htdp-exercises/a85ff3111d459dda0e94d9b463d01a09accbf9bf/part02-arbitrarily-large-data/226-predicate-color-states.rkt | racket | ---------------------------------------------------------------------------------------------------
– '()
A Transition is a structure:
in reaction to key strokes | #lang htdp/bsl
(require 2htdp/image)
A FSM is one of :
– ( cons Transition FSM )
(define-struct transition [current next])
( make - transition FSM - State FSM - State )
FSM - State is a Color .
interpretation A FSM represents the transitions that a
finite state machine can take from one state to ano... |
7ae7152c7b4c3232e79242cacde74e4b44b13c4dfc5c8ac4ef52d7bfc7517e91 | well-typed-lightbulbs/ocaml-esp32 | int.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
(* ... | null | https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/stdlib/int.ml | ocaml | ************************************************************************
OCaml
The... | Copyright 2018 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
type t = int
let zero = 0
let one = 1
let minus_one = -1
external neg : int -> int = "%negint"
external add : int -> int -> int = "%addint"
external sub : int -> int -> ... |
bc99bc640333f2943a8c587c8d3adbb0b26f8f787d2f5aaa64e84621c5c39bed | ds-wizard/engine-backend | Detail_DELETE.hs | module Registry.Specs.API.Organization.Detail_DELETE (
detail_delete,
) where
import Network.HTTP.Types
import Network.Wai (Application)
import Test.Hspec
import Test.Hspec.Wai
import Registry.Model.Context.AppContext
import Registry.Specs.API.Common
import SharedTest.Specs.API.Common
-- -------------------------... | null | https://raw.githubusercontent.com/ds-wizard/engine-backend/d392b751192a646064305d3534c57becaa229f28/engine-registry/test/Registry/Specs/API/Organization/Detail_DELETE.hs | haskell | ------------------------------------------------------------------------
DELETE /organizations/{orgId}
------------------------------------------------------------------------
----------------------------------------------------
----------------------------------------------------
--------------------------------... | module Registry.Specs.API.Organization.Detail_DELETE (
detail_delete,
) where
import Network.HTTP.Types
import Network.Wai (Application)
import Test.Hspec
import Test.Hspec.Wai
import Registry.Model.Context.AppContext
import Registry.Specs.API.Common
import SharedTest.Specs.API.Common
detail_delete :: AppContext ... |
15cc5e006c9070c69a19d0efa70b5d181fa0facf6ff92b7adcf0170e0553837d | rtoy/cmucl | linux-os.lisp | ;;; -*- Package: SYSTEM -*-
;;;
;;; **********************************************************************
This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
;;;
(ext:file-comment
"$Header: src/code/linux-os.lisp $")
;;;
;;; ****... | null | https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/code/linux-os.lisp | lisp | -*- Package: SYSTEM -*-
**********************************************************************
**********************************************************************
Instead of reading /proc/version (which has some bugs with
let's just get the info from uname().
Return system time, user time and number... | This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
(ext:file-comment
"$Header: src/code/linux-os.lisp $")
OS interface functions for CMUCL under Linux .
Written and maintained mostly by and .
, , and did stuff her... |
e9ae90503445a0b67aa31709427e535d6b3963b4e67ece8a43f5d1ba031944f7 | clojurewerkz/support | io.clj | (ns clojurewerkz.support.io
(:import com.google.common.io.Files))
(defn ^java.io.File create-temp-dir
[]
once we drop JDK 6 support , this can be
;; done via JDK 7's java.nio.files.Files that
supports directory prefixes . MK .
(Files/createTempDir)) | null | https://raw.githubusercontent.com/clojurewerkz/support/33d28084829f6ccb6aed870a357fa6b53c57d2cc/src/clojure/clojurewerkz/support/io.clj | clojure | done via JDK 7's java.nio.files.Files that | (ns clojurewerkz.support.io
(:import com.google.common.io.Files))
(defn ^java.io.File create-temp-dir
[]
once we drop JDK 6 support , this can be
supports directory prefixes . MK .
(Files/createTempDir)) |
61648c523015e8ec743da6e50ca960968804d342ff4816226ddfdecdcdc41ac6 | biocad/math-grads | Interaction.hs | | Module that provides various functions for interaction with ' 's ,
-- 'EdgeList's and vertices themselves.
--
module Math.Grads.Algo.Interaction
(
-- * Vertex Functions
--
areAdjacent
, getEnds
, getOtherEnd
, getSharedVertex
, getVertexAdjacent
, getVertexIncident
, getVertexIncidentIdx
... | null | https://raw.githubusercontent.com/biocad/math-grads/df7bdc48f86f57f3d011991c64188489e8d73bc1/src/Math/Grads/Algo/Interaction.hs | haskell | 'EdgeList's and vertices themselves.
* Vertex Functions
* Edge Functions
* EdgeList Functions
| Find all edges in given 'EdgeList' that are incident to vertex with given index.
| Returns indices of edges in 'EdgeList' that are incident to vertex with given index.
| Finds in given 'EdgeList' all indices... | | Module that provides various functions for interaction with ' 's ,
module Math.Grads.Algo.Interaction
(
areAdjacent
, getEnds
, getOtherEnd
, getSharedVertex
, getVertexAdjacent
, getVertexIncident
, getVertexIncidentIdx
, haveSharedVertex
, isIncident
, (~=)
, (/~=)
, matchEdges
, ge... |
29440083be7238330fc816fd19298d30c73166aab65ba253eedc7ea822a1d628 | racket/macro-debugger | info.rkt | #lang info
(define scribblings '(("macro-debugger.scrbl" () (tool-library))))
(define raco-commands
'(("macro-stepper"
(submod macro-debugger/stepper main)
"explore expansion steps"
#f)))
| null | https://raw.githubusercontent.com/racket/macro-debugger/d4e2325e6d8eced81badf315048ff54f515110d5/macro-debugger/macro-debugger/info.rkt | racket | #lang info
(define scribblings '(("macro-debugger.scrbl" () (tool-library))))
(define raco-commands
'(("macro-stepper"
(submod macro-debugger/stepper main)
"explore expansion steps"
#f)))
| |
f4e56ce2dfade11b246140a185ec41a704dd7583a8afed1bd58523788024245e | MinaProtocol/mina | account_identifier.ml |
* This file has been generated by the OCamlClientCodegen generator for openapi - generator .
*
* Generated by : -generator.tech
*
* Schema Account_identifier.t : The account_identifier uniquely identifies an account within a network . All fields in the account_identifier are utilized to determine this un... | null | https://raw.githubusercontent.com/MinaProtocol/mina/a80b00221953c26ff158e7375a948b5fa9e7bd8b/src/lib/rosetta_models/account_identifier.ml | ocaml | The address may be a cryptographic public key (or some encoding of it) or a provided username.
* The account_identifier uniquely identifies an account within a network. All fields in the account_identifier are utilized to determine this uniqueness (including the metadata field, if populated). |
* This file has been generated by the OCamlClientCodegen generator for openapi - generator .
*
* Generated by : -generator.tech
*
* Schema Account_identifier.t : The account_identifier uniquely identifies an account within a network . All fields in the account_identifier are utilized to determine this un... |
79a02bc0af91c1db28803a070a90b97218372521d20962876be2aa133b05b9f6 | fpco/ide-backend | GetOpt.hs | -----------------------------------------------------------------------------
-- |
Module : Distribution .
Copyright : ( c ) 2002 - 2005
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer :
-- Portability : portable
--
-- This library provides facilities for parsi... | null | https://raw.githubusercontent.com/fpco/ide-backend/860636f2d0e872e9481569236bce690637e0016e/ide-backend/TestSuite/inputs/Cabal-1.22.0.0/Distribution/GetOpt.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Portability : portable
This library provides facilities for parsing the command-line options
@getopt@ library.
------------------------------------------... | Module : Distribution .
Copyright : ( c ) 2002 - 2005
in a standalone program . It is essentially a Haskell port of the GNU
< > Oct. 1996 ( small
changes Dec. 1997 )
Two rather obscure features are missing : The Bash 2.0 non - option hack
( if you do n't already know it , you probab... |
7b840535be32cbd57f8d965f369f9fdefd6f92283ff55e6eb4dfac5a4d665ee8 | change-metrics/monocle | Auth.hs | # LANGUAGE DataKinds #
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeApplications #
# LANGUAGE NoGeneralisedNewtypeDeriving #
# OPTIONS_GHC -fno - warn - missing - export - lists #
# OPTIONS_GHC -fno - warn - name - shadowing #
# OPTI... | null | https://raw.githubusercontent.com/change-metrics/monocle/8b239d7ee0e9e30690cd82baf7e46a5fda221583/codegen/Monocle/Protob/Auth.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
| Generated by Haskell protocol buffer compiler. DO NOT EDIT! | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE TypeApplications #
# LANGUAGE NoGeneralisedNewtypeDeriving #
# OPTIONS_GHC -fno - warn - missing - export - lists #
# OPTIONS_GHC -fno - warn - name - shadowing #
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - unused - matches #
m... |
b9ad1d10e9adc083fb788f24bfddb90ffefbc7ed62168784d051e3aeef91c38a | KenDickey/Crosstalk | gambit-apropos.scm | ;;; FILE: "apropos.scm"
;;; IMPLEMENTS: apropos function for Scheme globals
;;; return a list of variable name symbols containing
;;; the target string.
AUTHOR :
DATE : 30 June 2016
Copyright ( c ) 2016 ,
;; All rights reserved.
;; Redistribution and use in source and binary forms, with or without
;; mod... | null | https://raw.githubusercontent.com/KenDickey/Crosstalk/c4a315baf039e714980e14f5b07860632b9bd0e6/gambit-apropos.scm | scheme | FILE: "apropos.scm"
IMPLEMENTS: apropos function for Scheme globals
return a list of variable name symbols containing
the target string.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistr... | AUTHOR :
DATE : 30 June 2016
Copyright ( c ) 2016 ,
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS "
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT HOLDER OR LIABLE
FOR ANY DIRECT , INDIRE... |
8b8ee5dbc0e8440d5fe99e64e80276c7f0998174a72ed8b978755de3e4c86b02 | soenkehahn/getopt-generics | CustomOption.hs | {-# LANGUAGE DeriveDataTypeable #-}
module CustomOption where
import WithCli
data File = File FilePath
deriving (Show, Typeable)
instance Argument File where
argumentType Proxy = "custom-file-type"
parseArgument f = Just (File f)
instance HasArguments File where
argumentsParser = atomicArgumentsParser
mai... | null | https://raw.githubusercontent.com/soenkehahn/getopt-generics/735319c8146043f704d17f06b7bbfa41d84fe3e6/docs/CustomOption.hs | haskell | # LANGUAGE DeriveDataTypeable # |
module CustomOption where
import WithCli
data File = File FilePath
deriving (Show, Typeable)
instance Argument File where
argumentType Proxy = "custom-file-type"
parseArgument f = Just (File f)
instance HasArguments File where
argumentsParser = atomicArgumentsParser
main :: IO ()
main = withCli run
run :... |
a29baa3ef16bf78baab9335d032f3594d75f90e1106997e48bbe8baca776e1d7 | nedap/formatting-stack | ns_aliases.clj | (ns unit.formatting-stack.linters.ns-aliases
(:require
[clojure.test :refer [are deftest]]
[formatting-stack.linters.ns-aliases :as sut]))
(deftest name-and-alias
(are [input expected] (= expected
(sut/name-and-alias input))
'[foo], ['foo nil]
'[foo :ref... | null | https://raw.githubusercontent.com/nedap/formatting-stack/c43e74d5409e9338f208457bb8928ce437381a3f/test/unit/formatting_stack/linters/ns_aliases.clj | clojure | (ns unit.formatting-stack.linters.ns-aliases
(:require
[clojure.test :refer [are deftest]]
[formatting-stack.linters.ns-aliases :as sut]))
(deftest name-and-alias
(are [input expected] (= expected
(sut/name-and-alias input))
'[foo], ['foo nil]
'[foo :ref... | |
2608052430488ea8ec0c1ddb8f8e5cc42e178b4b4d34a349f0d24bcb7af76bf6 | rsharifnasab/my-learning | Main.hs | Copyright 2019 Google LLC
--
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
distributed und... | null | https://raw.githubusercontent.com/rsharifnasab/my-learning/8555583a772c96e334e3fdace5a295a21c31ea8b/haskell/google-haskell/haskell_101/Main.hs | haskell |
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 governing perm... | Copyright 2019 Google LLC
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
# LANGUAGE CPP , LambdaCase , StandaloneDeriving #
# OPTIONS_GHC -fno - warn - type - defaults #
# OPTIONS_GHC -fno - warn - missing - signatures ... |
b7f7f014e04aefee38a6b876a652dae46003d68650ef16c4c94ca56fc4ab7c4a | xvw/preface | monad_plus.mli | (** Functors that generate a suite for a [Monad_plus]. *)
module Suite
(R : Model.COVARIANT_1)
(F : Preface_specs.MONAD_PLUS with type 'a t = 'a R.t)
(A : Model.T0)
(B : Model.T0)
(C : Model.T0)
(D : Model.T0) : Model.SUITE
module Suite_monoidal
(R : Model.COVARIANT_1)
(F : Preface_spe... | null | https://raw.githubusercontent.com/xvw/preface/84a297e1ee2967ad4341dca875da8d2dc6d7638c/lib/preface_qcheck/monad_plus.mli | ocaml | * Functors that generate a suite for a [Monad_plus]. |
module Suite
(R : Model.COVARIANT_1)
(F : Preface_specs.MONAD_PLUS with type 'a t = 'a R.t)
(A : Model.T0)
(B : Model.T0)
(C : Model.T0)
(D : Model.T0) : Model.SUITE
module Suite_monoidal
(R : Model.COVARIANT_1)
(F : Preface_specs.MONAD_PLUS with type 'a t = 'a R.t)
(A : Model.T0)
... |
52d77d9d027eceec04bce1f6e353b44079d19cdfa1f18d30a6a82939c3a69b88 | tmfg/mmtis-national-access-point | user.cljs | (ns ote.views.user
"User's own info view"
(:require [reagent.core :as r]
[ote.ui.form :as form]
[ote.db.user :as user]
[ote.localization :refer [tr tr-key]]
[ote.ui.buttons :as buttons]
[ote.app.controller.login :as lc]
[clojure.string :as str]... | null | https://raw.githubusercontent.com/tmfg/mmtis-national-access-point/a86cc890ffa1fe4f773083be5d2556e87a93d975/ote/src/cljs/ote/views/user.cljs | clojure | After submitting a successful email change action display only info box and action button
When arriving to view or after a failed form submission: display form.
Show current password field if it is required for update | (ns ote.views.user
"User's own info view"
(:require [reagent.core :as r]
[ote.ui.form :as form]
[ote.db.user :as user]
[ote.localization :refer [tr tr-key]]
[ote.ui.buttons :as buttons]
[ote.app.controller.login :as lc]
[clojure.string :as str]... |
2520954f95c145a9ec59a6cca64d27930481f0c0db9500c20587fa1e838d59bd | GaloisInc/json | Parsec.hs | | Parse JSON values using the Parsec combinators .
module Text.JSON.Parsec
( p_value
, p_null
, p_boolean
, p_array
, p_string
, p_object
, p_number
, p_js_string
, p_js_object
, p_jvalue
, module Text.ParserCombinators.Parsec
) where
import Text.JSON.Types
import Text.ParserCombinators.Pars... | null | https://raw.githubusercontent.com/GaloisInc/json/329bbce8fd68a04a5377f48102c37d28160b246b/Text/JSON/Parsec.hs | haskell | ------------------------------------------------------------------------------ | | Parse JSON values using the Parsec combinators .
module Text.JSON.Parsec
( p_value
, p_null
, p_boolean
, p_array
, p_string
, p_object
, p_number
, p_js_string
, p_js_object
, p_jvalue
, module Text.ParserCombinators.Parsec
) where
import Text.JSON.Types
import Text.ParserCombinators.Pars... |
12d4b59d251c048b024344a60467792f54dbc780b40272f5cd74bc8f3fdd94ea | gatlin/psilo | Syntax.hs | module Lib.Syntax
( Symbol
, builtin_syms
, CoreExpr
, CoreAst(..)
, TopLevel(..)
, SurfaceExpr
, SurfaceAst(..)
, aInt
, aFloat
, aBool
, aId
, aApp
, aFun
, aIf
, aDef
, AnnotatedExpr
, annotated
, TypeLit(..)
, fromTypeLit
, LiftedExpr(.... | null | https://raw.githubusercontent.com/gatlin/psilo/ed2aa5e357011bbb0a566c201dbfb87edb0e3209/src/Lib/Syntax.hs | haskell | module Lib.Syntax
( Symbol
, builtin_syms
, CoreExpr
, CoreAst(..)
, TopLevel(..)
, SurfaceExpr
, SurfaceAst(..)
, aInt
, aFloat
, aBool
, aId
, aApp
, aFun
, aIf
, aDef
, AnnotatedExpr
, annotated
, TypeLit(..)
, fromTypeLit
, LiftedExpr(.... | |
40f392776a7ed114d7ad9966a0d8256194372116c5692fa54805a083e40957a4 | dmitryvk/sbcl-win32-threads | debug-info.lisp | ;;;; structures used for recording debugger information
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
;;;; public domain. The software is in the... | null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/src/code/debug-info.lisp | lisp | structures used for recording debugger information
more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
flags for compiled debug variables
Compiled debug variables are in a packed binary repr... |
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB!C")
FIXME : old CMU CL representation follows :
uninterned name
SC - Offset of primary locati... |
c3f6b51e9220a952e26d7c2499ae4360c078f142482e379a11219bbd3e862802 | mishoo/queen.lisp | pgn.lisp | (in-package #:queen)
(defmethod parse-pgn ((in stream))
(with-parse-stream in
(labels
((read-sym ()
(read-while #'alnum?))
(read-header ()
(let (name value)
(skip #\[)
(setf name (read-sym))
(skip-whitespace)
(setf value ... | null | https://raw.githubusercontent.com/mishoo/queen.lisp/395535fcbd24fa463b32e17a35a4c12fdc7e2277/pgn.lisp | lisp | )
) | (in-package #:queen)
(defmethod parse-pgn ((in stream))
(with-parse-stream in
(labels
((read-sym ()
(read-while #'alnum?))
(read-header ()
(let (name value)
(skip #\[)
(setf name (read-sym))
(skip-whitespace)
(setf value ... |
81709160c150fc57241943f45ad740a0e215c6daf30095307283636612e416d9 | khibino/haskell-relational-record | SQL.hs | -- |
-- Module : Database.Relational.SQL
Copyright : 2013 - 2019
-- License : BSD3
--
-- Maintainer :
-- Stability : experimental
-- Portability : unknown
--
-- This module defines finalized SQL definitions which convert from relational queries.
module Database.Relational.SQL (
-- * Typed query st... | null | https://raw.githubusercontent.com/khibino/haskell-relational-record/759b3d7cea207e64d2bd1cf195125182f73d2a52/relational-query/src/Database/Relational/SQL.hs | haskell | |
Module : Database.Relational.SQL
License : BSD3
Maintainer :
Stability : experimental
Portability : unknown
This module defines finalized SQL definitions which convert from relational queries.
* Typed query statement
* Typed update statement
* Typed insert statement
* Typed delete statement
... | Copyright : 2013 - 2019
module Database.Relational.SQL (
Query (..), unsafeTypedQuery,
relationalQuery_,
relationalQuery', relationalQuery,
relationalQuerySQL,
KeyUpdate (..), unsafeTypedKeyUpdate, typedKeyUpdate, typedKeyUpdateTable, keyUpdate,
Update (..), unsafeTypedUpdate, typedUpdate', update... |
0c42ccd5f8cf7905a1778a870f6bc577fc663b39e47942c135dcae073743d6ed | haskell-github/github | GitDiff.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Common
import qualified GitHub.Endpoints.Repos.Commits as Github
import qualified Data.Text.IO as Text
main :: IO ()
main = do
possibleDiff <- Github.diff "thoughtbot" "paperclip" "41f685f6e01396936bb8cd98e7cca517e... | null | https://raw.githubusercontent.com/haskell-github/github/81d9b658c33a706f18418211a78d2690752518a4/samples/Repos/Commits/GitDiff.hs | haskell | # LANGUAGE OverloadedStrings #
See -fleischman/repo-change-file-permission | # LANGUAGE NoImplicitPrelude #
module Main where
import Common
import qualified GitHub.Endpoints.Repos.Commits as Github
import qualified Data.Text.IO as Text
main :: IO ()
main = do
possibleDiff <- Github.diff "thoughtbot" "paperclip" "41f685f6e01396936bb8cd98e7cca517e2c7d96b" "HEAD"
either (fail . sh... |
4d20278afb182366ba64ccea155b597d13ffa730a34a233c05502585d0dbf75b | gregcman/sucle | image-utility.lisp | (defpackage #:img
(:use #:cl)
(:shadow #:load)
(:export
#:w
#:h
#:load))
(in-package #:img)
(defparameter *flip-image-p* nil)
(defparameter *normalize-to-rgba-unsigned-byte-8* t)
(defun load (path &key (flip *flip-image-p*)
(normalize-to-rgba-unsigned-byte-8
*normalize-to-rgba-unsigned-byt... | null | https://raw.githubusercontent.com/gregcman/sucle/258be4ac4daaceea06a55f893227584d3772bb47/src/image-utility/image-utility.lisp | lisp | [FIXME]image-width and image-height create garbage with cons cells?
[FIXME]bits not correct?
[FIXME]include alpha channel or not?
ra -> r r r a | (defpackage #:img
(:use #:cl)
(:shadow #:load)
(:export
#:w
#:h
#:load))
(in-package #:img)
(defparameter *flip-image-p* nil)
(defparameter *normalize-to-rgba-unsigned-byte-8* t)
(defun load (path &key (flip *flip-image-p*)
(normalize-to-rgba-unsigned-byte-8
*normalize-to-rgba-unsigned-byt... |
09534b2bd290bea133b1950a7b3fc4c90918a1917770a43d65a43e423b42d77f | ianmbloom/gudni | Deknob.hs | # LANGUAGE ScopedTypeVariables #
-----------------------------------------------------------------------------
-- |
-- Module : Graphics.Gudni.Raster.Constants
Copyright : ( c ) 2019
-- License : BSD-style (see the file libraries/base/LICENSE)
--
Maintainer :
-- Stability : experimental
... | null | https://raw.githubusercontent.com/ianmbloom/gudni/fa69f1bf08c194effca05753afe5455ebae51234/src/Graphics/Gudni/Raster/Deknob.hs | haskell | ---------------------------------------------------------------------------
|
Module : Graphics.Gudni.Raster.Constants
License : BSD-style (see the file libraries/base/LICENSE)
Stability : experimental
Portability : portable
Functions for removing "knobs" which are vertical curves that cannot be ... | # LANGUAGE ScopedTypeVariables #
Copyright : ( c ) 2019
Maintainer :
module Graphics.Gudni.Raster.Deknob
( Bezier (..)
, replaceKnobs
)
where
import Linear
import Graphics.Gudni.Figure
import qualified Data.Vector as V
import Control.Lens
import Control.Loop
It must be split into two curve... |
58bbffcea78014c2e48e0f26e9aaaa3f820750e1bfbb08bc99485f19b2e0b2ca | pandoc/pandoc-lua-marshal | QuoteType.hs | |
Copyright : © 2021 - 2023 SPDX - License - Identifier : MIT
Maintainer : >
Marshaling / unmarshaling functions of ' QuoteType ' values .
Copyright : © 2021-2023 Albert Krewinkel
SPDX-License-Identifier : MIT
Maintainer : Albert Krewinkel <tarle... | null | https://raw.githubusercontent.com/pandoc/pandoc-lua-marshal/e71315da1d377cf52cd94975c20ac04616c2d935/src/Text/Pandoc/Lua/Marshal/QuoteType.hs | haskell | |
Copyright : © 2021 - 2023 SPDX - License - Identifier : MIT
Maintainer : >
Marshaling / unmarshaling functions of ' QuoteType ' values .
Copyright : © 2021-2023 Albert Krewinkel
SPDX-License-Identifier : MIT
Maintainer : Albert Krewinkel <tarle... | |
cf1454aa343efb13822427e05750d2e2fb7c9d52402e3dba98892bd4c6cea056 | s-expressionists/Eclector | utilities.lisp | (cl:in-package #:eclector.reader.test)
(def-suite* :eclector.reader.utilities
:in :eclector.reader)
(test convert-according-to-readtable-case/smoke
"Smoke test for the CONVERT-ACCORDING-TO-READTABLE-CASE function."
(mapc (lambda (foo)
(destructuring-bind (token escape-ranges case expected) foo
... | null | https://raw.githubusercontent.com/s-expressionists/Eclector/07e314ec01944beb95a89e22b31a6b5e857330c4/test/reader/utilities.lisp | lisp | (cl:in-package #:eclector.reader.test)
(def-suite* :eclector.reader.utilities
:in :eclector.reader)
(test convert-according-to-readtable-case/smoke
"Smoke test for the CONVERT-ACCORDING-TO-READTABLE-CASE function."
(mapc (lambda (foo)
(destructuring-bind (token escape-ranges case expected) foo
... | |
c129936d6ac9b73587805b275bcd2599e41bb4281f69b39db8cfdd59de5a4d88 | otakar-smrz/elixir-fm | Derive.hs | -- |
--
-- Module : Elixir.Derive
Copyright : 2005 - 2016
-- License : GPL
--
-- Maintainer : otakar-smrz users.sf.net
-- Stability : provisional
-- Portability : portable
--
-- "ElixirFM"
module Elixir.Derive where
import Elixir.Template
import Elixir.Patterns
import Elixir.System
impo... | null | https://raw.githubusercontent.com/otakar-smrz/elixir-fm/fae5bab6dd53c15d25c1e147e7787b2c254aabf0/Haskell/ElixirFM/Elixir/Derive.hs | haskell | |
Module : Elixir.Derive
License : GPL
Maintainer : otakar-smrz users.sf.net
Stability : provisional
Portability : portable
"ElixirFM" | Copyright : 2005 - 2016
module Elixir.Derive where
import Elixir.Template
import Elixir.Patterns
import Elixir.System
import Elixir.Entity
import Elixir.Pretty
import Data.List
instance (Show a, Template a) => Pretty [(String, [(TagsType, [(Form, Lexeme a)])])] where
pretty = vcat . map pretty ... |
d609c9b5a892ea90719dca2fdc6ee9d8718be328e0c7d663c532cb79678d28f1 | BinaryAnalysisPlatform/bap | bap_expi.mli | open Core_kernel[@@warning "-D"]
open Monads.Std
open Bap_common_types
open Bap_bil
open Bap_result
open Bap_type_error
open Bap_expi_types
class context : Context.t
module type S = Expi.S
module Make(M : Monad.State.S2) : S with type ('a,'e) state = ('a,'e) M.t
include S with type ('a,'e) state = ('a,'e) Monad.Stat... | null | https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/cbdf732d46c8e38df79d9942fc49bcb97915c657/lib/bap_types/bap_expi.mli | ocaml | open Core_kernel[@@warning "-D"]
open Monads.Std
open Bap_common_types
open Bap_bil
open Bap_result
open Bap_type_error
open Bap_expi_types
class context : Context.t
module type S = Expi.S
module Make(M : Monad.State.S2) : S with type ('a,'e) state = ('a,'e) M.t
include S with type ('a,'e) state = ('a,'e) Monad.Stat... | |
a5374f4515b73ccf30e219c80ae2d3e6bd55d89b6caed15ffe9706315245520a | spechub/Hets | IOS.hs | # LANGUAGE MultiParamTypeClasses , FlexibleInstances #
|
Module : ./Common / IOS.hs
Description : An IO State Monad implementation
Copyright : ( c ) , DFKI Bremen 2010
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : provisional
Portability : non -... | null | https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/Common/IOS.hs | haskell | | An IO State Monad
not needed
modifyIOS :: (s->s) -> IOS s s
modifyIOS f = IOS (\s -> return (s, f s))
| Like fmap but changes the state type, this needs map and unmap functions | # LANGUAGE MultiParamTypeClasses , FlexibleInstances #
|
Module : ./Common / IOS.hs
Description : An IO State Monad implementation
Copyright : ( c ) , DFKI Bremen 2010
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : provisional
Portability : non -... |
73805a5fb1d483e548c5f393ff3ce535bb4f1c4087efa41842682e2c4f2ff6c1 | billstclair/trubanc-lisp | misc-types.lisp | ;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
;;;
;;; misc-types.lisp --- Various tests on the type system.
;;;
Copyright ( C ) 2005 - 2006 , loliveira(@)common - lisp.net >
;;;
;;; Permission is hereby granted, free of charge, to any person
;;; obtaining a copy of this software and associated documentation
fi... | null | https://raw.githubusercontent.com/billstclair/trubanc-lisp/5436d2eca5b1ed10bc47eec7080f6cb90f98ca65/systems/cffi_0.10.4/tests/misc-types.lisp | lisp | -*- Mode: lisp; indent-tabs-mode: nil -*-
misc-types.lisp --- Various tests on the type system.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use, copy,
modify, merge, publish, d... | Copyright ( C ) 2005 - 2006 , loliveira(@)common - lisp.net >
files ( the " Software " ) , to deal in the Software without
of the Software , and to permit persons to whom the Software is
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY ... |
c4c0e5806ba92668a1ec788cc74e7d624b1d7982dc6fb2880a7932df3a66775c | sebastiaanvisser/ghc-goals | Main.hs | module Main where
import Dep
main :: IO ()
main = putStrLn $ map undefined test
| null | https://raw.githubusercontent.com/sebastiaanvisser/ghc-goals/cf256c99c4b7e3b569bab3e6c10f0903a7c1eac4/tests/Main.hs | haskell | module Main where
import Dep
main :: IO ()
main = putStrLn $ map undefined test
| |
a7a685b55e0f1d6ff52c0227c4a80444c5573234079f7fe0d8ec9bfd1dcdd775 | basho-labs/mesos-erlang | erl_mesos_env.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2016 Basho Technologies Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
%% except in compliance with the License. You may obtain
%... | null | https://raw.githubusercontent.com/basho-labs/mesos-erlang/b90bf62c2d614f12a0ac3cd55a915b3737198da5/src/erl_mesos_env.erl | erlang | -------------------------------------------------------------------
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,
KIND, either express or implied. See the ... | Copyright ( c ) 2016 Basho Technologies Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(erl_mesos_env).
-export([get_value/1,
get_value/2,
... |
fbef2416308c97764af4ed76b0bf7caca2a304378abe2f10f8b1b49a5ce322fa | rtoy/ansi-cl-tests | read-byte.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sat Jan 17 17:30:49 2004
;;;; Contains: Tests of READ-BYTE, WRITE-BYTE
(in-package :cl-test)
(deftest read-byte.1
(let ((s (open "foo.txt"
:direction :output
:if-exists :supersede
:element-type '(unsigned-byte 8... | null | https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/read-byte.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of READ-BYTE, WRITE-BYTE
Error tests | Author :
Created : Sat Jan 17 17:30:49 2004
(in-package :cl-test)
(deftest read-byte.1
(let ((s (open "foo.txt"
:direction :output
:if-exists :supersede
:element-type '(unsigned-byte 8))))
(values
(write-byte 17 s)
(close s)
(progn
... |
ffae32378a1914cf063f9538d30545f363f089727aab4becdd092ec0bea27dd2 | AccelerateHS/accelerate-examples | Tree.hs | --
A Barns - Hut tree
--
module Common.Tree
where
| null | https://raw.githubusercontent.com/AccelerateHS/accelerate-examples/a973ee423b5eadda6ef2e2504d2383f625e49821/examples/n-body/Common/Tree.hs | haskell | A Barns - Hut tree
module Common.Tree
where
| |
5fec5ad082a3ccc30495644950564517d974e44f04686ae1b25fedfa7053962e | smallmelon/sdzmmo | mysql_recv.erl | %%%-------------------------------------------------------------------
%%% File : mysql_recv.erl
Author : < >
. : Handles data being received on a MySQL socket .
%%% per-row framing and sends each row to parent.
%%%
Created : 4 Aug 2005 by < >
%%%
Note : All MySQL code was written b... | null | https://raw.githubusercontent.com/smallmelon/sdzmmo/254ff430481de474527c0e96202c63fb0d2c29d2/src/lib/mysql/mysql_recv.erl | erlang | -------------------------------------------------------------------
File : mysql_recv.erl
per-row framing and sends each row to parent.
in the file mysql.erl - I just moved it here.
See the file COPYING
Signals this receiver process can send to it's parent
{mysql_... | Author : < >
. : Handles data being received on a MySQL socket .
Created : 4 Aug 2005 by < >
Note : All MySQL code was written by , originally
Copyright ( c ) 2001 - 2004 Kungliga Tekniska Högskolan
( the parent is a mysql_conn connection handler ) :
{ mysql_recv ... |
4ce99271e2861acc74303c8ceb8a5c80143955cd7ea107640bce8178c1ad34e7 | alanzplus/EOPL | 1.34.rkt | #lang eopl
(require "bst.rkt")
(define path
(lambda (int tree)
(aux int tree '())))
(define aux
(lambda (int tree paths)
(if (null? tree)
'()
(let ((val (val-of-node tree)))
(cond
((> int val)
(aux int (rtree tree) (append paths (list 'right))))
... | null | https://raw.githubusercontent.com/alanzplus/EOPL/d7b06392d26d93df851d0ca66d9edc681a06693c/EOPL/ch1/1.34.rkt | racket | #lang eopl
(require "bst.rkt")
(define path
(lambda (int tree)
(aux int tree '())))
(define aux
(lambda (int tree paths)
(if (null? tree)
'()
(let ((val (val-of-node tree)))
(cond
((> int val)
(aux int (rtree tree) (append paths (list 'right))))
... | |
69252f88f6ba7af3e5dd70d70e75765b9981063fe6a08a93cbd1861fa604ec33 | esuomi/git-revisions | core_test.clj | (ns git-revisions.core-test
(:require [clojure.java.shell :as sh]
[clojure.test :refer :all]
[git-revisions.core :as core]))
(defn ^:private static-sh
[commands]
(fn [& args]
(if-let [res (get commands args)]
{:exit 0
:out res}
{:exit -1
:err (str "unhandled ... | null | https://raw.githubusercontent.com/esuomi/git-revisions/b529ab43f0b1efee6db719927e1e461627ff6417/test/git_revisions/core_test.clj | clojure | clojure.java.shell/sh prepends ' to all rows in multi-row output, this is a bit weird but alas
current commit
tree metadata
current branch
previous matching tag
commit count | (ns git-revisions.core-test
(:require [clojure.java.shell :as sh]
[clojure.test :refer :all]
[git-revisions.core :as core]))
(defn ^:private static-sh
[commands]
(fn [& args]
(if-let [res (get commands args)]
{:exit 0
:out res}
{:exit -1
:err (str "unhandled ... |
8a90a44153502239061ff03975a600f4f37c1382e78d6db467b86b4541648eaf | maravillas/lein-js | closure_test.clj | (ns closure-test
(:use [clojure.test]
[clojure.contrib reflect])
(:use [lein-js.closure] :reload-all)
(:import [com.google.javascript.jscomp CompilerOptions]))
(defn- option-field
[instance field]
(get-field CompilerOptions field instance))
(deftest test-default-compiler-options
(let [o (make-compiler-op... | null | https://raw.githubusercontent.com/maravillas/lein-js/3df63d80ebed8813ac67bdf554d560d031611290/test/closure_test.clj | clojure | (ns closure-test
(:use [clojure.test]
[clojure.contrib reflect])
(:use [lein-js.closure] :reload-all)
(:import [com.google.javascript.jscomp CompilerOptions]))
(defn- option-field
[instance field]
(get-field CompilerOptions field instance))
(deftest test-default-compiler-options
(let [o (make-compiler-op... | |
013ea3905662554621138e092f668253c95b98c38f2fbd82585291519abe9a0e | rescript-association/genType | predef.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/rescript-association/genType/c44251e969fb10d27a38d2bdeff6a5f4d778594f/src/compiler-libs-406/predef.mli | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Types
val type_int: type_expr
val type_char: type_expr
val type_string: type_expr
val type_bytes: ... |
1f33a23c976177f83618f4b2233a34719cbf8b85a331eb065467aed93e3f5879 | spurious/sagittarius-scheme-mirror | cpstak.scm | CPSTAK -- A continuation - passing version of the TAK benchmark .
A good test of first class procedures and tail recursion .
(define (cpstak x y z)
(define (tak x y z k)
(if (not (< y x))
(k z)
(tak (- x 1)
y
z
(lambda (v1)
(tak (- y 1)
... | null | https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/bench/gambit-benchmarks/cpstak.scm | scheme | CPSTAK -- A continuation - passing version of the TAK benchmark .
A good test of first class procedures and tail recursion .
(define (cpstak x y z)
(define (tak x y z k)
(if (not (< y x))
(k z)
(tak (- x 1)
y
z
(lambda (v1)
(tak (- y 1)
... | |
0130f669b3f0e44c3b60d7d7e951700e1ec5ccbe9f52ba4d099069590472d6ff | tek/chiasma | Measure.hs | module Chiasma.Ui.Data.Measure where
import Control.Lens (makeClassy)
import Prettyprinter (Pretty (..), (<+>))
import Chiasma.Data.Axis (Axis)
import Chiasma.Data.TmuxId (PaneId (..))
import Chiasma.Ui.Data.Tree (NNode, NTree)
data MPane =
MPane {
_paneId :: PaneId,
_mainPosition :: Int,
_offPosition ... | null | https://raw.githubusercontent.com/tek/chiasma/51751e19a416a9afe12f7797df8a67990b266240/packages/chiasma/lib/Chiasma/Ui/Data/Measure.hs | haskell | module Chiasma.Ui.Data.Measure where
import Control.Lens (makeClassy)
import Prettyprinter (Pretty (..), (<+>))
import Chiasma.Data.Axis (Axis)
import Chiasma.Data.TmuxId (PaneId (..))
import Chiasma.Ui.Data.Tree (NNode, NTree)
data MPane =
MPane {
_paneId :: PaneId,
_mainPosition :: Int,
_offPosition ... | |
578c47428ba7424ec2a11a8b41c932c373cb7e3c87933fe40784439f169d7b52 | simmone/racket-simple-qr | finder-pattern-center-points.rkt | #lang racket
(require "../../../../share/func.rkt")
(require "../../../../share/draw/draw.rkt")
(provide (contract-out
[write-report-finder-pattern-center-points (-> natural? list? natural? list? path-string? void?)]
))
(define (write-report-finder-pattern-center-points module_width center_points... | null | https://raw.githubusercontent.com/simmone/racket-simple-qr/904f1491bc521badeafeabd0d7d7e97e3d0ee958/simple-qr/read/lib/express/finder-pattern-center-points/finder-pattern-center-points.rkt | racket | #lang racket
(require "../../../../share/func.rkt")
(require "../../../../share/draw/draw.rkt")
(provide (contract-out
[write-report-finder-pattern-center-points (-> natural? list? natural? list? path-string? void?)]
))
(define (write-report-finder-pattern-center-points module_width center_points... | |
45f403b6245e74025f539b3748928bcb0a121c69a92578be277209b9720620ab | fission-codes/fission | Initializer.hs | module Fission.Web.Server.App.Domain.Initializer (module Fission.Web.Server.App.Domain.Initializer.Class) where
import Fission.Web.Server.App.Domain.Initializer.Class
| null | https://raw.githubusercontent.com/fission-codes/fission/11d14b729ccebfd69499a534445fb072ac3433a3/fission-web-server/library/Fission/Web/Server/App/Domain/Initializer.hs | haskell | module Fission.Web.Server.App.Domain.Initializer (module Fission.Web.Server.App.Domain.Initializer.Class) where
import Fission.Web.Server.App.Domain.Initializer.Class
| |
d39f137cdbdb580c12c2a0034875718860bb11a84e140f962538c26f13f89b58 | borodust/alien-works | renderable.lisp | (cl:in-package :%alien-works.filament)
(defun renderable-manager (engine)
(%filament:get-renderable-manager
'(claw-utils:claw-pointer %filament::engine) engine))
;;;
;;; RENDERABLE
;;;
(u:define-enumval-extractor renderable-primitive-type-enum
%filament:renderable-manager+primitive-type)
(warp-intricate-buil... | null | https://raw.githubusercontent.com/borodust/alien-works/30ece406a7416a7b4690165dde350cd2677335be/src/graphics/filament/renderable.lisp | lisp |
RENDERABLE
| (cl:in-package :%alien-works.filament)
(defun renderable-manager (engine)
(%filament:get-renderable-manager
'(claw-utils:claw-pointer %filament::engine) engine))
(u:define-enumval-extractor renderable-primitive-type-enum
%filament:renderable-manager+primitive-type)
(warp-intricate-builder-option renderable-b... |
6c9a93ddaa5c2e338af5dee2a0df3a8d9c624f187665d6cd6c6149df5ee2da9b | avsm/platform | xml_iter.mli | TyXML
*
* Copyright ( C ) 2004 < >
* Copyright ( C ) 2011 ,
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version... | null | https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/tyxml.4.3.0/lib/xml_iter.mli | ocaml | * Basic iterators over XML tree (functorial interface).
* Recursively edit attributes for the element and all its children.
* The following can safely be exported by higher level libraries,
because removing an attribute from a element is always legal.
* Exporting the following by higher level libraries would d... | TyXML
*
* Copyright ( C ) 2004 < >
* Copyright ( C ) 2011 ,
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version... |
bc793a5b869be86063a7fb1bf3e31e20fe28edbdce329dc7a5e86a10b291989b | sky-big/RabbitMQ | many_node_ha.erl | The contents of this file are subject to the Mozilla Public License
%% Version 1.1 (the "License"); you may not use this file except in
%% compliance with the License. You may obtain a copy of the License
%% at /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITHOUT WARRANTY OF ... | null | https://raw.githubusercontent.com/sky-big/RabbitMQ/d7a773e11f93fcde4497c764c9fa185aad049ce2/plugins-src/rabbitmq-test/test/src/many_node_ha.erl | erlang | Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License
at /
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and
limitations under the License.
TODO: this seem... | The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is RabbitMQ .
The Initial Developer of the Original Code is GoPivotal , Inc.
Copyright ( c ) 2007 - 2014 GoPivotal , Inc. All rights reserved .
-module(... |
bc887833f3ddaf7af9e119f636d30b4f5c46532ec1f85f3d8d5d66424dfce0a7 | scalaris-team/scalaris | cbf.erl | 2016 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
% you may not use this file except in compliance with the License.
% You may obtain a copy of the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, software
distribut... | null | https://raw.githubusercontent.com/scalaris-team/scalaris/feb894d54e642bb3530e709e730156b0ecc1635f/src/rrepair/cbf.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... | 2016 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
@author < >
,
2013 IEEE Transactions on Knowledge and Data Engineering 25.10
-module(cbf).
-author(''... |
072beb4b933d07c955885959dcfd0d3985088aa2bb6757e891c0ab56dbb84d83 | dpiponi/Moodler | string_warp.hs | do
(x0, y0) <- mouse
let (x, y) = quantise2 quantum (x0, y0)
root <- currentPlane
string_id10 <- new' "string_id"
in11 <- plugin' (string_id10 ! "input") (x+(-27.0), y+(1.0)) (Inside root)
setColour in11 "(0, 0, 1)"
out12 <- plugout' (string_id10 ! "result") (x+(14.0), y+(1.0)) (Inside roo... | null | https://raw.githubusercontent.com/dpiponi/Moodler/a0c984c36abae52668d00f25eb3749e97e8936d3/Moodler/scripts/string_warp.hs | haskell | do
(x0, y0) <- mouse
let (x, y) = quantise2 quantum (x0, y0)
root <- currentPlane
string_id10 <- new' "string_id"
in11 <- plugin' (string_id10 ! "input") (x+(-27.0), y+(1.0)) (Inside root)
setColour in11 "(0, 0, 1)"
out12 <- plugout' (string_id10 ! "result") (x+(14.0), y+(1.0)) (Inside roo... | |
ac43b175f78ef2bebbc93ad8bc95378000d9a9db87421a737334f70c6ff6dee2 | afiskon/erlang-task-queue | task_queue_workers_sup.erl | -module(task_queue_workers_sup).
-behaviour(supervisor).
%% API
-export([start_link/1]).
%% Supervisor callbacks
-export([init/1]).
-define(CHILD(Id, Mod, Type, Args), {Id, {Mod, start_link, Args},
transient, 5000, Type, [Mod]}).
%%%=============================================... | null | https://raw.githubusercontent.com/afiskon/erlang-task-queue/1d3a48d0620ed2108b0cf2fdbd2531778597970f/src/task_queue_workers_sup.erl | erlang | API
Supervisor callbacks
===================================================================
API functions
===================================================================
===================================================================
Supervisor callbacks
====================================================... | -module(task_queue_workers_sup).
-behaviour(supervisor).
-export([start_link/1]).
-export([init/1]).
-define(CHILD(Id, Mod, Type, Args), {Id, {Mod, start_link, Args},
transient, 5000, Type, [Mod]}).
start_link(Options) ->
supervisor:start_link(?MODULE, Options).
init(Opt... |
552ad610481178f6dbd0bcc67d66425710997d823aa2c9a757812e5ad46595ca | manu291/dypgen | parse_tree.ml | type tree = Int of int | Node of (tree * tree * tree)
let rec print_tree t = match t with
| Int x -> print_int x
| Node (t1,t2,t3) -> (
print_string "(";
print_tree t1;
print_string "+";
print_tree t2;
print_string "*";
print_tree t3;
print_string ")")
let print_forest fo... | null | https://raw.githubusercontent.com/manu291/dypgen/59d11b4c70b8d0971348ca6913839ff1fb4f9b5f/demos/position/parse_tree.ml | ocaml | type tree = Int of int | Node of (tree * tree * tree)
let rec print_tree t = match t with
| Int x -> print_int x
| Node (t1,t2,t3) -> (
print_string "(";
print_tree t1;
print_string "+";
print_tree t2;
print_string "*";
print_tree t3;
print_string ")")
let print_forest fo... | |
66efdbb7cbcd5b7073e64f4a2bc3f371a388cceb36c9a637ecb51da5c19cdcc0 | gleam-lang/rebar_gleam | rebar_gleam_prv_compile.erl | -module(rebar_gleam_prv_compile).
-behaviour(provider).
-export([init/1, do/1, format_error/1]).
-define(PROVIDER, compile).
-define(DEPS, [lock]).
%% ===================================================================
%% Public API
%% ===================================================================
-spec init(re... | null | https://raw.githubusercontent.com/gleam-lang/rebar_gleam/2e9f8d4726f4c38db08e5dbc894c67da6159489f/src/rebar_gleam_prv_compile.erl | erlang | ===================================================================
Public API
=================================================================== | -module(rebar_gleam_prv_compile).
-behaviour(provider).
-export([init/1, do/1, format_error/1]).
-define(PROVIDER, compile).
-define(DEPS, [lock]).
-spec init(rebar_state:t()) -> {ok, rebar_state:t()}.
init(State) ->
Provider = providers:create([
{name, ?PROVIDER},
{module, ?MODULE},
{bar... |
4541da07fa6a6e2e0620544c7ca81376772b8c090bbdefe03bbbd242dfee1057 | onyx-platform/onyx | tail_params_test.clj | (ns onyx.peer.tail-params-test
(:require [clojure.core.async :refer [chan >!! <!! close! sliding-buffer]]
[clojure.test :refer [deftest is testing]]
[onyx.plugin.core-async :refer [take-segments!]]
[onyx.test-helper :refer [load-config with-test-env add-test-env-peers!]]
... | null | https://raw.githubusercontent.com/onyx-platform/onyx/74f9ae58cdbcfcb1163464595f1e6ae6444c9782/test/onyx/peer/tail_params_test.clj | clojure | (ns onyx.peer.tail-params-test
(:require [clojure.core.async :refer [chan >!! <!! close! sliding-buffer]]
[clojure.test :refer [deftest is testing]]
[onyx.plugin.core-async :refer [take-segments!]]
[onyx.test-helper :refer [load-config with-test-env add-test-env-peers!]]
... | |
26923f0f5c41b48b98285e2a1b9279b2248c4542e99dd8ab49403e8cfbecdd79 | huangz1990/SICP-answers | 23-another-for-each.scm | 23-another-for-each.scm
(define (for-each p lst)
(cond ((not (null? lst))
(p (car lst))
(for-each p (cdr lst)))))
| null | https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp2/code/23-another-for-each.scm | scheme | 23-another-for-each.scm
(define (for-each p lst)
(cond ((not (null? lst))
(p (car lst))
(for-each p (cdr lst)))))
| |
c41e11139ee8ef46eb7a41eb9bd45041a37a7edbad19f1e66c01cb5a37b8ec39 | xh4/web-toolkit | style.lisp | (in-package :component)
(defgeneric component-class-style (component-name))
(defun css-properties ()
(loop for class in (class-direct-subclasses (find-class 'css:property))
for name = (class-name class)
when (fboundp name)
collect name))
(define-condition on-css-property ()
((property
:initarg... | null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/component/style.lisp | lisp | (in-package :component)
(defgeneric component-class-style (component-name))
(defun css-properties ()
(loop for class in (class-direct-subclasses (find-class 'css:property))
for name = (class-name class)
when (fboundp name)
collect name))
(define-condition on-css-property ()
((property
:initarg... | |
c4ce8f4965e24a5d5086c3dc02adb7b164643220486d947a59cd58da7a5e2a26 | thheller/shadow-cljsjs | storage.cljs | (ns firebase.storage
{:skip-goog-provide true}
(:require ["@firebase/storage"]))
| null | https://raw.githubusercontent.com/thheller/shadow-cljsjs/eaf350d29d45adb85c0753dff77e276e7925a744/src/main/firebase/storage.cljs | clojure | (ns firebase.storage
{:skip-goog-provide true}
(:require ["@firebase/storage"]))
| |
999b09054ff2fe6788f051f873aef1e55dc05e923b049f25d78fd0b3d5927062 | shayan-najd/NativeMetaprogramming | T7220.hs | # OPTIONS_GHC -fno - warn - redundant - constraints #
# LANGUAGE FlexibleContexts #
# LANGUAGE FunctionalDependencies #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TypeFamilies #
# LANGUAGE ScopedTypeVariables #
module Test2 where
class C a b | b -> a
data A = A
data X a = X
data Y = Y
... | null | https://raw.githubusercontent.com/shayan-najd/NativeMetaprogramming/24e5f85990642d3f0b0044be4327b8f52fce2ba3/testsuite/tests/typecheck/should_compile/T7220.hs | haskell | # LANGUAGE RankNTypes #
This line causes an error (see below) | # OPTIONS_GHC -fno - warn - redundant - constraints #
# LANGUAGE FlexibleContexts #
# LANGUAGE FunctionalDependencies #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
# LANGUAGE ScopedTypeVariables #
module Test2 where
class C a b | b -> a
data A = A
data X a = X
data Y = Y
type family TF b
f :: (for... |
6c4f943b8986173a2ca8e1d17eaa33376090238044dcc03f49ef67e3dc2572ea | finnishtransportagency/harja | sampo_api.clj | (ns harja.palvelin.integraatiot.vayla-rest.sampo-api
(:require [com.stuartsierra.component :as component]
[compojure.core :refer [POST]]
[taoensso.timbre :as log]
[harja.palvelin.asetukset :refer [ominaisuus-kaytossa?]]
[harja.palvelin.komponentit.http-palvelin :refer [... | null | https://raw.githubusercontent.com/finnishtransportagency/harja/af09d60911ed31ea98634a9d5c7f4b062e63504f/src/clj/harja/palvelin/integraatiot/vayla_rest/sampo_api.clj | clojure | (ns harja.palvelin.integraatiot.vayla-rest.sampo-api
(:require [com.stuartsierra.component :as component]
[compojure.core :refer [POST]]
[taoensso.timbre :as log]
[harja.palvelin.asetukset :refer [ominaisuus-kaytossa?]]
[harja.palvelin.komponentit.http-palvelin :refer [... | |
884acd89292b5ab982052770e33c387ac383aae2c9bfc18edbfad2609d7c77e4 | imrehg/ypsilon | range.scm | #!nobacktrace
Ypsilon Scheme System
Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited .
See license.txt for terms and conditions of use .
(library (ypsilon gtk range)
(export gtk_range_get_adjustment
gtk_range_get_fill_level
gtk_range_get_inverted
gtk_range_get_lo... | null | https://raw.githubusercontent.com/imrehg/ypsilon/e57a06ef5c66c1a88905b2be2fa791fa29848514/sitelib/ypsilon/gtk/range.scm | scheme | GtkAdjustment* gtk_range_get_adjustment (GtkRange* range)
gdouble gtk_range_get_fill_level (GtkRange* range)
gboolean gtk_range_get_inverted (GtkRange* range)
GtkSensitivityType gtk_range_get_lower_stepper_sensitivity (GtkRange* range)
gboolean gtk_range_get_restrict_to_fill_level (GtkRange* range)
gboolean gtk_r... | #!nobacktrace
Ypsilon Scheme System
Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited .
See license.txt for terms and conditions of use .
(library (ypsilon gtk range)
(export gtk_range_get_adjustment
gtk_range_get_fill_level
gtk_range_get_inverted
gtk_range_get_lo... |
b0c032e05c6095ed4e192920ea26469d218ed9c5d213bb2d90dd6a3f71186a11 | keigoi/ocaml-mpst-light | example.ml | open Mpst_light
module OAuthExample = struct
let c = {role_label=
{make_obj=(fun v->object method role_C=v end);
call_obj=(fun obj->obj#role_C)};
role_index=idx0}
let s = {role_label=
{make_obj=(fun v->object method role_S=v end);
call_obj=(fun obj-... | null | https://raw.githubusercontent.com/keigoi/ocaml-mpst-light/099658369798b9588cb744ee0b95d09ff6e50d9f/examples/example.ml | ocaml | open Mpst_light
module OAuthExample = struct
let c = {role_label=
{make_obj=(fun v->object method role_C=v end);
call_obj=(fun obj->obj#role_C)};
role_index=idx0}
let s = {role_label=
{make_obj=(fun v->object method role_S=v end);
call_obj=(fun obj-... | |
a173582c76674b675daa2a130de7518ae27ebf841d89ec1623216537c24e25d5 | mbutterick/typesetting | hacs.rkt | #lang debug racket
(require racket/generator graph racket/set)
(provide (except-out (all-defined-out) define/contract))
(define-syntax-rule (define/contract EXPR CONTRACT . BODY)
(define EXPR . BODY))
(define-syntax when-debug
(let ()
(define debug #t)
(if debug
(make-rename-transformer #'begin)
... | null | https://raw.githubusercontent.com/mbutterick/typesetting/93a682a1581f3c1564b6f39fc05a5fe1a09a5ccb/csp/csp/hacs.rkt | racket | apply proc in many-to-many style
anything is ok for now
pattern is mix of values and boxed symbols (indicating variables to persist)
use boxes here as cheap way to distinguish id symbols from value symbols
return all elements that have min value.
return all elements that have max value.
name is on left
otherwis... | #lang debug racket
(require racket/generator graph racket/set)
(provide (except-out (all-defined-out) define/contract))
(define-syntax-rule (define/contract EXPR CONTRACT . BODY)
(define EXPR . BODY))
(define-syntax when-debug
(let ()
(define debug #t)
(if debug
(make-rename-transformer #'begin)
... |
2379317e07a433ec8200968a8fc2caad5157eef0a70fcff6a8e8663a53357e58 | imrehg/ypsilon | build-boot-fasl.scm | Ypsilon Scheme System
Copyright ( c ) 2004 - 2008 Y.FUJITA , LittleWing Company Limited .
See license.txt for terms and conditions of use .
#!core
(begin
(import (core primitives)
(core destructuring)
(core optimize)
(core parameters)
(core io)
(core files))
... | null | https://raw.githubusercontent.com/imrehg/ypsilon/e57a06ef5c66c1a88905b2be2fa791fa29848514/heap/build-boot-fasl.scm | scheme | [end] | Ypsilon Scheme System
Copyright ( c ) 2004 - 2008 Y.FUJITA , LittleWing Company Limited .
See license.txt for terms and conditions of use .
#!core
(begin
(import (core primitives)
(core destructuring)
(core optimize)
(core parameters)
(core io)
(core files))
... |
8136f514f89564e7a1c9f486948840016f35c7d15dbf172b96fa3bb96212a08e | seckcoder/iu_c311 | interp.rkt | ; interpreter of let-lang
#lang eopl
(require "../base/utils.rkt")
(require "store.rkt")
(require "grammar.rkt")
(require "ds.rkt")
(require "scheduler.rkt")
(require racket/file)
(provide (all-defined-out))
(define apply-proc
(lambda (proc1 arg cont)
(cases
proc proc1
(closure
(var body e... | null | https://raw.githubusercontent.com/seckcoder/iu_c311/a1215983b6ab08df32058ef1e089cb294419e567/racket/thread1/interp.rkt | racket | interpreter of let-lang
todo (expval support)
(display cont)(newline)(newline) |
#lang eopl
(require "../base/utils.rkt")
(require "store.rkt")
(require "grammar.rkt")
(require "ds.rkt")
(require "scheduler.rkt")
(require racket/file)
(provide (all-defined-out))
(define apply-proc
(lambda (proc1 arg cont)
(cases
proc proc1
(closure
(var body env)
(let* ((ref (n... |
25c65668a44de24649fb9884e57cd612cbf3268706a0e75223ae309e08031a92 | diku-dk/futhark | Query.hs | -- | @futhark query@
module Futhark.CLI.Query (main) where
import Futhark.Compiler
import Futhark.Util.Loc
import Futhark.Util.Options
import Language.Futhark.Query
import Language.Futhark.Syntax
import Text.Read (readMaybe)
-- | Run @futhark query@.
main :: String -> [String] -> IO ()
main = mainWithOptions () [] "p... | null | https://raw.githubusercontent.com/diku-dk/futhark/156f24a8d0fdb7d9ad853b074e786849998ce602/src/Futhark/CLI/Query.hs | haskell | | @futhark query@
| Run @futhark query@.
The 'offset' part of the Pos is not used and can be arbitrary. | module Futhark.CLI.Query (main) where
import Futhark.Compiler
import Futhark.Util.Loc
import Futhark.Util.Options
import Language.Futhark.Query
import Language.Futhark.Syntax
import Text.Read (readMaybe)
main :: String -> [String] -> IO ()
main = mainWithOptions () [] "program line col" $ \args () ->
case args of
... |
c55a2497c4ed59bc1346e997fa4d773e06b1693307f86132cf4d68e9bed7f0d4 | deis/example-clojure-ring | web.clj | (ns helloworld.web
(:use compojure.core [ring.adapter.jetty :only [run-jetty]])
(:require [compojure.route :as route]
[compojure.handler :as handler]))
(def message (get (System/getenv) "POWERED_BY" "Deis"))
(defroutes main-routes
(GET "/" [] (apply str "Powered by " message))
(route/resources "/"... | null | https://raw.githubusercontent.com/deis/example-clojure-ring/878bd7802fb6f35058e9a6478cbab01595835fb0/src/helloworld/web.clj | clojure | (ns helloworld.web
(:use compojure.core [ring.adapter.jetty :only [run-jetty]])
(:require [compojure.route :as route]
[compojure.handler :as handler]))
(def message (get (System/getenv) "POWERED_BY" "Deis"))
(defroutes main-routes
(GET "/" [] (apply str "Powered by " message))
(route/resources "/"... | |
96225e406637a257fc8d1ce09d15f43106a26a4cbb9966343e9c062f1e493f55 | digitallyinduced/ihp | ValidateField.hs | |
Module : .
Description : Validation for records
Copyright : ( c ) digitally induced GmbH , 2020
Use ' ' and ' validateFieldIO ' together with the validation functions to do simple validations .
Also take a look at ' IHP.ValidationSupport . ValidateIsUnique.validateIsUnique ' for e.g. checking that an e... | null | https://raw.githubusercontent.com/digitallyinduced/ihp/62ca014a3d986e35da0fb05a4b1e84e5831e87cf/IHP/ValidationSupport/ValidateField.hs | haskell |
>>> Validator Text
>>> Validator Int
| Validates a record field using a given validator function.
> let project :: Project = newRecord
> project
> |> getValidationFailure #name -- Just "This field cannot be empty"
>
>
> project
> |> getValidationFailure #name -- Nothing
> let project :: Proje... | |
Module : .
Description : Validation for records
Copyright : ( c ) digitally induced GmbH , 2020
Use ' ' and ' validateFieldIO ' together with the validation functions to do simple validations .
Also take a look at ' IHP.ValidationSupport . ValidateIsUnique.validateIsUnique ' for e.g. checking that an e... |
8b296c804a51a62c4034cdd7d625c3ea16a624e04918f727a2663f5eb7e70773 | gafiatulin/codewars | FactorialTail.hs | -- Factorial tail
-- /
module Codewars.Kata.FactorialTail where
import Data.List (group)
import Control.Arrow ((&&&))
zeroes :: Integral a => a -> a -> a
zeroes base n = minimum . map (f . (head &&& length)) . group . pd $ base
where f (a, b) = (`div` fromIntegral b) . sum . map (n `div`) $ [a^i | i <- [1.. floo... | null | https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/4%20kyu/FactorialTail.hs | haskell | Factorial tail
/ |
module Codewars.Kata.FactorialTail where
import Data.List (group)
import Control.Arrow ((&&&))
zeroes :: Integral a => a -> a -> a
zeroes base n = minimum . map (f . (head &&& length)) . group . pd $ base
where f (a, b) = (`div` fromIntegral b) . sum . map (n `div`) $ [a^i | i <- [1.. floor (logBase (fromIntegra... |
51bfd7f27376005f07499aa9f150e4e1ad67c175c904e66c5a6b8d3ecfa9f0d5 | polyfy/polylith | interface.clj | (ns polylith.clj.core.migrator.interface
(:require [polylith.clj.core.migrator.core :as core]))
(defn migrate [ws-dir workspace]
(core/migrate ws-dir workspace))
| null | https://raw.githubusercontent.com/polyfy/polylith/febea3d8a9b30a60397594dda3cb0f25154b8d8d/components/migrator/src/polylith/clj/core/migrator/interface.clj | clojure | (ns polylith.clj.core.migrator.interface
(:require [polylith.clj.core.migrator.core :as core]))
(defn migrate [ws-dir workspace]
(core/migrate ws-dir workspace))
| |
b6a2c0f9e2156b54293add5c0d4a7fcb70452005ac9806ac90506f9338e03dd3 | nasa/PRECiSA | LexRawSpecLang.hs | -- Notices:
--
Copyright 2020 United States Government as represented by the Administrator of the National Aeronautics and Space Administration . All Rights Reserved .
-- Disclaimers
No Warranty : THE SUBJECT SOFTWARE IS PROVIDED " AS IS " WITHOUT ANY WARRANTY OF ANY KIND , EITHER EXPRESSED , IMPLIED , OR STATUTO... | null | https://raw.githubusercontent.com/nasa/PRECiSA/91e1e7543c5888ad5fb123d3462f71d085b99741/PRECiSA/src/Parser/LexRawSpecLang.hs | haskell | Notices:
Disclaimers
# LINE 3 "LexSpecLang.x" #
# OPTIONS -fno-warn-incomplete-patterns #
reserved words and symbols
string literals
integer literals
identifiers
double precision float literals
character literals
-----------------------------------------------------------------
A modified "posn" wrapper.
----... | Copyright 2020 United States Government as represented by the Administrator of the National Aeronautics and Space Administration . All Rights Reserved .
No Warranty : THE SUBJECT SOFTWARE IS PROVIDED " AS IS " WITHOUT ANY WARRANTY OF ANY KIND , EITHER EXPRESSED , IMPLIED , OR STATUTORY , INCLUDING , BUT NOT LIMIT... |
10f7c766bfe2e0abd31365309dbad8a62efc5dbdd90db428b5143802fbebb0df | reanimate/reanimate | doc_seqA.hs | #!/usr/bin/env stack
-- stack runghc --package reanimate
module Main(main) where
import Reanimate
import Reanimate.Builtin.Documentation
main :: IO ()
main = reanimate $ docEnv (drawBox `seqA` drawCircle)
| null | https://raw.githubusercontent.com/reanimate/reanimate/5ea023980ff7f488934d40593cc5069f5fd038b0/examples/doc_seqA.hs | haskell | stack runghc --package reanimate | #!/usr/bin/env stack
module Main(main) where
import Reanimate
import Reanimate.Builtin.Documentation
main :: IO ()
main = reanimate $ docEnv (drawBox `seqA` drawCircle)
|
b0518cf9dd1cb141c00200834474d3e4df82c3cd4d433d324b601fe7053b8c01 | dselsam/arc | Grid.hs | Copyright ( c ) 2020 Microsoft Corporation . All rights reserved .
Released under Apache 2.0 license as described in the file LICENSE .
Authors : , , .
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TemplateHaskell #
# LANGUAGE UndecidableInstances #
# LANGUAGE InstanceSigs #
# LANGUAGE TypeFamilies #
# LAN... | null | https://raw.githubusercontent.com/dselsam/arc/7e68a7ed9508bf26926b0f68336db05505f4e765/src/Lib/Grid.hs | haskell | # LANGUAGE StrictData #
TODO: duplication
g1 takes precedence!
Just for this file, since we can't qualify `Grid` here
unsafe
unsafe
redundant sameDims check, but helpful short circuit
TODO: throw error or keep Maybe?
---------------
---------------
---------------
Combinator Instances
---------------
TODO : do... | Copyright ( c ) 2020 Microsoft Corporation . All rights reserved .
Released under Apache 2.0 license as described in the file LICENSE .
Authors : , , .
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TemplateHaskell #
# LANGUAGE UndecidableInstances #
# LANGUAGE InstanceSigs #
# LANGUAGE TypeFamilies #
# LAN... |
f5c49bbecb79e58b4bcda2cc700a3c09b7225fcbedc6308e653973f2753837a5 | practicalli/clojure-through-code | 03-using-data-structures.clj | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Using Clojure data structures
(ns clojure-through-code.03-using-data-structures)
Defining things is easy in Clojure
Defining things is as simple as giving a name to a value , of course in Clojure the evaluation of a function is also a value .
(def person "Jane Doe")
;; Names are... | null | https://raw.githubusercontent.com/practicalli/clojure-through-code/4409a728db84965c2b6abe13d4dc073cbf8f706f/src/clojure_through_code/03-using-data-structures.clj | clojure |
Names are of course case sensitive, so Person is not the same as person
Here we are defining a name for a vector, which contains numbers, a string and name of another def.
You can also dynamically re-define a name to points to a different value
the original value that defined my-data remains unchanged (its immuta... | Using Clojure data structures
(ns clojure-through-code.03-using-data-structures)
Defining things is easy in Clojure
Defining things is as simple as giving a name to a value , of course in Clojure the evaluation of a function is also a value .
(def person "Jane Doe")
(def Person "James Doh")
Clojure uses ... |
659e0369c083d1c5c8e6bbabd0e434a3d7d0316f6a997ad0e481c27f1428b7c9 | spawnfest/eep49ers | ssl_pem_cache.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 20016 - 2018 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applica... | null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/ssl/src/ssl_pem_cache.erl | erlang |
%CopyrightBegin%
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 lan... | Copyright Ericsson AB 20016 - 2018 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(ssl_pem_cache).
-behaviour(gen_server).
Internal application API
-export([start_link/1,
start_link_d... |
47b5a22606c8e19e83669eaa8c32b78e3d8cb9e9401c354495347fb5f3a49ad4 | borkdude/speculative | specs.cljc | (ns speculative.specs
"Primitive specs"
(:refer-clojure :exclude [seqable? reduceable? regexp?])
(:require
[clojure.spec.alpha :as s]
[clojure.spec.gen.alpha :as gen]
[clojure.string :as str]
#?(:cljs [goog.string])))
#?(:cljs (def ^:private
before-1_10_439?
(and *clojurescript-... | null | https://raw.githubusercontent.com/borkdude/speculative/4e773794a4065a84bdadd997516e52c76ab51b1f/src/speculative/specs.cljc | clojure | workaround for -1966
avoid generation of strings and vectors (those are interpreted as pairs when using conj with maps
Atoms
End Atoms
test matcher-gen:
End regex stuff
Scratch | (ns speculative.specs
"Primitive specs"
(:refer-clojure :exclude [seqable? reduceable? regexp?])
(:require
[clojure.spec.alpha :as s]
[clojure.spec.gen.alpha :as gen]
[clojure.string :as str]
#?(:cljs [goog.string])))
#?(:cljs (def ^:private
before-1_10_439?
(and *clojurescript-... |
101f4b93c69af80db1b76cdf21a9dfa3f1a0acdd503957c3682a1808962c15d2 | byorgey/bin | cm.hs | # LANGUAGE ScopedTypeVariables #
# LANGUAGE ViewPatterns #
-- Depends on lens-datetime package
import Control.Applicative
import Control.Exception (IOException, catch)
import Control.Lens ((^.))
import Control.Monad
import Data.Time
import D... | null | https://raw.githubusercontent.com/byorgey/bin/7370e6cc77be375c9e5e00718d15773169534c10/cm.hs | haskell | Depends on lens-datetime package | # LANGUAGE ScopedTypeVariables #
# LANGUAGE ViewPatterns #
import Control.Applicative
import Control.Exception (IOException, catch)
import Control.Lens ((^.))
import Control.Monad
import Data.Time
import Data.Time.Lens
import Syste... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.