_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 |
|---|---|---|---|---|---|---|---|---|
7b08780a6f95e9fce28529e385ed1fb545b58e045e0bdb8d914db979b8ac646f | ajnsit/wai-routes | Monad.hs | # LANGUAGE OverloadedStrings , TypeFamilies , RankNTypes , DeriveFunctor #
|
Module : Routes . Monad
Copyright : ( c ) 2013
License : MIT ( see the file LICENSE )
Maintainer :
Stability : experimental
Portability : non - portable ( uses ghc extensions )
Defines a Rou... | null | https://raw.githubusercontent.com/ajnsit/wai-routes/4d6b240af57a95353373ddba81c4905db0234459/src/Routes/Monad.hs | haskell | * Compose Routes
* Convert to Wai Application
A Router functor can either add a middleware, or resolve to an app itself.
Router type
| Catch all routes and process them with the supplied application.
Note: As expected from the name, no request proceeds past a catchall.
| Synonym of `catchall`. Kept for backwards... | # LANGUAGE OverloadedStrings , TypeFamilies , RankNTypes , DeriveFunctor #
|
Module : Routes . Monad
Copyright : ( c ) 2013
License : MIT ( see the file LICENSE )
Maintainer :
Stability : experimental
Portability : non - portable ( uses ghc extensions )
Defines a Rou... |
64f27b6f4ec41ef3e721984391fd11b25c0f31764316a5ef0fd9a22a71f1bda3 | imdea-software/leap | Z3PairsQuery.mli |
(***********************************************************************)
(* *)
LEAP
(* *)
, IMDEA ... | null | https://raw.githubusercontent.com/imdea-software/leap/5f946163c0f80ff9162db605a75b7ce2e27926ef/src/solvers/backend/query/z3/Z3PairsQuery.mli | ocaml | *********************************************************************
... |
LEAP
, IMDEA Software Institute
Copyright 2011 IMDEA Software Institute
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compl... |
b07accc3b1abe4672a2a3b6087023133d565a51dc8aff4ee2fff9ab3659f37bd | BumblebeeBat/PinkFairy | create_account_tx.erl | -module(create_account_tx).
-export([doit/6, create_account/5]).
-record(ca, {from = 0, nonce = 0, address = <<"">>, amount = 0, fee = 0}).
create_account(Addr, Amount, Fee, Id, Accounts) ->
A = if
size(Addr) > 85 -> sign:pubkey2address(Addr);
true -> Addr
end,
{_, Acc, Proof} = trie:get(Id, Account... | null | https://raw.githubusercontent.com/BumblebeeBat/PinkFairy/33d595d735d6b1119732984e894ed6aea2b6cb6a/src/txs/create_account_tx.erl | erlang | find out the fee for creating an account in variables, and charge it.
-1 is so it doesn't crash the sorter. it means to create a new account.
channels, accounts, variables | -module(create_account_tx).
-export([doit/6, create_account/5]).
-record(ca, {from = 0, nonce = 0, address = <<"">>, amount = 0, fee = 0}).
create_account(Addr, Amount, Fee, Id, Accounts) ->
A = if
size(Addr) > 85 -> sign:pubkey2address(Addr);
true -> Addr
end,
{_, Acc, Proof} = trie:get(Id, Account... |
fc2527a5635d5032f71c71273060457f0e4858b7658cb026152644914f6f43d2 | timothypratley/vone | scratch.clj | (ns vone.scratch
(:require [clj-time.core :as time]
[clj-diff.core :refer :all]
[clojure.repl :refer :all]
[clojure.data]
[vone.services :refer :all]
[vone.helpers :refer :all]
[vone.version-one-request :refer :all]))
(openItems "TC5.0.1")
(as-... | null | https://raw.githubusercontent.com/timothypratley/vone/b026f7000dda752f0090a1203b53706a583749fe/repl/scratch.clj | clojure | (ns vone.scratch
(:require [clj-time.core :as time]
[clj-diff.core :refer :all]
[clojure.repl :refer :all]
[clojure.data]
[vone.services :refer :all]
[vone.helpers :refer :all]
[vone.version-one-request :refer :all]))
(openItems "TC5.0.1")
(as-... | |
e6b17334b31b23dd94f0b2ba3e9579632d2c22fc2d1a1e53bad6942418be614c | ublubu/shapes | Engine.hs | {-# LANGUAGE MagicHash #-}
{-# LANGUAGE TypeFamilies #-}
{- |
Another piece of the sample implementation of a physics engine that uses this library.
-}
module Physics.Engine (module Physics.Engine, ContactBehavior(..), makeWorldObj) where
import GHC.Types (Double (D#))
import ... | null | https://raw.githubusercontent.com/ublubu/shapes/fa5d959c17224a851d517826deeae097f1583392/shapes/src/Physics/Engine.hs | haskell | # LANGUAGE MagicHash #
# LANGUAGE TypeFamilies #
|
Another piece of the sample implementation of a physics engine that uses this library.
| Create a @PhysicalObj@.
^ Velocity
^ Rotational velocity
^ Position
^ Rotation
^ Linear mass paired with rotational mass |
module Physics.Engine (module Physics.Engine, ContactBehavior(..), makeWorldObj) where
import GHC.Types (Double (D#))
import Control.Monad.ST
import Physics.Constraint (PhysicalObj (..), toInvMass2)
import Physics.Contact (Shape (..))
import... |
82a6d711f276360940599cd4ed443c3b420d75005e873c9fdc2eb2bea40638b2 | S8A/htdp-exercises | ex396.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 ex396) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "u... | null | https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex396.rkt | racket | about the language level of this file in a form that our tools can easily process.
..:: TO PLAY ::..
An HM-Word is a [List-of Letter or "_"]
interpretation "_" represents a letter to be guessed
HM-Word N -> String
runs a simplistic hangman game, produces the current state
HM-Word -> HM-Word
HM-Word KeyEvent -> ... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex396) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp") (lib "batch-io.rkt" "teachpack" "2htdp"))) (htdp-set... |
0d53223510a8dfae055a66363959f6f5a1314f46137d85306e73fb191d9c65c7 | postspectacular/rnd.farm | project.clj | (defproject com.postspectacular/rnd-farm "2.0.0"
:description "Human generated randomness"
:url "/"
:license {:name "Apache Software License"
:url "-2.0"
:distribution :repo}
:scm {:name "git"
:url ""}
:min-lein-version "2.0.0"
:de... | null | https://raw.githubusercontent.com/postspectacular/rnd.farm/80cf1d0def59d4cf24b4926ab4da1b2841cdc7da/project.clj | clojure | (defproject com.postspectacular/rnd-farm "2.0.0"
:description "Human generated randomness"
:url "/"
:license {:name "Apache Software License"
:url "-2.0"
:distribution :repo}
:scm {:name "git"
:url ""}
:min-lein-version "2.0.0"
:de... | |
34665b0d212b081b8eac8652e2d1f9a82f1277a61a50849197971bcf3fd81534 | effectai/neo-clojure-clr | blockchain.clj | (ns neo-clj.blockchain
(:refer-clojure :exclude [sync])
(:require
[clojure.walk :refer [keywordize-keys]]
[neo-clj.util :as util]
[neo-clj.implementations :refer [get-private-field]]
[clojure.data.json :as json]
[clojure.pprint :refer [pprint]])
(:import
System.Text.Encoding
System.Net.WebReq... | null | https://raw.githubusercontent.com/effectai/neo-clojure-clr/a3a9b2352dae2b8b127fe9aa72ffd4e3bde35107/src/neo_clj/blockchain.clj | clojure | List of RPC servers used for syncing
enhance :asset with the :txid
get list of assets | (ns neo-clj.blockchain
(:refer-clojure :exclude [sync])
(:require
[clojure.walk :refer [keywordize-keys]]
[neo-clj.util :as util]
[neo-clj.implementations :refer [get-private-field]]
[clojure.data.json :as json]
[clojure.pprint :refer [pprint]])
(:import
System.Text.Encoding
System.Net.WebReq... |
0751c31b6822aa85f1342b287b5819ae11f7cca6768263fa99e4a535fee53139 | JHU-PL-Lab/jaylang | repeat.ml | let rec succ x = x + 1
let rec repeat (f: int -> int) n s =
if n = 0 then
s
else
f (repeat f (n - 1) s)
let rec main n = assert (repeat succ n 0 >= n)
| null | https://raw.githubusercontent.com/JHU-PL-Lab/jaylang/484b3876986a515fb57b11768a1b3b50418cde0c/benchmark/cases/mochi_origin/fpice/repeat.ml | ocaml | let rec succ x = x + 1
let rec repeat (f: int -> int) n s =
if n = 0 then
s
else
f (repeat f (n - 1) s)
let rec main n = assert (repeat succ n 0 >= n)
| |
7365e8be79584a523b8a337128b600289eba58d21939f7dc9791a7d72d2834f8 | ordnungswidrig/crux-dynamodb | dynamodb.clj | (ns de.c6e.crux.dynamodb
(:require [clojure.tools.logging :as log]
[crux.node :as n]
[crux.db :as db]
[crux.io :as cio]
[crux.status :as status]
[crux.tx :as tx]
[taoensso.nippy :as nippy])
(:import software.amazon.awssdk.services.dynamodb.Dyn... | null | https://raw.githubusercontent.com/ordnungswidrig/crux-dynamodb/d0a8feaf02d964bfc37b6471d37dd5135285a2b8/src/de/c6e/crux/dynamodb.clj | clojure | todo create table code
For this to work create table with hash key "partition" (string) and sort-key "tx" (numeric)
Example-data
default | 1 | bgFy... | 1591111570009 |
possible improvements
which directly returns a Iterable. The function takes an atom as a "close-flag" to signal the request
to stop the i... | (ns de.c6e.crux.dynamodb
(:require [clojure.tools.logging :as log]
[crux.node :as n]
[crux.db :as db]
[crux.io :as cio]
[crux.status :as status]
[crux.tx :as tx]
[taoensso.nippy :as nippy])
(:import software.amazon.awssdk.services.dynamodb.Dyn... |
8c10e2b8260e604d35be02d21028b7a9504988a7f48410278012c4a6cdfa080f | haskell-tools/haskell-tools | ToTopLevel_res.hs | module Refactor.FloatOut.ToTopLevel where
f = g
g = id | null | https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/builtin-refactorings/examples/Refactor/FloatOut/ToTopLevel_res.hs | haskell | module Refactor.FloatOut.ToTopLevel where
f = g
g = id | |
11837f58ddf24611634554b2e03e85a2102a6cc50afd37bbd827fc6ddda0a058 | expipiplus1/spir-v | Write.hs | # LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
# LANGUAGE RecordWildCards #
module Write
( writeSpecToFiles
) where
import Control.Monad ((<=<))
import Data.Char (isAlphaNum, isDigit, toUpper)
import Data.Foldable (foldl')
import Data.List (isPrefixOf, intersperse)
import Data... | null | https://raw.githubusercontent.com/expipiplus1/spir-v/5692404f43a63fb8feb0cfaff3bfb3eedada6890/generate/src/Write.hs | haskell | # LANGUAGE OverloadedStrings #
------------------------------------------------------------------------------
Limits
------------------------------------------------------------------------------
------------------------------------------------------------------------------
--------------------------------------------... | # LANGUAGE LambdaCase #
# LANGUAGE QuasiQuotes #
# LANGUAGE RecordWildCards #
module Write
( writeSpecToFiles
) where
import Control.Monad ((<=<))
import Data.Char (isAlphaNum, isDigit, toUpper)
import Data.Foldable (foldl')
import Data.List (isPrefixOf, intersperse)
import Data.Maybe (fromJust)
import Data.Monoi... |
a16952e184401881ea2c8dca0cd595267769bdc69ad548646abb24058f3a9a8f | smallmelon/sdzmmo | pt_25.erl | %%%------------------------------------
%%% @Module : pt_25
@Author : hc
@Email :
@Created : 2010.08.09
@Description : 经脉协议
%%%------------------------------------
-module(pt_25).
-export([read/2, write/2]).
%%
%%客户端 -> 服务端 ----------------------------
%%
开经脉
read(25010, <<Meridia... | null | https://raw.githubusercontent.com/smallmelon/sdzmmo/254ff430481de474527c0e96202c63fb0d2c29d2/src/proto/pt_25.erl | erlang | ------------------------------------
@Module : pt_25
------------------------------------
客户端 -> 服务端 ----------------------------
io:format("PlayerId=~p~n",[PlayerId]),
查看经脉属性
服务端 -> 客户端 ------------------------------------
| @Author : hc
@Email :
@Created : 2010.08.09
@Description : 经脉协议
-module(pt_25).
-export([read/2, write/2]).
开经脉
read(25010, <<MeridianId:16>>) ->
{ok, MeridianId};
查看经脉信息
read(25020, <<PlayerId:32>>) ->
{ok, PlayerId};
read(25030, <<PlayerId:32,MeridianId:16>>) ->
... |
3c1dc6ad00dce9203385e6c254221b1fdf7f32b226295447d1903e91f59cc212 | atgreen/lisp-openshift | ccl-send.lisp | ;;;; -*- Mode: Lisp -*-
$ I d : ccl-send.lisp 538 2010 - 07 - 09 08:38:33Z ctian $
Clozure CL 's socket function SEND - TO does n't support operations on connected UDP sockets .
(in-package :ccl)
(defun c_send-for-usocket (sockfd msgptr len flags)
(ignoring-eintr (check-socket-error (#_send sockfd msgptr len f... | null | https://raw.githubusercontent.com/atgreen/lisp-openshift/40235286bd3c6a61cab9f5af883d9ed9befba849/quicklisp/dists/quicklisp/software/usocket-0.5.5/vendor/ccl-send.lisp | lisp | -*- Mode: Lisp -*- | $ I d : ccl-send.lisp 538 2010 - 07 - 09 08:38:33Z ctian $
Clozure CL 's socket function SEND - TO does n't support operations on connected UDP sockets .
(in-package :ccl)
(defun c_send-for-usocket (sockfd msgptr len flags)
(ignoring-eintr (check-socket-error (#_send sockfd msgptr len flags))))
(defun send-fo... |
6f5215f3f16df4cf2af3809e0cdf31a2604e612cd9c71800524435ba60256fde | s-expressionists/Cleavir | query.lisp | (cl:in-package #:cleavir-environment)
;;;; This file contains definitions of generic functions for querying
;;;; the environment, and classes that are returned as a result of
;;;; such queries. With respect to the environment functions defined
;;;; in CLtL2, these classes can be thought of as containing the
;;;; info... | null | https://raw.githubusercontent.com/s-expressionists/Cleavir/e0293780d356a9d563af9abf9317019f608b4e1d/Environment/query.lisp | lisp | This file contains definitions of generic functions for querying
the environment, and classes that are returned as a result of
such queries. With respect to the environment functions defined
in CLtL2, these classes can be thought of as containing the
information returned by CLtL2 functions such as
VARIABLE-INFOR... | (cl:in-package #:cleavir-environment)
bundled up into a CLOS standard object .
compilation " ) and the AST generator that converts a form to an
Implementations that use these Cleavir tools need to supply
that do not support first - class global environments , must
(defgeneric variable-info (system environmen... |
afa38b09e819915eda9c1d93cb8b16bca1a219d239cad90bb3c547f28eee14da | cyga/real-world-haskell | csv7.hs | file : ch16 / csv7.hs
eol = try (string "\n\r")
<|> try (string "\r\n")
<|> string "\n"
<|> string "\r"
<|> fail "Couldn't find EOL"
| null | https://raw.githubusercontent.com/cyga/real-world-haskell/4ed581af5b96c6ef03f20d763b8de26be69d43d9/ch16/csv7.hs | haskell | file : ch16 / csv7.hs
eol = try (string "\n\r")
<|> try (string "\r\n")
<|> string "\n"
<|> string "\r"
<|> fail "Couldn't find EOL"
| |
1f2b144729b24af49810245a644beed127605085dfea195eddc4db4f856d4314 | thicksteadTHpp/Obvius | obvius-tutorial-sgi.lisp |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; File: obvius-tutorial-sgi.lisp
;;; Author: Heeger
;;; Description:
;;; Creation Date:
;;; ----------------------------------------------------------------
Object - Based Vision and Image Understanding System ( OBVIUS ) ,
... | null | https://raw.githubusercontent.com/thicksteadTHpp/Obvius/9a91673609def033539c9ebaf098e8f11eb0df6e/tutorials/obvius/obvius-tutorial-sgi.lisp | lisp |
File: obvius-tutorial-sgi.lisp
Author: Heeger
Description:
Creation Date:
----------------------------------------------------------------
sun, you should use obvius-tutorial.lisp instead. The main
difference is that the control panel, menus, and dialog boxes have
are direct function calls that allow yo... |
Object - Based Vision and Image Understanding System ( OBVIUS ) ,
Copyright 1988 , Vision Science Group , Media Laboratory ,
Massachusetts Institute of Technology .
This is an obvius tutorial for the implementation of Obvius that
runs on the Silicon Graphics machines . If you are ... |
eeabf1b836a02b721ce6477e0d28b6991be5e0eb43a27c91817236e5f287739d | CodyReichert/qi | gzip.lisp | gzip.lisp -- dealing with deflate data
(in-package :chipz)
(defclass gzip-header ()
((flags :initarg :flags :accessor flags)
(filename :initform nil :accessor filename)
(write-date :initarg :write-date :accessor write-date)
(mtime :initform 0 :accessor mtime)
(comment :initform nil :accessor commen... | null | https://raw.githubusercontent.com/CodyReichert/qi/9cf6d31f40e19f4a7f60891ef7c8c0381ccac66f/dependencies/chipz-master/gzip.lisp | lisp | individual bit meanings in the flag field
values of the compression method byte
values of the extra flag field | gzip.lisp -- dealing with deflate data
(in-package :chipz)
(defclass gzip-header ()
((flags :initarg :flags :accessor flags)
(filename :initform nil :accessor filename)
(write-date :initarg :write-date :accessor write-date)
(mtime :initform 0 :accessor mtime)
(comment :initform nil :accessor commen... |
1308199f94782b580649ebd34fa79540fad863faa59e535c9326f6f30d0a61b7 | gvolpe/fts | Utils.hs | module Utils where
import Control.Exception
import Data.Text ( Text )
import qualified Data.Text as T
import System.Environment ( getEnv )
safeGetEnv :: String -> IO (Maybe Text)
safeGetEnv var = (Just . T.pack <$> getEnv var) `orElse`... | null | https://raw.githubusercontent.com/gvolpe/fts/8b0b6c41505afea0737f3b00fe0403503cf5cb38/src/Utils.hs | haskell | module Utils where
import Control.Exception
import Data.Text ( Text )
import qualified Data.Text as T
import System.Environment ( getEnv )
safeGetEnv :: String -> IO (Maybe Text)
safeGetEnv var = (Just . T.pack <$> getEnv var) `orElse`... | |
3b488b22ff1b4c60eecc711a065c011be034aa4cdc0a03cdce91637d9bf3ab6f | white-silence88/cse | woo.lisp | (in-package #:cse)
| null | https://raw.githubusercontent.com/white-silence88/cse/9d938129a86f701fbe618a545b45c8f16f27b879/src/wrappers/woo.lisp | lisp | (in-package #:cse)
| |
f4f65124b60260b9ae848444d51bb32ee73ae145943a32af3ad73d27a3646557 | JoeKennedy/fantasy | League.PlayerSpec.hs | module Handler.League.PlayerSpec (spec) where
import TestImport
spec :: Spec
spec = withApp $ do
describe "getLeague.PlayerR" $ do
error "Spec not implemented: getLeague.PlayerR"
| null | https://raw.githubusercontent.com/JoeKennedy/fantasy/eb9dc9bf6074be5c5ca951e323c6497676424dda/test/Handler/League.PlayerSpec.hs | haskell | module Handler.League.PlayerSpec (spec) where
import TestImport
spec :: Spec
spec = withApp $ do
describe "getLeague.PlayerR" $ do
error "Spec not implemented: getLeague.PlayerR"
| |
94532cbfb21b26db02ba2679056af7fceef4e2e9ea30d9a7e0aaaba729bef7ed | wargrey/w3s | port.rkt | #lang typed/racket/base
;;; /
(provide (all-defined-out))
(require racket/string)
(require racket/unsafe/ops)
(require digimon/stdio)
(require digimon/token)
(require "characters.rkt")
(require "delimiter.rkt")
(require "errno.rkt")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;... | null | https://raw.githubusercontent.com/wargrey/w3s/ce6ef2f019b32be6b458cfd8aca2b48ecbf7a5b5/sgml/digitama/tokenizer/port.rkt | racket | /
/#sec-common-syn
Do not skip whitespace here, or the lexer will not find the right place to start an open parenthesis.
`#` is not special, but some keywords, like #REQUIRED, start with it
/#sec-entity-decl
/#NT-EntityValue
/#NT-STag
/#NT-ETag
/#NT-Attribute
non-empty (start) tag does not have a close de... | #lang typed/racket/base
(provide (all-defined-out))
(require racket/string)
(require racket/unsafe/ops)
(require digimon/stdio)
(require digimon/token)
(require "characters.rkt")
(require "delimiter.rkt")
(require "errno.rkt")
Performance Hint
0 . See schema / digitama / exchange / csv / reader / port.rkt
1... |
1db1096e18094f5cd9349f826cd37465eb14f1e67613ac5d83965f1ad0e4f246 | joehillen/craft | Hosts.hs | # OPTIONS_GHC -fno - warn - orphans #
module Craft.Hosts
( IP(..)
, Name(..)
, Configs
, Hosts(..)
, Craft.Hosts.lookup
, hostsfp
, get
, parseHosts
, showConfigs
, toFile
, fromFile
, insert
, deleteIP
, deleteName
, delete
, set
, setHost
)
where
import Control.Lens hiding (noneOf, set)
import qu... | null | https://raw.githubusercontent.com/joehillen/craft/de31caa7f86cceaab23dbef0f05208bb853cf73b/src/Craft/Hosts.hs | haskell | --------------------------------------
____ _ _ --
| _ \ _ __(_)_ ____ _| |_ ___ --
| |_) | '__| \ \ / / _` | __/ _ \ --
| __/| | | |\ V / (_| | || __/ --
-------------------------------------- | # OPTIONS_GHC -fno - warn - orphans #
module Craft.Hosts
( IP(..)
, Name(..)
, Configs
, Hosts(..)
, Craft.Hosts.lookup
, hostsfp
, get
, parseHosts
, showConfigs
, toFile
, fromFile
, insert
, deleteIP
, deleteName
, delete
, set
, setHost
)
where
import Control.Lens hiding (noneOf, set)
import qu... |
9535efb3b9f15b53d28a56be3f68145780a95af5b5f57cd48f1a87f970c28a54 | mcgizzle/CS4012-Functional-Programming | Chan.hs | module Chan where
import Control.Concurrent hiding (Chan)
import Control.Concurrent.STM hiding (TChan)
type Stream a = MVar (Item a)
data Item a = Item a (Stream a)
data Chan a = Chan (MVar (Stream a)) (MVar (Stream a))
newChan :: IO (Chan a)
newChan = do
hole <- newEmptyMVar
readVar <- newMVar hole
... | null | https://raw.githubusercontent.com/mcgizzle/CS4012-Functional-Programming/31d73663f982020b2890c1605964a696685f2410/Chan.hs | haskell | If using multicast-channels then this must use readMVar
Otherwise takeMVar stream would be fine | module Chan where
import Control.Concurrent hiding (Chan)
import Control.Concurrent.STM hiding (TChan)
type Stream a = MVar (Item a)
data Item a = Item a (Stream a)
data Chan a = Chan (MVar (Stream a)) (MVar (Stream a))
newChan :: IO (Chan a)
newChan = do
hole <- newEmptyMVar
readVar <- newMVar hole
... |
c074cd64af986018bb8bf153ea0fc2bcffc91a19d5e6983946b8d0699ba6ad34 | CryptoKami/cryptokami-core | Abstract.hs | {-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE RankNTypes #-}
-- | Network Transport
module Network.Transport.Abstract
( -- * Types
Transport(..)
, EndPoint(..)
, Connection(..)
, Event(..)
, QDi... | null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/networking/src/Network/Transport/Abstract.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE DeriveGeneric #
# LANGUAGE RankNTypes #
| Network Transport
* Types
* Hints
* Error codes
------------------------------------------------------------------------------
Main API ... | # LANGUAGE GeneralizedNewtypeDeriving #
module Network.Transport.Abstract
Transport(..)
, EndPoint(..)
, Connection(..)
, Event(..)
, QDisc(..)
, NT.ConnectionId
, NT.ConnectionBundle
, NT.Reliability(..)
, NT.EndPointAddress(..)
, NT.ConnectHints(..)
, NT.defaultConnectHints
, NT.TransportEr... |
1d7e0e83a9e77b751cdaf1e448149e4b51fe61e75913adf26c8995782c63208e | ucsd-progsys/dsolve | na_insertsort-e.ml | DSOLVE -dontminemlq
let swap a i j =
let tmpj = Junkarray2.get a j in
let tmpi = Junkarray2.get a i in
Junkarray2.set a i tmpj;
Junkarray2.set a j tmpi
let insertSort arr start n =
let limit = start + n in
let start_plus = start + 1 in
let rec outer i =
let i_plus = i + 1 in
if limit < i... | null | https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/negtests/na_insertsort-e.ml | ocaml | DSOLVE -dontminemlq
let swap a i j =
let tmpj = Junkarray2.get a j in
let tmpi = Junkarray2.get a i in
Junkarray2.set a i tmpj;
Junkarray2.set a j tmpi
let insertSort arr start n =
let limit = start + n in
let start_plus = start + 1 in
let rec outer i =
let i_plus = i + 1 in
if limit < i... | |
7121cbec742c8f71698cd1dbfe4c2cfe8bcacc99b6b4ca14509c12f78030272c | ideas-edu/ideas | Difference.hs | -----------------------------------------------------------------------------
Copyright 2019 , Ideas project team . This file is distributed under the
terms of the Apache License 2.0 . For more information , see the files
" LICENSE.txt " and " NOTICE.txt " , which are included in the distribution .
-------... | null | https://raw.githubusercontent.com/ideas-edu/ideas/f84907f92a8c407b7313f99e65a08d2646dc1565/src/Ideas/Common/Rewriting/Difference.hs | haskell | ---------------------------------------------------------------------------
---------------------------------------------------------------------------
|
Maintainer :
Stability : provisional
into account.
---------------------------------------------------------------------------
returns a result ... | Copyright 2019 , Ideas project team . This file is distributed under the
terms of the Apache License 2.0 . For more information , see the files
" LICENSE.txt " and " NOTICE.txt " , which are included in the distribution .
Portability : portable ( depends on ghc )
Compute the difference of two terms ... |
ec96c377e4f59ffb234d29cd1f29e084de90b0eea659b9e088d6940bd55efc12 | sansarip/owlbear | ts.cljs | (ns owlbear.generators.tree.ts
(:require-macros [hiccups.core :as hiccups :refer [html]])
(:require [cljstache.core :as fmt]
[clojure.string :as str]
[clojure.test.check.generators :as gen]
[oops.core :as oops]
[owlbear.generators.tree :as obgt]
[owlbear.g... | null | https://raw.githubusercontent.com/sansarip/owlbear/55cea7550a564ce8bf90db10e07ddd47d7f293e9/src/cljs/owlbear/generators/tree/ts.cljs | clojure |
================================================================================
Expressions
================================================================================
================================================================================
Statements
================================================... | (ns owlbear.generators.tree.ts
(:require-macros [hiccups.core :as hiccups :refer [html]])
(:require [cljstache.core :as fmt]
[clojure.string :as str]
[clojure.test.check.generators :as gen]
[oops.core :as oops]
[owlbear.generators.tree :as obgt]
[owlbear.g... |
4d0a8b849bc9e2d6197622fbfc020c54a7f3f0fd790f9f0e7f7e9d8cff2f595c | tomsmalley/semantic-reflex | Divider.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE RecursiveDo #-}
# LANGUAGE RecordWildCards #
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
module Example.Sectio... | null | https://raw.githubusercontent.com/tomsmalley/semantic-reflex/5a973390fae1facbc4351b75ea59210d6756b8e5/semantic-reflex-example/src/Example/Section/Divider.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE QuasiQuotes #
# LANGUAGE RecursiveDo #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell # | # LANGUAGE FlexibleContexts #
# LANGUAGE RecordWildCards #
module Example.Section.Divider where
import Control.Lens
import Reflex.Dom.SemanticUI
import Reflex.Dom.Core (text)
import Example.QQ
import Example.Common
dividers :: forall t m. (MonadWidget t m, Prerender t m) => Section t m
dividers = Section... |
e5cf984e42f4ba0de39005b789cba53d5071771030210f2dc82c1e0147969c6f | singleheart/programming-in-haskell | ex3.hs | data Tree a
= Leaf a
| Node (Tree a) (Tree a)
balanced :: Tree a -> Bool
balanced (Leaf _) = True
balanced (Node l r) = abs (size l - size r) <= 1 && balanced l && balanced r
size :: Tree a -> Int
size (Leaf _) = 1
size (Node l r) = size l + size r
| null | https://raw.githubusercontent.com/singleheart/programming-in-haskell/80c7efc0425babea3cd982e47e121f19bec0aba9/ch08/ex3.hs | haskell | data Tree a
= Leaf a
| Node (Tree a) (Tree a)
balanced :: Tree a -> Bool
balanced (Leaf _) = True
balanced (Node l r) = abs (size l - size r) <= 1 && balanced l && balanced r
size :: Tree a -> Int
size (Leaf _) = 1
size (Node l r) = size l + size r
| |
44952bf4baaaa05772042d87af1308b56aa7267315b9d08c55c0a827a707db89 | jepsen-io/mongodb | list_append.clj | (ns jepsen.mongodb.list-append
"Elle list append workload"
(:require [clojure [pprint :refer [pprint]]]
[clojure.tools.logging :refer [info warn]]
[dom-top.core :refer [loopr
with-retry]]
[elle.list-append :as elle.list-append]
[jepse... | null | https://raw.githubusercontent.com/jepsen-io/mongodb/ff2f23a154bbd3b372dc5b6e8f14892ada3746d8/src/jepsen/mongodb/list_append.clj | clojure | me find what switch makes that timeout shorter. MaxCommitTime only affects
a *single* invocation of the transaction, not the retries. We work around
MongoDB *ignores* the DB and collection-level read and write concerns
within a transaction, which seems... bad, because it actually
*downgrades* safety if you chose h... | (ns jepsen.mongodb.list-append
"Elle list append workload"
(:require [clojure [pprint :refer [pprint]]]
[clojure.tools.logging :refer [info warn]]
[dom-top.core :refer [loopr
with-retry]]
[elle.list-append :as elle.list-append]
[jepse... |
28b1565451a4a519e31392f1eaa92d42265bd20e57dfb32533626477a33e6fe4 | Gbury/dolmen | statement.ml |
(* This file is free software, part of dolmen. See file "LICENSE" for more information. *)
(* Type definitions *)
type term = Term.t
type location = Loc.t
type abstract = {
id : Id.t;
ty : term;
loc : location;
attrs : term list;
}
type inductive = {
id : Id.t;
vars : term list;
cstrs : (Id.t * term l... | null | https://raw.githubusercontent.com/Gbury/dolmen/9688f7a6ab99c9c183084218de32285ff27f226f/src/standard/statement.ml | ocaml | This file is free software, part of dolmen. See file "LICENSE" for more information.
Type definitions
Description of statements.
Statements are wrapped in a record to have a location.
Dummy location
(* Debug printing
Pretty printing
* Annotations
Internal shortcut.
Pack
Push/Pop
Assumptions and fa... |
type term = Term.t
type location = Loc.t
type abstract = {
id : Id.t;
ty : term;
loc : location;
attrs : term list;
}
type inductive = {
id : Id.t;
vars : term list;
cstrs : (Id.t * term list) list;
loc : location;
attrs : term list;
}
type record = {
id : Id.t;
vars : term list;
fields : (... |
57cd252c7ec0df455947ab11101c444ec490e81e870f7360187ed1c99352bbf3 | untangled-web/sql-datomic | schema.clj | (ns sql-datomic.schema
(:require [datomic.api :as d]
[clojure.pprint :as pp]))
Blacklist of keyword namespaces to elide when looking at attrs .
(def system-ns #{ ;; s/ => untangled.datomic.schema
"confirmity" ;; conformity migration lib
"constrain... | null | https://raw.githubusercontent.com/untangled-web/sql-datomic/8a025fa66498ab683bd62ac6f689a8e10dc302da/src/sql_datomic/schema.clj | clojure | s/ => untangled.datomic.schema
conformity migration lib
s/reference-constraint-for-attribute
from lib of same name
s/entity-extensions | (ns sql-datomic.schema
(:require [datomic.api :as d]
[clojure.pprint :as pp]))
Blacklist of keyword namespaces to elide when looking at attrs .
"db"
"db.alter"
"db.bootstrap"
"db.cardinality"
"db.excise"
... |
ffae247e904ade9a3f33823ce0720b5a5646a7980674b6e71147d807fb97529b | bostonaholic/clojure.jdbc-c3p0 | c3p0.clj | Copyright 2014 - 2015 < >
;;
Licensed under the Apache License , Version 2.0 ( the " License " )
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;; -2.0
;;
;; Unless required by applicable law or agreed to in writing, software
distributed un... | null | https://raw.githubusercontent.com/bostonaholic/clojure.jdbc-c3p0/74bd34130235f22ba3a0fd2038915d64e90f77bd/src/jdbc/pool/c3p0.clj | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright 2014 - 2015 < >
Licensed under the Apache License , Version 2.0 ( the " License " )
distributed under the License is distributed on an " AS IS " BASIS ,
(ns jdbc.pool.c3p0
(:require [clojure.string :as str]
[clojure.walk :as walk])
(:import com.mchange.v2.c3p0.ComboPooledDataSource
... |
18df665a1b59b48e9e161b2875cd8679604f090a8903e5b84a4014aa50a31c13 | static-analysis-engineering/codehawk | jCHXInitializeAnalysis.ml | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Java Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Copy... | null | https://raw.githubusercontent.com/static-analysis-engineering/codehawk/98ced4d5e6d7989575092df232759afc2cb851f6/CodeHawk/CHJ/jchstac/jCHXInitializeAnalysis.ml | ocaml | * -----------------------------------------------------------------------------
Reads in all application jars, creates a dictionary of class names, field,
and method signatures and saves this dictionary to an xml file, named
<output_directory>/<project_name>_dictionary.xml .
-------------------------------... | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Java Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Copy... |
7b93d313b4a73b8a175118d1f7c501a3ef47e0b2e206dac383026f2f17da71d4 | kcsongor/generic-lens | Subtype.hs | # LANGUAGE MonoLocalBinds #
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
{-... | null | https://raw.githubusercontent.com/kcsongor/generic-lens/8e1fc7dcf444332c474fca17110d4bc554db08c8/generic-lens-core/src/Data/Generics/Sum/Internal/Subtype.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators #
# LANGUAGE TypeSynonymInstances #
---------------------------------------------------------------------------
|
Module : Data.Generics.Sum.Int... | # LANGUAGE MonoLocalBinds #
# LANGUAGE AllowAmbiguousTypes #
# LANGUAGE FlexibleInstances #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
# LANGUAGE TypeApplications #
# LANGUAGE UndecidableInstances #
Copyright : ( C ) 2020
Mainta... |
8db648a1ee4a0f6f37510602c58455e865787ea0b3b6eca02c11a1c2a1bd2a50 | RolfRolles/PandemicML | X86PredicateEvaluator.ml | open X86Predicate
let truncate_to i32 = function
| S32 -> (i32,S32)
| S16 -> (Int32.logand 0xffffl i32,S16)
| S8 -> (Int32.logand 0xffl i32,S8)
| S1 -> (Int32.logand 1l i32,S1)
let sign_aux mand mor i32 =
if Int32.logand i32 mand <> 0l
then Int32.logor mor i32
else i32
let sign_extend i32 = function
| S32 ->... | null | https://raw.githubusercontent.com/RolfRolles/PandemicML/9c31ecaf9c782dbbeb6cf502bc2a6730316d681e/Test/X86PredicateEvaluator.ml | ocaml | sl?
ul?
Both positive, compare directly
Cast to a larger size
Cast to a smaller size | open X86Predicate
let truncate_to i32 = function
| S32 -> (i32,S32)
| S16 -> (Int32.logand 0xffffl i32,S16)
| S8 -> (Int32.logand 0xffl i32,S8)
| S1 -> (Int32.logand 1l i32,S1)
let sign_aux mand mor i32 =
if Int32.logand i32 mand <> 0l
then Int32.logor mor i32
else i32
let sign_extend i32 = function
| S32 ->... |
a942fd2a93c8cafab7c12d6d22f26233355ec8ee484a98fd7335308fab909eec | BoeingX/haskell-programming-from-first-principles | IntermissionExercises.hs | module Lists.FilteringListsOfValues.IntermissionExercises where
Question 1
multiplesOfThree :: [Int] -> [Int]
multiplesOfThree = filter (\x -> x `rem` 3 == 0)
Question 2
howManyMultiplesOfThree :: [Int] -> Int
howManyMultiplesOfThree = length . multiplesOfThree
Question 3
removeArticles :: String -> [String]
r... | null | https://raw.githubusercontent.com/BoeingX/haskell-programming-from-first-principles/ffb637f536597f552a4e4567fee848ed27f3ba74/src/Lists/FilteringListsOfValues/IntermissionExercises.hs | haskell | module Lists.FilteringListsOfValues.IntermissionExercises where
Question 1
multiplesOfThree :: [Int] -> [Int]
multiplesOfThree = filter (\x -> x `rem` 3 == 0)
Question 2
howManyMultiplesOfThree :: [Int] -> Int
howManyMultiplesOfThree = length . multiplesOfThree
Question 3
removeArticles :: String -> [String]
r... | |
6e4f102a571acc6e0bec3ad30f72bde94bccfe46762174a7d3d41c4c43fa4eb7 | phoe/phoe-toolbox | phoe-toolbox.lisp | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; PHOE-TOOLBOX
" phoe " Herda 2017
;;;; phoe-toolbox.lisp
(in-package #:phoe-toolbox)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Indentation
(trivial-indent:define-indentation uiop:define... | null | https://raw.githubusercontent.com/phoe/phoe-toolbox/c8cfe4bf7d835e0a2e6dc61ad7984a75654bf1da/phoe-toolbox.lisp | lisp |
PHOE-TOOLBOX
phoe-toolbox.lisp
Indentation
else, it is printed with inserting BODY inside
All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, are permitted provided that the following
conditions are met:
notice, this list of conditions and the followi... | " phoe " Herda 2017
(in-package #:phoe-toolbox)
(trivial-indent:define-indentation uiop:define-package (4 2 &rest))
Macros
(defmacro define-constructor ((class . keys) &body body)
"Defines an INITIALIZE-INSTANCE :AFTER method on the given object."
`(defmethod initialize-instance :after ((,class ,class)
... |
82c13ac23ab482bdab949e4fc5f8510250144fcfb57785d8574cb9c5d9605107 | fyquah/hardcaml_arty | rtl_generator.ml | open Base
open Hardcaml
open Signal
type create_fn = Scope.t -> Signal.t User_application.I.t -> Signal.t User_application.O.t
module Top = struct
module I = struct
type 'a t =
{ reset : 'a
; sys_clock : 'a
; usb_uart_rx : 'a
; push_buttons_4bits : 'a [@bits 4]
; eth_mii ... | null | https://raw.githubusercontent.com/fyquah/hardcaml_arty/c4c0dc14fd26d423c46928be4c8a0910d18b48cf/src/infrastructure/rtl_generator.ml | ocaml | open Base
open Hardcaml
open Signal
type create_fn = Scope.t -> Signal.t User_application.I.t -> Signal.t User_application.O.t
module Top = struct
module I = struct
type 'a t =
{ reset : 'a
; sys_clock : 'a
; usb_uart_rx : 'a
; push_buttons_4bits : 'a [@bits 4]
; eth_mii ... | |
b377e98332e4931c8a121bce7cf3e95f22f652f92b43ac86578b23274eee1c41 | well-typed/optics | Optics.hs | -- | This module provides lenses and traversals for working with vectors.
module Data.Vector.Optics
( toVectorOf
*
, vector
, forced
-- * Lenses
, sliced
-- * Traversal of individual indices
, ordinals
) where
import Data.Vector (Vector)
import Optics.Core
import qualified Data.Vector.Generic.Optics... | null | https://raw.githubusercontent.com/well-typed/optics/7cc3f9c334cdf69feaf10f58b11d3dbe2f98812c/optics-extra/src/Data/Vector/Optics.hs | haskell | | This module provides lenses and traversals for working with vectors.
* Lenses
* Traversal of individual indices
$setup
>>> import Data.Vector as Vector
This is only a valid 'Lens' if you do not change the length of the resulting
'Vector'.
Attempting to return a longer or shorter vector will result in violat... | module Data.Vector.Optics
( toVectorOf
*
, vector
, forced
, sliced
, ordinals
) where
import Data.Vector (Vector)
import Optics.Core
import qualified Data.Vector.Generic.Optics as G
| i n@ provides a ' Lens ' that edits the @n@ elements starting at
index @i@ from a ' Lens ' .
> > > Vector.from... |
34485961c837cdde12ea423477d61a7aa794cd672713c5ca5dc8defe38b08e10 | ryukinix/discrete-mathematics | exercises.hs | {-- A Compilation of the Exercises of Chapter 1
INTRODUCTION TO HASKELL
--}
- Operators , Functions and basic Types ( Lists , Strings , Int , , Tuple ) -
Exercise 3 .
-- Write a function that takes a character and returns True
-- if the character is 'a' and False otherwise
ex3 :: Char -> Bool
ex3 'a' = Tr... | null | https://raw.githubusercontent.com/ryukinix/discrete-mathematics/1f779e05822c094af33745e2dd3c9a35c6dfb388/src/01-introduction-to-haskell/exercises.hs | haskell | - A Compilation of the Exercises of Chapter 1
INTRODUCTION TO HASKELL
-
Write a function that takes a character and returns True
if the character is 'a' and False otherwise
Write a function that takes a string and returns True if
the string is "hello" and false otherwise. This can be done
by specifying each ... |
- Operators , Functions and basic Types ( Lists , Strings , Int , , Tuple ) -
Exercise 3 .
ex3 :: Char -> Bool
ex3 'a' = True
ex3 c = False
Exercise 4 .
ex4 :: String -> Bool
ex4 "hello" = True
ex4 s = False
Exercise 5 .
ex5 :: String -> String
ex5 (' ':x) = x
ex5 x = x
Exercise 6
Each number is ... |
466e97bd566678ff2ea1356957bad9a5c3f71cb5d5e1adcb2094b06586d62f26 | facebook/pyre-check | ignore.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/pyre-check/98b8362ffa5c715c708676c1a37a52647ce79fe0/source/ast/ignore.ml | ocaml | TODO(T132410158) Add a module-level doc comment. |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... |
441aeb37fad0e1afb07956175c01c26888469dca3f5e3409d1455836aee30b2d | S8A/htdp-exercises | ex294.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 ex294) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-... | null | https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex294.rkt | racket | about the language level of this file in a form that our tools can easily process.
X [List-of X] -> [Maybe N]
of x in l, #false otherwise
X [List-of X] -> [ [Maybe N] -> Boolean ] | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex294) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
determine the index of the first occurrence
(define (... |
eec0e2f534b8da19c87d8d03cf7435a6ee28527a46ec036adc664c8486852110 | ngrunwald/meta-csv | core.cljc | (ns meta-csv.core
(:require [clojure.java.io :as io]
[clojure.string :as str]
[clojure.spec.alpha :as s]
[meta-csv.parser :as parser]
[medley.core :as med])
(:import [java.io Reader BufferedReader File StringReader]
[java.util Collection]
#?@(:bb... | null | https://raw.githubusercontent.com/ngrunwald/meta-csv/4f78122643a5299c286fe9ca3a7d59aee874efdf/src/meta_csv/core.cljc | clojure | use file -bi later if present to try a guess
#?(:bb
nil
:clj
^CsvReader [{:keys [delimiter skip-empty-rows? header?
text-delimiter error-on-different-field-count?]}]
(when delimiter (.setFieldSeparator reader delimiter))
(when header? (.setContainsHeader reader ... | (ns meta-csv.core
(:require [clojure.java.io :as io]
[clojure.string :as str]
[clojure.spec.alpha :as s]
[meta-csv.parser :as parser]
[medley.core :as med])
(:import [java.io Reader BufferedReader File StringReader]
[java.util Collection]
#?@(:bb... |
9ca4f8b0004fa592cd88ebe117e8af58cef6475ebb5a65e3ab19701633047daf | oral-health-and-disease-ontologies/ohd-ontology | eaglesoft-dental-providers.lisp | ;;****************************************************************
Instructions for being able to connect to Eaglesoft database
;;
;; Ensure that the r21 system file is loaded.
;; For details see comment at top of r21-utilities.lisp
;;****************************************************************
;; Database prepa... | null | https://raw.githubusercontent.com/oral-health-and-disease-ontologies/ohd-ontology/ba3f502b86487c8ba5fa04ff8ba33312a1679570/src/r21-study/eaglesoft-dental-providers.lisp | lisp | ****************************************************************
Ensure that the r21 system file is loaded.
For details see comment at top of r21-utilities.lisp
****************************************************************
Database preparation:
When get-eaglesoft-dental-providers-ont is ran, the program verifi... | Instructions for being able to connect to Eaglesoft database
(defun get-eaglesoft-dental-providers-ont
(&key dental-organization-id r21-provider-id limit-rows force-create-table)
"Returns an ontology of the dental providers contained in the Eaglesoft database. The dental-organization-id is needed in cases w... |
5a33a8e0e4b6954c6830ac0ef5450d9e79e948b99f2e80a2e5a0cce14a5f9dd2 | slyrus/abcl | restart.lisp | ;;; restart.lisp
;;;
Copyright ( C ) 2003 - 2005
$ Id$
;;;
;;; This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation ; either version 2
of the License , or ( at your option ) any later version .
... | null | https://raw.githubusercontent.com/slyrus/abcl/881f733fdbf4b722865318a7d2abe2ff8fdad96e/src/org/armedbear/lisp/restart.lisp | lisp | restart.lisp
This program is free software; you can redistribute it and/or
either version 2
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License fo... | Copyright ( C ) 2003 - 2005
$ Id$
modify it under the terms of the GNU General Public License
of the License , or ( at your option ) any later version .
You should have received a copy of the GNU General Public License
Foundation , Inc. , 59 Temple Place - Suite 330 , Boston , MA 02111 - 1307 , USA .
... |
658b5387321b6c97dbdf83520ae383857316ed3c9783c628d217009ce133cb86 | AccelerateHS/accelerate-examples | Issue288.hs | --
--
module Test.Issues.Issue288 (test_issue288)
where
import Config
import Test.Framework
import Test.Framework.Providers.HUnit
import Prelude as P
import Data.Array.Accelerate as A
import Data.Array.Accelerate.Examples.Internal... | null | https://raw.githubusercontent.com/AccelerateHS/accelerate-examples/a973ee423b5eadda6ef2e2504d2383f625e49821/examples/icebox/nofib/Test/Issues/Issue288.hs | haskell |
module Test.Issues.Issue288 (test_issue288)
where
import Config
import Test.Framework
import Test.Framework.Providers.HUnit
import Prelude as P
import Data.Array.Accelerate as A
import Data.Array.Accelerate.Examples.Internal ... | |
e4fd03dae9d1707d0e5cd7dc1aeb48b36bbe81b1f81fd1a1212b6be1d288f26e | danstiner/hfmt | ExitCode.hs | module ExitCode
( exitCode
, helpDoc
, operationalFailureCode
, sourceParseFailureCode
) where
import Types
import System.Exit
import Text.PrettyPrint.ANSI.Leijen
-- | Decide which exit code to use
--
Assume if we are printing diffs that we * are * being run in a CI and so
-- should exit with failure if ... | null | https://raw.githubusercontent.com/danstiner/hfmt/1a613954462011e6627e11f9ad76af79d0f7ff2b/app/ExitCode.hs | haskell | | Decide which exit code to use
should exit with failure if any format differences were found. Otherwise
failure of the tool to operate properly.
| Encountered I/O or other operational error
| Failed to parse a source code file
| Formatted code differs from existing source code | module ExitCode
( exitCode
, helpDoc
, operationalFailureCode
, sourceParseFailureCode
) where
import Types
import System.Exit
import Text.PrettyPrint.ANSI.Leijen
Assume if we are printing diffs that we * are * being run in a CI and so
assume we are being run in a context where non - zero exit indicate... |
3abad7942af4ca0a51f4b5446c3dd5ceee5351d8386d60b3e649a0c63b4560f6 | funkywork/nightmare | router.mli | MIT License
Copyright ( c ) 2023 funkywork
Permission is hereby granted , free of charge , to any person obtaining a copy
of this software and associated documentation files ( the " Software " ) , to deal
in the Software without restriction , including without limitation the rights
to... | null | https://raw.githubusercontent.com/funkywork/nightmare/05858823d01925cb8cb02a6b29ed8a223822a0e8/lib/dream/router.mli | ocaml | * [run ~services fallback request] defines a [Middleware] that tries to match
a route, and relays on [fallback] if no route is candidate. | MIT License
Copyright ( c ) 2023 funkywork
Permission is hereby granted , free of charge , to any person obtaining a copy
of this software and associated documentation files ( the " Software " ) , to deal
in the Software without restriction , including without limitation the rights
to... |
42cbef3f1843cc653225c25bfd355b5f25dfeed20026c2d611384a2c6ffd296b | thheller/shadow-cljs | ring_gzip.clj | (ns shadow.cljs.devtools.server.ring-gzip
{:doc "Ring gzip compression."
:source "-gzip/blob/master/src/ring/middleware/gzip.clj"}
(:require [clojure.java.io :as io])
(:import (java.io InputStream
Closeable
File
PipedInputStream
Pi... | null | https://raw.githubusercontent.com/thheller/shadow-cljs/ba0a02aec050c6bc8db1932916009400f99d3cce/src/main/shadow/cljs/devtools/server/ring_gzip.clj | clojure | Be aggressive in supporting clients with mangled headers (due to
Set Vary to make sure proxies don't deliver the wrong content. | (ns shadow.cljs.devtools.server.ring-gzip
{:doc "Ring gzip compression."
:source "-gzip/blob/master/src/ring/middleware/gzip.clj"}
(:require [clojure.java.io :as io])
(:import (java.io InputStream
Closeable
File
PipedInputStream
Pi... |
900999c23a9ad0b2702c11652a7fe5663052a85ee37298ec3cc72363eb43b29f | abailly/dojo-nantes | Tests.hs | module Tests where
import Test.HUnit
import M
test1 = TestList [
rempliLigne [] ~?= 0
, rempliLigne [0] ~?= 0
, rempliLigne [0, 0] ~?= 0
, rempliLigne [1, 0, 1] ~?= 1
, rempliLigne [1, 0, 0, 1] ~?= 2
, rempliLigne [1, 1, 0, 1] ~?= 1
, rempliLigne [0, 1, 0, 1] ~?= 1
]
tests = TestList [
test1
]
... | null | https://raw.githubusercontent.com/abailly/dojo-nantes/31600a7c74d540cb0c7d4b0c5cbe239f9a2104ac/2014-06-06/Tests.hs | haskell | module Tests where
import Test.HUnit
import M
test1 = TestList [
rempliLigne [] ~?= 0
, rempliLigne [0] ~?= 0
, rempliLigne [0, 0] ~?= 0
, rempliLigne [1, 0, 1] ~?= 1
, rempliLigne [1, 0, 0, 1] ~?= 2
, rempliLigne [1, 1, 0, 1] ~?= 1
, rempliLigne [0, 1, 0, 1] ~?= 1
]
tests = TestList [
test1
]
... | |
4ef7be9550e0310c2aff56a5f6879db6d11036429bbbbd539266fc37e6da61c7 | tokiwoousaka/CatCat | CatCat.hs | module Language.CatCat where
import Language.CatCat.Parser
| null | https://raw.githubusercontent.com/tokiwoousaka/CatCat/3ecc40781f70e48bbb9b4bede01afc8f1e1e2304/src/Language/CatCat.hs | haskell | module Language.CatCat where
import Language.CatCat.Parser
| |
fcf39140b68bf6959a86d84d09bfa94deab5e5029329fc4ce66208db254c2060 | ekmett/distributive | Internal.hs | {-# Language CPP #-}
{-# Language DerivingVia #-}
# Language GeneralizedNewtypeDeriving #
{-# Language Unsafe #-}
{-# options_haddock hide #-}
module Data.Vec.Internal
( Vec(UnsafeVec,Vec,toVector)
, pattern V
, FromVector(..)
, withDim
) where
import Control.Monad
import Control.Monad.Reader.Class
import Control.Mon... | null | https://raw.githubusercontent.com/ekmett/distributive/6728858c636b2ee07c7f8fc39f674afd5e9317b9/src/Data/Vec/Internal.hs | haskell | # Language CPP #
# Language DerivingVia #
# Language Unsafe #
# options_haddock hide #
# inline index #
# inlinable tabulate #
# inline withDim #
# complete V :: Vector #
# complete V :: [] # | # Language GeneralizedNewtypeDeriving #
module Data.Vec.Internal
( Vec(UnsafeVec,Vec,toVector)
, pattern V
, FromVector(..)
, withDim
) where
import Control.Monad
import Control.Monad.Reader.Class
import Control.Monad.Fix
import Control.Monad.Zip
import Data.Foldable.WithIndex
import Data.Function.Coerce
import Data.... |
b8e2705fabd2b724687f5e7e14090d99fa141db8715cd61e23e180621ba8f61b | awakesecurity/spectacle | Plain.hs | {-# OPTIONS_HADDOCK show-extensions #-}
-- |
-- Module : Language.Spectacle.Syntax.Plain
Copyright : ( c ) Arista Networks , 2022 - 2023
License : Apache License 2.0 , see LICENSE
--
-- Stability : stable
Portability : non - portable ( GHC extensions )
--
Plain or known variable usage an... | null | https://raw.githubusercontent.com/awakesecurity/spectacle/430680c28b26dabb50f466948180eb59ba72fc8e/src/Language/Spectacle/Syntax/Plain.hs | haskell | # OPTIONS_HADDOCK show-extensions #
|
Module : Language.Spectacle.Syntax.Plain
Stability : stable
@since 1.0.0
-------------------------------------------------------------------------------------------------
| 'plain' for a variable named @s@ is the value of @s@ from the previous frame of time.
@si... |
Copyright : ( c ) Arista Networks , 2022 - 2023
License : Apache License 2.0 , see LICENSE
Portability : non - portable ( GHC extensions )
Plain or known variable usage and substitution .
module Language.Spectacle.Syntax.Plain
( Plain (Plain),
Effect (PlainVar),
plain,
runPlain,
)... |
e60f965ff505a747c80adc5ca7516c6834073051dbacacc081d6f679dfac8274 | hexlet-codebattle/battle_asserts | xor.clj | (ns battle-asserts.issues.xor
(:require [clojure.test.check.generators :as gen]
[clojure.string :as s]
[faker.generate :as faker]))
(def level :easy)
(def disabled true)
(def tags ["bits-operation" "strings"])
(def description
{:en "Given two strings, return a string generated by XORing ... | null | https://raw.githubusercontent.com/hexlet-codebattle/battle_asserts/3d92dfc8be2379742e554ee1b6e3878372fe9e78/src/battle_asserts/issues/xor.clj | clojure | (ns battle-asserts.issues.xor
(:require [clojure.test.check.generators :as gen]
[clojure.string :as s]
[faker.generate :as faker]))
(def level :easy)
(def disabled true)
(def tags ["bits-operation" "strings"])
(def description
{:en "Given two strings, return a string generated by XORing ... | |
24c25b11232a11192c1e51df48e3ce3ae88ee4c00fc7bb7669c3ca179aeb5e16 | plumatic/grab-bag | math_test.clj | (ns plumbing.math-test
(:use clojure.test plumbing.math plumbing.test))
(deftest entropy-test
(let [dist (fn [xs]
(map #(double (/ % (count xs)))
(vals (frequencies xs))))]
(testing "dist"
(is-=-by sort [0.5 0.5] (dist [1 1 0 0]))
(is-=-by sort [0.25 0.75] (dist ... | null | https://raw.githubusercontent.com/plumatic/grab-bag/a15e943322fbbf6f00790ce5614ba6f90de1a9b5/lib/plumbing/test/plumbing/math_test.clj | clojure | (ns plumbing.math-test
(:use clojure.test plumbing.math plumbing.test))
(deftest entropy-test
(let [dist (fn [xs]
(map #(double (/ % (count xs)))
(vals (frequencies xs))))]
(testing "dist"
(is-=-by sort [0.5 0.5] (dist [1 1 0 0]))
(is-=-by sort [0.25 0.75] (dist ... | |
1e8bb63c2f3bf1aee7991b3cbf8d2adcce596cd923f0e4a808a43bd596afd55d | picty/parsifal | tar9.ml | open Lwt
open LwtUtil
open Parsifal
open BasePTypes
open PTypes
enum file_type (8, UnknownVal UnknownFileType) =
| 0 -> NormalFile
| 0x30 -> NormalFile
| 0x31 -> HardLink
| 0x32 -> SymbolicLink
| 0x33 -> CharacterSpecial
| 0x34 -> BlockSpecial
| 0x35 -> Directory
| 0x36 -> FIFO
| 0x37 -> ContiguousF... | null | https://raw.githubusercontent.com/picty/parsifal/767a1d558ea6da23ada46d8d96a057514b0aa2a8/tutorial/tar-steps/tar9.ml | ocaml | open Lwt
open LwtUtil
open Parsifal
open BasePTypes
open PTypes
enum file_type (8, UnknownVal UnknownFileType) =
| 0 -> NormalFile
| 0x30 -> NormalFile
| 0x31 -> HardLink
| 0x32 -> SymbolicLink
| 0x33 -> CharacterSpecial
| 0x34 -> BlockSpecial
| 0x35 -> Directory
| 0x36 -> FIFO
| 0x37 -> ContiguousF... | |
7cb9444685b0e850b7fe817fe8fa6bc6be76c314c0656024088fc00887c65e7c | polymeris/re-frame-realword-example-app | core.cljs | (ns conduit.core
(:require [reagent.core :as reagent]
[re-frame.core :as re-frame]
[re-frisk.core :refer [enable-re-frisk!]]
[conduit.events]
[conduit.subs]
[conduit.routes :as routes]
[conduit.views.core :as views]
[c... | null | https://raw.githubusercontent.com/polymeris/re-frame-realword-example-app/f57f3f62551bf9a13be1c5561ec3acc6eea1ca46/src/cljs/conduit/core.cljs | clojure | (ns conduit.core
(:require [reagent.core :as reagent]
[re-frame.core :as re-frame]
[re-frisk.core :refer [enable-re-frisk!]]
[conduit.events]
[conduit.subs]
[conduit.routes :as routes]
[conduit.views.core :as views]
[c... | |
36acb8e133502ccc4af18a66f138a317021b564a5de8288d07cbd0c15fabd851 | jeapostrophe/remix | info.rkt | #lang info
(define version "0.0")
(define collection "remix")
(define deps '("base"
"at-exp-lib"
"rackunit-lib"
"datalog"))
(define build-deps '("scribble-doc"
"rackunit-lib"
"base"
"racket-doc"
... | null | https://raw.githubusercontent.com/jeapostrophe/remix/982529019d12252b5f6ab49c17a1a8283ccfb9df/info.rkt | racket | #lang info
(define version "0.0")
(define collection "remix")
(define deps '("base"
"at-exp-lib"
"rackunit-lib"
"datalog"))
(define build-deps '("scribble-doc"
"rackunit-lib"
"base"
"racket-doc"
... | |
f914f4a1eb798bb3d7ec465461bc83a4456f80977c00f48de1695709ed9ade95 | samrat/ecstatic | core_test.clj | (ns ecstatic.core-test
(:use clojure.test
ecstatic.core
ecstatic.io
ecstatic.dummy-fs)
(:require [fs.core :as fs]))
(defn dummy-fs-fixture [f]
(create-dummy-fs)
(create-site "test-site/src" "test-site/_site")
(f)
(fs/delete-dir "test-site"))
(use-fixtures :once dummy-fs-fixture)
(... | null | https://raw.githubusercontent.com/samrat/ecstatic/ee7e33eef6baec1a4f0b80453c1c477058e0a707/test/ecstatic/core_test.clj | clojure | (ns ecstatic.core-test
(:use clojure.test
ecstatic.core
ecstatic.io
ecstatic.dummy-fs)
(:require [fs.core :as fs]))
(defn dummy-fs-fixture [f]
(create-dummy-fs)
(create-site "test-site/src" "test-site/_site")
(f)
(fs/delete-dir "test-site"))
(use-fixtures :once dummy-fs-fixture)
(... | |
d2f2d8c8c2f374140db68ea60e7873cac2d4b3efa83cd2cdc7901ed707811555 | ghcjs/jsaddle-dom | HTMLTimeElement.hs | # LANGUAGE PatternSynonyms #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.HTMLTimeElement
(setDateTime, getDateTime, HTMLTimeElement(..),
gTypeHTMLTimeElement)
where
import P... | null | https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/HTMLTimeElement.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | # LANGUAGE PatternSynonyms #
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.HTMLTimeElement
(setDateTime, getDateTime, HTMLTimeElement(..),
gTypeHTMLTimeElement)
where
import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fromIntegral, rou... |
7e655e63a2e037ced4dbf360c4f5e7744ca35a49735adb7842d0a5e66b48a2c3 | VERIMAG-Polyhedra/VPL | ZArith_dec.ml | open BinInt
open BinNums
open Datatypes
open Specif
type __ = Obj.t
let __ = let rec f _ = Obj.repr f in Obj.repr f
(** val coq_Zcompare_rect :
coq_Z -> coq_Z -> (__ -> 'a1) -> (__ -> 'a1) -> (__ -> 'a1) -> 'a1 **)
let coq_Zcompare_rect n m h1 h2 h3 =
let c = Z.compare n m in
(match c with
| Eq -> h1 __
... | null | https://raw.githubusercontent.com/VERIMAG-Polyhedra/VPL/cd78d6e7d120508fd5a694bdb01300477e5646f8/ocaml/extracted/ZArith_dec.ml | ocaml | * val coq_Zcompare_rect :
coq_Z -> coq_Z -> (__ -> 'a1) -> (__ -> 'a1) -> (__ -> 'a1) -> 'a1 *
* val coq_Z_lt_ge_dec : coq_Z -> coq_Z -> bool *
* val coq_Z_lt_le_dec : coq_Z -> coq_Z -> bool *
absurd case
absurd case
* val coq_Z_dec' : coq_Z -> coq_Z -> bool sumor * | open BinInt
open BinNums
open Datatypes
open Specif
type __ = Obj.t
let __ = let rec f _ = Obj.repr f in Obj.repr f
let coq_Zcompare_rect n m h1 h2 h3 =
let c = Z.compare n m in
(match c with
| Eq -> h1 __
| Lt -> h2 __
| Gt -> h3 __)
* coq_Zcompare_rec :
coq_Z - > coq_Z - > ( _ _ - > ' a1 ) - >... |
1fb5a4301fe22d6e051052391e169602edacfc4a171647bc81886b8fcd95a010 | hrefhref/styx | styx_sup.erl | %%%-------------------------------------------------------------------
%% @doc styx top level supervisor.
%% @end
%%%-------------------------------------------------------------------
-module(styx_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(SERVER, ?MODULE).
start_link() ->
... | null | https://raw.githubusercontent.com/hrefhref/styx/fd639a6f74d3a2c4cdcc18f5191c101cd41f289b/apps/styx/src/styx_sup.erl | erlang | -------------------------------------------------------------------
@doc styx top level supervisor.
@end
-------------------------------------------------------------------
sup_flags() = #{strategy => strategy(), % optional
intensity => non_neg_integer(), % optional
optional
child_spec() =... |
-module(styx_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(SERVER, ?MODULE).
start_link() ->
supervisor:start_link({local, ?SERVER}, ?MODULE, []).
init([]) ->
SupFlags = #{strategy => one_for_all,
intensity => 0,
period => 1},
Chil... |
de2a8c44e7adc285ae08ca1d76f8a9d702724f3fb09b5a400bde598416044aea | commercialhaskell/haskelldocumentation | LogParser.hs | module LogParser where
Full disclosure : this exercise is heavly inspired by a homework assignment
from the brilliant course , CIS194 at University of Pennsylvania
( /~cis194/ ) .
If you want to learn more on your own the course material is
online and waiting for you :)
= = = = ... | null | https://raw.githubusercontent.com/commercialhaskell/haskelldocumentation/55a809dc00406acf158d158f2d7aa46f31b57e68/exercises/LogParser/LogParser.hs | haskell | module LogParser where
Full disclosure : this exercise is heavly inspired by a homework assignment
from the brilliant course , CIS194 at University of Pennsylvania
( /~cis194/ ) .
If you want to learn more on your own the course material is
online and waiting for you :)
= = = = ... | |
5793351a5f872208b41102b324c79f098e551175c94772efdea02a2c1f4e579f | skanev/playground | 66.scm | SICP exercise 3.66
;
; Examine the stream (pairs integers integers). Can you make any general
; comments about the order in which the pairs are placed into the stream? For
example , approximately how many pairs precede the pair ( 1 , 100 ) ? the pair
( 99 , 100 ) ? the pair ( 100 , 100 ) ? ( If you can make preci... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/03/66.scm | scheme |
Examine the stream (pairs integers integers). Can you make any general
comments about the order in which the pairs are placed into the stream? For
statements here, all the better. But feel free to give more qualitative
answers if you find yourself getting bogged down.)
The stream looks like this:
we get this:
... | SICP exercise 3.66
example , approximately how many pairs precede the pair ( 1 , 100 ) ? the pair
( 99 , 100 ) ? the pair ( 100 , 100 ) ? ( If you can make precise mathematical
( 1 1 )
( 1 2 )
( 2 2 )
( 1 3 )
( 2 3 )
( 1 4 )
( 3 3 )
( 1 5 )
( 2 4 )
( 1 6 )
( 3 4 )
... |
0e196d1fa9906507823eaf165443a7fad7d5e96aec1498db87b5272f190dc0ae | kendroe/CoqRewriter | match.ml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* REWRITELIB
*
* match.ml
*
* ( C ) 2017 ,
*
* This prog... | null | https://raw.githubusercontent.com/kendroe/CoqRewriter/ddf5dc2ea51105d5a2dc87c99f0d364cf2b8ebf5/plugin/src/match.ml | ocaml | require "list.sml" ;
require "env.sml" ;
require "exp.sml" ;
require "expint.sml" ;
require "subst.sml" ;
require "context.sml" ;
require "cache.sml" ;
require "match-s.sml" ;
require "basis.__integer" ;
open listimpl ;
open EXP_INTERNimpl ;
open CONTEXTimpl ; | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* REWRITELIB
*
* match.ml
*
* ( C ) 2017 ,
*
* This prog... |
4cfe479a3eb0bb6943e50da9a50a53b16b9f7f0cadbc3894c616972cc1ba80a1 | channable/alfred-margaret | BoyerMooreCISpec.hs | {-# LANGUAGE BangPatterns #-}
{-# LANGUAGE OverloadedStrings #-}
module Data.Text.BoyerMooreCISpec
( spec
) where
import Control.Monad (forM_)
import Test.Hspec (Spec, describe, it, shouldBe, parallel)
import Test.Hspec.QuickCheck (modifyMaxSuccess, prop)
import Data.Text (Text)
import Test.QuickCheck (Arbitrary... | null | https://raw.githubusercontent.com/channable/alfred-margaret/be96f07bb74c5aa65ce01d664de5d98badbee307/tests/Data/Text/BoyerMooreCISpec.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE OverloadedStrings #
The match positions are byte indices (not char indices).
This is an interesting case for badCharLookup, because the mismatch
The match position should be relative to the start of the text "a".
Even if this text is represented as a slice of "bbba" internally.
... |
module Data.Text.BoyerMooreCISpec
( spec
) where
import Control.Monad (forM_)
import Test.Hspec (Spec, describe, it, shouldBe, parallel)
import Test.Hspec.QuickCheck (modifyMaxSuccess, prop)
import Data.Text (Text)
import Test.QuickCheck (Arbitrary (arbitrary, shrink), forAllShrink)
import Test.QuickCheck.Instan... |
23083733c4f0bdabb5b46b9f244840ad76e3309b1fd45e4a1754f9cfc5307ae3 | winterland1989/magic-haskell | Lens.hs | {-# LANGUAGE Rank2Types #-}
module Lens where
import Data.Functor.Identity (Identity(..))
import Control.Applicative (Const(..))
import Data.Function ((&))
--------------------------------------------------------------------------------
over :: ((a -> Identity a) -> b -> Identity b) -> (a -> a) -> b ->... | null | https://raw.githubusercontent.com/winterland1989/magic-haskell/027362d7feb175b10eafa6f12873009ae7e0fb57/code/Lens.hs | haskell | # LANGUAGE Rank2Types #
------------------------------------------------------------------------------
------------------------------------------------------------------------------
中缀版本view
中缀版本set |
module Lens where
import Data.Functor.Identity (Identity(..))
import Control.Applicative (Const(..))
import Data.Function ((&))
over :: ((a -> Identity a) -> b -> Identity b) -> (a -> a) -> b -> b
over lens f x = runIdentity $ lifted x
where
lifted = lens (Identity . f)
set :: ((a -> Identity a)... |
2b20e1519a56ad81660e6b7b7dc1e32c4d2df6e22af0ad0788e9202df3f1a848 | binaryage/cljs-oops | core.cljs | (ns oops.core
"The main namespace to be consumed by library users from ClojureScript.
Provides core macros via core.clj and runtime support (see runtime.clj).
(ns your-project.namespace
(:require [oops.core :refer [oget oset! ocall oapply ocall! oapply!
oget+ oset!+... | null | https://raw.githubusercontent.com/binaryage/cljs-oops/cce2e4790249ed99fdf94c1815d1a442d585be3d/src/lib/oops/core.cljs | clojure | -- diagnostics reporting --------------------------------------------------------------------------------------------------
-- runtime support for macros ---------------------------------------------------------------------------------------------
work around -11-04-release#_google_closure_library_goog_module_global... | (ns oops.core
"The main namespace to be consumed by library users from ClojureScript.
Provides core macros via core.clj and runtime support (see runtime.clj).
(ns your-project.namespace
(:require [oops.core :refer [oget oset! ocall oapply ocall! oapply!
oget+ oset!+... |
4bc7ad8918d264885c2156d11e87135eee3fb9ffd1eeed264ef02708db8f1f84 | janestreet/hardcaml | fifo_intf.ml | open Base
module type Config = sig
val data_width : int
val capacity : int
val showahead : bool
end
module T = struct
type 'a t =
{ q : 'a
; full : 'a
; empty : 'a
; nearly_full : 'a
; nearly_empty : 'a
; used : 'a
}
[@@deriving sexp_of, hardcaml]
type 'a create_params =
* def... | null | https://raw.githubusercontent.com/janestreet/hardcaml/4126f65f39048fef5853ba9b8d766143f678a9e4/src/fifo_intf.ml | ocaml | * default is [depth-1] *
* default is [true]
* default is [empty] *
* default is [true]
to override naming prefix
* default is [false]
* Create FIFO using interfaces.
* Create fifo using read-before-write ram only. It may still be used in showahead
mode and include an extra register stage. Latency is slig... | open Base
module type Config = sig
val data_width : int
val capacity : int
val showahead : bool
end
module T = struct
type 'a t =
{ q : 'a
; full : 'a
; empty : 'a
; nearly_full : 'a
; nearly_empty : 'a
; used : 'a
}
[@@deriving sexp_of, hardcaml]
type 'a create_params =
* def... |
b1c69573797de1eb7e2e2542c3d028cb9fb376719b10afed308d4baf6fc67d5c | tweag/ormolu | comment-multiline-after-out.hs | foo ::
-- | start index
Int ->
-- | length
Int ->
t a ->
t a
| null | https://raw.githubusercontent.com/tweag/ormolu/34bdf62429768f24b70d0f8ba7730fc4d8ae73ba/data/examples/other/comment-multiline-after-out.hs | haskell | | start index
| length | foo ::
Int ->
Int ->
t a ->
t a
|
2cf335b2b4b3cde0a3c1d1f3dc4aafbc51e25ff8612ef0643a11947530b98765 | clojure-numerics/expresso | properties.clj | (ns numeric.expresso.properties
(:refer-clojure :exclude [== record?])
(:use [clojure.core.logic])
(:require [numeric.expresso.impl.pimplementation])
(:import [numeric.expresso.impl.pimplementation
Expression])
(:require [clojure.walk :as walk]
[clojure.core.matrix :as mat]
... | null | https://raw.githubusercontent.com/clojure-numerics/expresso/6905956b759aeff2fce9053910201e2877a2631b/src/main/clojure/numeric/expresso/properties.clj | clojure | The props multimethod is used to assign the right metadata to the symbols
during construction of expressions. Many protocol implementation are driven
by the functions in the metadata.
These predicates are contributed to core.matrix and the core.matrix predicates
will be used when they become available in a core.matrix ... | (ns numeric.expresso.properties
(:refer-clojure :exclude [== record?])
(:use [clojure.core.logic])
(:require [numeric.expresso.impl.pimplementation])
(:import [numeric.expresso.impl.pimplementation
Expression])
(:require [clojure.walk :as walk]
[clojure.core.matrix :as mat]
... |
c92f8da8bb584e841b8b71ff928ac54ed1bd1e64508fe327d8c363200ad3f74d | squirrel-prover/squirrel-prover | highTacticsArgs.mli | * Tactic argument conversion .
Includes [ TacticsArgs ]
Includes [TacticsArgs] *)
include module type of TacticsArgs
(*------------------------------------------------------------------*)
val convert_as_lsymb : parser_arg list -> lsymb option
val convert_args : Env.t -> parser_arg list -> esort -> Equiv.an... | null | https://raw.githubusercontent.com/squirrel-prover/squirrel-prover/d25b6dab570ea0e99915059a67599fd3a38caa8b/src/highTacticsArgs.mli | ocaml | ------------------------------------------------------------------ | * Tactic argument conversion .
Includes [ TacticsArgs ]
Includes [TacticsArgs] *)
include module type of TacticsArgs
val convert_as_lsymb : parser_arg list -> lsymb option
val convert_args : Env.t -> parser_arg list -> esort -> Equiv.any_form -> earg
|
35780130abfc26163f7f2bdfafbd1d89e4a8c688ecdc37c9e5693414d8973c47 | tweag/ormolu | multiline-out.hs | deriving instance
Eq
Foo
deriving stock instance
Show
Foo
deriving anyclass instance
ToJSON
Foo
deriving newtype instance
Data
Foo
deriving via
Foo
Int
instance
Triple
A
B
C
| null | https://raw.githubusercontent.com/tweag/ormolu/34bdf62429768f24b70d0f8ba7730fc4d8ae73ba/data/examples/declaration/deriving/multiline-out.hs | haskell | deriving instance
Eq
Foo
deriving stock instance
Show
Foo
deriving anyclass instance
ToJSON
Foo
deriving newtype instance
Data
Foo
deriving via
Foo
Int
instance
Triple
A
B
C
| |
3b8a967c39cdd0db5f58b0cb504946ecdfd45d09cfc306ed73a7af5bd816e50d | onedata/op-worker | storage_sync_monitoring.erl | %%%-------------------------------------------------------------------
@author
( C ) 2018 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%%--------------------------------------------------------------------
%%% @doc
Model responsible for saving information abo... | null | https://raw.githubusercontent.com/onedata/op-worker/b09f05b6928121cec4d6b41ce8037fe056e6b4b3/src/modules/datastore/models/storage/import/storage_sync_monitoring.erl | erlang | -------------------------------------------------------------------
--------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API
export for CT tests
datastore_model callbacks
=================================================... | @author
( C ) 2018 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
Model responsible for saving information about storage import scans .
@TODO VFS-6767 deprecated , included for upgrade procedure . Remove in next major release after 21.02 . * .
-module(storage_... |
27a7fdcc72e5d5a0ae50619cd65b9d3df38bed939d3c45595fb597db3fc16fbf | oklm-wsh/MrMime | convenience.ml | type 'a decoding = [ `Continue | `Error of Parser.err | `Done of 'a ]
type ('input, 'r) decoder =
{ src : 'input Input.t
; mutable i : Bytes.t
; mutable i_off : int
; mutable i_len : int
; mutable k : ('input, 'r) decoder -> 'r decoding }
let rec loop t = function
| Parser.Read { k; _ } -... | null | https://raw.githubusercontent.com/oklm-wsh/MrMime/4d2a9dc75905927a092c0424cff7462e2b26bb96/lib/convenience.ml | ocaml | type 'a decoding = [ `Continue | `Error of Parser.err | `Done of 'a ]
type ('input, 'r) decoder =
{ src : 'input Input.t
; mutable i : Bytes.t
; mutable i_off : int
; mutable i_len : int
; mutable k : ('input, 'r) decoder -> 'r decoding }
let rec loop t = function
| Parser.Read { k; _ } -... | |
66ce6689fcb02b037c50e5296f75682bd2d89a1064e05fcb1acc2bacbc5c2d81 | coq-community/vscoq | completionSuggester.ml | module CompactedDecl = Context.Compacted.Declaration
open Printer
let mk_hyp sigma d (env,l) =
let d' = CompactedDecl.to_named_context d in
let env' = List.fold_right Environ.push_named d' env in
let ids, typ = match d with
| CompactedDecl.LocalAssum (ids, typ) -> ids, typ
| CompactedDecl.LocalDef (ids,c,typ... | null | https://raw.githubusercontent.com/coq-community/vscoq/a5573a0c8f403924f7cf9fc20a573663eb72dbc5/language-server/dm/completionSuggester.ml | ocaml | module CompactedDecl = Context.Compacted.Declaration
open Printer
let mk_hyp sigma d (env,l) =
let d' = CompactedDecl.to_named_context d in
let env' = List.fold_right Environ.push_named d' env in
let ids, typ = match d with
| CompactedDecl.LocalAssum (ids, typ) -> ids, typ
| CompactedDecl.LocalDef (ids,c,typ... | |
9aa49da14d7547281982a098c277a8f1af2d91d0a84f897c3e419aaf533f5b88 | nvim-treesitter/nvim-treesitter | locals.scm | Program structure
(module) @scope
; Function with parameters, defines parameters
(parameters
(identifier) @definition.parameter)
(default_parameter
(identifier) @definition.parameter)
(typed_parameter
(identifier) @definition.parameter)
(typed_default_parameter
(identifier) @definition.parameter)
; *args... | null | https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/f8595b13bff62d5c64d54840e16678b9ad843620/queries/starlark/locals.scm | scheme | Function with parameters, defines parameters
*args parameter
Function defines function and scope
Loops
not a scope!
for in list comprehension
Assignments
REFERENCES
Starlark-specific
Loads | Program structure
(module) @scope
(parameters
(identifier) @definition.parameter)
(default_parameter
(identifier) @definition.parameter)
(typed_parameter
(identifier) @definition.parameter)
(typed_default_parameter
(identifier) @definition.parameter)
(parameters
(list_splat_pattern
(identifier) @de... |
e544eec393b8a1a394f6b7d7dbad26e6174898b0db07a965b3b6505cca4bdcf6 | athensresearch/athens | user.clj | #_{:clj-kondo/ignore [:unused-referred-var :unused-namespace]}
(ns user
(:require
[com.stuartsierra.component.user-helpers :refer [dev go reset]]))
| null | https://raw.githubusercontent.com/athensresearch/athens/35a6e086b017d38e30f0023330174baa0b8b784e/dev/clj/user.clj | clojure | #_{:clj-kondo/ignore [:unused-referred-var :unused-namespace]}
(ns user
(:require
[com.stuartsierra.component.user-helpers :refer [dev go reset]]))
| |
8786c2a470e865e9c8bc9715f7610d13afc543a6bd1d88a00063d2b2a00fb6f8 | rtoy/ansi-cl-tests | simple-string-p.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sun Aug 29 17:31:24 2004
;;;; Contains: Tests of SIMPLE-STRING-P
(in-package :cl-test)
(deftest simple-string-p.1
(check-type-predicate #'simple-string-p 'simple-string)
nil)
(deftest simple-string-p.2
(notnot-mv (simple-string-p "ancd"))
t)
(deftest sim... | null | https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/simple-string-p.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of SIMPLE-STRING-P
(deftest simple-string-p.4
:fill-pointer t))
nil)
(deftest simple-string-p.7
:displaced-to s
(simple-string-p s2))
nil)
Error tests | Author :
Created : Sun Aug 29 17:31:24 2004
(in-package :cl-test)
(deftest simple-string-p.1
(check-type-predicate #'simple-string-p 'simple-string)
nil)
(deftest simple-string-p.2
(notnot-mv (simple-string-p "ancd"))
t)
(deftest simple-string-p.3
(simple-string-p 0)
nil)
( simple - strin... |
b7e30ef6137514b0c6672cc7bb076ad4c5dd75420d41a6a4dbe62659d6098d15 | cosgroveb/jane | jane_irc_server.erl | -module(jane_irc_server).
-behavior(gen_server).
-include_lib("exmpp/include/exmpp.hrl").
-include_lib("exmpp/include/exmpp_client.hrl").
-include_lib("jane.hrl").
-export([start_link/0, send_message/1, silence/0, unsilence/0, join_room/1]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
term... | null | https://raw.githubusercontent.com/cosgroveb/jane/ef5f4187f4f4525ea9d8687bafddf4a2133dadc9/src/jane_irc_server.erl | erlang | ===================================================================
API
===================================================================
===================================================================
gen_server callbacks
===================================================================
=====================... | -module(jane_irc_server).
-behavior(gen_server).
-include_lib("exmpp/include/exmpp.hrl").
-include_lib("exmpp/include/exmpp_client.hrl").
-include_lib("jane.hrl").
-export([start_link/0, send_message/1, silence/0, unsilence/0, join_room/1]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
term... |
61eee6d8882b78b3a199637b8705112d3e64575a8bf931d0fceb8b9e401a2ce0 | brendanhay/gogol | Create.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
{-# LANGUAGE St... | null | https://raw.githubusercontent.com/brendanhay/gogol/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-tagmanager/gen/Gogol/TagManager/Accounts/Containers/Workspaces/Variables/Create.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
Creates a GTM Variable.
/See:/ <-manager Tag Manager API Reference> for @tagmanager.accounts.containers.workspaces.variables.create@.
* Resource
** Constructing a Request
| Creates a GTM Variable.
/See:/ 'newTagManagerAccou... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators... |
d6aeb66c8deb2732dfad9d6527942707f7cbff2cd6ed3981e16d9d25de99eef5 | GlideAngle/flare-timing | CrossZoneOptions.hs | module CrossZoneOptions (description) where
import Text.RawString.QQ (r)
import Flight.Cmd.Options (Description(..))
description :: Description
description = Description [r|
Finds pairs of track fixes that cross each task control zone.
Where 'c' is the comp name, 'p' is the pilot name, '.' is the folder with
competi... | null | https://raw.githubusercontent.com/GlideAngle/flare-timing/27bd34c1943496987382091441a1c2516c169263/lang-haskell/flare-timing/prod-apps/cross-zone/CrossZoneOptions.hs | haskell | module CrossZoneOptions (description) where
import Text.RawString.QQ (r)
import Flight.Cmd.Options (Description(..))
description :: Description
description = Description [r|
Finds pairs of track fixes that cross each task control zone.
Where 'c' is the comp name, 'p' is the pilot name, '.' is the folder with
competi... | |
dd1f6a7cad9d504fae2dd85e8262aedbcbe583e197a5f988c20dcc9fc4359a2a | mfoemmel/erlang-otp | xref_utils.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2000 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/tools/src/xref_utils.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 2000 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(xref_utils).
-export([xset/2]).
-... |
613525b0fce2737d76eb1e24aa85741665681cf46791c4245b9dba577711b92c | screenshotbot/screenshotbot-oss | test-pipe-stream.lisp | ;;;; Copyright 2018-Present Modern Interpreters 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 /.
(defpackage :util/tests/test-pipe-stream
(:use #:cl
#:fiveam)
(:import-fr... | null | https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/7a04e02dc574845aba7ce5fb242efc0749c101b0/src/util/tests/test-pipe-stream.lisp | lisp | Copyright 2018-Present Modern Interpreters Inc.
(is (eql :eof (read-byte stream nil :eof))) | 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 /.
(defpackage :util/tests/test-pipe-stream
(:use #:cl
#:fiveam)
(:import-from #:util/pipe-stream
#:in-memory-pipe-str... |
036a8c0136dffb3a4783dcce8cc812f822f71cf7b36dad7cc1a756f9439f8145 | anwarmamat/cmsc330fall17public | eval.ml | open Types
open Utils
exception TypeError of string
exception DeclarationError of string
exception DivByZeroError
let rec eval_expr env e = failwith "unimplemented"
let rec eval_stmt env s = failwith "unimplemented"
| null | https://raw.githubusercontent.com/anwarmamat/cmsc330fall17public/9a23ec1fc0cc4324e8c316f8d630c4e53af80f04/p4b/eval.ml | ocaml | open Types
open Utils
exception TypeError of string
exception DeclarationError of string
exception DivByZeroError
let rec eval_expr env e = failwith "unimplemented"
let rec eval_stmt env s = failwith "unimplemented"
| |
4710780e2f95ba07445e3fb0a1f95438b0255a78a58d4704b239f5754acf3103 | CodyReichert/qi | streams.lisp | #+xcvb (module (:depends-on ("package")))
(in-package :trivial-gray-streams)
(defclass fundamental-stream (impl-specific-gray:fundamental-stream) ())
(defclass fundamental-input-stream
(fundamental-stream impl-specific-gray:fundamental-input-stream) ())
(defclass fundamental-output-stream
(fundamental-stream ... | null | https://raw.githubusercontent.com/CodyReichert/qi/9cf6d31f40e19f4a7f60891ef7c8c0381ccac66f/dependencies/trivial-gray-streams-latest/streams.lisp | lisp | Default methods for stream-read/write-sequence.
It would be nice to implement default methods
in trivial gray streams, maybe borrowing the code
simplicity we will fallback to default implementation
of the implementation-specific analogue function which calls us.
Implementations should provide this default method... | #+xcvb (module (:depends-on ("package")))
(in-package :trivial-gray-streams)
(defclass fundamental-stream (impl-specific-gray:fundamental-stream) ())
(defclass fundamental-input-stream
(fundamental-stream impl-specific-gray:fundamental-input-stream) ())
(defclass fundamental-output-stream
(fundamental-stream ... |
c0d2eee02f9ce6f66f16cc8da0ba2d4ae6d75026c48ae9ef35cea90650b6353f | coq/coq | stream.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/coq/coq/686e9097959307e382f8889aa63fe8638ad76fc1/gramlib/stream.mli | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1997 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
type ('e,'a) t
exception Failure
* Raised by parsers when none of the first components of the stream
patt... |
ea8998983869ccfc9d631aba67199a1b8694467b245e3262b00a8d64fe38a153 | iamaleksey/oserl | operation_SUITE.erl | Copyright ( C ) 2009 ,
%%% All rights reserved.
%%%
%%% Redistribution and use in source and binary forms, with or without
%%% modification, are permitted provided that the following conditions are met:
%%%
%%% o Redistributions of source code must retain the above copyright notice,
%%% this list of conditions ... | null | https://raw.githubusercontent.com/iamaleksey/oserl/b254c68225b98384738c7a7ff9ddb53caa35c075/test/operation_SUITE.erl | erlang | All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
o Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
o Redistributions ... | Copyright ( C ) 2009 ,
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS "
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY ,... |
8f6015f0bdc87a297edce38f8f7cb876c8318b0f825257ab9466b287829562c5 | tolysz/ghcjs-stack | Icon.hs | #if __GLASGOW_HASKELL__ >= 701
# LANGUAGE Trustworthy #
#endif
-----------------------------------------------------------------------------
-- |
Module : Graphics . Win32.Icon
Copyright : ( c ) , 1997 - 2003
-- License : BSD-style (see the file libraries/base/LICENSE)
--
Maintainer : Vu... | null | https://raw.githubusercontent.com/tolysz/ghcjs-stack/83d5be83e87286d984e89635d5926702c55b9f29/special/Win32/Graphics/Win32/Icon.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-style (see the file libraries/base/LICENSE)
Stability : provisional
Portability : portable
---------------------------------------------------------------------------
---------------------------------------------... | #if __GLASGOW_HASKELL__ >= 701
# LANGUAGE Trustworthy #
#endif
Module : Graphics . Win32.Icon
Copyright : ( c ) , 1997 - 2003
Maintainer : Vuokko < >
A collection of FFI declarations for interfacing with Win32 .
module Graphics.Win32.Icon where
#ifndef ghcjs_HOST_OS
import Graphics.Win3... |
73745e2e7a8f4c8052724c3b8f7cbaf30c1917a9853efa0dcfee2861582ced26 | quephird/fun-with-quil | spinny-rounded-rects.clj | (ns fun-with-quil.animations.spinny-rounded-rects
(:require [quil.core :as q :include-macros true]))
(defn setup []
(q/rect-mode :center)
(q/no-stroke))
(defn draw []
(let [fc (q/frame-count)
w (q/width)
h (q/height)]
(q/background 255)
(q/translate (* w 0.5) (* h 0.5))
(doseq [i (... | null | https://raw.githubusercontent.com/quephird/fun-with-quil/3b3a6885771f5a1a4cffeb8379f05a28048a1616/src/fun_with_quil/animations/spinny-rounded-rects.clj | clojure | (ns fun-with-quil.animations.spinny-rounded-rects
(:require [quil.core :as q :include-macros true]))
(defn setup []
(q/rect-mode :center)
(q/no-stroke))
(defn draw []
(let [fc (q/frame-count)
w (q/width)
h (q/height)]
(q/background 255)
(q/translate (* w 0.5) (* h 0.5))
(doseq [i (... | |
79f7ebf3425ff4f7b2ee9eb5977740f66ff5d51c99f99510dff10bdb072b2083 | lambdageek/centrinel | RegionInferenceResult.hs | -- | Defines the type of region inference results - a mapping from
-- structure tag names to region schemes.
module Centrinel.RegionInferenceResult (
StructTagRef(..)
, RegionInferenceResult
, makeRegionInferenceResult
) where
import qualified Data.Map as Map
import Language.C.Data.Ident (SUERef)
import quali... | null | https://raw.githubusercontent.com/lambdageek/centrinel/412b620b77c6cb569811fec845b89d04585c1332/src/Centrinel/RegionInferenceResult.hs | haskell | | Defines the type of region inference results - a mapping from
structure tag names to region schemes.
| @struct T@ reference - the name @T@ in the struct/union/enum tag namespace, but only when it's a struct.
we're not interested in unions or enums.
| Make a region inference result. Assumes the map contains only... | module Centrinel.RegionInferenceResult (
StructTagRef(..)
, RegionInferenceResult
, makeRegionInferenceResult
) where
import qualified Data.Map as Map
import Language.C.Data.Ident (SUERef)
import qualified Data.Assoc
import qualified Centrinel.PrettyPrint as PP
import Centrinel.PrettyPrint ((<+>))
import Ce... |
f34161d48f903623b43b88fc71530424fa0e4ea1e35183c7151b5ca209caa71b | nasser/magic | attributes.clj | Copyright ( c ) . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; ... | null | https://raw.githubusercontent.com/nasser/magic/7a46f773bc7785c82d9527d52c1a8c28ac16e195/tests/clojure/test_clojure/attributes.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) . All rights reserved .
Original authors : ,
CLR version author :
(ns clojure.test-clojure.attributes
(:use clojure.test)
(:import [System.Security.Permissions FileIOPermissionAttribute FileDialogPermissionAttribute SecurityAction]))
(definterface Foo (foo []))
(deftype ^{
... |
1cd0e5fd9628bfb85a28a73c03bad8ce971d1c434c6863455f52c0d0ec8bc90c | SKA-ScienceDataProcessor/RC | CPU.hs | # LANGUAGE CPP #
module Logging.Analyze.CPU where
import Data.Word
import Data.List
import Logging.ProcessLog
data CPUMtxs = CPUMtxs {
-- Hints
cmHintFloatOps :: !Int
, cmHintDoubleOps :: !Int
, cmHintMemoryReadBytes :: !Int
-- Perf
, cmCpuCycles :: !Int -- , cmCpuCyclesTime ... | null | https://raw.githubusercontent.com/SKA-ScienceDataProcessor/RC/1b5e25baf9204a9f7ef40ed8ee94a86cc6c674af/MS6/LogAn/Logging/Analyze/CPU.hs | haskell | Hints
Perf
, cmCpuCyclesTime :: !Int
, cmCpuInstructionsTime :: !Int
, cmScalarFloatOpsTime :: !Int
, cmSseFloatOpsTime :: !Int
, cmSseDoubleOpsTime :: !Int
, cmAvxFloatOpsTime :: !Int
, cmAvxDoubleOpsTime :: !Int
, cmMemReadBytesTime :: !Int
Wall time
0 0 0 0 0 0 0 0 0
uca mtx (Per... | # LANGUAGE CPP #
module Logging.Analyze.CPU where
import Data.Word
import Data.List
import Logging.ProcessLog
data CPUMtxs = CPUMtxs {
cmHintFloatOps :: !Int
, cmHintDoubleOps :: !Int
, cmHintMemoryReadBytes :: !Int
, cmX87OpsTime : : ! Int
, cmScalarDoubleOpsTime : : ! Int
, cm... |
f722e965f3a3c9c26505c9c711885bc5be286ffb44fc51158b6f84718a3a2b09 | ZeusWPI/contests | quilt.hs | import Control.Monad (replicateM, replicateM_)
import Control.Monad.RWS (RWS, ask, get, modify, runRWS, tell)
import Data.List (transpose)
type Quilt = [String]
type Machine a = RWS [Quilt] [Quilt] [Quilt] a -- Base patterns, out, stack
turn :: Quilt -> Quilt
turn = map (map t . reverse) . transpose
where
t '-... | null | https://raw.githubusercontent.com/ZeusWPI/contests/d78aec91be3ce32a436d160cd7a13825d36bbf3a/2012-vpw/quilt.hs | haskell | Base patterns, out, stack | import Control.Monad (replicateM, replicateM_)
import Control.Monad.RWS (RWS, ask, get, modify, runRWS, tell)
import Data.List (transpose)
type Quilt = [String]
turn :: Quilt -> Quilt
turn = map (map t . reverse) . transpose
where
t '-' = '|'
t '|' = '-'
t '/' = '\\'
t '\\' = '/'
t x = x
... |
1f8720f25f111205fde9c4c6341a6bc52f01872e44a7abbfca1857e1950c87e6 | realworldocaml/book | supported_version.ml | type t = int * int
let all =
[
(4, 02);
(4, 03);
(4, 04);
(4, 05);
(4, 06);
(4, 07);
(4, 08);
(4, 09);
(4, 10);
(4, 11);
(4, 12);
(4, 13);
(4, 14);
(5, 0);
]
let to_string (a, b) =
if a < 5 then Printf.sprintf "%d.%02d" a b else Printf.sprintf "%d.%d" a b
... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/ppxlib/ast/supported_version/supported_version.ml | ocaml | type t = int * int
let all =
[
(4, 02);
(4, 03);
(4, 04);
(4, 05);
(4, 06);
(4, 07);
(4, 08);
(4, 09);
(4, 10);
(4, 11);
(4, 12);
(4, 13);
(4, 14);
(5, 0);
]
let to_string (a, b) =
if a < 5 then Printf.sprintf "%d.%02d" a b else Printf.sprintf "%d.%d" a b
... | |
dfc6327acbd05da7eec9982c90fc06541ac7288aeb147c96b8fbe8e05240cc69 | 8l/asif | Derivation.hs | module Language.FOmega.Derivation where
import Language.FOmega.Syntax hiding (
star, box, lam, pi, app, var, (==>)
)
import qualified Language.FOmega.Syntax as S
import Prelude hiding (pi)
import Control.Monad.Reader
import Control.Monad.Trans.Except
import Control.Applicative
import System.IO.Unsafe
-- type de... | null | https://raw.githubusercontent.com/8l/asif/3a0b0909e71a2e19e0773b3c77eadfa753751b41/src/Language/FOmega/Derivation.hs | haskell | type derivation
$ S.toCore qt
case function variable names
types of case functions
Exp
bottom | module Language.FOmega.Derivation where
import Language.FOmega.Syntax hiding (
star, box, lam, pi, app, var, (==>)
)
import qualified Language.FOmega.Syntax as S
import Prelude hiding (pi)
import Control.Monad.Reader
import Control.Monad.Trans.Except
import Control.Applicative
import System.IO.Unsafe
data Der =... |
5ef0ab7b9d023434449ab282d5aaadc98115a9eeeaec01ce4b0ecfdef1e25bd1 | mhuebert/re-view | examples.cljs | (ns {{name}}.examples
(:require [re-view.core :as v :refer [defview]]))
(defview custom-cursor
"A more advanced example using the :view/state atom, a lifecycle method,
and a custom method."
{:view/initial-state {:mouse-position [150 100]}
:update-mouse-position (fn [{:keys [... | null | https://raw.githubusercontent.com/mhuebert/re-view/ba38cd09b78b3c6db6a2983f3e2cf1bd6294564f/re_view/re-view-template/resources/leiningen/new/re_view/examples.cljs | clojure | (ns {{name}}.examples
(:require [re-view.core :as v :refer [defview]]))
(defview custom-cursor
"A more advanced example using the :view/state atom, a lifecycle method,
and a custom method."
{:view/initial-state {:mouse-position [150 100]}
:update-mouse-position (fn [{:keys [... | |
fe2b1a38c7e96c60e2f0820c0be364649b12aa4290003f86e3997f1877a76123 | csabahruska/jhc-components | Char.hs | module Data.Char (
isAscii, isLatin1, isControl, isPrint, isSpace, isUpper, isLower,
isAlpha, isDigit, isOctDigit, isHexDigit, isAlphaNum,
digitToInt, intToDigit,
toUpper, toLower,
ord, chr,
readLitChar, showLitChar, lexLitChar,
-- ...and what the Prelude exports
Char, String
) ... | null | https://raw.githubusercontent.com/csabahruska/jhc-components/a7dace481d017f5a83fbfc062bdd2d099133adf1/lib/haskell-extras/Data/Char.hs | haskell | ...and what the Prelude exports | module Data.Char (
isAscii, isLatin1, isControl, isPrint, isSpace, isUpper, isLower,
isAlpha, isDigit, isOctDigit, isHexDigit, isAlphaNum,
digitToInt, intToDigit,
toUpper, toLower,
ord, chr,
readLitChar, showLitChar, lexLitChar,
Char, String
) where
import Jhc.Basics
import Jhc.Enum
im... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.