_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 |
|---|---|---|---|---|---|---|---|---|
983716eff204cba88d5e517215736579d2bbce95887a8bb4ffdcc3e11cb67800 | blancas/eisen | snake.clj | ; Inspired by the snakes that have gone before:
snake : -smaller-snake/
snake :
(ns snake.snake
(:import (java.awt Color Dimension)
(javax.swing JPanel JFrame Timer JOptionPane)
(java.awt.event ActionListener KeyListener))
(:use snake.import-static))
(import-static java.awt.event.KeyEve... | null | https://raw.githubusercontent.com/blancas/eisen/ec44756b5653c108647215cb56f2fa01a71fd0f0/src/main/resources/snake/snake.clj | clojure | Inspired by the snakes that have gone before:
----------------------------------------------------------
functional model
----------------------------------------------------------
----------------------------------------------------------
mutable model
----------------------------------------------------------
... | snake : -smaller-snake/
snake :
(ns snake.snake
(:import (java.awt Color Dimension)
(javax.swing JPanel JFrame Timer JOptionPane)
(java.awt.event ActionListener KeyListener))
(:use snake.import-static))
(import-static java.awt.event.KeyEvent VK_LEFT VK_RIGHT VK_UP VK_DOWN)
(def width ... |
52e45dc74297b6697bf9520e83707c5b748485c04dbae306aeefbb713ca1eba4 | well-typed/large-records | R050.hs | {-# LANGUAGE DataKinds #-}
# LANGUAGE PatternSynonyms #
{-# LANGUAGE ViewPatterns #-}
#if PROFILE_CORESIZE
{-# OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #-}
#endif
#if PROFILE_TIMING
{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-}
#endif
module Experiment.PatternSynonym_Default.Siz... | null | https://raw.githubusercontent.com/well-typed/large-records/c6c2b51af11e90f30822543d7ce4d1cb28cee294/large-records-benchmarks/bench/experiments/Experiment/PatternSynonym_Default/Sized/R050.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE ViewPatterns #
# OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #
# OPTIONS_GHC -ddump-to-file -ddump-timings # | # LANGUAGE PatternSynonyms #
#if PROFILE_CORESIZE
#endif
#if PROFILE_TIMING
#endif
module Experiment.PatternSynonym_Default.Sized.R050 where
import Bench.Types
data R
viewR :: R -> (
(T 00, T 01, T 02, T 03, T 04, T 05, T 06, T 07, T 08, T 09)
, (T 10, T 11, T 12, T 13, T 14, T 15, T 16, T 17, T 18, T 19... |
fdd90ab7245f9071dc7b4c6fe355566a9806f2447d36f1642f6a24448bcefb0e | patoline/patoline | FBezier.ml | let derivee a =
let len = Array.length a - 1 in
let flen = float_of_int len in
let b = Array.make len 0.0 in
for i = 0 to len - 1 do
b.(i) <- (a.(i+1) -. a.(i)) *. flen
done; b
let casteljau_right f x =
for t = Array.length f downto 2 do
for i = 0 to (t-2) do
f.(i) <- (1.0 -. x) *. f.(i) +. x... | null | https://raw.githubusercontent.com/patoline/patoline/3dcd41fdff64895d795d4a78baa27d572b161081/patfonts/FBezier.ml | ocaml | let derivee a =
let len = Array.length a - 1 in
let flen = float_of_int len in
let b = Array.make len 0.0 in
for i = 0 to len - 1 do
b.(i) <- (a.(i+1) -. a.(i)) *. flen
done; b
let casteljau_right f x =
for t = Array.length f downto 2 do
for i = 0 to (t-2) do
f.(i) <- (1.0 -. x) *. f.(i) +. x... | |
c0cbcdf424d33b17f0b76c0c7a7b207568322a55f511de534ed11703eb77f48e | locusmath/locus | object.clj | (ns locus.order.general.element.object
(:require [locus.set.logic.core.set :refer :all]
[locus.set.logic.limit.product :refer :all]
[locus.con.core.setpart :refer :all]
[locus.set.mapping.general.core.object :refer :all]
[locus.set.logic.structure.protocols :refer :all]... | null | https://raw.githubusercontent.com/locusmath/locus/fb6068bd78977b51fd3c5783545a5f9986e4235c/src/clojure/locus/order/general/element/object.clj | clojure | Elements of preorders, partial orders, setoids, and related structures
Preorder elements are also instances of objects of thin categories.
Elements of preordered sets
Additional classes of order elements | (ns locus.order.general.element.object
(:require [locus.set.logic.core.set :refer :all]
[locus.set.logic.limit.product :refer :all]
[locus.con.core.setpart :refer :all]
[locus.set.mapping.general.core.object :refer :all]
[locus.set.logic.structure.protocols :refer :all]... |
18754f7781610063d11824eb0c832469abd2beab39361498e8717665cf8fb87a | kayceesrk/Quelea | BankAccount_SC.hs | # LANGUAGE TemplateHaskell , ScopedTypeVariables , CPP #
import Quelea.Shim
import Quelea.Types
import Quelea.ClientMonad
import Quelea.DBDriver
import BankAccountDefs
import Prelude hiding (catch)
import Quelea.Contract
import System.Process (ProcessHandle, runCommand, terminateProcess)
import System.Environment (get... | null | https://raw.githubusercontent.com/kayceesrk/Quelea/73db79a5d5513b9aeeb475867a67bacb6a5313d0/tests/BankAccount/BankAccount_SC.hs | haskell | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
Kind of process
Broker's address
Daemon Options
--------------
Client Options
--------------
Number of client rounds
Number of concurrent client threa... | # LANGUAGE TemplateHaskell , ScopedTypeVariables , CPP #
import Quelea.Shim
import Quelea.Types
import Quelea.ClientMonad
import Quelea.DBDriver
import BankAccountDefs
import Prelude hiding (catch)
import Quelea.Contract
import System.Process (ProcessHandle, runCommand, terminateProcess)
import System.Environment (get... |
6de3e80b9a5eaedd081ed610cfd5706bd171b802a6ed43b6343949cc56a0ecea | 97jaz/gregor | zone-loc.rkt | #lang racket/base
(require racket/list
cldr/core
cldr/dates-modern
tzinfo
"../../generics.rkt"
"zone-util.rkt"
"gmt-offset.rkt")
(provide zone/city-fmt
zone/generic-loc-fmt)
(define (zone/city-fmt loc t)
(define tzid (canonical-tzid (->tzid t)))
(... | null | https://raw.githubusercontent.com/97jaz/gregor/91d71c6082fec4197aaf9ade57aceb148116c11c/gregor-lib/gregor/private/pattern/l10n/zone-loc.rkt | racket | #lang racket/base
(require racket/list
cldr/core
cldr/dates-modern
tzinfo
"../../generics.rkt"
"zone-util.rkt"
"gmt-offset.rkt")
(provide zone/city-fmt
zone/generic-loc-fmt)
(define (zone/city-fmt loc t)
(define tzid (canonical-tzid (->tzid t)))
(... | |
323302de6ca834805563822cfa91dacf54726e9a6caa213336cf0e93a8d2f343 | clash-lang/clash-compiler | T1182A.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
module T1182A where
import qualified Prelude as P
import Clash.Prelude
import qualified Clash.Netlist.Types as N
import qualified Clash.Netlist.Id as Id
import Clash.Annotations.TH
import Clash.Class.HasDomai... | null | https://raw.githubusercontent.com/clash-lang/clash-compiler/df3d5d1484413f2366e64804dab760fdb57edf14/tests/shouldwork/TopEntity/T1182A.hs | haskell | # LANGUAGE GADTs # | # LANGUAGE FlexibleContexts #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
module T1182A where
import qualified Prelude as P
import Clash.Prelude
import qualified Clash.Netlist.Types as N
import qualified Clash.Netlist.Id as Id
import Clash.Annotations.TH
import Clash.Class.HasDomain
import Test.Tasty.Cl... |
f753fd49f942563fe92e7c7adcb46ccefc9e0b4e452ad4e5090eda3c21ead55b | pavlobaron/ErlangOTPBookSamples | wk_build.erl | -module(wk_build).
-export([all/0, compile/0, dialyzer/0, test1/0, test2/0, doc/0]).
all() ->
compile(),
dialyzer(),
test1(),
test2(),
doc(),
cprof(),
perf_kursinfo1(),
perf_kursinfo2(),
cover().
files() ->
["wechselkurs_server.erl" ,
"wechselkurs_client.e... | null | https://raw.githubusercontent.com/pavlobaron/ErlangOTPBookSamples/50094964ad814932760174914490e49618b2b8c2/entwicklung/wechselkurs/src/wk_build.erl | erlang | -module(wk_build).
-export([all/0, compile/0, dialyzer/0, test1/0, test2/0, doc/0]).
all() ->
compile(),
dialyzer(),
test1(),
test2(),
doc(),
cprof(),
perf_kursinfo1(),
perf_kursinfo2(),
cover().
files() ->
["wechselkurs_server.erl" ,
"wechselkurs_client.e... | |
d16c4224f24e5e58f723602457073a6b87d9c07dddf1f2951b99b18ce0f588eb | OCamlPro/ocp-indent | with_never.ml | let f x = match x with
| `A -> "A"
| `B -> "B"
let f = function
| `A -> "A"
| `B -> "B"
let f = fun x -> match x with
| `A -> "A"
| `B -> "B"
let f =
let g x = match x with
| `A -> "A"
| `B -> "B"
in
g
let f =
let g = function
| `A -> "A"
| `B -> "B"
in
g
let f =
let g = fun x -> match x ... | null | https://raw.githubusercontent.com/OCamlPro/ocp-indent/9e26c0a2699b7076cebc04ece59fb354eb84c11c/tests/passing/with_never.ml | ocaml | just check syntax | let f x = match x with
| `A -> "A"
| `B -> "B"
let f = function
| `A -> "A"
| `B -> "B"
let f = fun x -> match x with
| `A -> "A"
| `B -> "B"
let f =
let g x = match x with
| `A -> "A"
| `B -> "B"
in
g
let f =
let g = function
| `A -> "A"
| `B -> "B"
in
g
let f =
let g = fun x -> match x ... |
d7c539f975b792f96db9ed5721259c3b2a6d7e89427cf585bb35f17a16b2d0bc | deadtrickster/prometheus.cl | package.lisp | (in-package #:cl-user)
(defpackage #:prometheus.test
(:use #:cl #:prove #:prometheus.test.support))
(in-package #:prometheus.test)
| null | https://raw.githubusercontent.com/deadtrickster/prometheus.cl/60572b793135e8ab5a857d47cc1a5fe0af3a2d53/t/prometheus/package.lisp | lisp | (in-package #:cl-user)
(defpackage #:prometheus.test
(:use #:cl #:prove #:prometheus.test.support))
(in-package #:prometheus.test)
| |
99ace8b4b367cb4df9136cb56b4286b1a6d852285d08cc8b1b40fdbf8249ec5a | bjornbm/astro | AsA2009.hs | # LANGUAGE MultiParamTypeClasses #
|
Copyright : Copyright ( C ) 2008
License : BSD3
Maintainer :
Stability : experimental
Portability : GHC only ?
An implementation of TDB conversions based on the formula on page
B7 of the Astronomical Almanac for the year 2009 . The formul... | null | https://raw.githubusercontent.com/bjornbm/astro/f4fb2c4b739a0a8f68f51aa154285120d2230c30/src/Astro/Time/Barycentric/AsA2009.hs | haskell | # LANGUAGE MultiParamTypeClasses #
|
Copyright : Copyright ( C ) 2008
License : BSD3
Maintainer :
Stability : experimental
Portability : GHC only ?
An implementation of TDB conversions based on the formula on page
B7 of the Astronomical Almanac for the year 2009 . The formul... | |
63038e79bc27248cd39c684668c981e477b0e5d55badfda11a0c366572f28e31 | HaskVan/HaskellKoans | BasicFunctions.hs |
This module contains koans for the most basic functions
in Haskell
This module contains koans for the most basic functions
in Haskell
-}
module BasicFunctions (koans) where
import Test.Hspec (Spec, describe, it)
import Test.HUnit (assertBool, assertEqual)
import Util
koans :: Koan
koans = describe "BasicFunct... | null | https://raw.githubusercontent.com/HaskVan/HaskellKoans/5553712ec7b3f76f3a286249b971e633af725d90/test/BasicFunctions.hs | haskell | * Arithmetic Operators
* Logical Operators
* Basic Parsing functions
* Functional utilities
--------------------------------------------------------------------
Arithmetic Operations
--------------------------------------------------------------------
REPLACE: replaceValue with correct value
let result = repla... |
This module contains koans for the most basic functions
in Haskell
This module contains koans for the most basic functions
in Haskell
-}
module BasicFunctions (koans) where
import Test.Hspec (Spec, describe, it)
import Test.HUnit (assertBool, assertEqual)
import Util
koans :: Koan
koans = describe "BasicFunct... |
a33e2ba1edea25d7d19c61a92a9debfe35bb081cb9c9bd767f23c4990194c436 | strega-nil/stregaml | Ast.ml | module Stmt = Types.Ast_Stmt
module Binding = struct
include Types.Ast_Binding
let name (Binding r) = r.name
let is_mut (Binding r) = r.is_mut
let ty (Binding r) = r.ty
end
module Expr = struct
include Types.Ast_Expr
module Builtin = struct
include Types.Ast_Expr_Builtin
let to_string b ~lang... | null | https://raw.githubusercontent.com/strega-nil/stregaml/83b51826d5776926fb3f4b7ad03c7ffe837ecbf8/lib/typed_ast/Ast.ml | ocaml | module Stmt = Types.Ast_Stmt
module Binding = struct
include Types.Ast_Binding
let name (Binding r) = r.name
let is_mut (Binding r) = r.is_mut
let ty (Binding r) = r.ty
end
module Expr = struct
include Types.Ast_Expr
module Builtin = struct
include Types.Ast_Expr_Builtin
let to_string b ~lang... | |
a9074fe33c419cd3e1f746a000e5bc00a6b0339e7bc2d929d8de942d29f0683c | ethereum/act | Dev.hs | module Dev where
import CLI
import Coq (coq)
import Enrich
import qualified Data.Text as T
writeCoqFile :: FilePath -> FilePath -> IO ()
writeCoqFile src trg = do
contents <- readFile src
proceed contents (enrich <$> compile contents) $ \claims ->
writeFile trg . T.unpack $ coq claims
| null | https://raw.githubusercontent.com/ethereum/act/7dbda2daff428a8a3938cb46197a4b282e6506f0/src/Dev.hs | haskell | module Dev where
import CLI
import Coq (coq)
import Enrich
import qualified Data.Text as T
writeCoqFile :: FilePath -> FilePath -> IO ()
writeCoqFile src trg = do
contents <- readFile src
proceed contents (enrich <$> compile contents) $ \claims ->
writeFile trg . T.unpack $ coq claims
| |
5fa8cf7272e841d9fb2f3d64859d2416bd05aafccc21e3ffc549fe1a4db541a9 | janestreet/file_path | bench_path.mli | include File_path.Path with module Types := File_path.Types
| null | https://raw.githubusercontent.com/janestreet/file_path/51ccd4268cab0ef3eea0b708a7d46803cf567f34/bench/bench_path.mli | ocaml | include File_path.Path with module Types := File_path.Types
| |
046cf6761deb9d00218498635b0412e08e9945f5cef59e1727c81dbd9c0c3dd9 | pqwy/notty | runes.ml | Copyright ( c ) 2016 - 2017 . All rights reserved .
See LICENSE.md .
See LICENSE.md. *)
(**
* Demonstrates geometry computation with various scripts. A few of those will
* usually break.
*)
open Notty
open Notty.Infix
open Common
let hpad_sp attr l r i =
let h = I.height i in
I.(char attr ' ' l h ... | null | https://raw.githubusercontent.com/pqwy/notty/389366c023396017aa21efcdbb07ade5ba0974c5/examples/runes.ml | ocaml | *
* Demonstrates geometry computation with various scripts. A few of those will
* usually break.
| Copyright ( c ) 2016 - 2017 . All rights reserved .
See LICENSE.md .
See LICENSE.md. *)
open Notty
open Notty.Infix
open Common
let hpad_sp attr l r i =
let h = I.height i in
I.(char attr ' ' l h <|> i <|> char attr ' ' r h)
let vpad_sp attr t b i =
let w = I.width i in
I.(char attr ' ' w t <-> ... |
53d1a860badf821f49f3e2d11e93154df60be9b854da0b48a6418757d5c88e44 | input-output-hk/ouroboros-network | Mock.hs | {-# LANGUAGE FlexibleContexts #-}
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
module Test.Ouroboros.Storage.ImmutableDB.Mock (openDBMock) where
import Data.Bifunctor (first)
import Ouroboros.Consensus.Block
import Ouroboros.Consensus.Util ((...:), (.:))
import ... | null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/edc5678e80149649d006aaaf8a2a1dd38e14fc28/ouroboros-consensus-test/test-storage/Test/Ouroboros/Storage/ImmutableDB/Mock.hs | haskell | # LANGUAGE FlexibleContexts # | # LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
module Test.Ouroboros.Storage.ImmutableDB.Mock (openDBMock) where
import Data.Bifunctor (first)
import Ouroboros.Consensus.Block
import Ouroboros.Consensus.Util ((...:), (.:))
import Ouroboros.Consensus.Util.IOL... |
3c7062cbcecbe6d816b0739ed20f659d98bf593068a356ab1a908a2ef35a8e4d | sile/sanmoku | double-array-buffered-output.lisp | (defpackage dawg.double-array.buffered-output
(:use :common-lisp :dawg.global)
(:export buffered-output
with-output
write-uint))
(in-package :dawg.double-array.buffered-output)
;;;;;;;;;;;;;;;
;;; declamation
(declaim #.*fastest*)
;;;;;;;;;;;;
;;; constant
(defconstant +BUFFER_SIZE+ 819200)
... | null | https://raw.githubusercontent.com/sile/sanmoku/9c218550894fc352a4f14f20d599a9494e742b8d/dicbuilder/cl-dawg-sanmoku/double-array-buffered-output.lisp | lisp |
declamation
constant
buffered-output
external function | (defpackage dawg.double-array.buffered-output
(:use :common-lisp :dawg.global)
(:export buffered-output
with-output
write-uint))
(in-package :dawg.double-array.buffered-output)
(declaim #.*fastest*)
(defconstant +BUFFER_SIZE+ 819200)
(defstruct buffered-output
(binary-output nil :type fil... |
f3df7e9f5e6a816cdc0b4372cea579be7d82872ebfaf3faf08187ea1721dc114 | schell/ixshader | IxShader.hs | {-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
{-# LANGUAGE LambdaCase #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
{-# LANGUAGE RankNTyp... | null | https://raw.githubusercontent.com/schell/ixshader/66e5302fa24bbdc7c948a79ee2422cae688b982f/src/Graphics/IxShader.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE RankNTypes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeInType #
# LANGUAGE TypeOperators #
# OPTIONS_GHC -fprint-explicit-kinds # | # LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
# LANGUAGE RebindableSyntax #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -fno - warn - missi... |
5d9d30dcaa479c628f7ac21308645165485099bd0c59bf2fe38c2870839a8f62 | cmcl/frankjnr | Frank.hs | {-# LANGUAGE GADTs #-}
module Main where
import Parser
import Compile
import TypeCheck
import Syntax
import RefineSyntax
import DesugarSyntax
import Debug
import Debug.Trace
import qualified Shonky.Semantics as Shonky
import Data.IORef
import qualified Data.Map.Strict as M
import Data.List
import System.Console.Cm... | null | https://raw.githubusercontent.com/cmcl/frankjnr/57f8f294ad46ea646f11eb81edb7b72b0cebc344/Frank.hs | haskell | # LANGUAGE GADTs #
TODO: LC: Fix locations?
putStrLn $ "Generated computation: " ++ show comp
handy for testing in ghci | module Main where
import Parser
import Compile
import TypeCheck
import Syntax
import RefineSyntax
import DesugarSyntax
import Debug
import Debug.Trace
import qualified Shonky.Semantics as Shonky
import Data.IORef
import qualified Data.Map.Strict as M
import Data.List
import System.Console.CmdArgs.Explicit
import S... |
429af6a79c2aa93568981d044786807abe6887016f123a731017e1053d4a2833 | parapluu/Concuerror | readers_rwr.erl | -module(readers_rwr).
-export([readers_rwr/0]).
-export([scenarios/0]).
scenarios() -> [{?MODULE, inf, dpor}].
readers_rwr() ->
ets:new(table, [public, named_table]),
ets:insert(table, {x, 0}),
ets:insert(table, {y, 0}),
Writer =
fun() ->
ets:lookup(table, y),
... | null | https://raw.githubusercontent.com/parapluu/Concuerror/152a5ccee0b6e97d8c3329c2167166435329d261/tests/suites/dpor_tests/src/readers_rwr.erl | erlang | -module(readers_rwr).
-export([readers_rwr/0]).
-export([scenarios/0]).
scenarios() -> [{?MODULE, inf, dpor}].
readers_rwr() ->
ets:new(table, [public, named_table]),
ets:insert(table, {x, 0}),
ets:insert(table, {y, 0}),
Writer =
fun() ->
ets:lookup(table, y),
... | |
58f34931edf29b02fa9b381d5c78ea313d5da322d38f77d434a47e9c56809db0 | aws-beam/aws-erlang | aws_opensearchserverless.erl | %% WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
See -beam/aws-codegen for more details .
@doc Use the Amazon OpenSearch Serverless API to create , configure , and
manage OpenSearch Serverless collections and security policies .
%%
OpenSearch Serverless is an on - demand , pre - provisioned serverless
configura... | null | https://raw.githubusercontent.com/aws-beam/aws-erlang/699287cee7dfc9dc8c08ced5f090dcc192c9cba8/src/aws_opensearchserverless.erl | erlang | WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
the operational complexities of provisioning, configuring, and tuning your
of data without having to worry about the underlying infrastructure and
data management.
Serverless?
====================================================================
API
====================... | See -beam/aws-codegen for more details .
@doc Use the Amazon OpenSearch Serverless API to create , configure , and
manage OpenSearch Serverless collections and security policies .
OpenSearch Serverless is an on - demand , pre - provisioned serverless
configuration for Amazon OpenSearch Service . OpenSearch S... |
223f8845284dd93c3c3afc01e4dad22bbb987f23b05199af0644881a5dd07783 | avsm/ocaml-regexp | inttagmap.ml |
module type IntTagMapModule =
sig
type 'a key
type ('a,'data) t
val empty : ('a,'data) t
val add : 'a key -> 'data -> ('a,'data) t -> ('a,'data) t
val find : 'a key -> ('a,'data) t -> 'data
val remove : 'a key -> ('a,'data) t -> ('a,'data) t
val mem : 'a key -> ('a,'data) t -> bool
val iter : (... | null | https://raw.githubusercontent.com/avsm/ocaml-regexp/90298a535e2570b35eede9cafb698cb7f7329367/lib/inttagmap.ml | ocaml |
module type IntTagMapModule =
sig
type 'a key
type ('a,'data) t
val empty : ('a,'data) t
val add : 'a key -> 'data -> ('a,'data) t -> ('a,'data) t
val find : 'a key -> ('a,'data) t -> 'data
val remove : 'a key -> ('a,'data) t -> ('a,'data) t
val mem : 'a key -> ('a,'data) t -> bool
val iter : (... | |
99fa55dfc4e390e8a476313e75098f46b1a59963bb6839ff3c8be815ebc2003a | askonomm/clarktown | heading_block.clj | (ns clarktown.matchers.heading-block
(:require
[clojure.string :as string]))
(defn is-atx-heading?
"Determines whether the given block is a atx heading."
[block]
(re-matches #"^\s{0,3}?\#{1,6}\s.*" block))
(defn is-settext-heading?
"Determines whether the given block is a settext heading."
[block]
... | null | https://raw.githubusercontent.com/askonomm/clarktown/4393901425177a36e091e5d29926383e7a546b75/src/clarktown/matchers/heading_block.clj | clojure | (ns clarktown.matchers.heading-block
(:require
[clojure.string :as string]))
(defn is-atx-heading?
"Determines whether the given block is a atx heading."
[block]
(re-matches #"^\s{0,3}?\#{1,6}\s.*" block))
(defn is-settext-heading?
"Determines whether the given block is a settext heading."
[block]
... | |
0553f3d65c40f4cba74d286a911e810278c6744227a8659cf039c7099afdae5e | Ingemark/pbxis | logging.clj | Copyright 2018 .
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 u... | null | https://raw.githubusercontent.com/Ingemark/pbxis/9da41ebb717e02f1a3e3e6f553f340c3dd77e619/src/com/ingemark/logging.clj | clojure |
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.
limitations under the License. | Copyright 2018 .
distributed under the License is distributed on an " AS IS " BASIS ,
See the License for the specific language governing permissions and
(ns com.ingemark.logging
(:require (clojure [stacktrace :as trc] [pprint :as pp] [string :as s]))
(:import (org.slf4j Logger LoggerFactory)))
(def... |
1b55497ec9cb7e2e34930002dc1d841d5a1fb75f583e4a0694dd3adee241bb4c | OCamlPro/alt-ergo | connected_ast.mli | (******************************************************************************)
(* *)
(* The Alt-Ergo theorem prover *)
Copyright ( C ) 2006 - 2013 ... | null | https://raw.githubusercontent.com/OCamlPro/alt-ergo/291523151417f4cd112744d740b58ab1e8a630b4/src/bin/gui/connected_ast.mli | ocaml | ****************************************************************************
The Alt-Ergo theorem prover
... | Copyright ( C ) 2006 - 2013
... |
80bf0b167210ecee9f0bab5efb5f9ab25dfbec7a8f4ed1ad40f3828137f159c9 | fragnix/fragnix | Data.Attoparsec.Internal.hs | # LANGUAGE Haskell98 #
{-# LINE 1 "Data/Attoparsec/Internal.hs" #-}
# LANGUAGE BangPatterns , CPP , ScopedTypeVariables #
-- |
Module : Data . Attoparsec . Internal
Copyright : 2007 - 2015
-- License : BSD3
--
-- Maintainer :
... | null | https://raw.githubusercontent.com/fragnix/fragnix/b9969e9c6366e2917a782f3ac4e77cce0835448b/tests/packages/scotty/Data.Attoparsec.Internal.hs | haskell | # LINE 1 "Data/Attoparsec/Internal.hs" #
|
License : BSD3
Maintainer :
Stability : experimental
Portability : unknown
library.
they are incomplete and hence their equality cannot be known.
| Ask for input. If we receive any, pass the augmented input to a
success continuation, otherwise to a fai... | # LANGUAGE Haskell98 #
# LANGUAGE BangPatterns , CPP , ScopedTypeVariables #
Module : Data . Attoparsec . Internal
Copyright : 2007 - 2015
Simple , efficient parser combinators , loosely based on the Parsec
module Data.Attoparsec.I... |
cd8a1fcac7fc9caed691fc1819df6b7237b1564b6d66c55eee7da43fa1c0bcbc | rowangithub/DOrder | 35_invgen.ml |
* InvGen , CAV'09 paper , fig 2
* InvGen, CAV'09 paper, fig 2
*)
let rec loop x n =
if (x < n) then loop (x+1) n
else if (n > 0) then assert (x = n)
else ()
let main n =
let x = 0 in
loop x n
let _ = main 2
let _ = main 0
let _ = main (-1) | null | https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/tests/folprograms/hola/35_invgen.ml | ocaml |
* InvGen , CAV'09 paper , fig 2
* InvGen, CAV'09 paper, fig 2
*)
let rec loop x n =
if (x < n) then loop (x+1) n
else if (n > 0) then assert (x = n)
else ()
let main n =
let x = 0 in
loop x n
let _ = main 2
let _ = main 0
let _ = main (-1) | |
d56e7df906e51f60645799204cd0f285f53f6875a1745140978ed4a1030152c6 | tmattio/js-bindings | protocol_showDocument.mli | [@@@ocaml.warning "-7-11-32-33-39"]
[@@@js.implem
[@@@ocaml.warning "-7-11-32-33-39"]
]
open Ts2ocaml_baselib
unknown identifiers :
- HandlerResult < T1 , T2 >
- ProtocolRequestType < T1 , T2 , T3 , T4 , T5 >
- Range
- RequestHandler < T1 , T2 , T3 >
- URI
unknown identifiers:
- Handl... | null | https://raw.githubusercontent.com/tmattio/js-bindings/fe1d40a5b8cae157af85fa84ca482fb6b0ddf1e0/lib/vscode-languageserver-protocol/_gen/protocol_showDocument.mli | ocaml | import { Range, URI } from 'vscode-languageserver-types';
import { ProtocolRequestType } from './messages'; | [@@@ocaml.warning "-7-11-32-33-39"]
[@@@js.implem
[@@@ocaml.warning "-7-11-32-33-39"]
]
open Ts2ocaml_baselib
unknown identifiers :
- HandlerResult < T1 , T2 >
- ProtocolRequestType < T1 , T2 , T3 , T4 , T5 >
- Range
- RequestHandler < T1 , T2 , T3 >
- URI
unknown identifiers:
- Handl... |
0f0f147fd21e33d66544384253d21a2785d7a4616897f5274e051af88d877bc2 | nikita-volkov/record | Main.hs | -- The code is mostly ripped from
--
import BasePrelude
import System.Directory
import System.FilePath
import Test.DocTest
import Build_doctest (deps)
main :: IO ()
main = do
sources <- getSources
doctest $ dfltParams ++ map ("-package="++) deps ++ sources
where
dfltParams =
[
"-isrc",
... | null | https://raw.githubusercontent.com/nikita-volkov/record/e534886eaed0e1179eb6fe6d73ec08e2dd26f521/doctest/Main.hs | haskell | The code is mostly ripped from
| import BasePrelude
import System.Directory
import System.FilePath
import Test.DocTest
import Build_doctest (deps)
main :: IO ()
main = do
sources <- getSources
doctest $ dfltParams ++ map ("-package="++) deps ++ sources
where
dfltParams =
[
"-isrc",
"-idist/build/autogen",
"-op... |
c27967b1990a09f70b1e67362510fa31bf966dd99f414003eaec3d4c2b9d33e4 | scull7/bs-sql-common | SqlCommon_batch.ml | let size setting = Belt.Option.getWithDefault setting 1000
let slice size rows =
(
Belt.Array.slice rows ~offset:0 ~len:size,
Belt.Array.slice rows ~offset:size ~len:(Belt.Array.length rows)
)
let trampoline fn = Js.Global.setTimeout fn 0
module Sql = struct
(*
Have to use this because MySQL2 doesn... | null | https://raw.githubusercontent.com/scull7/bs-sql-common/803c82d7438e94a55c67951358ee2077521c9341/src/SqlCommon_batch.ml | ocaml |
Have to use this because MySQL2 doesn't properly
handle the table name escaping
| let size setting = Belt.Option.getWithDefault setting 1000
let slice size rows =
(
Belt.Array.slice rows ~offset:0 ~len:size,
Belt.Array.slice rows ~offset:size ~len:(Belt.Array.length rows)
)
let trampoline fn = Js.Global.setTimeout fn 0
module Sql = struct
let insert table columns rows =
SqlCommo... |
c7b4f29d06a37d5874f937f930af9df7ea4da61cbfcb64ba87eabac12286247c | jyp/glpk-hs | LinearProgram.hs | module Data.LinearProgram (
module Data.LinearProgram.Common,
module Data.LinearProgram.GLPK,
module Control.Monad.LPMonad) where
import Data.LinearProgram.GLPK
import Data.LinearProgram.Common
import Control.Monad.LPMonad | null | https://raw.githubusercontent.com/jyp/glpk-hs/a1f4410e93eb76047bafa58583c31b8c8a404860/src/Data/LinearProgram.hs | haskell | module Data.LinearProgram (
module Data.LinearProgram.Common,
module Data.LinearProgram.GLPK,
module Control.Monad.LPMonad) where
import Data.LinearProgram.GLPK
import Data.LinearProgram.Common
import Control.Monad.LPMonad | |
290ed118e716a4b5bcc064d3321b682434365128a606a5aa34be536ef8f5e1d5 | exercism/haskell | Tests.hs | # LANGUAGE RecordWildCards #
import Data.Foldable (for_)
import Data.Time.Calendar (fromGregorian)
import Test.Hspec (Spec, describe, it, shouldBe)
import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith)
import Meetup (Weekday(..), Schedule(..), meetupDay)
main :: IO ()
main = hspecWith def... | null | https://raw.githubusercontent.com/exercism/haskell/f81ee7dc338294b3dbefb7bd39fc193546fcec26/exercises/practice/meetup/test/Tests.hs | haskell | # LANGUAGE RecordWildCards #
import Data.Foldable (for_)
import Data.Time.Calendar (fromGregorian)
import Test.Hspec (Spec, describe, it, shouldBe)
import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith)
import Meetup (Weekday(..), Schedule(..), meetupDay)
main :: IO ()
main = hspecWith def... | |
63bda8fda443a4c9acfda24f17b0d6e1146be2b85ec1a04ca96698bd97d7de4f | intermine/bluegenes-old | maths.cljs | (ns bluegenes.utils.maths)
(defn circle-intersections
"Determines the pair of X and Y coordinates where two circles intersect."
[x0 y0 r0 x1 y1 r1]
(let [dx (- x1 x0)
dy (- y1 y0)
d (.sqrt js/Math (+ (* dy dy) (* dx dx)))
a (/ (+ (- (* r0 r0) (* r1 r1)) (* d d)) (* 2 d))
x2 (+ x0 ... | null | https://raw.githubusercontent.com/intermine/bluegenes-old/5b719c7ac83a7340e0ff65790cf42413c15fb7e9/src/cljs/bluegenes/utils/maths.cljs | clojure | (ns bluegenes.utils.maths)
(defn circle-intersections
"Determines the pair of X and Y coordinates where two circles intersect."
[x0 y0 r0 x1 y1 r1]
(let [dx (- x1 x0)
dy (- y1 y0)
d (.sqrt js/Math (+ (* dy dy) (* dx dx)))
a (/ (+ (- (* r0 r0) (* r1 r1)) (* d d)) (* 2 d))
x2 (+ x0 ... | |
db005c31258008f1ee2fa06f021b2fd8f29725606c5da486d650587849380efd | cryptomeme/nario | Font.hs | -- -*- mode: haskell; Encoding: UTF-8 -*-
-- Bitmap font
module Font (
Font(..),
fontPut,
fontPutc
) where
import Graphics.UI.SDL
import Control.Monad (zipWithM_)
import Data.Char (ord)
data Font = Font {
fontSurface :: Surface,
fontWidth :: Int,
fontHeight :: Int,
fontXN :: Int
}
-- Put string
fontPut fon... | null | https://raw.githubusercontent.com/cryptomeme/nario/5f1ef10a1530763e1d2f51d280266ba48dae0c26/Font.hs | haskell | -*- mode: haskell; Encoding: UTF-8 -*-
Bitmap font
Put string
Put char | module Font (
Font(..),
fontPut,
fontPutc
) where
import Graphics.UI.SDL
import Control.Monad (zipWithM_)
import Data.Char (ord)
data Font = Font {
fontSurface :: Surface,
fontWidth :: Int,
fontHeight :: Int,
fontXN :: Int
}
fontPut font sur x y str = zipWithM_ (\i c -> fontPutc font sur i y c) [x..] str
f... |
b2449bd45f77ac66d726231ef61b5a6ada6a7050eefcc964e4dec304043a4f04 | sicmutils/sicmutils | render.cljc | #_"SPDX-License-Identifier: GPL-3.0"
(ns sicmutils.expression.render
"Functions and utilities for rendering symbolic expressions to various backends
like LaTeX, infix or Javascript."
(:require [clojure.set :as set]
[clojure.string :as s]
[clojure.zip :as z]
[pattern.rule :as R... | null | https://raw.githubusercontent.com/sicmutils/sicmutils/f427fd073937faf62741fcdda6362f910ecda71f/src/sicmutils/expression/render.cljc | clojure | for negative summands the
Some special cases:
- give (expt X n) the precedence of X
- give (partial ...) the precedence of D
- otherwise (...) has the precedence of application
arguments.
respect precedence, except in the special cases
of ratios rendered as calls to `/`:
(/ x), (/ x y)
(- (* a b c...))
w... | #_"SPDX-License-Identifier: GPL-3.0"
(ns sicmutils.expression.render
"Functions and utilities for rendering symbolic expressions to various backends
like LaTeX, infix or Javascript."
(:require [clojure.set :as set]
[clojure.string :as s]
[clojure.zip :as z]
[pattern.rule :as R... |
e71d9a20b3ff31b6fb1eaa6e76cfb25e5fc6a1f2a8bc29015e9731fdaca5dd3d | uwplse/PUMPKIN-PATCH | higherdifferencers.mli | open Searchopts
open Proofdiff
open Candidates
open Differencers
open Evd
open Stateutils
(* --- Recursive differencing --- *)
* Try to difference with one differencer
* If that fails , then try the next one , and so on
* Try to difference with one differencer
* If that fails, then try the next one, and so... | null | https://raw.githubusercontent.com/uwplse/PUMPKIN-PATCH/73fd77ba49388fdc72702a252a8fa8f071a8e1ea/plugin/src/core/components/differencing/higherdifferencers.mli | ocaml | --- Recursive differencing ---
* Reduce and then diff
* If reducing has no effect, then give up to prevent inifinite recursion
* Convert a proof differencer to a term differencer
*
* In other words, update the goals and terms of the current diff using
* the supplied options, then apply the supplied differen... | open Searchopts
open Proofdiff
open Candidates
open Differencers
open Evd
open Stateutils
* Try to difference with one differencer
* If that fails , then try the next one , and so on
* Try to difference with one differencer
* If that fails, then try the next one, and so on
*)
val try_chain_diffs :
('a c... |
03cfa3fdfb065bb7c71ca44f8bbb42dcaa18f00fc9c853e2d2b822548c6ea1c8 | SumitPadhiyar/confuzz | ppx_lwt.ml | open! Migrate_parsetree
open! OCaml_404.Ast
open Ast_mapper
open! Ast_helper
open Asttypes
open Parsetree
open Ast_convenience_404
(** {2 Convenient stuff} *)
let with_loc f {txt ; loc = _loc} =
(f txt) [@metaloc _loc]
let def_loc txt =
{ txt; loc = !default_loc }
(** Test if a case is a catchall. *)
let is_ca... | null | https://raw.githubusercontent.com/SumitPadhiyar/confuzz/7d6b2af51d7135025f9ed1e013a9ae0940f3663e/src/ppx/ppx_lwt.ml | ocaml | * {2 Convenient stuff}
* Test if a case is a catchall.
* Add a wildcard case in there is none. Useful for exception handlers.
* let%lwt related functions
* [p = x] and e ≡ [Lwt.bind __ppx_lwt_$i (fun p -> e)]
__ppx_lwt_$i, at the position of $x$
Note: instances of [@metaloc !default_loc] below are workarounds f... | open! Migrate_parsetree
open! OCaml_404.Ast
open Ast_mapper
open! Ast_helper
open Asttypes
open Parsetree
open Ast_convenience_404
let with_loc f {txt ; loc = _loc} =
(f txt) [@metaloc _loc]
let def_loc txt =
{ txt; loc = !default_loc }
let is_catchall case =
let rec is_catchall_pat p = match p.ppat_desc wit... |
b0dd42fbcc68b16a473f91b8cf3a49eaf2e88f350152fea68f2bb10ec73faeaa | nd/bird | 4.5.8.hs | scanf f a = map (foldr f a) . tails
case xs is []
simple variant:
map (foldr f a) . tails [] =
{def of tails}
map (foldr f a) [[]] =
{def of map}
(foldr f a []) : [] =
{def of foldr} =
[a]
efficient variant:
{def of scanr}
[a]
case xs is (x:xs)
simple variant:
map (foldr f a) . tails (x:xs) =
{def of tails}
... | null | https://raw.githubusercontent.com/nd/bird/06dba97af7cfb11f558eaeb31a75bd04cacf7201/ch04/4.5.8.hs | haskell | scanf f a = map (foldr f a) . tails
case xs is []
simple variant:
map (foldr f a) . tails [] =
{def of tails}
map (foldr f a) [[]] =
{def of map}
(foldr f a []) : [] =
{def of foldr} =
[a]
efficient variant:
{def of scanr}
[a]
case xs is (x:xs)
simple variant:
map (foldr f a) . tails (x:xs) =
{def of tails}
... | |
1f8cde620976cdcc14398530d7137589f107a7268f9ff75997abd654580c275f | janestreet/core_unix | interval_unix.ml | open! Core
module Interval = Interval_lib.Interval
module Stable = struct
module V1 = struct
module Time = struct
module T = struct
type t = Time_float_unix.Stable.V1.t Interval.Stable.V1.t
[@@deriving sexp, bin_io, compare]
end
include T
include Comparator.Stable.V1.Make... | null | https://raw.githubusercontent.com/janestreet/core_unix/0426d9f0da51e6e2c228cf87f2ab130f7e0efbc8/interval_unix/src/interval_unix.ml | ocaml | open! Core
module Interval = Interval_lib.Interval
module Stable = struct
module V1 = struct
module Time = struct
module T = struct
type t = Time_float_unix.Stable.V1.t Interval.Stable.V1.t
[@@deriving sexp, bin_io, compare]
end
include T
include Comparator.Stable.V1.Make... | |
b30a515c502fbefdc0201be6151995b44bbca84ecc3c3a0e2c8ee37604137fd4 | dgiot/dgiot | dgiot_parse_graphql.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2020 - 2021 DGIOT Technologies Co. , Ltd. 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... | null | https://raw.githubusercontent.com/dgiot/dgiot/a6b816a094b1c9bd024ce40b8142375a0f0289d8/apps/dgiot_parse/src/utils/dgiot_parse_graphql.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 ... | Copyright ( c ) 2020 - 2021 DGIOT Technologies Co. , Ltd. 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(dgiot_parse_graphql).
-author("johnliu").
-include("dgiot_parse.hrl").
-include_lib("d... |
4f7c851abf436d788d24a475efbede666cea29fa04cab573f51f92b66cdaa41f | ocaml/ocamlbuild | ocaml_dependencies.ml | (***********************************************************************)
(* *)
(* ocamlbuild *)
(* *)
, , projet Galliu... | null | https://raw.githubusercontent.com/ocaml/ocamlbuild/792b7c8abdbc712c98ed7e69469ed354b87e125b/src/ocaml_dependencies.ml | ocaml | *********************************************************************
ocamlbuild
... | , , projet Gallium , INRIA Rocquencourt
Copyright 2007 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
Original author :
open My_std
open Log
open Tools... |
343d08004cd45438cfd912863eb17f1c51779be1e9dfdddd2217fc24ecc18d30 | clojure-interop/java-jdk | BasicBorders$MarginBorder.clj | (ns javax.swing.plaf.basic.BasicBorders$MarginBorder
(:refer-clojure :only [require comment defn ->])
(:import [javax.swing.plaf.basic BasicBorders$MarginBorder]))
(defn ->margin-border
"Constructor."
(^BasicBorders$MarginBorder []
(new BasicBorders$MarginBorder )))
(defn get-border-insets
"Description ... | null | https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.swing/src/javax/swing/plaf/basic/BasicBorders%24MarginBorder.clj | clojure | (ns javax.swing.plaf.basic.BasicBorders$MarginBorder
(:refer-clojure :only [require comment defn ->])
(:import [javax.swing.plaf.basic BasicBorders$MarginBorder]))
(defn ->margin-border
"Constructor."
(^BasicBorders$MarginBorder []
(new BasicBorders$MarginBorder )))
(defn get-border-insets
"Description ... | |
595aa6aa2993c258facdd8c78ab19313995e9956e3a3fca287f6103265ddd4c7 | ocaml-multicore/ocaml-tsan | finaliser2.ml | (* TEST *)
let () = Out_channel.set_buffered stdout false
(* If minor heap values are finalised on a domain, then the callbacks are run
at the end of a minor collection triggered by that domain. *)
let[@inline never][@local never] test1 () =
let r' = ref 0 in
let rec foo () =
let r = ref 0 in
Gc.finali... | null | https://raw.githubusercontent.com/ocaml-multicore/ocaml-tsan/f54002470cc6ab780963cc81b11a85a820a40819/testsuite/tests/weak-ephe-final/finaliser2.ml | ocaml | TEST
If minor heap values are finalised on a domain, then the callbacks are run
at the end of a minor collection triggered by that domain.
Check that the finalisation functions will be called in the reverse order of
the corresponding calls to finalise.
Now this domain takes over the finalisers from d |
let () = Out_channel.set_buffered stdout false
let[@inline never][@local never] test1 () =
let r' = ref 0 in
let rec foo () =
let r = ref 0 in
Gc.finalise_last (fun _ -> r' := 1; print_endline "test1") r
in
foo();
Gc.minor();
assert (!r' = 1)
let[@inline never][@local never] test2 () =
let r = ... |
5f8f9190781672fd606b6b47c45f2d34594dd670ae860b8f326b5b8b4967a83d | nvim-treesitter/nvim-treesitter | folds.scm | [
(entry)
] @fold
| null | https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/ddc0f1b606472b6a1ab85ee9becfd4877507627d/queries/bibtex/folds.scm | scheme | [
(entry)
] @fold
| |
c68353e07e93c3cd0a994404adf6ee214f85cd0cc8d559663a938b66ba99316b | ivanperez-keera/SpaceInvaders | WorldGeometry.hs |
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* I N V A D E R S *
* ... | null | https://raw.githubusercontent.com/ivanperez-keera/SpaceInvaders/0a481947bb7d264f231a20d1edbaf6f050824abe/src/WorldGeometry.hs | haskell | Everything in the world is measured in meters.
The world is assumed to be rectangular.
World size in pixels.
! ! ! We do n't need any walls ? ? ?
Positions of the walls .
!!! We don't need any walls???
Positions of the walls.
Co-ordinate translations
<-> Position2? |
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* I N V A D E R S *
* ... |
f5f925ee9caece1508c4c9f691cd6de140f1377e14bd80026a27926a1ebd2954 | matsumonkie/izuna | Env.hs | # LANGUAGE DeriveGeneric #
module IzunaServer.Env
( getEnv
, Env(..)
) where
import qualified Dhall
import GHC.Generics (Generic)
import IzunaBuilder.Type
data Env = Env
{ _env_githubAuthToken :: Text
, _env_port :: Nat
}
deriving (Generic, Show)
instance D... | null | https://raw.githubusercontent.com/matsumonkie/izuna/b21915617c4e3bb7d14d75814f72b8258689fb9b/izuna-server/src/IzunaServer/Env.hs | haskell | # LANGUAGE DeriveGeneric #
module IzunaServer.Env
( getEnv
, Env(..)
) where
import qualified Dhall
import GHC.Generics (Generic)
import IzunaBuilder.Type
data Env = Env
{ _env_githubAuthToken :: Text
, _env_port :: Nat
}
deriving (Generic, Show)
instance D... | |
d2891f9c7e2180f48a728af3feb42396f3bd86ddbaa6cdb2dc6630db0e7211f6 | no-defun-allowed/concurrent-hash-tables | luckless.lisp | (cl:in-package :cl)
(defpackage :concurrent-hash-table
(:use :cl)
(:export #:make-chash-table
#:getchash #:remchash
#:chash-table-count
#:mapchash #:modify-value
#:modchash
#:update-chash #:do-concurrent-table
#:implementation)
(:local-nicknames ... | null | https://raw.githubusercontent.com/no-defun-allowed/concurrent-hash-tables/1b9f0b5da54fece4f42296e1bdacfcec0c370a5a/Code/luckless.lisp | lisp | Luckless <>, which is a port of
Cliff Click's NonBlockingHashMap to Common Lisp.
And it might get confused if you don't use my fork
<-defun-allowed/luckless> because I implemented
Replace the value.
Remove the value.
Create a new box.
Do nothing. | (cl:in-package :cl)
(defpackage :concurrent-hash-table
(:use :cl)
(:export #:make-chash-table
#:getchash #:remchash
#:chash-table-count
#:mapchash #:modify-value
#:modchash
#:update-chash #:do-concurrent-table
#:implementation)
(:local-nicknames ... |
e808f99636a14d4d4c30520731a2e2e7a0df1a117e76b76ddf8d0ce8c2bc1a7c | databrary/databrary | Types.hs | # LANGUAGE CPP #
module Web.Types
( WebFileInfo(..)
, WebFileMap
, Web(..)
, WebGeneratorM
, WebGenerator
) where
#ifdef DEVEL
import Control.Concurrent.MVar (MVar)
#endif
import Control.Monad.Trans.Except (ExceptT)
import Control.Monad.Trans.State.Strict (StateT)
import Crypto.Hash (Digest, MD5)
import qu... | null | https://raw.githubusercontent.com/databrary/databrary/685f3c625b960268f5d9b04e3d7c6146bea5afda/src/Web/Types.hs | haskell | Compute hash or increment of all js and css files | # LANGUAGE CPP #
module Web.Types
( WebFileInfo(..)
, WebFileMap
, Web(..)
, WebGeneratorM
, WebGenerator
) where
#ifdef DEVEL
import Control.Concurrent.MVar (MVar)
#endif
import Control.Monad.Trans.Except (ExceptT)
import Control.Monad.Trans.State.Strict (StateT)
import Crypto.Hash (Digest, MD5)
import qu... |
fbd07dc603df5570c22a118a565d57325074a199a229e77d79a4a998bf067911 | geophf/1HaskellADay | Solution.hs | module Y2017.M01.D12.Solution where
import Data.Set (Set)
import qualified Data.Set as Set
-
Continuing the conversation of partial functions , studying pitfalls from
@bitemyapp .
Yesterday we looked at partial functions on List and solved that problem . Today ,
we 'll look at the more general problem of pa... | null | https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2017/M01/D12/Solution.hs | haskell | }
}
}
} | module Y2017.M01.D12.Solution where
import Data.Set (Set)
import qualified Data.Set as Set
-
Continuing the conversation of partial functions , studying pitfalls from
@bitemyapp .
Yesterday we looked at partial functions on List and solved that problem . Today ,
we 'll look at the more general problem of pa... |
e5f4c9b8e9562563cf70365cbc6986735544ae73bde933d612cc2c6406ef5514 | thraxil/petra | petra_01_news.erl | -module(petra_01_news).
-export([init/0, stop/1]).
This script is first executed at server startup and should
% return a list of WatchIDs that should be cancelled in the stop
% function below (stop is executed if the script is ever reloaded).
init() ->
{ok, []}.
stop(ListOfWatchIDs) ->
lists:map(fun boss_n... | null | https://raw.githubusercontent.com/thraxil/petra/b0cb6980d7e120d1ef3b855947507013bd703032/priv/init/petra_01_news.erl | erlang | return a list of WatchIDs that should be cancelled in the stop
function below (stop is executed if the script is ever reloaded).
Ideas
fun
;
end),
Followers = User:followers(),
lists:map(fun(Follower) ->
end, Followers)
end)... | -module(petra_01_news).
-export([init/0, stop/1]).
This script is first executed at server startup and should
init() ->
{ok, []}.
stop(ListOfWatchIDs) ->
lists:map(fun boss_news:cancel_watch/1, ListOfWatchIDs).
: watch("user-42 . * " ,
( updated , { , ' location ' , OldLocation , NewLo... |
3560827ee62cc29704a9d700f57bf69ee82fd874291331b225c91f3503962d5f | links-lang/links | processTypes.ml | open Utility
(* Should be safe to not have an explicit lock due to the co-operative
* nature of the scheduling, since things shouldn't be pre-empted mid
* counter update. *)
module type NAME = sig
type t
val create : unit -> t
val compare : t -> t -> int
val equal : t -> t -> bool
val to_string : t -> stri... | null | https://raw.githubusercontent.com/links-lang/links/2923893c80677b67cacc6747a25b5bcd65c4c2b6/core/processTypes.ml | ocaml | Should be safe to not have an explicit lock due to the co-operative
* nature of the scheduling, since things shouldn't be pre-empted mid
* counter update. | open Utility
module type NAME = sig
type t
val create : unit -> t
val compare : t -> t -> int
val equal : t -> t -> bool
val to_string : t -> string
val of_string : string -> t
val to_json : t -> Yojson.Basic.t
val pp : Format.formatter -> t -> unit
val show : t -> string
end
let name_source : int r... |
6fca43635268e1786538b7d47eed6b8b43b6e3084185fcc215baaabf27452e23 | DavidAlphaFox/RabbitMQ | tcp_acceptor_sup.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/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/src/tcp_acceptor_sup.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.
----------------... | 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... |
7967e1c491dd89dc3c33a3b2bb0d5bfb8b5edcbef4ce110a9f70c09801a9ccdd | chetmurthy/ensemble | config_trans.ml | (**************************************************************)
CONFIG_TRANS.ML
Author : , 10/96
(**************************************************************)
open Trans
open Buf
open Util
open Layer
open View
(**************************************************************)
let name = Trace.file "CONFIG_TRANS... | null | https://raw.githubusercontent.com/chetmurthy/ensemble/8266a89e68be24a4aaa5d594662e211eeaa6dc89/ensemble/server/infr/config_trans.ml | ocaml | ************************************************************
************************************************************
************************************************************
************************************************************
************************************************************
Check the opti... | CONFIG_TRANS.ML
Author : , 10/96
open Trans
open Buf
open Util
open Layer
open View
let name = Trace.file "CONFIG_TRANS"
let failwith s = Trace.make_failwith name s
let log = Trace.log name
let name_send = "CONFIG_TRANS(send)"
let name_cast = "CONFIG_TRANS(cast)"
let name_recv = "CONFIG_TRANS(recv)"
let name_gos... |
4614e9437616496f1be9aa0ebc9893f54e2636c229c6d73f7a6607f421f50448 | Ekatereana/CommonLispWorks | packages.lisp | ;;;; Simple table data structure.
Copyright ( c ) 2013 , All rights reserved ( see COPYING file for details ) .
(in-package :cl-user)
(defpackage :cl-simple-table
(:nicknames :simple-table)
(:use :cl)
(:export :make-table
:make-row
:add-to-table
:add-to-row
:get-r... | null | https://raw.githubusercontent.com/Ekatereana/CommonLispWorks/13111f7c45ec4d672dfdf3689ba22554d5c60727/cl-simple-table/packages.lisp | lisp | Simple table data structure. | Copyright ( c ) 2013 , All rights reserved ( see COPYING file for details ) .
(in-package :cl-user)
(defpackage :cl-simple-table
(:nicknames :simple-table)
(:use :cl)
(:export :make-table
:make-row
:add-to-table
:add-to-row
:get-row
:get-row-column
... |
df889477f3ad4dd23b6ec15e7c693fb77ee4bebedafe11567373716fd3f88335 | drathier/elm-offline | Decode.hs | # OPTIONS_GHC -Wall -fno - warn - unused - do - bind #
# LANGUAGE BangPatterns , MagicHash , OverloadedStrings , UnboxedTuples #
module Json.Decode
( parse
re - export from Json . Decode . Internals
, Json.Decoder
, Json.string, Json.text, Json.name, Json.bool, Json.int
, Json.list, Json.dict, Json.pairs, Jso... | null | https://raw.githubusercontent.com/drathier/elm-offline/f562198cac29f4cda15b69fde7e66edde89b34fa/compiler/src/Json/Decode.hs | haskell | JSON
OBJECT
ARRAY
NUMBER
STRING
"
"
\n
\
\t
\n | # OPTIONS_GHC -Wall -fno - warn - unused - do - bind #
# LANGUAGE BangPatterns , MagicHash , OverloadedStrings , UnboxedTuples #
module Json.Decode
( parse
re - export from Json . Decode . Internals
, Json.Decoder
, Json.string, Json.text, Json.name, Json.bool, Json.int
, Json.list, Json.dict, Json.pairs, Jso... |
a43668277ad1168bd7831ffeb56bdb3eae76776f81bfab12b604e151d43399a7 | vyos/vyconf | vyconf_client.ml | include Vyconf_pb
include Vyconf_types
type t = {
sock: Lwt_unix.file_descr;
ic: Lwt_io.input Lwt_io.channel;
oc: Lwt_io.output Lwt_io.channel;
enc: Pbrt.Encoder.t;
session: string option;
conf_mode: bool;
closed: bool;
out_format: request_output_format;
conf_format: request_config_... | null | https://raw.githubusercontent.com/vyos/vyconf/dd9271b4304c6b1a5a2576821d1b2b8fd3aa6bf5/src/vyconf_client.ml | ocaml | include Vyconf_pb
include Vyconf_types
type t = {
sock: Lwt_unix.file_descr;
ic: Lwt_io.input Lwt_io.channel;
oc: Lwt_io.output Lwt_io.channel;
enc: Pbrt.Encoder.t;
session: string option;
conf_mode: bool;
closed: bool;
out_format: request_output_format;
conf_format: request_config_... | |
ce4c188a14c062d4920736fb0671dbb61010968a795145af288980f921bb1178 | gogins/csound-extended-nudruz | chords.lisp | (in-package :cm)
;(print (nth (random (length *list*)) *list*))
(defun random-elt (choices)
(nth (random (length choices)) choices))
(defun dyads5-graph ()
(new graph of
`(((1 2) :id ab :to ,(random-elt '(cd de ce)))
((1 3) :id ac :to ,(random-elt '(de be bd)))
((1 4) :id ad :to ,(random-elt '(b... | null | https://raw.githubusercontent.com/gogins/csound-extended-nudruz/4551d54890f4adbadc5db8f46cc24af8e92fb9e9/sources/data/chords.lisp | lisp | (print (nth (random (length *list*)) *list*)) | (in-package :cm)
(defun random-elt (choices)
(nth (random (length choices)) choices))
(defun dyads5-graph ()
(new graph of
`(((1 2) :id ab :to ,(random-elt '(cd de ce)))
((1 3) :id ac :to ,(random-elt '(de be bd)))
((1 4) :id ad :to ,(random-elt '(be bc ce)))
((1 5) :id ae :to ,(random-elt '(c... |
3dc130f65be25e678a366515e86a99306305d53f24de6e59ee287b0ab5c4dfb5 | dktr0/MusicW | Envelopes.hs | module Sound.MusicW.Envelopes where
import Sound.MusicW.AudioContext
import Sound.MusicW.Node
import Sound.MusicW.SynthDef
ampEnv :: AudioIO m => AudioTime -> AudioTime -> Double -> AudioTime -> AudioTime -> NodeRef -> SynthDef m NodeRef
ampEnv a d s st r input = do
g <- gain 0.0 input
linearRampOnParam Gain 1.0 ... | null | https://raw.githubusercontent.com/dktr0/MusicW/bc6ddf6306f7354a5b418496cc9e6853ece8bb53/src/Sound/MusicW/Envelopes.hs | haskell | module Sound.MusicW.Envelopes where
import Sound.MusicW.AudioContext
import Sound.MusicW.Node
import Sound.MusicW.SynthDef
ampEnv :: AudioIO m => AudioTime -> AudioTime -> Double -> AudioTime -> AudioTime -> NodeRef -> SynthDef m NodeRef
ampEnv a d s st r input = do
g <- gain 0.0 input
linearRampOnParam Gain 1.0 ... | |
a440e50daea25b40967530a17985404ef5dfdb41a2d85b7fcc12087f27c4cfe3 | AbstractMachinesLab/caramel | utils.ml | module Position = struct
open Lexing
let repr p = (p.pos_lnum, p.pos_cnum - p.pos_bol)
end
module Location = struct
open Location
let repr l = (Position.repr l.loc_start, Position.repr l.loc_end)
end
let check_locs f ~name ~input ~locs =
let lexbuf = Lexing.from_string input in
let actual = List.map Loc... | null | https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocamlformat-0.17.0/vendor/parse-wyc/test/unit/utils.ml | ocaml | module Position = struct
open Lexing
let repr p = (p.pos_lnum, p.pos_cnum - p.pos_bol)
end
module Location = struct
open Location
let repr l = (Position.repr l.loc_start, Position.repr l.loc_end)
end
let check_locs f ~name ~input ~locs =
let lexbuf = Lexing.from_string input in
let actual = List.map Loc... | |
e10c8751d765b2b808e1eec9599a930ab6f63b0098abc3ec0359f0838ded563b | madjestic/Haskell-OpenGL-Tutorial | Input.hs | module Input
( AppInput
, parseWinInput
, mousePos
, lbp
, lbpPos
, lbDown
, rbp
, rbpPos
, rbDown
, keyPress
, keyPressed
, keyReleased
, keyPressedRepeat
, quitEvent
, module SDL.Input.Keyboard.Codes
) where
import Data.Maybe
import ... | null | https://raw.githubusercontent.com/madjestic/Haskell-OpenGL-Tutorial/9f685ddde9d6c5d2cc9c2c62f214ca0d43e717c7/Mandelbrot-FRP-io-sdl2/Input.hs | haskell | <| Signal Functions |> --
| Current mouse position
| Events that indicate left button click
| Events that indicate left button click and are tagged with mouse position
| Is left button down
| Events that indicate right button click
| Events that indicate right button click and are tagged with mouse position
| I... | module Input
( AppInput
, parseWinInput
, mousePos
, lbp
, lbpPos
, lbDown
, rbp
, rbpPos
, rbDown
, keyPress
, keyPressed
, keyReleased
, keyPressedRepeat
, quitEvent
, module SDL.Input.Keyboard.Codes
) where
import Data.Maybe
import ... |
61d3909a7553d758e7094c7463a111aa3cb17b44725b69b072597d1f1bcd420c | dinosaure/art | rowex.ml | let () = Printexc.record_backtrace true
exception Duplicate
let (.![]) = String.unsafe_get
): see [ art.ml ] about this unsafe access .
external ( <= ) : 'a -> 'a -> bool = "%lessequal"
let ( <= ) (x : int) y = x <= y [@@inline]
let min (a : int) b = if a <= b then a else b [@@inline]
type key = string
let key ... | null | https://raw.githubusercontent.com/dinosaure/art/4dff34f21f1c730e5502b00f46cab0e2ccd3c6cb/lib/rowex.ml | ocaml | TODO?
XXX(dinosaure): a Int128 does not exist in OCaml, so we load it into a
simple (little-endian) [string]. However, the access to the value must
be atomic and be saved into a string then.
XXX(dinosaure): [owner] is a unique identifier (like a PID) to tell us which
process requires a node to be ... | let () = Printexc.record_backtrace true
exception Duplicate
let (.![]) = String.unsafe_get
): see [ art.ml ] about this unsafe access .
external ( <= ) : 'a -> 'a -> bool = "%lessequal"
let ( <= ) (x : int) y = x <= y [@@inline]
let min (a : int) b = if a <= b then a else b [@@inline]
type key = string
let key ... |
48d166442ee53c2ed5dd66ddf2460a2b29b35f468533f9df95def668e27a284f | jellelicht/guix | compression.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2012 , 2013 , 2014 , 2015 < >
Copyright © 2013 < >
Copyright © 2014 , 2015 < >
Copyright © 2015 < >
Copyright © 2015 < >
Copyright © 2015 < >
Copyright © 2015 < >
Copyright © 2015 < >
Copyright © 2015 , 2016... | null | https://raw.githubusercontent.com/jellelicht/guix/83cfc9414fca3ab57c949e18c1ceb375a179b59c/gnu/packages/compression.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2012 , 2013 , 2014 , 2015 < >
Copyright © 2013 < >
Copyright © 2014 , 2015 < >
Copyright © 2015 < >
Copyright © 2015 < >
Copyright © 2015 < >
Copyright © 2015 < >
Copyright © 2015 < >
Copyright © 2015 , 2016 < >
Copyright © 2016 < >
under the terms of ... |
9d31ac5093ecee35ca72d6414a161c8844f5411f3ac267d6830a46e2dc27c5a6 | maximedenes/native-coq | formula.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/plugins/firstorder/formula.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
"_" cannot be parsed
we have a co... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Hipattern
open Names
ope... |
56448eb62b44ea6ccab79e99b84f89220aa13f1f5b0d11bf13eb6d8df1cd84cd | uim/uim | sj3.scm | sj3.scm : SJ3 for uim .
;;;
Copyright ( c ) 2003 - 2013 uim Project
;;;
;;; All rights reserved.
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
1 . Redistributions of source code must retain the above ... | null | https://raw.githubusercontent.com/uim/uim/d1ac9d9315ff8c57c713b502544fef9b3a83b3e5/scm/sj3.scm | scheme |
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
notice, this list of conditions and the following disclaimer.
notice, this list of conditions and the following disclaimer in the
documen... | sj3.scm : SJ3 for uim .
Copyright ( c ) 2003 - 2013 uim Project
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
3 . Neither the name of authors nor the names of its contributors
THIS SOFTWARE IS PROVIDED BY THE COPYRIG... |
3d1e0f9e50a60e5801438f058ab2fd8be54534d28d1acb77d2252537cee073b0 | prolic/futr | Helpers.hs | {-# LANGUAGE OverloadedStrings #-}
module Helpers where
import Control.Monad.IO.Class (MonadIO)
import Crypto.Schnorr (XOnlyPubKey, exportXOnlyPubKey)
import Data.DateTime
import Data.Maybe (fromMaybe)
import Data.Text (Text, pack)
import Monomer
import Nostr.Event
import Nostr.Keys
import Nostr.Profile
voidTask ... | null | https://raw.githubusercontent.com/prolic/futr/34f45dbf57d23b08efb780cf3ef9b5d08a872d6f/src/Helpers.hs | haskell | # LANGUAGE OverloadedStrings # |
module Helpers where
import Control.Monad.IO.Class (MonadIO)
import Crypto.Schnorr (XOnlyPubKey, exportXOnlyPubKey)
import Data.DateTime
import Data.Maybe (fromMaybe)
import Data.Text (Text, pack)
import Monomer
import Nostr.Event
import Nostr.Keys
import Nostr.Profile
voidTask :: IO () -> EventResponse s e sp ep
vo... |
6617d5051dbdc0f9629bf076a2ccb6c6ee363d32442ae5904da2b7e8bb0d11f0 | lem-project/lem | utf-16.lisp | (uiop:define-package :lem-encodings/utf-16
(:use :lem-base :cl))
(in-package :lem-encodings/utf-16)
(defclass utf-16 (encoding) ())
(defclass utf-16be (encoding) ())
(defclass utf-16le (encoding) ())
(register-encoding 'utf-16)
(register-encoding 'utf-16be)
(register-encoding 'utf-16le)
Shadow / unshadow invalid... | null | https://raw.githubusercontent.com/lem-project/lem/2efd909118a24434623907330de7302143358f1c/lib/encodings/utf-16.lisp | lisp | Why latin-1 supplement are treated as error?
Decode bytes from '(unsigned-byte 8) stream `input` to buffer or anything else
by the function `output-char`
Return a function which encodes a character and writes the result into stream `out` | (uiop:define-package :lem-encodings/utf-16
(:use :lem-base :cl))
(in-package :lem-encodings/utf-16)
(defclass utf-16 (encoding) ())
(defclass utf-16be (encoding) ())
(defclass utf-16le (encoding) ())
(register-encoding 'utf-16)
(register-encoding 'utf-16be)
(register-encoding 'utf-16le)
Shadow / unshadow invalid... |
94b2b29d7057b485b31e14d9c4ddf84d86baeb2072a31a28af7ed4ce9994a6e6 | facebookarchive/pfff | graph_gephi.mli |
val graph_to_gefx:
str_of_node:('a -> string) ->
output:Common.filename ->
tree:('a, 'a) Common2.tree option ->
weight_edges: ('a * 'a, float) Hashtbl.t option ->
'a Graph.graph ->
unit
| null | https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/h_visualization/graph_gephi.mli | ocaml |
val graph_to_gefx:
str_of_node:('a -> string) ->
output:Common.filename ->
tree:('a, 'a) Common2.tree option ->
weight_edges: ('a * 'a, float) Hashtbl.t option ->
'a Graph.graph ->
unit
| |
37da33245e2ad78237d169142976f71e3d75d84f5dcdb3380c8dcf952c11ec78 | subtitle-master/subtitlemaster | nodejs_test.cljs | (ns wilkerdev.util.nodejs-test
(:require-macros [wilkerdev.util.macros :refer [<? test]]
[cljs.core.async.macros :refer [go]])
(:require [cljs.core.async :as async]
[wilkerdev.util.nodejs :as node]
[sm.test-helper :as helper]))
(test "stream->buffer"
(let [path "test/fi... | null | https://raw.githubusercontent.com/subtitle-master/subtitlemaster/d88c2fb007c6c3d4030fefbd4b7e3eafb0e797a9/test/cljs/wilkerdev/util/nodejs_test.cljs | clojure | (ns wilkerdev.util.nodejs-test
(:require-macros [wilkerdev.util.macros :refer [<? test]]
[cljs.core.async.macros :refer [go]])
(:require [cljs.core.async :as async]
[wilkerdev.util.nodejs :as node]
[sm.test-helper :as helper]))
(test "stream->buffer"
(let [path "test/fi... | |
2c32eb82ad7ad943249dcf636c407a99bfa116bb11370017bfd65876312f26ac | idris-hackers/idris-llvm | Main.hs | module Main where
import Idris.Core.TT
import Idris.AbsSyntax
import Idris.ElabDecls
import Idris.Main
import Idris.Options
import Idris.REPL
import Paths_idris_llvm
import IRTS.Compiler
import IRTS.CodegenLLVM
import qualified IRTS.CodegenCommon as CG
import LLVM.Target
import System.Environment
import System.Exit... | null | https://raw.githubusercontent.com/idris-hackers/idris-llvm/13565a33d635a7c212b1f8b6060d06643186931e/src/Main.hs | haskell | module Main where
import Idris.Core.TT
import Idris.AbsSyntax
import Idris.ElabDecls
import Idris.Main
import Idris.Options
import Idris.REPL
import Paths_idris_llvm
import IRTS.Compiler
import IRTS.CodegenLLVM
import qualified IRTS.CodegenCommon as CG
import LLVM.Target
import System.Environment
import System.Exit... | |
e522e76b8326236360577250946b0fdf4ebbeefe55069ae8b4ed5b645beb142f | eugeneia/athens | ffi-1.1.0.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; indent - tabs - mode : nil ; coding : utf-8 ; show - trailing - whitespace : t -*-
(defpackage :openssl-1.1.0
(:nicknames :ossl-1.1.0 :ossl110)
(:use :common-lisp)
(:export #:ssl-ctx-set-default-verify-dir
#:ssl-ctx-set-default-verify-file))
(in-package :o... | null | https://raw.githubusercontent.com/eugeneia/athens/cc9d456edd3891b764b0fbf0202a3e2f58865cbf/quicklisp/dists/quicklisp/software/cl%2Bssl-20180328-git/src/ffi-1.1.0.lisp | lisp | Syntax : COMMON - LISP ; indent - tabs - mode : nil ; coding : utf-8 ; show - trailing - whitespace : t -*- |
(defpackage :openssl-1.1.0
(:nicknames :ossl-1.1.0 :ossl110)
(:use :common-lisp)
(:export #:ssl-ctx-set-default-verify-dir
#:ssl-ctx-set-default-verify-file))
(in-package :openssl-1.1.0)
TODO : factor out define - ssl - function into a common dependency from ffi.lisp
and use it here . Or just mo... |
981e4b21168596cbbbbaa77b04768f417fc0573a5c39a1d861a2678bbfd7f307 | NorfairKing/intray | PostStripeHook.hs | {-# LANGUAGE OverloadedStrings #-}
module Intray.Server.Handler.PostStripeHook (servePostStripeHook) where
import Control.Monad.Logger
import Data.Aeson as JSON
import Data.Aeson.Encode.Pretty as JSON
import Data.Aeson.Types as JSON
import qualified Data.ByteString.Lazy as LB
import Data.Maybe
import qualified Data.T... | null | https://raw.githubusercontent.com/NorfairKing/intray/bee638922cbb7d44da0a577038bfb34839984b96/intray-server/src/Intray/Server/Handler/PostStripeHook.hs | haskell | # LANGUAGE OverloadedStrings #
| Update the subscription date when the subscription has been updated
We don't want to do anything with subscriptions for other products.
Try to find the corresponding stripe customer so that we can figure out the user that this subscription belongs to
If the subscription has ended, u... |
module Intray.Server.Handler.PostStripeHook (servePostStripeHook) where
import Control.Monad.Logger
import Data.Aeson as JSON
import Data.Aeson.Encode.Pretty as JSON
import Data.Aeson.Types as JSON
import qualified Data.ByteString.Lazy as LB
import Data.Maybe
import qualified Data.Text as T
import qualified Data.Text... |
4c52d5950da54afa75760f0b59f7d0a1cab598460a20bcc35832559ededa8653 | biocaml/biocaml | bgzf.mli | * I / O on Blocked GNU Zip format ( BGZF ) files
type in_channel
(** Representation of files opened for reading. *)
val open_in : string -> in_channel
* Opens a BGZF file for reading . @raise if the path
given in argument does not refer to an existing file .
given in argument does not refer to an existing ... | null | https://raw.githubusercontent.com/biocaml/biocaml/ac619539fed348747d686b8f628e80c1bb8bfc59/lib/unix/bgzf.mli | ocaml | * Representation of files opened for reading.
* Closes an open file. The channel cannot be used after that
call.
* [virtual_offset iz] provides the current position in the file
using the same encoding than for [seek_in].
* Exception signaling an incorrect format while reading data from an
open file. All i... | * I / O on Blocked GNU Zip format ( BGZF ) files
type in_channel
val open_in : string -> in_channel
* Opens a BGZF file for reading . @raise if the path
given in argument does not refer to an existing file .
given in argument does not refer to an existing file. *)
val of_in_channel : Stdlib.in_channel -> ... |
7f9138e6433970214cfe521f2ef61478cdf865825f62abc717137c1f3c97ea65 | ygrek/mldonkey | zog_misc.ml | (***********************************************************************)
(* Zoggy *)
(* *)
, projet Cristal , INRIA Rocquencourt
(* ... | null | https://raw.githubusercontent.com/ygrek/mldonkey/333868a12bb6cd25fed49391dd2c3a767741cb51/tools/zoggy/zog_misc.ml | ocaml | *********************************************************************
Zoggy
... | , projet Cristal , INRIA Rocquencourt
Copyright 2001 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
open Zog_types
* Get the first value of ... |
50d60466d5a12ec9e1ce4cc4b07f6c292e61b7962ef1d698fee3ea608ae23178 | simplex-chat/simplex-chat | M20220321_chat_item_edited.hs | # LANGUAGE QuasiQuotes #
module Simplex.Chat.Migrations.M20220321_chat_item_edited where
import Database.SQLite.Simple (Query)
import Database.SQLite.Simple.QQ (sql)
m20220321_chat_item_edited :: Query
m20220321_chat_item_edited =
[sql|
1 for edited
|]
| null | https://raw.githubusercontent.com/simplex-chat/simplex-chat/4b39de6c4fdec8d7795b2e7eb457b5661e77aa9b/src/Simplex/Chat/Migrations/M20220321_chat_item_edited.hs | haskell | # LANGUAGE QuasiQuotes #
module Simplex.Chat.Migrations.M20220321_chat_item_edited where
import Database.SQLite.Simple (Query)
import Database.SQLite.Simple.QQ (sql)
m20220321_chat_item_edited :: Query
m20220321_chat_item_edited =
[sql|
1 for edited
|]
| |
51d95d361bfa369163a7f0e49bb0a18cb4200b35ea7f25e675f3f1583b989c87 | skanev/playground | 26-tests.scm | (require rackunit rackunit/text-ui)
(require eopl)
(load-relative "../26.scm")
(define eopl-1.26-tests
(test-suite
"Tests for EOPL exercise 1.26"
(check-equal? (up '((1 2) (3 4)))
'(1 2 3 4))
(check-equal? (up '((x (y)) z))
'(x (y) z))
))
(exit (run-tests eopl-1.26-t... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/eopl/01/tests/26-tests.scm | scheme | (require rackunit rackunit/text-ui)
(require eopl)
(load-relative "../26.scm")
(define eopl-1.26-tests
(test-suite
"Tests for EOPL exercise 1.26"
(check-equal? (up '((1 2) (3 4)))
'(1 2 3 4))
(check-equal? (up '((x (y)) z))
'(x (y) z))
))
(exit (run-tests eopl-1.26-t... | |
aa4a39eb25edcb5abe2dfc254dc5a18b319b52d52f38e2aadb89031194a8822d | int-index/kalium | Operator.hs | module Kalium.Nucleus.Scalar.Operator where
import Kalium.Prelude
import Kalium.Nucleus.Scalar.Program
import qualified Kalium.Nucleus.Vector.Program as Vec
import qualified Data.Map as M
data Operator = Operator
{ tc :: [Type] -> [Type] -> Maybe Type
, vec :: [Vec.Expression] -> Vec.Expression
}
listMa... | null | https://raw.githubusercontent.com/int-index/kalium/0653b4229001880322acf3016de595360de726ec/src/Kalium/Nucleus/Scalar/Operator.hs | haskell | for now
for now
for now | module Kalium.Nucleus.Scalar.Operator where
import Kalium.Prelude
import Kalium.Nucleus.Scalar.Program
import qualified Kalium.Nucleus.Vector.Program as Vec
import qualified Data.Map as M
data Operator = Operator
{ tc :: [Type] -> [Type] -> Maybe Type
, vec :: [Vec.Expression] -> Vec.Expression
}
listMa... |
094b2bedc2338c59296b7eca9a01bafe908bc8e8533142be2e915d27b900ada7 | elaforge/karya | VerifyPerformance.hs | Copyright 2014
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
| Cmdline program to verify that a saved score still derives the same MIDI
msgs or lilypond code as the last saved performance .
module App.VerifyPerformance (main) where
import quali... | null | https://raw.githubusercontent.com/elaforge/karya/4e308b71ec1ec9fdc67aaaaa9cc157c159eba8b4/App/VerifyPerformance.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt
| This is intentionally not the same as what the shakefile uses, so I don't
mingle the results.
| If this is a directory with a 'verify_me_txt', expand to include its
contents.
* implementation
| Extract s... | Copyright 2014
| Cmdline program to verify that a saved score still derives the same MIDI
msgs or lilypond code as the last saved performance .
module App.VerifyPerformance (main) where
import qualified Control.Monad.Except as Except
import qualified Data.Aeson as Aeson
import qualified Data.ByteString.Lazy as... |
621b38838f1410ba628820f30f036ea3ad580aab72c3a010b7a6bb95ab53ffa6 | spechub/Hets | StatAna.hs | # LANGUAGE ExistentialQuantification , OverloadedStrings #
|
Module : ./TopHybrid / StatAna.hs
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : experimental
Portability : not portable
Description :
Static analysis of hybrid logic with an arbitrary logic b... | null | https://raw.githubusercontent.com/spechub/Hets/4cedaf8dbdb8909955e0066b465c331973043bbf/TopHybrid/StatAna.hs | haskell | Symbols, this should be removed...
| Collects the newly declared nomies and modies
| Adds the newly declared nomies/modies, and the analysed base
signature to a new sig
checking for redundancy of modalities and nominals declarations
Note : If there are repeated declarations, the size of the sets should
be differnt t... | # LANGUAGE ExistentialQuantification , OverloadedStrings #
|
Module : ./TopHybrid / StatAna.hs
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : experimental
Portability : not portable
Description :
Static analysis of hybrid logic with an arbitrary logic b... |
7f22ebec8d3f15f69fc0a61044047e02eeb32479f0f40c12229f1cb784e20a18 | NaaS/motto | runtime_data.ml |
Runtime state for programs .
, Cambridge University Computer Lab , July 2015
Use of this source code is governed by the Apache 2.0 license ; see LICENSE
Runtime state for Flick programs.
Nik Sultana, Cambridge University Computer Lab, July 2015
Use of this source code is governed by the A... | null | https://raw.githubusercontent.com/NaaS/motto/8ff3eba534be816d861dcfced93b68d593a12e2b/runtime/runtime_data.ml | ocaml | Representation of values during evaluation. Evaluation might take place interactively
with the user (or with the network), so this datatype is used to ensure that only
values (and not arbitrary expressions) are stored in variables.
We could avoid defining the typed_value type, and working with normalised values
... |
Runtime state for programs .
, Cambridge University Computer Lab , July 2015
Use of this source code is governed by the Apache 2.0 license ; see LICENSE
Runtime state for Flick programs.
Nik Sultana, Cambridge University Computer Lab, July 2015
Use of this source code is governed by the A... |
72eebd56645bba209e67643a19caeff9e8832064d54d8bc63ebde2314f303a58 | rudymatela/extrapolate | diff.hs | import Test.Extrapolate
import Data.Typeable (typeOf)
main :: IO ()
main = do
ch ()
ch bool
ch int
ch integer
ch char
ch ordering
ch [()]
ch [bool]
ch [int]
ch [integer]
ch [char]
ch [ordering]
ch ((),int)
ch (bool,char)
ch (int,(),bool)
ch (ordering,char,integer)
ch (mayb ())
ch... | null | https://raw.githubusercontent.com/rudymatela/extrapolate/0b3ca28eed0d04358b2fb033664476f8b29821a6/bench/diff.hs | haskell | see: -ci.org/rudymatela/extrapolate/jobs/263425540
For some reason, output for the following funky types is different across
I don't have time to investigate now, but it might be good to check why.
The following makes everything too slow
maybe in a future faster version we can uncomment those above. | import Test.Extrapolate
import Data.Typeable (typeOf)
main :: IO ()
main = do
ch ()
ch bool
ch int
ch integer
ch char
ch ordering
ch [()]
ch [bool]
ch [int]
ch [integer]
ch [char]
ch [ordering]
ch ((),int)
ch (bool,char)
ch (int,(),bool)
ch (ordering,char,integer)
ch (mayb ())
ch... |
6c4ff025ec2dd56036eb13aeb1fdff974abaff8ace35888cc87a6410e5c03c00 | schemeorg-community/index.scheme.org | srfi.131.records.syntactic.scm | (((name . "define-record-type")
(signature syntax-rules () ((_ type-spec constructor predicate field ...)))
(subsigs
(type-spec (pattern type-name (type-name parent)))
(constructor
(pattern #f constructor-name (constructor-name field-name ...)))
(predicate (pattern #f predicate-name))
(field (patter... | null | https://raw.githubusercontent.com/schemeorg-community/index.scheme.org/32e1afcfe423a158ac8ce014f5c0b8399d12a1ea/types/srfi.131.records.syntactic.scm | scheme | (((name . "define-record-type")
(signature syntax-rules () ((_ type-spec constructor predicate field ...)))
(subsigs
(type-spec (pattern type-name (type-name parent)))
(constructor
(pattern #f constructor-name (constructor-name field-name ...)))
(predicate (pattern #f predicate-name))
(field (patter... | |
e789a60d1efcb099d6e33dfe2ac1299aa2709f0b4be5f31e6377abecfc30daa4 | expipiplus1/vulkan | Promoted_From_VK_KHR_external_fence.hs | {-# language CPP #-}
-- No documentation found for Chapter "Promoted_From_VK_KHR_external_fence"
module Vulkan.Core11.Promoted_From_VK_KHR_external_fence ( ExportFenceCreateInfo(..)
, StructureType(..)
,... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/b1e33d1031779b4740c279c68879d05aee371659/src/Vulkan/Core11/Promoted_From_VK_KHR_external_fence.hs | haskell | # language CPP #
No documentation found for Chapter "Promoted_From_VK_KHR_external_fence"
| VkExportFenceCreateInfo - Structure specifying handle types that can be
exported from a fence
== Valid Usage
- #VUID-VkExportFenceCreateInfo-handleTypes-01446# The bits in
@handleTypes@ /must/ be supported and comp... | module Vulkan.Core11.Promoted_From_VK_KHR_external_fence ( ExportFenceCreateInfo(..)
, StructureType(..)
, FenceImportFlagBits(..)
, FenceImportF... |
65c23ba5cd6cdb2bb66313694ccbcafa6fa2869a6163464fab610378c6d563ff | CryptoKami/cryptokami-core | Timer.hs | | Restartable , STM - based timer for waiting a given number of microseconds .
--
-- Consider the following code:
-- @
-- main :: IO ()
-- main = do
delay < - newTimer $ 5 * 1000000
-- tid <- forkIO . forever $ do
-- startTimer delay
-- atomically $ waitTimer delay
-- putStrLn $ "Timer... | null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/util/Pos/Util/Timer.hs | haskell |
Consider the following code:
@
main :: IO ()
main = do
tid <- forkIO . forever $ do
startTimer delay
atomically $ waitTimer delay
putStrLn $ "Timer ended"
_ <- getLine
startTimer delay
@
seconds.
activate it 'startTimer' needs to be called.
| Set the duration of a t... | | Restartable , STM - based timer for waiting a given number of microseconds .
delay < - newTimer $ 5 * 1000000
( ` finally ` ) . forever $ do
It will print " Timer ended " every 5 seconds after there was no input for 5
module Pos.Util.Timer
( Timer
, newTimer
, setTimerDuration
, wait... |
4a4822a2b295355786ef48765c963bb4bcbaeeab7b15332bae5e8d8726f98915 | haskell-mafia/boris | Form.hs | # LANGUAGE NoImplicitPrelude #
module Boris.Http.Form (
loadForm
) where
import Airship (Webmachine, parseFormData, request)
import Control.Monad.IO.Class (MonadIO, liftIO)
import qualified Data.Text.Encoding as T
import P
loadForm :: MonadIO m => Webmachine m [(Text, Text)]
loa... | null | https://raw.githubusercontent.com/haskell-mafia/boris/fb670071600e8b2d8dbb9191fcf6bf8488f83f5a/boris-http/src/Boris/Http/Form.hs | haskell | # LANGUAGE NoImplicitPrelude #
module Boris.Http.Form (
loadForm
) where
import Airship (Webmachine, parseFormData, request)
import Control.Monad.IO.Class (MonadIO, liftIO)
import qualified Data.Text.Encoding as T
import P
loadForm :: MonadIO m => Webmachine m [(Text, Text)]
loa... | |
703349d2ae1b83df9df9125bb251ec30ad4baebb88e60eff74a4468548cf600f | bgusach/exercises-htdp2e | ex-174.rkt | #lang htdp/bsl
(require 2htdp/batch-io)
# # # Functions
; String -> nothing...
Encodes the file n and prints it to stdout
(define (encode-file n)
(write-file
'stdout
(join-strings
(encode-lines (read-lines n))
"\n"
)))
; List-of-string -> List-of-string
Encodes each of the strin... | null | https://raw.githubusercontent.com/bgusach/exercises-htdp2e/c4fd33f28fb0427862a2777a1fde8bf6432a7690/ex-174.rkt | racket | String -> nothing...
List-of-string -> List-of-string
String -> String
List-of-strings String -> String
joins a list of strings with the string s
List-of-1-strings -> List-of-strings
1String -> String
1String -> String | #lang htdp/bsl
(require 2htdp/batch-io)
# # # Functions
Encodes the file n and prints it to stdout
(define (encode-file n)
(write-file
'stdout
(join-strings
(encode-lines (read-lines n))
"\n"
)))
Encodes each of the strings of a list
(define (encode-lines los)
(cond
[(empt... |
bbc3aba376784af3a4a145c0a06fd1fb755e1a6a0d82f14e1f0589c07565d54b | Incubaid/rsync-demo | adler.ml | type t = {mutable a: int; mutable b: int; mutable c: int}
let padler = 65521
let make () = {a = 1 ;b = 0; c = 0}
let from buf offset length =
let too_far = offset + length in
let rec loop a b i=
if i = too_far
then {a; b; c = length}
else (* slooow modulo can be lifted with a bit of math *)
... | null | https://raw.githubusercontent.com/Incubaid/rsync-demo/d2587974dbb35e3838679cc5e0d19dabd42a8ac7/adler.ml | ocaml | slooow modulo can be lifted with a bit of math | type t = {mutable a: int; mutable b: int; mutable c: int}
let padler = 65521
let make () = {a = 1 ;b = 0; c = 0}
let from buf offset length =
let too_far = offset + length in
let rec loop a b i=
if i = too_far
then {a; b; c = length}
let a' = (a + Char.code(buf.[i])) mod padler in
let... |
80e2b25c5d72acf7359a633db4e8d4c197a72544c35fa3e969fc15de69c02a8c | nasa/PRECiSA | ErrM.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/4f72e50d75528ce81cf0858ca9bf58b352e4f4b9/PRECiSA/src/ErrM.hs | haskell | Notices:
Disclaimers | 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... |
1bf1b6885a286d7afcf01f2c452632d0fcde0418d1afca125dfb2823427a6f4e | ozusrl/SubtypedQuotedML | listSet.mli | (*********************************************************************************************************************)
(* *)
... | null | https://raw.githubusercontent.com/ozusrl/SubtypedQuotedML/7b09eb5518dea21fda3dc9db3b966a17225d91ff/src/wallace/listSet.mli | ocaml | *******************************************************************************************************************
... |
, projet Cristal , INRIA Rocquencourt
Copyright 2000 Institut National de Recherche en Informatique et Automatique . Distributed only by per... |
50ce310c3284f1fac0e88434f97dfbc4aab3a5f4ae63c11548ba590d6bf0a813 | SparkFund/spec-tacular | datomic_test.clj | (ns spark.spec-tacular.datomic-test
(:refer-clojure :exclude [remove read-string read assoc!])
(:use clojure.test
spark.spec-tacular
spark.spec-tacular.spec
[spark.spec-tacular.datomic :exclude [db]]
spark.spec-tacular.test-utils
spark.spec-tacular.generators
spark.sp... | null | https://raw.githubusercontent.com/SparkFund/spec-tacular/2ddeaa0a33593a5e71f377368ded4701fa223e20/test/spark/spec_tacular/datomic_test.clj | clojure | edited out ids
remember the item we added
make all enums first
lazy seq
set up a ScmLink
sl-db (refresh-sl)
s-db (get-by-eid (db) s-eid)
assoc!ing an absurd field should throw an error
random testing | (ns spark.spec-tacular.datomic-test
(:refer-clojure :exclude [remove read-string read assoc!])
(:use clojure.test
spark.spec-tacular
spark.spec-tacular.spec
[spark.spec-tacular.datomic :exclude [db]]
spark.spec-tacular.test-utils
spark.spec-tacular.generators
spark.sp... |
b746e5fc2747863512eaa4342df0c9998e4a1debc87cab7b2e7bbb0d0b4f6c2c | tweag/haskell-training | Forms.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE TypeOperators #
module Api.Forms where
import Api.AppServices
import Domain.Answer
import Domain.AnswerRepository as Answer
import Domain.AnswerSetRepository as AnswerSet
import Domain.Id
import Domain.Question
import Domain.QuestionRepository as Question
i... | null | https://raw.githubusercontent.com/tweag/haskell-training/89d930f7854075d692dfb127d2c54e953dbf1519/src/Api/Forms.hs | haskell | base
servant
servant-server | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE TypeOperators #
module Api.Forms where
import Api.AppServices
import Domain.Answer
import Domain.AnswerRepository as Answer
import Domain.AnswerSetRepository as AnswerSet
import Domain.Id
import Domain.Question
import Domain.QuestionRepository as Question
i... |
c2fe0d95f4578fe6b4481ed98b2fda96caa7aefbea3e70fcf337471a0d9a647e | anoma/juvix | Artifacts.hs | -- | Stuff that is generated when the pipeline is run
module Juvix.Compiler.Pipeline.Artifacts where
import Juvix.Compiler.Builtins
import Juvix.Compiler.Concrete.Translation.FromParsed.Analysis.PathResolver
import Juvix.Prelude
data Artifacts = Artifacts
{ _artifactBuiltins :: BuiltinsState,
_artifactResolver ... | null | https://raw.githubusercontent.com/anoma/juvix/af63c36574da981e62d72b3c985fff2ba6266e8b/src/Juvix/Compiler/Pipeline/Artifacts.hs | haskell | | Stuff that is generated when the pipeline is run | module Juvix.Compiler.Pipeline.Artifacts where
import Juvix.Compiler.Builtins
import Juvix.Compiler.Concrete.Translation.FromParsed.Analysis.PathResolver
import Juvix.Prelude
data Artifacts = Artifacts
{ _artifactBuiltins :: BuiltinsState,
_artifactResolver :: ResolverState
}
makeLenses ''Artifacts
|
d198618a978b67b400d650780b9200a2ac527765a9a943e5781baf51863aa54b | Toxaris/pts | Dynamics.hs | module PTS.Dynamics
( -- * Values
Value (..)
, Module (..)
-- * Functions
, Function
, abstract
, open
, close
-- * Binding
, Bindings
, Binding (..)
, lookupValue
, lookupType
-- * Evaluation
, Eval
, runEval
, eval
, evalTerm
-- * Reification
, reify
-- * Normaliz... | null | https://raw.githubusercontent.com/Toxaris/pts/1700024f47bc9d28528b68fc815d2421f5d25b84/src-lib/PTS/Dynamics.hs | haskell | * Values
* Functions
* Binding
* Evaluation
* Reification
* Normalization and Equivalence | module PTS.Dynamics
Value (..)
, Module (..)
, Function
, abstract
, open
, close
, Bindings
, Binding (..)
, lookupValue
, lookupType
, Eval
, runEval
, eval
, evalTerm
, reify
, nbe
, equiv
, equivTerm
) where
import PTS.Dynamics.Binding
import PTS.Dynamics.Evaluation
import P... |
eb48b67f1be3c63c38c14aafeea02906f3192f6fcd591d745208e0f804c696a7 | g-andrade/locus | locus_sup.erl | Copyright ( c ) 2017 - 2023
%%
%% Permission is hereby granted, free of charge, to any person obtaining a
%% copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction , including without limitation
%% the rights to use, copy, modify, merge, publish, di... | null | https://raw.githubusercontent.com/g-andrade/locus/c731b1a4a819e998c60d90a0484e75e36966aa8c/src/locus_sup.erl | erlang |
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
the rights to use, copy, modify, merge, publish, distribute, sublicense,
Software is furnished to do so, subject to the following conditions:
The above copyright not... | Copyright ( c ) 2017 - 2023
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
... |
5fe1d386492682e961f97c0956e388ae5c33aeb112b4a85534d3ee3a79147564 | igorhvr/bedlam | play.scm | ;;; Display an array of any dimension. The format is such as attempts
;;; to display the dimensions and indices, too - more informative than
;;; pretty, perhaps. The playful name should suggest that this is for
;;; playing around with the system, not for a public library.
, October 2001 .
(define (play arr)
(le... | null | https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/sisc/sisc-1.16.6/full-src/sisc/src/sisc/modules/srfi/srfi-25/play.scm | scheme | Display an array of any dimension. The format is such as attempts
to display the dimensions and indices, too - more informative than
pretty, perhaps. The playful name should suggest that this is for
playing around with the system, not for a public library. |
, October 2001 .
(define (play arr)
(let ((low (- (array-rank arr) 1))
(shp (array-shape arr)))
(define (play ks dim)
(let* ((b (array-ref shp dim 0))
(e (array-ref shp dim 1)))
(write-prefix (reverse ks) b (- low dim))
(if (= dim low)
(let ((vec (share... |
1f4bcb8a628e94bdcccf3df460530d5c1fbc9ce5d20f16883f52b2c076b6d209 | ocaml-multicore/tezos | requester.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c... | null | https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/lib_requester/requester.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c ) 2021 Nomadic Labs , < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WIT... |
b57bd9ce8f3ec1242daf3441848eda02c7bc2309bdab43eba045fc674015ee45 | yesodweb/persistent | Sqlite.hs | # LANGUAGE ForeignFunctionInterface #
{-# LANGUAGE OverloadedStrings #-}
# OPTIONS_GHC -fno - warn - deprecations #
-- | A port of the direct-sqlite package for dealing directly with
' PersistValue 's .
module Database.Sqlite (
Connection,
Statement,
... | null | https://raw.githubusercontent.com/yesodweb/persistent/bf4c3ae430d7e7ec0351a768783d73e6bd265890/persistent-sqlite/Database/Sqlite.hs | haskell | # LANGUAGE OverloadedStrings #
| A port of the direct-sqlite package for dealing directly with
* Basic usage guide
|
Note that the example code shown here is a low level interface
usage. Let's create a small demo sqlite3 database which we will
use in our program:
> $ sqlite3 ~/test.db
> sqlite> create table t... | # LANGUAGE ForeignFunctionInterface #
# OPTIONS_GHC -fno - warn - deprecations #
' PersistValue 's .
module Database.Sqlite (
Connection,
Statement,
Error(..),
SqliteException(..),
StepResult(... |
dcb1be48752526b1c60762b81768d732e64a924fc51c0524c7a3d97e19b02bc4 | ucsd-progsys/dsolve | listprod.ml | val reverse: ('a).{n:nat} 'a list(n) -> 'a list(n)
fun('a,'b)
lp_aux_1 (A, Bs, res) =
case Bs of
[] => res
| B :: Bs => lp_aux_1 (A, Bs, (A, B) :: res)
withtype {b:nat, n:nat} <b> =>
'a * 'b list(b) * ('a * 'b) list(n) -> ('a * 'b) list(n+b)
fun('a,'b)
lp_aux_2 (As, Bs, res) =
case As o... | null | https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/tests/POPL2008/xiog/DMLex/listprod.ml | ocaml | val reverse: ('a).{n:nat} 'a list(n) -> 'a list(n)
fun('a,'b)
lp_aux_1 (A, Bs, res) =
case Bs of
[] => res
| B :: Bs => lp_aux_1 (A, Bs, (A, B) :: res)
withtype {b:nat, n:nat} <b> =>
'a * 'b list(b) * ('a * 'b) list(n) -> ('a * 'b) list(n+b)
fun('a,'b)
lp_aux_2 (As, Bs, res) =
case As o... | |
45a21f8ceb282ab9f4c8b5fda3623c9c875d840e35abbb19ed0668954378d47c | nomeata/arbtt | CommonStartup.hs | # LANGUAGE CPP #
module CommonStartup where
#ifndef WIN32
import System.Locale.SetLocale
#endif
commonStartup :: IO ()
commonStartup = do
#ifndef WIN32
setLocale LC_ALL (Just "")
#endif
return ()
| null | https://raw.githubusercontent.com/nomeata/arbtt/5e9bf42785e075adaa574bf853f7adbc3408e7f4/src/CommonStartup.hs | haskell | # LANGUAGE CPP #
module CommonStartup where
#ifndef WIN32
import System.Locale.SetLocale
#endif
commonStartup :: IO ()
commonStartup = do
#ifndef WIN32
setLocale LC_ALL (Just "")
#endif
return ()
| |
0c50ddc2457fe1c9b76b1055fd4eddd5f5b3db05859a25637c6bb8d6bc064163 | emqx/emqx | emqx_alarm_SUITE.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2020 - 2023 EMQ Technologies Co. , Ltd. 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 o... | null | https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/apps/emqx/test/emqx_alarm_SUITE.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 ... | Copyright ( c ) 2020 - 2023 EMQ Technologies Co. , Ltd. 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(emqx_alarm_SUITE).
-compile(export_all).
-compile(nowarn_export_all).
-include_lib("em... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.