_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 |
|---|---|---|---|---|---|---|---|---|
1962cbcbed9831547f52e869c161bef536fd93e9d5f530bbddcbf3715fd04520 | pheaver/netlist-verilog | AST.hs | --------------------------------------------------------------------------------
-- |
-- Module : Language.Verilog.Syntax.AST
Copyright : ( c ) Signali Corp. 2010
-- License : All rights reserved
--
Maintainer :
-- Stability : experimental
Portability : ghc
--
An abstract syntax tree... | null | https://raw.githubusercontent.com/pheaver/netlist-verilog/9bc9e7864f64fadf74dffd628243cc2543abcd8d/verilog/Language/Verilog/Syntax/AST.hs | haskell | ------------------------------------------------------------------------------
|
Module : Language.Verilog.Syntax.AST
License : All rights reserved
Stability : experimental
write the definition of the AST:
* <>
* <>
* <>
generating, pretty printing, and parsing. To do anything more ad... | Copyright : ( c ) Signali Corp. 2010
Maintainer :
Portability : ghc
An abstract syntax tree ( AST ) for Verilog . We used the following to help
This AST is very close to the concrete syntax , and is only meant for
The AST is incomplete in many places , and deviates from the spec in a few
mod... |
0be3c8157a0d0b3fc741cea8bef05ee848f920ca7ebe9cdd60938677ef9dbb85 | hyperfiddle/electric | demo_7_todos_basic.cljc | (ns user.demo-7-todos-basic
(:require clojure.edn
[datascript.core :as d]
[hyperfiddle.photon :as p]
[hyperfiddle.photon-dom :as dom]
[hyperfiddle.photon-ui :as ui])
(:import [hyperfiddle.photon Pending])
#?(:cljs (:require-macros user.demo-7-todos-basic)))
;;; Bus... | null | https://raw.githubusercontent.com/hyperfiddle/electric/e633dc635cf84e0a2320b664ba722b696ce0067b/scratch/geoffrey/2022/demo_7_todos_basic.cljc | clojure | Business logic
todo
Dom input getters/setters
tests
key combo(s) to listen to
TODO remove from userland
acknowledgement
boolean
nil | true | false
auto-transact, prints server-side | (ns user.demo-7-todos-basic
(:require clojure.edn
[datascript.core :as d]
[hyperfiddle.photon :as p]
[hyperfiddle.photon-dom :as dom]
[hyperfiddle.photon-ui :as ui])
(:import [hyperfiddle.photon Pending])
#?(:cljs (:require-macros user.demo-7-todos-basic)))
(def a... |
f031b2938ce3fd6d44f5fa692179e54d43cf8581f465fd1b4efe7edb5a8a69b0 | strymonas/strymonas-ocaml | stream_raw.mli | (* Stream lower-level interface *)
type 'a cde (* Abstract type of code values *)
type 'a tbase (* Base types *)
type 'a stream (* Here, 'a is not necessarily the code type! *)
(* Producer of values. When evaluated repeatedly, may produce different values.
This is the primitive of initalizers an... | null | https://raw.githubusercontent.com/strymonas/strymonas-ocaml/b45ab87c62e5bb845ff4a989064f30ed6b468f6d/lib/stream_raw.mli | ocaml | Stream lower-level interface
Abstract type of code values
Base types
Here, 'a is not necessarily the code type!
Producer of values. When evaluated repeatedly, may produce different values.
This is the primitive of initalizers and loops.
The received continuation must be invoked exactly once.
FYI, the ... |
type 'a emit = ('a -> unit cde) -> unit cde
The termination condition : true to continue , false to terminate the stream .
It should be cheap to evaluate .
It may depend on the stream state ( introduced by initalizing_ref etc .
below ) , but it must not change state . Furthermore , it must satisfy
... |
47d6c1ebbc9be35645c6f5ea7d8c9cf3d4cbf1536c75f3d121532a2e485270f1 | NinjaTrappeur/ex-hack | Main.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE DataKinds #
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Lens.Getter ((^.))
import Options.Applicative (execParser, failureCode, help, helper,
info, long, metavar, short, st... | null | https://raw.githubusercontent.com/NinjaTrappeur/ex-hack/dace36926065d5a0dd0076beec1a6eeacd848732/app/Main.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE OverloadedStrings # | # LANGUAGE DataKinds #
module Main where
import Control.Lens.Getter ((^.))
import Options.Applicative (execParser, failureCode, help, helper,
info, long, metavar, short, strOption,
value, (<**>))
impor... |
6169dccf2c3556d9565dfa4d45b1a476cfea061fd4b578524a174b07c6fc7053 | kana/sicp | ex-2.80.scm | Exercise 2.80 . Define a generic predicate = zero ? that tests if its
argument is zero , and install it in the generic arithmetic package . This
;;; operation should work for ordinary numbers, rational numbers, and complex
;;; numbers.
(define (=zero? x)
(apply-generic '=zero? x))
(put '=zero? '(scheme-number... | null | https://raw.githubusercontent.com/kana/sicp/912bda4276995492ffc2ec971618316701e196f6/ex-2.80.scm | scheme | operation should work for ordinary numbers, rational numbers, and complex
numbers. | Exercise 2.80 . Define a generic predicate = zero ? that tests if its
argument is zero , and install it in the generic arithmetic package . This
(define (=zero? x)
(apply-generic '=zero? x))
(put '=zero? '(scheme-number)
(lambda (x) (= x 0)))
(put '=zero? '(rational)
(lambda (q) (= (numerator q) 0))... |
660d56b366edc9cf919f9a5971b8bea8ce206439d8b8eb4c4ac6ea996de9ad3d | TorXakis/TorXakis | TestSMTValue.hs |
TorXakis - Model Based Testing
Copyright ( c ) 2015 - 2017 TNO and Radboud University
See LICENSE at root directory of this repository .
TorXakis - Model Based Testing
Copyright (c) 2015-2017 TNO and Radboud University
See LICENSE at root directory of this repository.
-}
{-# LANGUAGE OverloadedStrings #-}
modul... | null | https://raw.githubusercontent.com/TorXakis/TorXakis/038463824b3d358df6b6b3ff08732335b7dbdb53/sys/solve/test/TestSMTValue.hs | haskell | # LANGUAGE OverloadedStrings #
----------------------------------------------------------------------------
-------------------------------------------------------------------------
-------------------------------------------------------------------------
---------------------------------------------------------------... |
TorXakis - Model Based Testing
Copyright ( c ) 2015 - 2017 TNO and Radboud University
See LICENSE at root directory of this repository .
TorXakis - Model Based Testing
Copyright (c) 2015-2017 TNO and Radboud University
See LICENSE at root directory of this repository.
-}
module TestSMTValue
(
testSMTValueList
)... |
f4a4112fc0ee1121e991993439117a55c5f40a5f84c19727e94a0b1cc88158fe | tonyrog/edrone | edrone_bat.erl | %%
Reading battery voltage levels AR drone version 2
%%
-module(edrone_bat).
-export([init/0]).
-export([read/0]).
%% debug
-export([read_adc/1, get_value/1]).
AR drone 2
-define(BUS, 1). %% (/dev/i2c-0)
-define(VBAT_ADDRESS, 16#4a).
init() ->
i2c:open(?BUS),
i2c:set_slave(?BUS, ?VBAT_ADDRESS),
i2... | null | https://raw.githubusercontent.com/tonyrog/edrone/ca8d2e2da75b064619697a1f4e53584051c23fca/src/edrone_bat.erl | erlang |
debug
(/dev/i2c-0)
SET_POWER_ON
SELECT_CHANNEL
ENABLE AVERAGING
START CONVERSION
START CONVERSION | Reading battery voltage levels AR drone version 2
-module(edrone_bat).
-export([init/0]).
-export([read/0]).
-export([read_adc/1, get_value/1]).
AR drone 2
-define(VBAT_ADDRESS, 16#4a).
init() ->
i2c:open(?BUS),
i2c:set_slave(?BUS, ?VBAT_ADDRESS),
DISABLE ( ? ) INTERUPT
ok.
read() ->
get_valu... |
204241cb8ac9c75ff190c15f1e6ad336b8a1a6517f8d47fe148a82b0ef146bc6 | noir-clojure/lib-noir | route.clj | (ns noir.util.route
(:require
[clout.core :refer [route-matches]]
[clojure.walk :refer [prewalk]]
[noir.request :refer [*request*]]
[noir.response :refer [redirect]]))
(defn ^{:skip-wiki true} apply-rules [request rules]
(if (map? rules)
(let [{:keys [any every]} rules]
(and (some #(% request... | null | https://raw.githubusercontent.com/noir-clojure/lib-noir/20e24641b85fe4bc6c3bb23806be78f3f5419874/src/noir/util/route.clj | clojure | (ns noir.util.route
(:require
[clout.core :refer [route-matches]]
[clojure.walk :refer [prewalk]]
[noir.request :refer [*request*]]
[noir.response :refer [redirect]]))
(defn ^{:skip-wiki true} apply-rules [request rules]
(if (map? rules)
(let [{:keys [any every]} rules]
(and (some #(% request... | |
92559d3aa2599dc4608501d7dbf025e0b0e66b9647edef21fea8db32cf52b6f0 | xach/zs3 | bucket-listing.lisp | ;;;;
Copyright ( c ) 2008 , All Rights Reserved
;;;;
;;;; Redistribution and use in source and binary forms, with or without
;;;; modification, are permitted provided that the following conditions
;;;; are met:
;;;;
;;;; * Redistributions of source code must retain the above copyright
;;;; notice, this list o... | null | https://raw.githubusercontent.com/xach/zs3/1294bd38c4cd00c6b2f628b05ad0f88b193c067a/bucket-listing.lisp | lisp |
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form... | Copyright ( c ) 2008 , All Rights Reserved
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
(in-package #:zs3)
(defbinder all-buckets
("ListAllMyBucketsResult"
("Owner"
("ID" (bind :owner-id))
("DisplayName" (bi... |
2d49b475c39825fe36d8ba68c37a50cfece73e11750333892a5fdf1fb4634cc9 | haskell/hackage-server | MemState.hs | module Distribution.Server.Framework.MemState (
MemState,
newMemStateNF,
newMemStateWHNF,
readMemState,
writeMemState,
modifyMemState,
) where
import Control.Concurrent.MVar
import Control.Exception (evaluate)
import Control.Monad.Trans (MonadIO(liftIO))
import Control.DeepSeq (NFData, rnf)
... | null | https://raw.githubusercontent.com/haskell/hackage-server/6c8689a779b688b3e6b927614c90318936d5bb3f/src/Distribution/Server/Framework/MemState.hs | haskell | | General-purpose in-memory ephemeral state. | module Distribution.Server.Framework.MemState (
MemState,
newMemStateNF,
newMemStateWHNF,
readMemState,
writeMemState,
modifyMemState,
) where
import Control.Concurrent.MVar
import Control.Exception (evaluate)
import Control.Monad.Trans (MonadIO(liftIO))
import Control.DeepSeq (NFData, rnf)
... |
39a4fe619673861a5c099ac6c9fcf74a164dbe7a9c1515956fa7c8572585ab22 | gergoerdi/hm-compo | Remap.hs | module Language.HM.Remap where
import Control.Monad.Reader
import Data.Functor.Product
import Data.Functor.Constant
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
import Data.Maybe
type Staged w r = Product (Constant w) (Reader r)
type Remap... | null | https://raw.githubusercontent.com/gergoerdi/hm-compo/386826e570fc6b6a078927bde85f3941e9a77e87/src/Language/HM/Remap.hs | haskell | module Language.HM.Remap where
import Control.Monad.Reader
import Data.Functor.Product
import Data.Functor.Constant
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
import Data.Maybe
type Staged w r = Product (Constant w) (Reader r)
type Remap... | |
e8c43c9642e9b53613ad5b2c2f6de1eb5c8cdc0f2b35757208402b0eb3ef6116 | google/ghc-source-gen | Decls.hs | module GHC.Hs.Decls (module HsDecls) where
import HsDecls
| null | https://raw.githubusercontent.com/google/ghc-source-gen/756d4cdc82f0aa86a8fd703fbc08b285ff3995ff/compat/GHC/Hs/Decls.hs | haskell | module GHC.Hs.Decls (module HsDecls) where
import HsDecls
| |
57020638eafee3a41b32234a7d2047d0f9e2673a25d8d6858199f2cb5ddf7184 | ocamllabs/ocaml-modular-implicits | pr5322_ok.ml | type 'par t = 'par
module M : sig val x : <m : 'a. 'a> end =
struct let x : <m : 'a. 'a t> = Obj.magic () end
let ident v = v
class alias = object method alias : 'a . 'a t -> 'a = ident end
| null | https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/testsuite/tests/typing-poly-bugs/pr5322_ok.ml | ocaml | type 'par t = 'par
module M : sig val x : <m : 'a. 'a> end =
struct let x : <m : 'a. 'a t> = Obj.magic () end
let ident v = v
class alias = object method alias : 'a . 'a t -> 'a = ident end
| |
4b4956fc239766894dbc4a94102a66a72a0609d8e01b9c1fafa929c7fd9c3b9e | graninas/Pragmatic-Type-Level-Design | Implementation.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeOperators #-}
# LANGUAGE FunctionalDependencies #
{-# LANGUAGE TypeFamilies #-}
# LANGUAGE PolyKinds #
{-# LANGUAGE KindSignatures #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances ... | null | https://raw.githubusercontent.com/graninas/Pragmatic-Type-Level-Design/a7e051ed9d664c6986323336a0ad2132a3fa3f1c/demo-apps/auction/test/Auction/Extensions/Implementation.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
# LANGUAGE TypeFamilies #
# LANGUAGE KindSignatures #
# LANGUAGE ScopedTypeVariables #
Extensions implementation
Dynamic (runtime) value. For now hardcoded by can be obtained from any source.
Payload | # LANGUAGE FunctionalDependencies #
# LANGUAGE PolyKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
module Auction.Extensions.Implementation where
import qualified Auction.Types as T
import qualified Auction.Language.Description as L
import qualified Auction.Ext... |
daa9de490307dd7d48539e7c216e9644b92a10623ebae1abe79fd12eed864f63 | no-defun-allowed/concurrent-hash-tables | java-string.lisp | (in-package :cliff-click-test)
Emulate Java 's String class , specifically how it caches the hash value as
Java strings are immutable .
(defun string-hash (string)
(declare (simple-string string)
(optimize (speed 3)))
(let ((hash 7))
(loop for char across string
do (setf hash
... | null | https://raw.githubusercontent.com/no-defun-allowed/concurrent-hash-tables/1b9f0b5da54fece4f42296e1bdacfcec0c370a5a/Examples/Cliff-Click-Test/java-string.lisp | lisp | (in-package :cliff-click-test)
Emulate Java 's String class , specifically how it caches the hash value as
Java strings are immutable .
(defun string-hash (string)
(declare (simple-string string)
(optimize (speed 3)))
(let ((hash 7))
(loop for char across string
do (setf hash
... | |
6bf77d8f8774a2996570c604d3ff696e274fe796857f15c202e3ed6c7707861f | channable/icepeak | Metrics.hs | {-# LANGUAGE OverloadedStrings #-}
module Metrics where
import Control.Monad.IO.Class
import Data.Text (Text, pack)
import Data.Text.Encoding (decodeUtf8)
import Data.Ratio ((%))
import System.Clock (TimeSpec, diffTimeSpec, toNanoSecs)
import Prometheus (Counter, Gauge, Histogram, Info (..), MonadMonitor, Vector, addC... | null | https://raw.githubusercontent.com/channable/icepeak/04d8b0b9eefbe619efdd9dfac2d7da8f4c355b7f/server/src/Metrics.hs | haskell | # LANGUAGE OverloadedStrings #
We want to store for each (HTTP method, HTTP status code) pair how many times it has been called
as well as the duration of each reaquest.
TODO: the following line can be removed after dashboard has been updated to use icepeak_data_size_bytes
TODO: the following line can be removed af... | module Metrics where
import Control.Monad.IO.Class
import Data.Text (Text, pack)
import Data.Text.Encoding (decodeUtf8)
import Data.Ratio ((%))
import System.Clock (TimeSpec, diffTimeSpec, toNanoSecs)
import Prometheus (Counter, Gauge, Histogram, Info (..), MonadMonitor, Vector, addCounter, counter, defaultBuckets, ex... |
a7558b98f6a89041815d6cfff88326cbb78ddb75a3d17b00a7c7d30c1cbaae92 | csabahruska/jhc-components | FindFixpoint.hs | module FindFixpoint(Ms, getVal, solve) where
import Array
import Control.Monad.Writer
import Data.Array.IO
import Data.Graph
import Data.IntSet as IntSet
import Util.Gen
data Env b = Env {-# UNPACK #-} !(IOArray Int b) {-# UNPACK #-} !(IOArray Int (IntSet)) {-# UNPACK #-} !Int
newtype Ms b c = Ms' (Env b -> IO c)
i... | null | https://raw.githubusercontent.com/csabahruska/jhc-components/a7dace481d017f5a83fbfc062bdd2d099133adf1/jhc-frontend/src/FindFixpoint.hs | haskell | # UNPACK #
# UNPACK #
# UNPACK #
# INLINE (>>) #
# INLINE (>>=) #
li xs [] n = CharIO.putErr ("[" ++ show (I# n) ++ "]") >> li xs xs 0# | module FindFixpoint(Ms, getVal, solve) where
import Array
import Control.Monad.Writer
import Data.Array.IO
import Data.Graph
import Data.IntSet as IntSet
import Util.Gen
newtype Ms b c = Ms' (Env b -> IO c)
instance Monad (Ms b) where
return a = Ms' (\_ -> return a)
Ms' comp >>= fun
= Ms' (\v -> com... |
756342f65518b4f6c0653c56bb53170c5fe21e3bb3ab90880ab2c9d74cb5fdd6 | janestreet/posixat | posixat.ml | include Types
external at_fdcwd : unit -> Fd.t = "shexp_at_fdcwd"
external fstatat
: dir:Fd.t
-> path:string
-> flags:At_flag.t list
-> Stats.t
= "shexp_fstatat"
external readlinkat : dir:Fd.t -> path:string -> string = "shexp_readlinkat"
include Posixat_generated
external fdopendir : Fd.t -> Unix.dir_h... | null | https://raw.githubusercontent.com/janestreet/posixat/58d4bb1f1c497d238bcd163da096e28be632b57a/src/posixat.ml | ocaml | include Types
external at_fdcwd : unit -> Fd.t = "shexp_at_fdcwd"
external fstatat
: dir:Fd.t
-> path:string
-> flags:At_flag.t list
-> Stats.t
= "shexp_fstatat"
external readlinkat : dir:Fd.t -> path:string -> string = "shexp_readlinkat"
include Posixat_generated
external fdopendir : Fd.t -> Unix.dir_h... | |
7fdf76392114f33b1dcadb9fbcd6c99af4f9d1d5df174bcdeb4330ad3fc56bd5 | exercism/babashka | tracks_on_tracks_on_tracks.clj | (ns tracks-on-tracks-on-tracks)
(defn new-list
"Creates an empty list of languages to practice."
[]
)
(defn add-language
"Adds a language to the list."
[lang lang-list]
)
(defn first-language
"Returns the first language on the list."
[lang-list]
)
(defn remove-language
"Removes the the first lan... | null | https://raw.githubusercontent.com/exercism/babashka/707356c52e08490e66cb1b2e63e4f4439d91cf08/exercises/concept/tracks-on-tracks-on-tracks/src/tracks_on_tracks_on_tracks.clj | clojure | (ns tracks-on-tracks-on-tracks)
(defn new-list
"Creates an empty list of languages to practice."
[]
)
(defn add-language
"Adds a language to the list."
[lang lang-list]
)
(defn first-language
"Returns the first language on the list."
[lang-list]
)
(defn remove-language
"Removes the the first lan... | |
c5ecf603dc104ec7095db79908c051cacb15475f9eeb4f6c7ea933a23a980235 | TheLortex/mirage-monorepo | location_error.ml | open Import
type t = Astlib.Location.Error.t
let to_extension (error : Astlib.Location.Error.t) =
let open Astlib.Location.Error in
let open Ast_helper in
if not (is_well_formed error) then
raise (Invalid_argument "to_extension: expected kind Report_error");
let sub_msgs = sub_msgs error in
let main_msg... | null | https://raw.githubusercontent.com/TheLortex/mirage-monorepo/b557005dfe5a51fc50f0597d82c450291cfe8a2a/duniverse/ppxlib/ast/location_error.ml | ocaml | open Import
type t = Astlib.Location.Error.t
let to_extension (error : Astlib.Location.Error.t) =
let open Astlib.Location.Error in
let open Ast_helper in
if not (is_well_formed error) then
raise (Invalid_argument "to_extension: expected kind Report_error");
let sub_msgs = sub_msgs error in
let main_msg... | |
9ddd0211ea95c41496216aa6ca641e8d90268c0bca5bad29c9b621b01b9926a6 | sbcl/sbcl | backq-const-fold.impure-cload.lisp | ;;; Example from Jan Moringen
(eval-when (:compile-toplevel :load-toplevel :execute)
(defclass foo () ()))
(defconstant +foo+
(if (boundp '+foo+)
+foo+
(make-instance 'foo)))
;;; The `(,+foo+) expression was being compile-time-folded to (#<foo
;;; xxxx>). Consequently it was unclear whether the #<foo... | null | https://raw.githubusercontent.com/sbcl/sbcl/5890caab1aa26924a01484d27533c10b479b457e/tests/backq-const-fold.impure-cload.lisp | lisp | Example from Jan Moringen
The `(,+foo+) expression was being compile-time-folded to (#<foo
xxxx>). Consequently it was unclear whether the #<foo> inside that
list should require a load-form. We now track whether something
comes from a named constant reference and dump the constant
appropriately. |
(eval-when (:compile-toplevel :load-toplevel :execute)
(defclass foo () ()))
(defconstant +foo+
(if (boundp '+foo+)
+foo+
(make-instance 'foo)))
(defun foo ()
`(,+foo+))
(defun bar ()
`#(,+foo+))
|
f9b0772d795e15eedd695e8e8e30e04aafef17cfef354c1a6bdc254d233a82ad | futurice/haskell-mega-repo | StateSet.hs | {-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
{-# LANGUAGE TypeOperators #-}
# LANGUAGE UndecidableInstances #
module Futurice.Integrat... | null | https://raw.githubusercontent.com/futurice/haskell-mega-repo/e301c08c8dfdcca048fe82fecce6bb2d02e9558a/futurice-integrations/src/Futurice/Integrations/Monad/StateSet.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DataKinds #
# LANGUAGE TypeOperators # | # LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
module Futurice.Integrations.Monad.StateSet (
stateSetFUM,
stateSetFUM6,
stateSetGitHub,
stateSetGoogle,
stateSetOkta,
... |
fff63066486db4b21adcfe5df769a60f83e67a2c6152c638422aa0de72fa8a23 | Ericson2314/lighthouse | Environment.hs | -----------------------------------------------------------------------------
-- |
-- Module : System.Environment
Copyright : ( c ) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer :
-- Stability : provisional
-- Portability : portabl... | null | https://raw.githubusercontent.com/Ericson2314/lighthouse/210078b846ebd6c43b89b5f0f735362a01a9af02/ghc-6.8.2/libraries/base/System/Environment.hs | haskell | ---------------------------------------------------------------------------
|
Module : System.Environment
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : provisional
Portability : portable
Miscellaneous information about the system environment.
-----------... | Copyright : ( c ) The University of Glasgow 2001
module System.Environment
(
#ifndef __NHC__
withArgs,
withProgName,
#endif
#ifdef __GLASGOW_HASKELL__
getEnvironment,
#endif
) where
import Prelude
#ifdef __GLASGOW_HASKELL__
import Data.List
import Foreign
import Foreign.C
import Contr... |
14fc0eabd25e80f51d0e228b319380da8ba8da4becb8bcf347535e5b2f4b4aa9 | ygrek/mldonkey | gnutellaProtocol.ml | Copyright 2001 , 2002 b8_bavard , b8_fee_carabine ,
This file is part of mldonkey .
mldonkey is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
... | null | https://raw.githubusercontent.com/ygrek/mldonkey/e136e7436c7d0f47f7222e43daa56ed721d12b0e/src/networks/gnutella/gnutellaProtocol.ml | ocaml | replace [header_] by [hsrep_]
char
char
char
char
match c.client_downloads with
[] ->
(* Here, we should probably browse the client or reply to
an upload request
add_peers headers;
gconn.gconn_handler <- Reader
(gnutella_handler parse (client_to_c... | Copyright 2001 , 2002 b8_bavard , b8_fee_carabine ,
This file is part of mldonkey .
mldonkey is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
... |
74cddb47e13612ab9e7b4bece93dfeaa9860d4591099918e8d51834b7bd32834 | dmvianna/haskellbook | Ch23-RandomExample2.hs |
module RandomExample2 where
import Control.Applicative (liftA3)
import Control.Monad (replicateM)
import Control.Monad.Trans.State
import System.Random
data Die = DieOne
| DieTwo
| DieThree
| DieFour
| DieFive
| DieSix
deriving (Eq, Show)
intToDie :: Int -> Di... | null | https://raw.githubusercontent.com/dmvianna/haskellbook/b1fdce66283ccf3e740db0bb1ad9730a7669d1fc/src/Ch23-RandomExample2.hs | haskell | Use this tactic _extremely_ sparingly. |
module RandomExample2 where
import Control.Applicative (liftA3)
import Control.Monad (replicateM)
import Control.Monad.Trans.State
import System.Random
data Die = DieOne
| DieTwo
| DieThree
| DieFour
| DieFive
| DieSix
deriving (Eq, Show)
intToDie :: Int -> Di... |
8ec9a45da05c64b9c928d845ea672a684494d4d618fa37b02b733f4d3364eb56 | pink-gorilla/goldly | core.clj | (ns goldly.broadcast.core
(:require
[clojure.string]
[taoensso.timbre :as log :refer [debug info infof error errorf]]
[webly.ws.core :refer [send! send-all! send-response]]))
(defn broadcast-to-system [system-id data path]
(send-all! [:goldly/clj-result {:run-id nil
:syst... | null | https://raw.githubusercontent.com/pink-gorilla/goldly/a942f29378e51da5725989ba017bac5a61e7fe54/src-unused/system/goldly/broadcast/core.clj | clojure | (ns goldly.broadcast.core
(:require
[clojure.string]
[taoensso.timbre :as log :refer [debug info infof error errorf]]
[webly.ws.core :refer [send! send-all! send-response]]))
(defn broadcast-to-system [system-id data path]
(send-all! [:goldly/clj-result {:run-id nil
:syst... | |
1356bb7f07e54950956cfd16d3771f18eba60610aef710d7256627af84454965 | clingen-data-model/genegraph | submission.clj | (ns genegraph.transform.clinvar.jsonld.submission
(:require [genegraph.database.load :as l]
[genegraph.database.names :refer [local-property-names local-class-names prefix-ns-map]]
[genegraph.database.query :as q]
[genegraph.transform.clinvar.common :refer [transform-clinvar
... | null | https://raw.githubusercontent.com/clingen-data-model/genegraph/cc27195eca7373e14212aba7fff0bcfb4c44d7be/src/genegraph/transform/clinvar/jsonld/submission.clj | clojure | (ns genegraph.transform.clinvar.jsonld.submission
(:require [genegraph.database.load :as l]
[genegraph.database.names :refer [local-property-names local-class-names prefix-ns-map]]
[genegraph.database.query :as q]
[genegraph.transform.clinvar.common :refer [transform-clinvar
... | |
6fd6250253c1c7f60c586f8b09926366ef1ec32b32b62f32ffb416bbf5cdfb81 | jaked/orpc | proto.ml | module type Sync =
sig
val clicks : unit -> int
val click : unit -> unit
end
module type Lwt =
sig
val clicks : unit -> int Lwt.t
val click : unit -> unit Lwt.t
end
| null | https://raw.githubusercontent.com/jaked/orpc/ecb5df8ec928070cd89cf035167fcedf3623ee3c/examples/clicks-comet/proto.ml | ocaml | module type Sync =
sig
val clicks : unit -> int
val click : unit -> unit
end
module type Lwt =
sig
val clicks : unit -> int Lwt.t
val click : unit -> unit Lwt.t
end
| |
5a86113f443fe9315a3a16e5fd9368d3ea057bde9d06b42f58e7428a0db9979a | input-output-hk/cardano-sl | Test.hs | #!/usr/bin/env stack
-- stack script --resolver lts-9.1
# LANGUAGE DeriveGeneric #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PackageImports #-}
{-# LANGUAGE RecordWildCards #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSections #
# LANGUAGE TypeApplications #
# LANGUAGE ViewPa... | null | https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/scripts/launch/Test.hs | haskell | stack script --resolver lts-9.1
# LANGUAGE OverloadedStrings #
# LANGUAGE PackageImports #
# LANGUAGE RecordWildCards # | #!/usr/bin/env stack
# LANGUAGE DeriveGeneric #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSections #
# LANGUAGE TypeApplications #
# LANGUAGE ViewPatterns #
import Control.Lens
import Control.Monad (forM_, void, when)
import Control.Monad.Except (ExceptT ... |
0a8a1ba7f64b586d00a2de96d0d80849f82635dfdf9d34a8bb3f05fdfe9229e8 | esl/MongooseIM | mongoose_listener_SUITE.erl | -module(mongoose_listener_SUITE).
-compile([export_all, nowarn_export_all]).
-include_lib("eunit/include/eunit.hrl").
-import(ejabberd_helper, [copy/2,
data/2]).
-define(DEFAULT_PORTS, [5222, 5280, 5269]).
all() ->
[tcp_socket_is_started_with_default_backlog,
tcp_socket_is_starte... | null | https://raw.githubusercontent.com/esl/MongooseIM/6d1c24b37a47c38ccdc3331baa7a1d863985f4cd/test/mongoose_listener_SUITE.erl | erlang | start server
make sure all ports are open
stop listeners, now they should be closed
and start them all again
we want to make sure that connection to an unchanged port survives reload
and that to the changed port does too (this is current implementation) | -module(mongoose_listener_SUITE).
-compile([export_all, nowarn_export_all]).
-include_lib("eunit/include/eunit.hrl").
-import(ejabberd_helper, [copy/2,
data/2]).
-define(DEFAULT_PORTS, [5222, 5280, 5269]).
all() ->
[tcp_socket_is_started_with_default_backlog,
tcp_socket_is_starte... |
a1cc39490b2504ec89b52ab98c97302726c15e6aac1c150741ea2e7aff831596 | pauleve/pint | ph_cooperativity.ml |
Copyright or © or Copr . ( 2013 )
This software is a computer program whose purpose is to provide Process
Hitting related tools .
This software is governed by the CeCILL license under French law and
abiding by the rules of distribution of free software . You can use ,
modify and/ or redistribute... | null | https://raw.githubusercontent.com/pauleve/pint/7cf943ec60afcf285c368950925fd45f59f66f4a/phlib/ph_cooperativity.ml | ocaml | levels of b that do not hit ai |
Copyright or © or Copr . ( 2013 )
This software is a computer program whose purpose is to provide Process
Hitting related tools .
This software is governed by the CeCILL license under French law and
abiding by the rules of distribution of free software . You can use ,
modify and/ or redistribute... |
4613829be368e1c14c7fd0b0a4585bea31627b4c94d5ef4292c5eaac0bf18da6 | tov/dssl2 | continue.rkt | #lang dssl2
let result = 0
for i in [1, 2, 4, 8, 16]:
if i == 8: continue
result = result + i
assert result == 23
| null | https://raw.githubusercontent.com/tov/dssl2/105d18069465781bd9b87466f8336d5ce9e9a0f3/test/dssl2/continue.rkt | racket | #lang dssl2
let result = 0
for i in [1, 2, 4, 8, 16]:
if i == 8: continue
result = result + i
assert result == 23
| |
336e39699cee548400cc7e242b1cc8ffb6f0f1be34b518b0b5d47eefba152d75 | bobzhang/fan | atyp.ml | let a : _ list = [1;2;3]
let f (u: _ Btyp.t) =
u.u
(* local variables: *)
(* compile-command: "ocamlc.opt -c atyp.ml" *)
(* end: *)
| null | https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/unitest/atyp.ml | ocaml | local variables:
compile-command: "ocamlc.opt -c atyp.ml"
end: | let a : _ list = [1;2;3]
let f (u: _ Btyp.t) =
u.u
|
9ee251ac7cc867dff95e9515067287ccb3a92c11eaa42d07e2459f96e4d7e19c | scrintal/heroicons-reagent | chat_bubble_bottom_center.cljs | (ns com.scrintal.heroicons.outline.chat-bubble-bottom-center)
(defn render []
[:svg {:xmlns ""
:fill "none"
:viewBox "0 0 24 24"
:strokeWidth "1.5"
:stroke "currentColor"
:aria-hidden "true"}
[:path {:strokeLinecap "round"
:strokeLinejo... | null | https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/outline/chat_bubble_bottom_center.cljs | clojure | (ns com.scrintal.heroicons.outline.chat-bubble-bottom-center)
(defn render []
[:svg {:xmlns ""
:fill "none"
:viewBox "0 0 24 24"
:strokeWidth "1.5"
:stroke "currentColor"
:aria-hidden "true"}
[:path {:strokeLinecap "round"
:strokeLinejo... | |
c3a4d26f784abc083cab2cdaf256fb98393c1a56fc32ea396cba1c072daa8d32 | UU-ComputerScience/uulib | TokenShow.hs | module UU.Scanner.TokenShow() where
import UU.Scanner.Token(Token,EnumValToken(..))
import UU.Scanner.Position(Pos(..))
import UU.Scanner.GenToken(GenToken(..))
instance Show Token where
showsPrec _ token
= showString
(case token of
Reserved key pos -> "symbol " ++ key ++ maybeshow pos... | null | https://raw.githubusercontent.com/UU-ComputerScience/uulib/68a5e661547908979545b493da3a55418ca5a6aa/src/UU/Scanner/TokenShow.hs | haskell | module UU.Scanner.TokenShow() where
import UU.Scanner.Token(Token,EnumValToken(..))
import UU.Scanner.Position(Pos(..))
import UU.Scanner.GenToken(GenToken(..))
instance Show Token where
showsPrec _ token
= showString
(case token of
Reserved key pos -> "symbol " ++ key ++ maybeshow pos... | |
527b44d4c843e96055b7e9bea4f6849b13df36eb6192bb5740092084b2ba6f3d | lambdacube3d/lambdacube-workshop | Asteroids03.hs | # LANGUAGE LambdaCase , OverloadedStrings , RecordWildCards #
import Control.Monad
import System.IO
import System.Directory
import Data.Vect
import Graphics.UI.GLFW as GLFW
import LambdaCube.Compiler as LambdaCube -- compiler
import LambdaCube.GL as LambdaCubeGL -- renderer
import qualified LambdaCube.OBJ as OBJ
imp... | null | https://raw.githubusercontent.com/lambdacube3d/lambdacube-workshop/3d40c91811d0aaf9fa57c3b8eb4a3f1bde0e3173/asteroids/stages/Asteroids03.hs | haskell | compiler
renderer
setup render data
load OBJ geometry and material descriptions
load materials textures
check schema compatibility
update graphics input
spaceship
asteroids
render | # LANGUAGE LambdaCase , OverloadedStrings , RecordWildCards #
import Control.Monad
import System.IO
import System.Directory
import Data.Vect
import Graphics.UI.GLFW as GLFW
import qualified LambdaCube.OBJ as OBJ
import Logic
asteroidsModificationTime = getModificationTime "Asteroids.lc"
main :: IO ()
main = do
... |
79d645d8de8f93ec7d6979f4dbd8d2e65a8ae892017be256f63d08a3b98d90ea | janestreet/accessor_base | accessor_sign.ml | open! Base
open! Import
type t = Sign.t =
| Neg
| Zero
| Pos
[@@deriving accessors]
| null | https://raw.githubusercontent.com/janestreet/accessor_base/8384c29a37e557168ae8a43b2a5a531f0ffc16e4/src/accessor_sign.ml | ocaml | open! Base
open! Import
type t = Sign.t =
| Neg
| Zero
| Pos
[@@deriving accessors]
| |
2ed44c9fa8b447d0763bb414dd0cd58e913179a938f9c7cae28512099bce0613 | Deraen/clj-hyphenate | pa.cljc | (ns clj-hyphenate.patterns.pa
"This pattern is imported from Hyphenator.js. Original comment follows:
For questions about the Panjabi hyphenation patterns
ask Santhosh Thottingal (santhosh dot thottingal at gmail dot com) "
(:require [clj-hyphenate.patterns :as pat]))
(def rules'
{:leftmin 2,
:rightmin 2,
... | null | https://raw.githubusercontent.com/Deraen/clj-hyphenate/cab0f83daf2c86f52415615a3a3919fbdba8e84b/src/clj_hyphenate/patterns/pa.cljc | clojure | (ns clj-hyphenate.patterns.pa
"This pattern is imported from Hyphenator.js. Original comment follows:
For questions about the Panjabi hyphenation patterns
ask Santhosh Thottingal (santhosh dot thottingal at gmail dot com) "
(:require [clj-hyphenate.patterns :as pat]))
(def rules'
{:leftmin 2,
:rightmin 2,
... | |
8aea416713b3d7673f33b6fa31ae00160d798840e483768cb415192833432b59 | inhabitedtype/ocaml-aws | deleteDBInstance.mli | open Types
type input = DeleteDBInstanceMessage.t
type output = DeleteDBInstanceResult.t
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type error := error
| null | https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/b6d5554c5d201202b5de8d0b0253871f7b66dab6/libraries/rds/lib/deleteDBInstance.mli | ocaml | open Types
type input = DeleteDBInstanceMessage.t
type output = DeleteDBInstanceResult.t
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type error := error
| |
eb7fe0fee184000f62a8b08fe0bb5dd47a7f4d5d72e91303128976a3e423be90 | manuel-serrano/bigloo | css.scm | ;*=====================================================================*/
* serrano / prgm / project / bigloo / api / web / src / Llib / css.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation ... | null | https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/api/web/src/Llib/css.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* CSS parsing */
*===========================... | * serrano / prgm / project / bigloo / api / web / src / Llib / css.scm * /
* Author : * /
* Creation : Tue Dec 20 07:33:38 2005 * /
* Last change : Mon May 30 14:10:03 2016 ( serrano ) * /
* ... |
43d69cb77a0014d2bafddd202d1618d1b2bc280cd3d952a1c30e7e3d5aa53a49 | nuprl/gradual-typing-performance | plt-pretty-big.rkt | (module plt-pretty-big "plt-pretty-big-text.rkt"
(require mred "private/imageeq.rkt")
(provide (all-from "plt-pretty-big-text.rkt")
(all-from mred)
(all-from "private/imageeq.rkt")))
| null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/pre-benchmark/ecoop/htdp-lib/lang/plt-pretty-big.rkt | racket | (module plt-pretty-big "plt-pretty-big-text.rkt"
(require mred "private/imageeq.rkt")
(provide (all-from "plt-pretty-big-text.rkt")
(all-from mred)
(all-from "private/imageeq.rkt")))
| |
2666d34f0261e187aec987048b338808fc83cbd7028ff1127a083fbc81ce22bf | igorhvr/bedlam | xpath-parser.scm | (require-library 'sisc/libs/srfi/srfi-1)
(import srfi-1)
/ XPointer grammar parser .
;
; This software is in Public Domain.
IT IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND .
;
; Please send bug reports and comments to:
; Dmitry Lizorkin
;===============================================... | null | https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/siscweb/siscweb-src-0.5/opt/sxml/scm/sxpath/xpath-parser.scm | scheme |
This software is in Public Domain.
Please send bug reports and comments to:
Dmitry Lizorkin
=========================================================================
be parameterized
txp-param ::= (list param-name param-value [parameterized-func] )
parameterized-func is optional
Each parser-param ge... | (require-library 'sisc/libs/srfi/srfi-1)
(import srfi-1)
/ XPointer grammar parser .
IT IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND .
Parser parameterization
For building a specific / XPointer implementation , grammar parser is to
txp - params : : = ( listof txp - param )
/ XP... |
f5fa4b55bf5a477f2e3ab11f6a3b44b0bedba2ce5147ecd29c6257b9b124bd78 | erlangonrails/devdb | riak_kv_map_phase.erl | %% -------------------------------------------------------------------
%%
%% riak_map_phase: manage the mechanics of a map phase of a MR job
%%
Copyright ( c ) 2007 - 2010 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you... | null | https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/riak-0.11.0/apps/riak_kv/src/riak_kv_map_phase.erl | erlang | -------------------------------------------------------------------
riak_map_phase: manage the mechanics of a map phase of a MR job
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implie... | Copyright ( c ) 2007 - 2010 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
... |
65bc545fecf1159f0c61252a0717279e81337b8f05e76469bdecf76c3c4965ae | penpot/penpot | left_sidebar.cljs | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
;;
;; Copyright (c) KALEIDOS INC
(ns app.main.ui.viewer.inspect.left-sidebar
(:require
[app.common.data :as d]
[app.main.data.viewer :a... | null | https://raw.githubusercontent.com/penpot/penpot/87a264ae405f8ba2f64b548850f348f84d7f602f/frontend/src/app/main/ui/viewer/inspect/left_sidebar.cljs | clojure |
Copyright (c) KALEIDOS INC | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(ns app.main.ui.viewer.inspect.left-sidebar
(:require
[app.common.data :as d]
[app.main.data.viewer :as dv]
[app.main.store :as st]
... |
7324335732869578f5bafad4ef5bd686c95409021cef950591820503720bc031 | Lysxia/generic-data | Types.hs | -- | Utilities to derive and transform generic types.
# LANGUAGE TypeOperators #
module Generic.Data.Types
( Data(..)
, toData
, fromData
) where
import Generic.Data.Internal.Data
| null | https://raw.githubusercontent.com/Lysxia/generic-data/846fafb9ec1e4e60424e4f266451665fe25fdfa9/src/Generic/Data/Types.hs | haskell | | Utilities to derive and transform generic types. |
# LANGUAGE TypeOperators #
module Generic.Data.Types
( Data(..)
, toData
, fromData
) where
import Generic.Data.Internal.Data
|
5aa23b7a72081e6bdb7c94b43f384aeb3a138a0ad705dada7402379e99bcc72e | Covariance/hi-language | T2.hs | module T2 (
group
) where
import Test.Hspec (Spec, it)
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.Hspec (testSpec)
import HI.Base (HiFun (HiFunAdd), HiValue (..))
import Util (evaluatesTo)
unitSpec :: Spec
unitSpec = do
it "boolean logic" $ do
"not(true)" `evaluatesTo` HiValueBool False
... | null | https://raw.githubusercontent.com/Covariance/hi-language/a395277811fdc7a9853c4241ff6ec07d6130480a/test/T2.hs | haskell | | We need to check the following properties:
- for all A B, greater-than(A, B) ≡ less-than(B, A) holds
- for all A B, not-equals(A, B) ≡ not(equals(A, B)) holds
- for all A, B, not-less-than(A, B) ≡ not(less-than(A, B)) holds
I was too tired to write all the generators for property tests. So this
is just a place... | module T2 (
group
) where
import Test.Hspec (Spec, it)
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.Hspec (testSpec)
import HI.Base (HiFun (HiFunAdd), HiValue (..))
import Util (evaluatesTo)
unitSpec :: Spec
unitSpec = do
it "boolean logic" $ do
"not(true)" `evaluatesTo` HiValueBool False
... |
e1d64a6251ef03753ba2fd555a44e12adc00eef75a186d0226a7502a391022a8 | sophiabrandt/markdown-preview | state.cljs | (ns mdpreview.state
(:require [reagent.core :refer [atom]]))
(def inital-value
"## Welcome to Markdown Preview!
Type in some [Markdown text](/), e.g. in *italic*.
#### About this site
> Markdown Preview was built with Clojurescript and Reagent.
Documentation and more info for this site is available on **[Github... | null | https://raw.githubusercontent.com/sophiabrandt/markdown-preview/bc01798289cdd6e8775b1ab472d4afe217a27580/src/mdpreview/state.cljs | clojure | (ns mdpreview.state
(:require [reagent.core :refer [atom]]))
(def inital-value
"## Welcome to Markdown Preview!
Type in some [Markdown text](/), e.g. in *italic*.
#### About this site
> Markdown Preview was built with Clojurescript and Reagent.
Documentation and more info for this site is available on **[Github... | |
35ea0ab83ad67e2068ae37ffb16d599af2d798eb541b346a3d09ccc15990d408 | bazqux/bazqux-urweb | DnsCache.hs | Does n't always resolve even with 30 seconds timeout .
Maybe some UDP packets lost .
--
TODO : пропатчить concurrent - dns - cache ,
" recv : does not exist ( Connection refused ) " ловил , когда BIND9 не запущен
Проверить , теперь есть ошибка NetworkFailure
--
# LANGUAGE ScopedTypeVariables , RecordWildCar... | null | https://raw.githubusercontent.com/bazqux/bazqux-urweb/bf2d5a65b5b286348c131e91b6e57df9e8045c3f/crawler/Lib/DnsCache.hs | haskell |
* DNS cache
* DNS lookup
* Utils
Unlike 'inet_ntoa' this function is pure and thread-safe.
r "celebutopia.net"
forkIO $ void $ resolveA c "google.com"
Для запуска локального bind9
ошибок же , но работает в 2 раза медленнее
то же , что и 100
то же , что и 100
ощутимо быстрее
ошибок почти н... | Does n't always resolve even with 30 seconds timeout .
Maybe some UDP packets lost .
TODO : пропатчить concurrent - dns - cache ,
" recv : does not exist ( Connection refused ) " ловил , когда BIND9 не запущен
Проверить , теперь есть ошибка NetworkFailure
# LANGUAGE ScopedTypeVariables , RecordWildCards , V... |
955d723edfb19b8819188d6df8b593ae8f70861a1c35a4b159f35b7e359b7e9f | agda/agda2hs | Issue94.hs | module Issue94 where
thing :: [a] -> [a]
thing xs = aux xs
where
aux :: [a] -> [a]
aux xs = xs
| null | https://raw.githubusercontent.com/agda/agda2hs/d89cce7552998f8be0910934740cdc6e5b4b59dc/test/golden/Issue94.hs | haskell | module Issue94 where
thing :: [a] -> [a]
thing xs = aux xs
where
aux :: [a] -> [a]
aux xs = xs
| |
688da044becdddb389c3ce6c95f30a3e8b7d33ddfe8c84acd7283af3b789d464 | FreeProving/free-compiler | ModuleTests.hs | -- | This module contains tests for the 'Pretty' instance of IR modules.
module FreeC.IR.Syntax.ModuleTests ( testModuleSyntax ) where
import Test.Hspec
import FreeC.Pretty
import FreeC.Test.Parser
-- | Sets the expectation that after parsing an AST node from the given string
-- and p... | null | https://raw.githubusercontent.com/FreeProving/free-compiler/6931b9ca652a185a92dd824373f092823aea4ea9/src/test/FreeC/IR/Syntax/ModuleTests.hs | haskell | | This module contains tests for the 'Pretty' instance of IR modules.
| Sets the expectation that after parsing an AST node from the given string
and pretty printing the resulting node, the original string is obtained.
| Test group for 'Pretty' instances of IR AST nodes. | module FreeC.IR.Syntax.ModuleTests ( testModuleSyntax ) where
import Test.Hspec
import FreeC.Pretty
import FreeC.Test.Parser
shouldPrettyPrintModule :: [String] -> Expectation
shouldPrettyPrintModule inputs = do
node <- expectParseTestModule inputs
lines (showPretty node) `shouldBe`... |
0d5197a6705235746061e4d61f9d34fb95a76ad304d98aa4e2cf884fe03ebb2c | kelamg/HtDP2e-workthrough | ex88.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex88) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #... | null | https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Fixed-size-Data/ex88.rkt | racket | about the language level of this file in a form that our tools can easily process.
more virtual pets
A Track is a structure:
interp. keeps track of a cat's changing variables
x is the x-coordinate of the cat on the screen
hap is its happiness
interp. a virtual cat, including its image and
... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex88) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(require 2htdp/image)
(require 2htdp/universe)
(define-struct tr... |
65611b403efd05903f0f92ec674ba81deea48cf171b3f22ae7b71a98aae4b006 | 8thlight/hyperion | key_spec.clj | (ns hyperion.key-spec
(:require [speclj.core :refer :all]
[hyperion.key :refer :all]))
(describe "Keys"
(it "encoding"
(should= "YQ" (encode-key "a"))
(should= "YWI" (encode-key "ab"))
(should= "YWJj" (encode-key "abc"))
(should= "YWJjZA" (encode-key "abcd"))
(should= "YWJjZGU" (en... | null | https://raw.githubusercontent.com/8thlight/hyperion/b1b8f60a5ef013da854e98319220b97920727865/api/spec/hyperion/key_spec.clj | clojure | (it "generate key times"
) | (ns hyperion.key-spec
(:require [speclj.core :refer :all]
[hyperion.key :refer :all]))
(describe "Keys"
(it "encoding"
(should= "YQ" (encode-key "a"))
(should= "YWI" (encode-key "ab"))
(should= "YWJj" (encode-key "abc"))
(should= "YWJjZA" (encode-key "abcd"))
(should= "YWJjZGU" (en... |
eb36aebbea31be2ec31e7ad05ffcdf51f72934db10a6564250f6dd23dd112c36 | biocaml/biocaml | track.ml | module Gff = Biocaml_unix.Gff
module Track = Biocaml_unix.Track
module Tfxm = Biocaml_unix.Tfxm
open OUnit
let test_parser () =
let transfo = Track.Transform.string_to_string_content () in
let test_line l f =
Tfxm.feed transfo (l ^ "\n");
assert_bool l (f (Tfxm.next transfo))
in
let test_output l o = t... | null | https://raw.githubusercontent.com/biocaml/biocaml/ac619539fed348747d686b8f628e80c1bb8bfc59/lib/test/track.ml | ocaml | module Gff = Biocaml_unix.Gff
module Track = Biocaml_unix.Track
module Tfxm = Biocaml_unix.Tfxm
open OUnit
let test_parser () =
let transfo = Track.Transform.string_to_string_content () in
let test_line l f =
Tfxm.feed transfo (l ^ "\n");
assert_bool l (f (Tfxm.next transfo))
in
let test_output l o = t... | |
dc525af4ba035c83f365c2401d96b7d8175b1cef224e2c576b4884265bd3cc90 | areuu/ilcompiler | operations_pb.mli | (** operations.proto Binary Encoding *)
* { 2 Protobuf Encoding }
val encode_load_integer : Operations_types.load_integer -> Pbrt.Encoder.t -> unit
(** [encode_load_integer v encoder] encodes [v] with the given [encoder] *)
val encode_load_big_int : Operations_types.load_big_int -> Pbrt.Encoder.t -> unit
(** [encod... | null | https://raw.githubusercontent.com/areuu/ilcompiler/c6f0bc809fe165947b8c7004dc1ed94414038002/src/proto/operations_pb.mli | ocaml | * operations.proto Binary Encoding
* [encode_load_integer v encoder] encodes [v] with the given [encoder]
* [encode_load_big_int v encoder] encodes [v] with the given [encoder]
* [encode_load_float v encoder] encodes [v] with the given [encoder]
* [encode_load_string v encoder] encodes [v] with the given [encoder] ... |
* { 2 Protobuf Encoding }
val encode_load_integer : Operations_types.load_integer -> Pbrt.Encoder.t -> unit
val encode_load_big_int : Operations_types.load_big_int -> Pbrt.Encoder.t -> unit
val encode_load_float : Operations_types.load_float -> Pbrt.Encoder.t -> unit
val encode_load_string : Operations_types.load... |
2002d7ef08a9ca351155be3a726be082ebfafd42c263295e60690b8c51550738 | sampou-org/pfad | Code18.hs | module Code18 where
import Data.List
moves :: State -> [Move]
move :: State -> Move -> State
solved :: State -> Bool
solve :: State -> Maybe [Move]
solve = undefined
type Path = ([Move],State)
type Frontier = [Path]
bfsearch :: [State] -> Frontier -> Maybe [Move]
bfsearch _ [] = Nothing
bfsearch qs (p@(... | null | https://raw.githubusercontent.com/sampou-org/pfad/3c2e0847bea9eac80672e1fbccb86ca5a6b09415/Code/Code18.hs | haskell | Rush Hour
moves :: Grid -> [Move]
move :: Grid -> (Vehicle,Cell) -> Grid
solved :: Grid -> Bool
goalmoves :: Grid -> Plan
premoves :: Grid -> Move -> [[Move]]
| module Code18 where
import Data.List
moves :: State -> [Move]
move :: State -> Move -> State
solved :: State -> Bool
solve :: State -> Maybe [Move]
solve = undefined
type Path = ([Move],State)
type Frontier = [Path]
bfsearch :: [State] -> Frontier -> Maybe [Move]
bfsearch _ [] = Nothing
bfsearch qs (p@(... |
6cfb6e3aa21059410c49a3cc139b2168bbc1032b3fecbce32a4bfe49f69e1d15 | PacktWorkshops/The-Clojure-Workshop | bike_race.clj | (ns packt-clj.bike-race)
(def distance-elevation
[[0 400]
[12.5 457]
[19 622]
[21.5 592]
[29 615]
[35.5 892]
[39 1083]
[43 1477]
[48.5 1151]
[52.5 999]
[57.5 800]
[62.5 730]
[65 1045]
[68.5 1390]
[70.5 1433]
[75 1211]
[78.5 917]
[82.5 744]
[8... | null | https://raw.githubusercontent.com/PacktWorkshops/The-Clojure-Workshop/3d309bb0e46a41ce2c93737870433b47ce0ba6a2/Chapter05/Exercise5.02/bike_race.clj | clojure | (ns packt-clj.bike-race)
(def distance-elevation
[[0 400]
[12.5 457]
[19 622]
[21.5 592]
[29 615]
[35.5 892]
[39 1083]
[43 1477]
[48.5 1151]
[52.5 999]
[57.5 800]
[62.5 730]
[65 1045]
[68.5 1390]
[70.5 1433]
[75 1211]
[78.5 917]
[82.5 744]
[8... | |
a3e8e0281b4993dab6e72179678560d47852d684367e729834dd3a12f80acaa5 | bondy-io/bondy | bondy_auth_password_SUITE.erl | %% =============================================================================
%% bondy_auth_password_SUITE.erl -
%%
Copyright ( c ) 2016 - 2022 Leapsight . All rights reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the... | null | https://raw.githubusercontent.com/bondy-io/bondy/a1267e7e5526db24f278e12315020753f3168b44/apps/bondy/test/bondy_auth_password_SUITE.erl | erlang | =============================================================================
bondy_auth_password_SUITE.erl -
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 WARR... | Copyright ( c ) 2016 - 2022 Leapsight . 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(bondy_auth_password_SUITE).
-include_lib("common_test/include/ct.hrl").
-include_lib("stdlib/include/... |
0ad923e4962162c2793fdf17bdfcdd6bfe7eeb908b089955d53200fff75fb84a | jaredly/reepl | code_mirror.cljs | (ns reepl.code-mirror
(:require [clojure.string :as str]
[reagent.core :as r]
[cljsjs.codemirror]
[cljsjs.codemirror.addon.edit.closebrackets]
[cljsjs.codemirror.addon.edit.matchbrackets]
[cljsjs.codemirror.addon.hint.show-hint]
[cljsjs.codemirro... | null | https://raw.githubusercontent.com/jaredly/reepl/96a8979c574b3979a7aeeed27e57a2ec4d357350/src/reepl/code_mirror.cljs | clojure | findWordAt doesn't work w/ clojure-parinfer mode
(.findWordAt cm back)
TODO don't replaceRange here, instead watch the state atom and react to
that.
On Escape, should we revert to the pre-completion-text?
tab
Maybe if there are no completions...
Then I'd move this into cycle-completions?
enter
up
down | (ns reepl.code-mirror
(:require [clojure.string :as str]
[reagent.core :as r]
[cljsjs.codemirror]
[cljsjs.codemirror.addon.edit.closebrackets]
[cljsjs.codemirror.addon.edit.matchbrackets]
[cljsjs.codemirror.addon.hint.show-hint]
[cljsjs.codemirro... |
87ffa5311ab5504fc4a13abaf232e86d9e8957d025d3ddc3ad6f0efeec01b5d5 | input-output-hk/marlowe-cardano | Compute.hs | -----------------------------------------------------------------------------
--
-- Module : $Headers
License : Apache 2.0
--
-- Stability : Experimental
Portability : Portable
--
| Property - based tests for ` computeTransaction ` of semantics .
--
---------------------------------------------... | null | https://raw.githubusercontent.com/input-output-hk/marlowe-cardano/b1b5d77e3fc78caa9fd67106e49c97ebc49438ec/marlowe-test/src/Spec/Marlowe/Semantics/Compute.hs | haskell | ---------------------------------------------------------------------------
Module : $Headers
Stability : Experimental
---------------------------------------------------------------------------
# LANGUAGE ConstraintKinds #
# LANGUAGE RankNTypes #
* Testing
| Record of choices.
| Record of bound value... | License : Apache 2.0
Portability : Portable
| Property - based tests for ` computeTransaction ` of semantics .
# LANGUAGE FlexibleContexts #
# LANGUAGE RecordWildCards #
# OPTIONS_GHC -fno - warn - orphans #
# OPTIONS_GHC -fno - warn - redundant - constraints #
# OPTIONS_GHC -fno - war... |
26fc9df75bcf6134615286b8bbfac4bcca5ffd3131a00283e935b3226a0e797f | ocaml-ppx/ppx | viewer_unstable_for_testing.ml | open Viewlib
$ Ppx_ast_cinaps.print_viewer_ml ( Astlib . Version.of_string " unstable_for_testing " )
open Versions.Unstable_for_testing
include Viewer_common
let pdir_bool'const view value =
let concrete = Directive_argument.to_concrete value in
match concrete with
| Directive_argument.Pdir_bool arg -> view ar... | null | https://raw.githubusercontent.com/ocaml-ppx/ppx/40e5a35a4386d969effaf428078c900bd03b78ec/ast/viewer_unstable_for_testing.ml | ocaml | $ | open Viewlib
$ Ppx_ast_cinaps.print_viewer_ml ( Astlib . Version.of_string " unstable_for_testing " )
open Versions.Unstable_for_testing
include Viewer_common
let pdir_bool'const view value =
let concrete = Directive_argument.to_concrete value in
match concrete with
| Directive_argument.Pdir_bool arg -> view ar... |
664d6847ec121f44801482a1bdbffc7fc476a2dcf4f8783f3e6a625c3f4f3055 | jesperes/aoc_erlang | aoc2021_day04.erl | -module(aoc2021_day04).
-behavior(aoc_puzzle).
-export([parse/1, solve/1, info/0]).
-include("aoc_puzzle.hrl").
-include_lib("eunit/include/eunit.hrl").
-spec info() -> aoc_puzzle().
info() ->
#aoc_puzzle{module = ?MODULE,
year = 2021,
day = 4,
name = "Giant Squid... | null | https://raw.githubusercontent.com/jesperes/aoc_erlang/9ecc18b8639ad37ba73d3f1a535e8e1ebad831ab/src/2021/aoc2021_day04.erl | erlang | Multiple boards may win in the same round, but this
winning board turn up in round where they are the only
winning board.
============================================================
Input parser
============================================================
Tests | -module(aoc2021_day04).
-behavior(aoc_puzzle).
-export([parse/1, solve/1, info/0]).
-include("aoc_puzzle.hrl").
-include_lib("eunit/include/eunit.hrl").
-spec info() -> aoc_puzzle().
info() ->
#aoc_puzzle{module = ?MODULE,
year = 2021,
day = 4,
name = "Giant Squid... |
80982870903f474a4fa82511771846816b74107c93c6527b75f4de59bb1d4f77 | higherkindness/mu-haskell | ClientRecord.hs | # language AllowAmbiguousTypes #
# language DataKinds #
{-# language DeriveGeneric #-}
# language FlexibleContexts #
# language OverloadedStrings #
{-# language ScopedTypeVariables #-}
# language TypeApplications #
module Main where
import Data.Conduit
import qualified Data.Condui... | null | https://raw.githubusercontent.com/higherkindness/mu-haskell/e41ba786f556cfac962e0f183b36bf9ae81d69e4/examples/health-check/src/ClientRecord.hs | haskell | # language DeriveGeneric #
# language ScopedTypeVariables #
Setup the client
Execute command | # language AllowAmbiguousTypes #
# language DataKinds #
# language FlexibleContexts #
# language OverloadedStrings #
# language TypeApplications #
module Main where
import Data.Conduit
import qualified Data.Conduit.Combinators as C
import qualified Data.Text as T
import ... |
4b1a544c428e241d1d8448141b52caf399588de180f5a96b0c5e12e8601b9662 | grin-compiler/ghc-wpc-sample-programs | Pandoc.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
|
Module : Text . Pandoc . Lua . Module . Pandoc
Copyright : Copyright © 2017 - 2020 License : GNU GPL , version 2 or above
Maintainer : >
Stability : alpha
Pandoc module for lua .
Module : T... | null | https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/pandoc-11df2a3c0f2b1b8e351ad8caaa7cdf583e1b3b2e/src/Text/Pandoc/Lua/Module/Pandoc.hs | haskell | # LANGUAGE OverloadedStrings #
loaded.
| Pipes input through a command. | # LANGUAGE FlexibleContexts #
|
Module : Text . Pandoc . Lua . Module . Pandoc
Copyright : Copyright © 2017 - 2020 License : GNU GPL , version 2 or above
Maintainer : >
Stability : alpha
Pandoc module for lua .
Module : Text.Pandoc.Lua.Module.Pandoc
Cop... |
2326986c8619016b7649b84b0e4f96dd68d0309fff9ab5c9b662a2f90c8ec9d1 | mbj/stratosphere | IntendedUsesProperty.hs | module Stratosphere.SageMaker.ModelCard.IntendedUsesProperty (
IntendedUsesProperty(..), mkIntendedUsesProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data Inte... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/sagemaker/gen/Stratosphere/SageMaker/ModelCard/IntendedUsesProperty.hs | haskell | module Stratosphere.SageMaker.ModelCard.IntendedUsesProperty (
IntendedUsesProperty(..), mkIntendedUsesProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data Inte... | |
81ff8e8002b2e7187a8251d1153477ebc722a6561e771a6c8fed2a4d8ed825ca | CodyReichert/qi | clisp.lisp | $ Id$
$ URL$
;;;; See LICENSE for licensing information.
(in-package :usocket)
(eval-when (:compile-toplevel :load-toplevel :execute)
#-ffi
(warn "This image doesn't contain FFI package, GET-HOST-NAME won't work.")
#-(or ffi rawsock)
(warn "This image doesn't contain either FFI or RAWSOCK package, no UDP... | null | https://raw.githubusercontent.com/CodyReichert/qi/9cf6d31f40e19f4a7f60891ef7c8c0381ccac66f/dependencies/usocket-latest/backend/clisp.lisp | lisp | See LICENSE for licensing information.
utility routine for looking up the current host name
Format: ((UNIX Windows) . CONDITION)
the socket is a stream too
no need to
to explicitly turn it on; unfortunately, there's no way to turn it off...
Only one close method required:
sockets and their associated streams
a... | $ Id$
$ URL$
(in-package :usocket)
(eval-when (:compile-toplevel :load-toplevel :execute)
#-ffi
(warn "This image doesn't contain FFI package, GET-HOST-NAME won't work.")
#-(or ffi rawsock)
(warn "This image doesn't contain either FFI or RAWSOCK package, no UDP support."))
#+ffi
(ffi:def-call-out get-ho... |
a726749cb34dd670ea1036de9d24033a0df4533c9ceb7f9f232756872dbc9ff9 | tarantool/jepsen.tarantool | runner.clj | (ns tarantool.runner
"Run Tarantool tests."
(:require [clojure.tools.logging :refer [info warn]]
[clojure.pprint :refer [pprint]]
[clojure.string :as str]
[clojure.java.io :as io]
[next.jdbc :as j]
[slingshot.slingshot :refer [try+]]
[jepsen [c... | null | https://raw.githubusercontent.com/tarantool/jepsen.tarantool/9f3d2d8c1fd18530b3887755e4daad440e2176d2/src/tarantool/runner.clj | clojure |
it relies on the
bank-specific option
bank-specific option
bank-specific option | (ns tarantool.runner
"Run Tarantool tests."
(:require [clojure.tools.logging :refer [info warn]]
[clojure.pprint :refer [pprint]]
[clojure.string :as str]
[clojure.java.io :as io]
[next.jdbc :as j]
[slingshot.slingshot :refer [try+]]
[jepsen [c... |
a2ce48c271666328a3b89d93324e1bdfd16f0ceb5e06907a22dde7d306e3ab14 | xoken/xoken-node | NodeConfig.hs | # LANGUAGE DeriveGeneric #
{-# LANGUAGE OverloadedStrings #-}
# OPTIONS_GHC -fno - warn - orphans #
module Xoken.NodeConfig
( module Xoken.NodeConfig
) where
import Arivi.P2P.Kademlia.Types
import Control.Exception
import Control.Monad (guard)
import Crypto.Secp256k1
import qualified Data.ByteString as BS
imp... | null | https://raw.githubusercontent.com/xoken/xoken-node/bbd4ed93d2d8b8d7c8071524f3fbf7fb6fddab67/node/src/Xoken/NodeConfig.hs | haskell | # LANGUAGE OverloadedStrings #
| Decode string of human-readable hex characters. | # LANGUAGE DeriveGeneric #
# OPTIONS_GHC -fno - warn - orphans #
module Xoken.NodeConfig
( module Xoken.NodeConfig
) where
import Arivi.P2P.Kademlia.Types
import Control.Exception
import Control.Monad (guard)
import Crypto.Secp256k1
import qualified Data.ByteString as BS
import qualified Data.ByteString.Base1... |
e6476a9670445ea2820ac418f515625cbb5de3703d02214039380c436f1de46e | locklin/clushjr | jblas-test.clj | (require 'idx)
(def mx1 (idx/rand-normal 3000 3000))
(def mx2 (idx/rand-normal 3000 3000))
3.8 seconds
(def mx4 (idx/rand-normal 500 500))
(def mx5 (idx/rand-normal 1500 1500))
0.5 secs for 500x500 ,
14 sec for 1500 ^ 2
7.2 secs
(time (def ev (idx/eigenvalues mx3))) ;;
;; incanter stuff
(use '[incanter ... | null | https://raw.githubusercontent.com/locklin/clushjr/3c63d4bdeddedf034c05ada4c000e0a34e49ccc3/test/jblas-test.clj | clojure |
incanter stuff
more tests for jblas | (require 'idx)
(def mx1 (idx/rand-normal 3000 3000))
(def mx2 (idx/rand-normal 3000 3000))
3.8 seconds
(def mx4 (idx/rand-normal 500 500))
(def mx5 (idx/rand-normal 1500 1500))
0.5 secs for 500x500 ,
14 sec for 1500 ^ 2
7.2 secs
(use '[incanter core stats])
(defn rand-matrix [n]
(matrix (sample-norma... |
7c20ddad628092cf4a22870a0e5fbe25252673edbf669224bc68c99499c05688 | fantasytree/fancy_game_server | nif_util.erl | -module(nif_util).
-export([
hello/0
,concat/1
,alloc/1
]
).
-on_load(init/0).
NIF functions end up overriding the functions defined in this module . But
this module must define the functions we want the NIF to implement .
% Theoretically this won't ever get called as out on_load funct... | null | https://raw.githubusercontent.com/fantasytree/fancy_game_server/4ca93486fc0d5b6630170e79b48fb31e9c6e2358/src/nif/nif_util.erl | erlang | Theoretically this won't ever get called as out on_load function init/0
should raise an error if we have issues.
unable to load for a specific platform.
Iternal functions
Since we used init/0 in our -on_load() preprocessor directive, this
function will get called as the module is loaded. This is the perfect
erl... | -module(nif_util).
-export([
hello/0
,concat/1
,alloc/1
]
).
-on_load(init/0).
NIF functions end up overriding the functions defined in this module . But
this module must define the functions we want the NIF to implement .
A really nice person would make a pure Erlang fallback incase... |
c95ed906b4c8ac8d9542146240b6fcead3691f435bedb7420908c902d9c729aa | dizengrong/erlang_game | gerl_db1.erl | @author dzR < >
%% @doc We use amnesia([]) deal with mysql datas
%% This file is generated automaticly
-module (gerl_db1).
-compile([export_all]).
-include("db.hrl").
driver_info () ->
db_conf:driver_info().
tables() -> [tab_account,tab_achievement,tab_dragon,tab_item,tab_magic_book,tab_magic_data,tab_role_chat... | null | https://raw.githubusercontent.com/dizengrong/erlang_game/4598f97daa9ca5eecff292ac401dd8f903eea867/gerl/src/db/gerl_db1.erl | erlang | @doc We use amnesia([]) deal with mysql datas
This file is generated automaticly | @author dzR < >
-module (gerl_db1).
-compile([export_all]).
-include("db.hrl").
driver_info () ->
db_conf:driver_info().
tables() -> [tab_account,tab_achievement,tab_dragon,tab_item,tab_magic_book,tab_magic_data,tab_role_chat,tab_role_pos,tab_role_data,tab_troops,tab_fight_attr,tab_rune,tab_log_item,tab_log_gol... |
29ce9de1213177b2d53e0ef0abebb69322e02dd166228c66883d77395d2f57df | serras/cobalt | Graph.hs | # LANGUAGE CPP #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE RecordWildCards #
module Cobalt.Core.Graph (
Graph
, vertices
, edges
, emptyGraph
, singletonDeleted
, singletonCommented
, singletonEdge
, singletonNodeWithTwoParents
, singletonNodeOrphan
, blameConstraints
, getDominators
) where
import qualified Data.... | null | https://raw.githubusercontent.com/serras/cobalt/cd8df75581a320fcca0d7d11b4b8c1788e8a5f9c/src/Cobalt/Core/Graph.hs | haskell | Update comment
Already there
No one to blame
next step | # LANGUAGE CPP #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE RecordWildCards #
module Cobalt.Core.Graph (
Graph
, vertices
, edges
, emptyGraph
, singletonDeleted
, singletonCommented
, singletonEdge
, singletonNodeWithTwoParents
, singletonNodeOrphan
, blameConstraints
, getDominators
) where
import qualified Data.... |
5d29184ba7d3eff46c03a9742dad910e788643025fec1191a700cf18ad2f8e97 | haskell-tls/hs-certificate | EC.hs | -- |
Module : Data .
-- License : BSD-style
Maintainer : < >
-- Stability : experimental
-- Portability : unknown
--
Utilities related to Elliptic Curve certificates and keys .
--
module Data.X509.EC
(
unserializePoint
, ecPubKeyCurve
, ecPubKeyCurveName
, ecPrivKeyCurve
... | null | https://raw.githubusercontent.com/haskell-tls/hs-certificate/4a0a2ce292ea46c0c5f72e1d31eca2001079cdd2/x509/Data/X509/EC.hs | haskell | |
License : BSD-style
Stability : experimental
Portability : unknown
valid for the specified curve.
should consider 'ecPubKeyCurveName' instead.
| Return the name of a standard curve associated to an EC Public Key
should consider 'ecPrivKeyCurveName' instead.
| Return the name of a standard curve assoc... | Module : Data .
Maintainer : < >
Utilities related to Elliptic Curve certificates and keys .
module Data.X509.EC
(
unserializePoint
, ecPubKeyCurve
, ecPubKeyCurveName
, ecPrivKeyCurve
, ecPrivKeyCurveName
, lookupCurveNameByOID
) where
import Data.ASN1.OID
import Da... |
df92af8331f57a4f9df1388925cb1634fb349a0c5e48d43c158e0d6b17794292 | HunterYIboHu/htdp2-solution | ex409-reorder.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex409-reorder) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor re... | null | https://raw.githubusercontent.com/HunterYIboHu/htdp2-solution/6182b4c2ef650ac7059f3c143f639d09cd708516/Chapter4/Section23-Simultaneous-Processing/7.Project-Dattabase/ex409-reorder.rkt | racket | about the language level of this file in a form that our tools can easily process.
data difinitions
A DB is a structure:
(make-db Schema Content)
A Schema is a [List-of Spec]
A Label is a String
A Predicate is a [Any -> Boolean]
A (piece of) Content is a [List-of Row]
A Row is [List-of Cell]
A Cell is Any
... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex409-reorder) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(define-struct db [schema content])
A Spec i... |
c940635efea2dac57ee939716d546d2266bac259865b66d04c7c4ee6b571ccfd | pandoc/ast-migrator | Down.hs | # LANGUAGE CPP #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
|
Module : Text . Pandoc . AST.V1_21.Down
Copyright : © 2020 SPDX - License - Identifier : BSD-3 - Clause
Maintainer : >
Stability : alpha
Portability : portable
Version 1.20 of the pandoc document AST .
M... | null | https://raw.githubusercontent.com/pandoc/ast-migrator/703a1ac54d265f5d313adb773f792966465c66ee/src/Text/Pandoc/AST/V1_21/Down.hs | haskell | # LANGUAGE OverloadedStrings #
| Convert the relevant components of a new-style table (with block
caption, row headers, row and column spans, and so on) to those of
content placed in the upper-left corner.
Adapted from placeRowSection in Builders. There is probably a
more abstract foldRowSection that unifies them ... | # LANGUAGE CPP #
# LANGUAGE LambdaCase #
|
Module : Text . Pandoc . AST.V1_21.Down
Copyright : © 2020 SPDX - License - Identifier : BSD-3 - Clause
Maintainer : >
Stability : alpha
Portability : portable
Version 1.20 of the pandoc document AST .
Module : Text.Pandoc.AST.V1_21.... |
6dff3b39b66a489875f9dd4dabdad6d33710e2cba47529af623da0d282595071 | fossas/fossa-cli | Test.hs | # LANGUAGE BlockArguments #
# LANGUAGE RecordWildCards #
module App.Fossa.Container.Test (
test,
) where
import App.Fossa.API.BuildWait (
waitForBuild,
waitForIssues,
)
import App.Fossa.Config.Container (
ContainerTestConfig (ContainerTestConfig, timeoutDuration),
TestOutputFormat (TestOutputJson, TestOutp... | null | https://raw.githubusercontent.com/fossas/fossa-cli/139cc4d2106a676f8babf577b85d6c8a159de437/src/App/Fossa/Container/Test.hs | haskell | # LANGUAGE BlockArguments #
# LANGUAGE RecordWildCards #
module App.Fossa.Container.Test (
test,
) where
import App.Fossa.API.BuildWait (
waitForBuild,
waitForIssues,
)
import App.Fossa.Config.Container (
ContainerTestConfig (ContainerTestConfig, timeoutDuration),
TestOutputFormat (TestOutputJson, TestOutp... | |
a6fdc46d8b7f400e627de2607511966db465eda4006d2b6826a1640853d547ce | carl-eastlund/dracula | proof-state.rkt | #lang racket
(require racket/pretty
"../proof/proof.rkt"
"../acl2/acl2.rkt"
"../acl2/rep.rkt"
"../private/hash.rkt"
"term-state.rkt")
A ProofState is :
( make - proof - state ( Or Nat # f ) ( Hash Nat TermState ) )
(define-struct proof-state (loc size index terms) ... | null | https://raw.githubusercontent.com/carl-eastlund/dracula/a937f4b40463779246e3544e4021c53744a33847/drscheme/proof-state.rkt | racket | ======================================================================
IMPLEMENTATION
======================================================================
==================================================
Constructors.
==================================================
==================================... | #lang racket
(require racket/pretty
"../proof/proof.rkt"
"../acl2/acl2.rkt"
"../acl2/rep.rkt"
"../private/hash.rkt"
"term-state.rkt")
A ProofState is :
( make - proof - state ( Or Nat # f ) ( Hash Nat TermState ) )
(define-struct proof-state (loc size index terms) ... |
3125d85cf1cbcc93ebe416c27592abb5b7ffc89a00d6ad2ee6fa283990d0a0ea | facebookarchive/pfff | record.ml | type record = {
fld1: int;
fld2: float;
mutable mut_fld3: float;
}
let use_record_in_pattern = function
{ fld1 = i; _} -> i
let use_record x = x.fld1
let modify_record x =
x.mut_fld3 <- 3.
let use_record_implicit () =
let fld1 = 1 in
{ fld2 = 2.0; fld1; mut_fld3 = 3.}
| null | https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/tests/ml/cmt/record.ml | ocaml | type record = {
fld1: int;
fld2: float;
mutable mut_fld3: float;
}
let use_record_in_pattern = function
{ fld1 = i; _} -> i
let use_record x = x.fld1
let modify_record x =
x.mut_fld3 <- 3.
let use_record_implicit () =
let fld1 = 1 in
{ fld2 = 2.0; fld1; mut_fld3 = 3.}
| |
4573ac4f77cfe6d98498c4bb9d9ada70da5041ed1e42aac2a47ec8a3bb9a90ac | cloojure/tupelo-datomic | schema.clj | (ns tupelo-datomic.schema
(:use tupelo.core)
(:require
[schema.core :as s]
[tupelo.schema :as ts]
))
(def TxResult
"A map returned by a successful transaction. Contains the keys
:db-before, :db-after, :tx-data, and :tempids"
{ :db-before datomic.db.Db
:db-after datomic.db.Db
... | null | https://raw.githubusercontent.com/cloojure/tupelo-datomic/95d0f044b5dad4a9cdc986cbd150eea2660fb4d0/src/tupelo_datomic/schema.clj | clojure | #todo (seq of datom) | (ns tupelo-datomic.schema
(:use tupelo.core)
(:require
[schema.core :as s]
[tupelo.schema :as ts]
))
(def TxResult
"A map returned by a successful transaction. Contains the keys
:db-before, :db-after, :tx-data, and :tempids"
{ :db-before datomic.db.Db
:db-after datomic.db.Db
... |
af600c74fa63567eb2ec5bcdb85039b7e43caf01f852c1c55e5345208f434309 | DaMSL/K3 | Literal.hs | module Language.K3.Core.Constructor.Literal where
import Data.Tree
import Data.Word (Word8)
import Language.K3.Core.Annotation
import Language.K3.Core.Common
import Language.K3.Core.Literal
import Language.K3.Core.Type
bool :: Bool -> K3 Literal
bool b = Node (LBool b :@: []) []
byte :: Word8 -> K3 Literal
byte b =... | null | https://raw.githubusercontent.com/DaMSL/K3/51749157844e76ae79dba619116fc5ad9d685643/src/Language/K3/Core/Constructor/Literal.hs | haskell | module Language.K3.Core.Constructor.Literal where
import Data.Tree
import Data.Word (Word8)
import Language.K3.Core.Annotation
import Language.K3.Core.Common
import Language.K3.Core.Literal
import Language.K3.Core.Type
bool :: Bool -> K3 Literal
bool b = Node (LBool b :@: []) []
byte :: Word8 -> K3 Literal
byte b =... | |
4b5bfaab5e3493870c3e21897926b5472ec95598ca2fc5e61813744797ff0a6a | ocaml/dune | cxx_flags.ml | open Import
type phase =
| Compile
| Link
type ccomp_type =
| Gcc
| Msvc
| Clang
| Other of string
let base_cxx_flags ~for_ cc =
match (cc, for_) with
| Gcc, Compile -> [ "-x"; "c++" ]
| Gcc, Link -> [ "-lstdc++"; "-shared-libgcc" ]
| Clang, Compile -> [ "-x"; "c++" ]
| Clang, Link -> [ "-lc++"... | null | https://raw.githubusercontent.com/ocaml/dune/c0415c5aa336e21e47a93666cb0a68c53ce9ab52/src/dune_rules/cxx_flags.ml | ocaml | open Import
type phase =
| Compile
| Link
type ccomp_type =
| Gcc
| Msvc
| Clang
| Other of string
let base_cxx_flags ~for_ cc =
match (cc, for_) with
| Gcc, Compile -> [ "-x"; "c++" ]
| Gcc, Link -> [ "-lstdc++"; "-shared-libgcc" ]
| Clang, Compile -> [ "-x"; "c++" ]
| Clang, Link -> [ "-lc++"... | |
ec5a963026c5b0cbb0e72fffa40398aee3262d5b58f76840e4531c11283bf117 | fp-works/2019-winter-Haskell-school | Exercise04Spec.hs | module CIS194.Homework01.Exercise04Spec where
import CIS194.Homework01.Exercise04
import Test.Tasty.Hspec
spec_validate :: Spec
spec_validate = do
it "returns False for a negative integer" $
validate (-1) `shouldBe` False
it "returns False for 0" $
validate 0 `shouldBe` False
it "returns False for a... | null | https://raw.githubusercontent.com/fp-works/2019-winter-Haskell-school/823b67f019b9e7bc0d3be36711c0cc7da4eba7d2/cis194/week1/daniel-deng/test/CIS194/Homework01/Exercise04Spec.hs | haskell | module CIS194.Homework01.Exercise04Spec where
import CIS194.Homework01.Exercise04
import Test.Tasty.Hspec
spec_validate :: Spec
spec_validate = do
it "returns False for a negative integer" $
validate (-1) `shouldBe` False
it "returns False for 0" $
validate 0 `shouldBe` False
it "returns False for a... | |
128cd7bd808a2db90ea315181bd1379d0e8c9f4f3c08cf85f0064668a81530a0 | kupl/FixML | sub14.ml | type formula =
True
| False
| Neg of formula
| Or of formula * formula
| And of formula * formula
| Imply of formula * formula
| Equiv of formula * formula;;
let eval f =
match f with
True -> true
| False -> false
| Neg x -> if (x = True) then false else true
| Or (x, y) -> if (x = True || y ... | null | https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/formula/formula2/submissions/sub14.ml | ocaml | type formula =
True
| False
| Neg of formula
| Or of formula * formula
| And of formula * formula
| Imply of formula * formula
| Equiv of formula * formula;;
let eval f =
match f with
True -> true
| False -> false
| Neg x -> if (x = True) then false else true
| Or (x, y) -> if (x = True || y ... | |
481defb0acc734883fe63453f5b280d9e936db341628624aa3b3a731765ca09e | akabe/ocaml-crf | crf_train.mli | --- A library for conditional random field ( CRF ) in OCaml
Copyright ( C ) 2015 < >
This program is free software ; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation ; either version 3 of the License , o... | null | https://raw.githubusercontent.com/akabe/ocaml-crf/ced26bcce559b1eda307f7a8961ac9e52905882f/lib/crf_train.mli | ocaml | --- A library for conditional random field ( CRF ) in OCaml
Copyright ( C ) 2015 < >
This program is free software ; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation ; either version 3 of the License , o... | |
842aa1374f854dd290b530ed7f42ca94c195e30c7fc80957ae06357a17430060 | alexandergunnarson/quantum | thread.cljc | (ns
^{:doc "Complex thread management made simple.
Aliases core.async for convenience."
:attribution "alexandergunnarson"}
quantum.core.thread
(:refer-clojure :exclude [doseq boolean? memoize conj! assoc! contains? empty?])
(:require [clojure.core :as c... | null | https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/src/quantum/core/thread.cljc | clojure | TO EXPLORE
- :source/:form, :promise, :creation-time
- Can print out a list of all running tasks in a pprint-table form
============================
Add to tree
technically should be a deque
Add to flat
(if-not force?
(do (log/pr ::debug "Before interrupt handler for id" thread-id)
((or interru... | (ns
^{:doc "Complex thread management made simple.
Aliases core.async for convenience."
:attribution "alexandergunnarson"}
quantum.core.thread
(:refer-clojure :exclude [doseq boolean? memoize conj! assoc! contains? empty?])
(:require [clojure.core :as c... |
bb2a1c6c020ec05d811b3681bf81715ccd771e62297fc32da3ba8df5a56c703f | pfdietz/ansi-test | pairlis.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sun Apr 20 07:30:55 2003
;;;; Contains: Tests of PAIRLIS
Pairlis has two legal behaviors : the pairs
;; can be prepended in the same order, or in the
reverse order , that they appear in the first
two arguments
(defun my-pairlis (x y &optional alist)
(i... | null | https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/cons/pairlis.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of PAIRLIS
can be prepended in the same order, or in the
Error tests | Author :
Created : Sun Apr 20 07:30:55 2003
Pairlis has two legal behaviors : the pairs
reverse order , that they appear in the first
two arguments
(defun my-pairlis (x y &optional alist)
(if (null x)
alist
(acons (car x) (car y)
(my-pairlis (cdr x) (cdr y) alist))))
(deft... |
e2d016d5929bf278564597386b77f320488dd7da2fc555c9258c5106bbc3b794 | Tritlo/spectacular | Memoization.hs | {-# LANGUAGE CPP #-}
# LANGUAGE OverloadedStrings #
{-# LANGUAGE TemplateHaskell #-}
-- | Quick-and-dirty, thread-unsafe, hash-based memoization.
module Data.Memoization (
MemoCacheTag(..)
, resetAllCaches
#ifdef PROFILE_CACHES
, getAllCacheMetrics
, printAllCacheMetrics
#endif... | null | https://raw.githubusercontent.com/Tritlo/spectacular/00621f4f0f03e5d0afea3c730434a8842e473546/src/Data/Memoization.hs | haskell | # LANGUAGE CPP #
# LANGUAGE TemplateHaskell #
| Quick-and-dirty, thread-unsafe, hash-based memoization.
---------------------------------------------------------------
-----------------------------------------------------------
---------------- Caches and cache metrics -----------------
-------... | # LANGUAGE OverloadedStrings #
module Data.Memoization (
MemoCacheTag(..)
, resetAllCaches
#ifdef PROFILE_CACHES
, getAllCacheMetrics
, printAllCacheMetrics
#endif
, memoIO
, memo
, memo2
) where
import Data.Hashable ( Hashable )
import qualified Data.HashTable.IO as HT
import Data.Text ( Te... |
f28479a020b970f6cdde7bc1bfddb81a924bd7d9af1190a1d716489c73f18305 | xapi-project/xen-api | client_main.ml |
* Copyright ( c ) Citrix Systems Inc.
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AN... | null | https://raw.githubusercontent.com/xapi-project/xen-api/1e1165f330c30ee6cb8e8f325af9fdd07474ca24/ocaml/message-switch/core_test/lwt/client_main.ml | ocaml |
* Copyright ( c ) Citrix Systems Inc.
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AN... | |
0f501a92d9490a6564b93c44617c4f7245548ddeb4c6a467302337406b6a177c | unclebob/AdventOfCode2022 | project.clj | (defproject day5-supply-stacks "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:main day5-supply-stacks.core
:dependencies [[org.clojure/clojure "1.8.0"]]
:profiles {:dev {:dependencies [[speclj "3.3.2"]]}}
:plugins [[... | null | https://raw.githubusercontent.com/unclebob/AdventOfCode2022/b8e4dd093a54362f76dc7cdd559489c369840bfd/day5-supply-stacks/project.clj | clojure | (defproject day5-supply-stacks "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:main day5-supply-stacks.core
:dependencies [[org.clojure/clojure "1.8.0"]]
:profiles {:dev {:dependencies [[speclj "3.3.2"]]}}
:plugins [[... | |
5743041e37a3b27234e8e3cd885b8dcf1afdb598a62c23ccd179a7dbdda578de | inria-parkas/sundialsml | sparse.ml |
open Sundials
open Bigarray
module S = Matrix.Sparse
module D = Matrix.Dense
let printf = Format.printf
let fprintf = Format.fprintf
let print_mat out mat =
let m, n = S.size mat in
let nnz, _ = S.dims mat in
fprintf out "@[<v>matrix (M=%d, N=%d, NNZ=%d):@\n" m n nnz;
for i = 0 to n - 1 do
fprintf out " ... | null | https://raw.githubusercontent.com/inria-parkas/sundialsml/0c46b0c6c067677af6ef8006260b9e697cc0562b/examples/ocaml/linear/sparse.ml | ocaml |
open Sundials
open Bigarray
module S = Matrix.Sparse
module D = Matrix.Dense
let printf = Format.printf
let fprintf = Format.fprintf
let print_mat out mat =
let m, n = S.size mat in
let nnz, _ = S.dims mat in
fprintf out "@[<v>matrix (M=%d, N=%d, NNZ=%d):@\n" m n nnz;
for i = 0 to n - 1 do
fprintf out " ... | |
8b92ec52f4142f4b2700fdb91105418824409bc76fa03c7164156405905bbaab | goblint/analyzer | topDown_deprecated.ml | open Prelude
open Analyses
open Constraints
open Messages
module GU = Goblintutil
exception SolverCannotDoGlobals
(** modified SLR3 as top down solver *)
module TD3 =
functor (S:EqConstrSys) ->
functor (HM:Hashtbl.S with type key = S.v) ->
struct
open SolverBox.Warrow (S.Dom)
include Generic.SolverSt... | null | https://raw.githubusercontent.com/goblint/analyzer/b9f527f6d3066d548c5551716366fbed8acecf35/src/solvers/topDown_deprecated.ml | ocaml | * modified SLR3 as top down solver
y -> xs
y -> xs
x,y -> d
make_wpoint y;
destabilize y;
solve y;
iterate until there are no more new side-effects | open Prelude
open Analyses
open Constraints
open Messages
module GU = Goblintutil
exception SolverCannotDoGlobals
module TD3 =
functor (S:EqConstrSys) ->
functor (HM:Hashtbl.S with type key = S.v) ->
struct
open SolverBox.Warrow (S.Dom)
include Generic.SolverStats (S) (HM)
module VS = Set.Make (S... |
1da7ed769576586637dd2cc3983ad08603a99f731b3a9fc8749fab880fd4470e | e-wrks/edh | Args.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE PatternSynonyms #
module Language.Edh.Args
todo find a way to hide this from EHI
type (!:),
type (?:),
pattern EdhArg,
mandatoryArg,
optionalArg,
defaultArg,
QtyAsIn (..),
ComputArg (..),
Effective (..),
computArgName,
type (@:),... | null | https://raw.githubusercontent.com/e-wrks/edh/f6c9db18a32a7d97aa9ce32bcd64c7e9f8bc6b2e/elr/src/Language/Edh/Args.hs | haskell | # LANGUAGE ConstraintKinds #
# COMPLETE EdhArg #
* Curried & Effected Edh Procedure Arguments
* Higher Kinded Argument Type Helpers | # LANGUAGE PatternSynonyms #
module Language.Edh.Args
todo find a way to hide this from EHI
type (!:),
type (?:),
pattern EdhArg,
mandatoryArg,
optionalArg,
defaultArg,
QtyAsIn (..),
ComputArg (..),
Effective (..),
computArgName,
type (@:),
type ($:),
appliedArg,
... |
6a9578f8f1025d06fb74876040f077b55208eacb6aa6be817bbc21e4d3ddb683 | fossas/fossa-cli | Common.hs | # LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
module App.Fossa.Config.Common (
* CLI Parsers
CommonOpts (..),
commonOpts,
releaseGroupMetadataOpts,
pathOpt,
targetOpt,
baseDirArg,
metadataOpts,
-- * CLI Validators
validateDir,
validateFile,
validateExists,
validateApiKey,
-- * CLI ... | null | https://raw.githubusercontent.com/fossas/fossa-cli/bc28a0e23b2bdc3515a9cb3bf8aa412d5b85d0b1/src/App/Fossa/Config/Common.hs | haskell | * CLI Validators
* CLI Collectors
* Configuration Types
* Global Defaults
| upload to fossa with provided api key and base url
Type included here so that if @validateFile@ ever changes this fails to compile,
since we're asserting @Abs@.
Type included here so that if @validateFile@ ever changes this fails to com... | # LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
module App.Fossa.Config.Common (
* CLI Parsers
CommonOpts (..),
commonOpts,
releaseGroupMetadataOpts,
pathOpt,
targetOpt,
baseDirArg,
metadataOpts,
validateDir,
validateFile,
validateExists,
validateApiKey,
collectBaseDir,
collectRevisi... |
b51282ede614d4cc0e0f0d593cc48bca4ef87eb2556af11311442348ba010c81 | LexiFi/gen_js_api | container.ml | module StringMap = struct
include Map.Make(String)
let t_to_js ml2js l =
let o = Ojs.empty_obj () in
iter (fun k v -> Ojs.set_prop o (Ojs.string_to_js k) (ml2js v)) l;
o
let t_of_js js2ml o =
let l = ref empty in
Ojs.iter_properties o
(fun k -> l := add k (js2ml (Ojs.get_prop o (Ojs.st... | null | https://raw.githubusercontent.com/LexiFi/gen_js_api/bee3b595898fdaf7db0366a9b1a009db9a6c6026/node-test/bindings/container.ml | ocaml | module StringMap = struct
include Map.Make(String)
let t_to_js ml2js l =
let o = Ojs.empty_obj () in
iter (fun k v -> Ojs.set_prop o (Ojs.string_to_js k) (ml2js v)) l;
o
let t_of_js js2ml o =
let l = ref empty in
Ojs.iter_properties o
(fun k -> l := add k (js2ml (Ojs.get_prop o (Ojs.st... | |
b3210d160e441df3e7c3a7898ca33f14c97f1963e953e51e38a5205758093eb6 | ekmett/linear | V2.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE TypeFamilies #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE CPP #
# LANGUAGE Trustworthy #
# LANGUAGE DeriveGeneric #
# LANGUAGE DataKinds #
{-# LANGUAGE DeriveLift #-}
#ifndef MI... | null | https://raw.githubusercontent.com/ekmett/linear/2384ebbe12fe68d397f23d8a6ffe8278da7073da/src/Linear/V2.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE RankNTypes #
# LANGUAGE DeriveLift #
---------------------------------------------------------------------------
|
License : BSD-style (see the file LICENSE)
Stability : experimental
Portability : non-portable
----------------------------------------------------... | # LANGUAGE TypeFamilies #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE CPP #
# LANGUAGE Trustworthy #
# LANGUAGE DeriveGeneric #
# LANGUAGE DataKinds #
#ifndef MIN_VERSION_hashable
#define MIN_VERSION_hashable(x,y,z) 1
#endif
#ifndef MIN_VERSION_vector
... |
8dcbbbdb0bb325b418bd4ac9ebd60363485ac742ae6674e24f0f98bd0ac08def | parapluu/Concuerror | ets_update_element.erl | -module(ets_update_element).
-compile(export_all).
scenarios() ->
[ update_element_good
, update_element_bad
, race_update_element_r
, race_update_element_w
].
update_element_good() ->
ets:new(table, [named_table, public]),
ets:insert(table, {x, 1}),
spawn_monitor(
fun() ->
ets:... | null | https://raw.githubusercontent.com/parapluu/Concuerror/152a5ccee0b6e97d8c3329c2167166435329d261/tests/suites/basic_tests/src/ets_update_element.erl | erlang | -module(ets_update_element).
-compile(export_all).
scenarios() ->
[ update_element_good
, update_element_bad
, race_update_element_r
, race_update_element_w
].
update_element_good() ->
ets:new(table, [named_table, public]),
ets:insert(table, {x, 1}),
spawn_monitor(
fun() ->
ets:... | |
080cd1505c6bead7df56a7b765ee7e04a68ba189ff1004fe74ec6689bf20af9f | avsm/platform | element_content.mli | TyXML
*
* Copyright ( C ) 2016
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at your op... | null | https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/tyxml.4.3.0/ppx/element_content.mli | ocaml | * Element child argument assemblers. These are almost parsers, except they
only tell how to pass already-parsed children to element functions.
* Assemblers satisfy: [assembler ~lang ~loc ~name children] evaluates
to a list of optionally-labeled parse trees for passing [children] to the
the element function... | TyXML
*
* Copyright ( C ) 2016
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at your op... |
8fae122e6d1197bf9f66ec5f56b8b56c06ee7a3f474e505eb209d511c01a4cca | nuvla/ui | views.cljs | (ns sixsq.nuvla.ui.docs.views
(:require [re-frame.core :refer [dispatch subscribe]]
[sixsq.nuvla.ui.docs-detail.views :as docs-details-view]
[sixsq.nuvla.ui.docs.events :as events]
[sixsq.nuvla.ui.docs.subs :as subs]
[sixsq.nuvla.ui.i18n.subs :as i18n-subs]
... | null | https://raw.githubusercontent.com/nuvla/ui/52718be9e639345b031673e69bc231b38974f3a9/code/src/cljs/sixsq/nuvla/ui/docs/views.cljs | clojure | (ns sixsq.nuvla.ui.docs.views
(:require [re-frame.core :refer [dispatch subscribe]]
[sixsq.nuvla.ui.docs-detail.views :as docs-details-view]
[sixsq.nuvla.ui.docs.events :as events]
[sixsq.nuvla.ui.docs.subs :as subs]
[sixsq.nuvla.ui.i18n.subs :as i18n-subs]
... | |
7d9dc209c0a225c0590ccb1ded4211b5f3521a1bdc7e93d4c3839914369c896a | tfausak/exercism-solutions | OCR.hs | module OCR
( convert
) where
import Prelude hiding (lookup)
import Data.List (intercalate, transpose)
import Data.List.Split (chunksOf)
import Data.Map (Map, fromList, lookup)
import Data.Maybe (fromMaybe)
convert :: String -> String
convert = intercalate "," . map lookupDigits . tokenize
tokenize :: String -> [[Str... | null | https://raw.githubusercontent.com/tfausak/exercism-solutions/5e6f93979cc61ef5e3b48a09ca316dfd7fcd319c/haskell/ocr-numbers/OCR.hs | haskell | module OCR
( convert
) where
import Prelude hiding (lookup)
import Data.List (intercalate, transpose)
import Data.List.Split (chunksOf)
import Data.Map (Map, fromList, lookup)
import Data.Maybe (fromMaybe)
convert :: String -> String
convert = intercalate "," . map lookupDigits . tokenize
tokenize :: String -> [[Str... | |
24f73304802151e362d4e248c9b13b89cc452cf85421e4374c47ee69e60f9e3f | jvf/scalaris | yaws_log_file_h.erl | %%%-------------------------------------------------------------------
%%% File : yaws_log_file_h.erl
%%% Author : <>
%%% Description :
%%%
Created : 11 Mar 2004 by < >
%%%-------------------------------------------------------------------
%% Just extending the error_logger_file_h abit,
%% If they change th... | null | https://raw.githubusercontent.com/jvf/scalaris/c069f44cf149ea6c69e24bdb08714bda242e7ee0/contrib/yaws/src/yaws_log_file_h.erl | erlang | -------------------------------------------------------------------
File : yaws_log_file_h.erl
Author : <>
Description :
-------------------------------------------------------------------
Just extending the error_logger_file_h abit,
If they change the internals of that module, this module
change anything t... | Created : 11 Mar 2004 by < >
breaks , but then again , the otp crew does n't ever appear to
-module(yaws_log_file_h).
-behaviour(gen_event).
-include_lib("kernel/include/file.hrl").
-export([init/1,
handle_event/2, handle_call/2, handle_info/2,
terminate/2, code_change/3]).
init(File) ->... |
b933a76421112c50d3ff3966c91629a7c8d3140331f5129535dedb78aa422cd3 | pandoc/pandoc-lua-marshal | List.hs | # LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
|
Copyright : © 2021 - 2023 : MIT
Maintainer : >
Lua lists with additional methods .
Copyright : © 2021-2023 Albert Krewinkel
License : MIT
Maintainer : Albert Krewinkel <tarleb+>
Lua lists with additional methods.
-}
modul... | null | https://raw.githubusercontent.com/pandoc/pandoc-lua-marshal/e71315da1d377cf52cd94975c20ac04616c2d935/src/Text/Pandoc/Lua/Marshal/List.hs | haskell | # LANGUAGE OverloadedStrings #
metatable that offers a number of convenience functions. | # LANGUAGE LambdaCase #
|
Copyright : © 2021 - 2023 : MIT
Maintainer : >
Lua lists with additional methods .
Copyright : © 2021-2023 Albert Krewinkel
License : MIT
Maintainer : Albert Krewinkel <tarleb+>
Lua lists with additional methods.
-}
module Text.Pandoc.Lua.Marshal.List
( ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.