_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 |
|---|---|---|---|---|---|---|---|---|
7d402ee383c134f1420edbb715b14b35f9ba52e966c42d4f8f565846d360635d | ghcjs/jsaddle-dom | MediaEncryptedEvent.hs | # LANGUAGE PatternSynonyms #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.MediaEncryptedEvent
(newMediaEncryptedEvent, getInitDataType, getInitData,
getInitDataUnsafe, getInitDataUn... | null | https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/MediaEncryptedEvent.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | # LANGUAGE PatternSynonyms #
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.MediaEncryptedEvent
(newMediaEncryptedEvent, getInitDataType, getInitData,
getInitDataUnsafe, getInitDataUnchecked, MediaEncryptedEvent(..),
gTypeMediaEncryptedEvent)
where
import Prelude ((.... |
8230b567b68fe3f32d552cb366b704052b48d95d7f2330560f3a4a627a049edd | racket/plai | mutator1.rkt | #lang plai/gc2/mutator
1
| null | https://raw.githubusercontent.com/racket/plai/164f3b763116fcfa7bd827be511650e71fa04319/plai-lib/tests/gc2/bad-mutators/mutator1.rkt | racket | #lang plai/gc2/mutator
1
| |
19cd570abdf8f8a58d5dcc47c421f58119e2e3996dfd0030da66d0c33ebdf692 | juxt/shop | main.cljs | (ns ^:figwheel-hooks tutorial.vent.frontend.main
(:require-macros
[tutorial.vent.frontend.main :refer [html]])
(:require
[brutha.core :as br]
[tutorial.vent.frontend.ajax
:refer [page-fetch fetch-page]
:as ajax]))
(defonce state (atom {:page {:name :home}}))
(def state* state)
(declare fetch... | null | https://raw.githubusercontent.com/juxt/shop/c23fc55bca1852bfbabb681a72debc12373c3a36/examples/tutorial.vent/src/tutorial/vent/frontend/main.cljs | clojure | [:a.tweet__action {:href "#"}
[:span.eye.tweet__action-icon]
"Hide"]
and this is what figwheel calls after each save
this only gets called once | (ns ^:figwheel-hooks tutorial.vent.frontend.main
(:require-macros
[tutorial.vent.frontend.main :refer [html]])
(:require
[brutha.core :as br]
[tutorial.vent.frontend.ajax
:refer [page-fetch fetch-page]
:as ajax]))
(defonce state (atom {:page {:name :home}}))
(def state* state)
(declare fetch... |
251f5292db6532a5abf6923fd4a86f7e2b9640cc388f92d6efa6b9aed2240538 | nvim-treesitter/nvim-treesitter | indents.scm | [
(journal_item)
] @indent
| null | https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/ddc0f1b606472b6a1ab85ee9becfd4877507627d/queries/ledger/indents.scm | scheme | [
(journal_item)
] @indent
| |
556b5b0f2fba80bb1913e8c7954a924f7c44b6af75341342805f42cb827e64eb | maxlapshin/fix | fix_exec_conn.erl | -module(fix_exec_conn).
-author({"Danil Zagoskin", ''}).
-include("log.hrl").
-include("../include/admin.hrl").
-include("../include/business.hrl").
-include("../include/fix.hrl").
-include_lib("eunit/include/eunit.hrl").
-define(NETWORK_TIMEOUT, 500).
% Public API
-export([id/1, start_link/2, connect/2]).
-export... | null | https://raw.githubusercontent.com/maxlapshin/fix/f603ff807112df92741f64955aacd5e3deb50495/src/fix_exec_conn.erl | erlang | Public API
gen_server callbacks
Request new order placement
Cancel an order placed before
Request order status
Request order status
decode_messages may return new log when log is pre-buffer
Special cases
Do actual message send
Write log
Crash on send failure
?D(heartbeat),
Open log at successful logon and ... | -module(fix_exec_conn).
-author({"Danil Zagoskin", ''}).
-include("log.hrl").
-include("../include/admin.hrl").
-include("../include/business.hrl").
-include("../include/fix.hrl").
-include_lib("eunit/include/eunit.hrl").
-define(NETWORK_TIMEOUT, 500).
-export([id/1, start_link/2, connect/2]).
-export([attach/2, a... |
2e96b80902ad7dea3b30d3a449af5616112a1d04e4d431b720155f21fa9ea5fc | jeromesimeon/Galax | procmod_types.mli | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/procmod/procmod_types.mli | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : , v 1.9 2007/10/16 01:25:35 mff Exp $
open Galax_io
open Monitoring_context
open Processing_context
open Parse_context
open Norm_context
open Typing_context
open Compile_context
open Code_selection_context
open Compiled_program_uni... |
4d402929c48904cd03cfeb9f25832e54048efea3e3ed1e61793dae82a7e5df96 | kuribas/cubicbezier | Curvature.hs | module Geom2D.CubicBezier.Curvature
(curvature, radiusOfCurvature, curvatureExtrema, findRadius)
where
import Geom2D
import Geom2D.CubicBezier.Basic
import Geom2D.CubicBezier.Intersection
import Math.BernsteinPoly
| Curvature of the curve . A negative curvature means the curve
-- curves to the right.
curva... | null | https://raw.githubusercontent.com/kuribas/cubicbezier/52da0941ba1deb33c06a2edcfa279bace0e44075/Geom2D/CubicBezier/Curvature.hs | haskell | curves to the right.
is the reciprocal of the curvature.
| Find extrema of the curvature, but not inflection points.
| Find points on the curve that have a certain radius of curvature.
Values to the left and to the right of the curve are returned.
^ the curve
^ distance
^ tolerance
^ result
either empty or a ... | module Geom2D.CubicBezier.Curvature
(curvature, radiusOfCurvature, curvatureExtrema, findRadius)
where
import Geom2D
import Geom2D.CubicBezier.Basic
import Geom2D.CubicBezier.Intersection
import Math.BernsteinPoly
| Curvature of the curve . A negative curvature means the curve
curvature :: CubicBezier Doub... |
691398cd300fb7895c4b7edcaceb74e742650afeb66d43a45004705a58016b5c | techascent/p2p-chat | main.clj | (ns p2p-chat.main
(:require [taoensso.timbre :as log]
[p2p-chat.server :as server]
[p2p-chat.routes :as routes])
(:gen-class))
(defn -main
[& args]
(server/restart routes/routes 8000))
| null | https://raw.githubusercontent.com/techascent/p2p-chat/d7c5229af00f5edf8aec6a80139c87003563896c/src/p2p_chat/main.clj | clojure | (ns p2p-chat.main
(:require [taoensso.timbre :as log]
[p2p-chat.server :as server]
[p2p-chat.routes :as routes])
(:gen-class))
(defn -main
[& args]
(server/restart routes/routes 8000))
| |
a38b4ac1c3c5d46501ebd20be114523a5e322ea06309af89747b4b82f20936fb | goodell/cppmem | inline.mli | Js_of_ocaml compiler
* /
* Copyright ( C ) 2010
* Laboratoire PPS - CNRS Université Paris Diderot
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking... | null | https://raw.githubusercontent.com/goodell/cppmem/eb3ce19b607a5d6ec81138cd8cacd236f9388e87/js_of_ocaml-1.2/compiler/inline.mli | ocaml | Js_of_ocaml compiler
* /
* Copyright ( C ) 2010
* Laboratoire PPS - CNRS Université Paris Diderot
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking... | |
a38ee7189ccbcd944a48a8798b5625e11210e04bde9020cb28e57827bb13a990 | Helium4Haskell/helium | ClassInstaneError9.hs | class X a where
f :: a -> Int
instance X (Maybe a) where
f Nothing = 7
f (Just x) = f x
main = f (Just 3) | null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/typeClasses/ClassInstaneError9.hs | haskell | class X a where
f :: a -> Int
instance X (Maybe a) where
f Nothing = 7
f (Just x) = f x
main = f (Just 3) | |
524325335bddfe8e408b8baf1150a0375643def8a84edfb0256bb9ec8137e250 | nick8325/quickspec | Haskell.hs | {-# OPTIONS_HADDOCK hide #-}
# LANGUAGE DataKinds #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TypeFamilies #
# LANGUAGE PatternGuards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators #
{-# LANGUAGE GADTs #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE MultiParamTypeClasses #
# LANGUA... | null | https://raw.githubusercontent.com/nick8325/quickspec/4cd5f17ef02a9552f9ccaf07e15c140135faca14/src/QuickSpec/Internal/Haskell.hs | haskell | # OPTIONS_HADDOCK hide #
# LANGUAGE RankNTypes #
# LANGUAGE GADTs #
# LANGUAGE ConstraintKinds #
Generate tuple values (pairs and () are built into findInstance)
Derive typeclass instances using (:-)
Standard names
Standard instances
From Arbitrary to Gen
Observation functions
Needed for typeclass-polymorphic pr... | # LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE PatternGuards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators #
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE RecordWildCards #
# LANGUAGE UndecidableInstances #
# LANGUAGE DefaultSignatu... |
a179fbb2dfb4b8c78ff53fd9ba18d828b04952ecb709a1cec10d5beb63b3d58b | penpot/penpot | grid.cljs | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
;;
;; Copyright (c) KALEIDOS INC
(ns app.main.ui.dashboard.grid
(:require
[app.common.data.macros :as dm]
[app.common.files.features :a... | null | https://raw.githubusercontent.com/penpot/penpot/96ce475206d90cccb01c8cd63d684132690e480b/frontend/src/app/main/ui/dashboard/grid.cljs | clojure |
Copyright (c) KALEIDOS INC
--- Grid Item Thumbnail
--- Grid Item Library
Unicode 00A0 is non-breaking space
Unicode 00A0 is non-breaking space
Unicode 00A0 is non-breaking space
--- Grid Item
set-drag-image requires that the element is rendered and
visible to the user at the moment of creating the ghost
imag... | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(ns app.main.ui.dashboard.grid
(:require
[app.common.data.macros :as dm]
[app.common.files.features :as ffeat]
[app.common.geom.poin... |
84b45e9a326f14bf0044a844b7b73f39b957ef899fdf28a4323b09af0fa72cd0 | REMath/mit_16.399 | ccom.ml | ccom.ml
open Abstract_Syntax
open Labels
open Cenv
open Caexp
open Cbexp
open Fixpoint
(* collecting semantics of commands *)
exception Error of string
let rec ccom c r l =
match c with
| (SKIP (l', l'')) ->
if (l = l') then r
else if (l = l'') then r
else (raise (Error "SKIP incoherence"))
... | null | https://raw.githubusercontent.com/REMath/mit_16.399/3f395d6a9dfa1ed232d307c3c542df3dbd5b614a/project/Collecting-Interpreter/ccom.ml | ocaml | collecting semantics of commands | ccom.ml
open Abstract_Syntax
open Labels
open Cenv
open Caexp
open Cbexp
open Fixpoint
exception Error of string
let rec ccom c r l =
match c with
| (SKIP (l', l'')) ->
if (l = l') then r
else if (l = l'') then r
else (raise (Error "SKIP incoherence"))
| (ASSIGN (l',x,a,l'')) ->
if (l ... |
e208885192ee47088adb87062760c78c2733675b20000068dc7955a87297eca5 | martinklepsch/tenzing | om-next-app.cljs | (ns {{name}}.app
(:require [goog.dom :as gdom]
[om.next :as om :refer-macros [defui]]
[om.dom :as dom]))
(def app-state (atom {:greeting "Hello world!"}))
(defui App
Object
(render [this]
(let [{:keys [greeting]} (om/props this)]
(dom/h1 nil greeting))))
(def reconciler
(om/... | null | https://raw.githubusercontent.com/martinklepsch/tenzing/d147f988128f3377be7d94c6cbf78d01d481c86e/resources/leiningen/new/tenzing/om-next-app.cljs | clojure | (ns {{name}}.app
(:require [goog.dom :as gdom]
[om.next :as om :refer-macros [defui]]
[om.dom :as dom]))
(def app-state (atom {:greeting "Hello world!"}))
(defui App
Object
(render [this]
(let [{:keys [greeting]} (om/props this)]
(dom/h1 nil greeting))))
(def reconciler
(om/... | |
d577a96a7379e2c91d57da00907cae84648b030e1ce7466db552672d1ffdd53b | hikettei/cl-waffe | beta.lisp |
(in-package :cl-waffe)
To fix : Zero - division error .
(defun !beta (dims alpha beta)
"Initializes tensor with samples of beta distribution in a faster way.
Algorithm:
x=[0,1]
a = min(alpha, beta)
b = max(alpha, beta)
PDF: fX(x)=x^a−1*(1−x)*b−1/B(a,b)
where B(a,b)=∫1,0{x^a−1(1−x)^b−1}dx
@begin[lang=lisp]... | null | https://raw.githubusercontent.com/hikettei/cl-waffe/c52a840f77c236e30f84b8785d7121d6e752f0ad/source/distributions/beta.lisp | lisp | Evaluation took:
0 bytes consed |
(in-package :cl-waffe)
To fix : Zero - division error .
(defun !beta (dims alpha beta)
"Initializes tensor with samples of beta distribution in a faster way.
Algorithm:
x=[0,1]
a = min(alpha, beta)
b = max(alpha, beta)
PDF: fX(x)=x^a−1*(1−x)*b−1/B(a,b)
where B(a,b)=∫1,0{x^a−1(1−x)^b−1}dx
@begin[lang=lisp]... |
e1f50e35508af829a7cd7e4248822719c70a35634c386d9053bbb0d34ebf4f25 | input-output-hk/project-icarus-importer | Instances.hs | # LANGUAGE TypeOperators #
-- | Miscellaneous instances, etc. Related to the main blockchain of course.
module Pos.Core.Block.Main.Instances
(
) where
import Universum
import qualified Data.Text.Buildable as Buildable
import Formatting (bprint, build, int, stext, (%))
import ... | null | https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/core/src/Pos/Core/Block/Main/Instances.hs | haskell | | Miscellaneous instances, etc. Related to the main blockchain of course.
instead of @Bi MainBlockHeader@. We compute header's hash by | # LANGUAGE TypeOperators #
module Pos.Core.Block.Main.Instances
(
) where
import Universum
import qualified Data.Text.Buildable as Buildable
import Formatting (bprint, build, int, stext, (%))
import Serokell.Util (Color (Magenta), colorize, listJson)
import Pos... |
c5676d1f94a96d80ed57c713a047346bfe610b539677db594da731692199571c | metosin/ring-swagger | coerce.clj | (ns ring.swagger.coerce
(:require [schema.core :as s]
[schema.coerce :as sc]
[clojure.string :as str]
[clj-time.format :as tf]
[clj-time.coerce :as tc]
[clojure.edn :as edn]
[ring.swagger.extension :as extension])
(:import [org.joda.time LocalD... | null | https://raw.githubusercontent.com/metosin/ring-swagger/0ef9046174dec0ebd4cbf97d6cc5c6846ef11996/src/ring/swagger/coerce.clj | clojure | Default
(split-params-matcher schema)
Public Api
| (ns ring.swagger.coerce
(:require [schema.core :as s]
[schema.coerce :as sc]
[clojure.string :as str]
[clj-time.format :as tf]
[clj-time.coerce :as tc]
[clojure.edn :as edn]
[ring.swagger.extension :as extension])
(:import [org.joda.time LocalD... |
ac0a09bcf61b4ad1d7270d9c8d99b1c6e235c1f8d006c7890b4bdf8a5183ee3e | DSiSc/why3 | pdriver.ml | (********************************************************************)
(* *)
The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2018 -- Inria - CNRS - Paris - Sud University
(* ... | null | https://raw.githubusercontent.com/DSiSc/why3/8ba9c2287224b53075adc51544bc377bc8ea5c75/src/mlw/pdriver.ml | ocaml | ******************************************************************
This software is distributed under the terms of the GNU Lesser
on linking described in file LICENSE. ... | The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2018 -- Inria - CNRS - Paris - Sud University
General Public License version 2.1 , with the special exception
open Ident
open Ty
open Term
open Theory
open Driver_ast
let debug =
Debug.register_info_flag "extracti... |
a0be6793595c6b28b264dcaa88a6f9a7941ebfb0c0fe96a731b4b5004e772a3d | anurudhp/CPHaskell | b.hs | import Control.Arrow ((>>>))
main :: IO ()
main = interact $ words >>> map read >>> solve >>> show
solve :: [Int] -> Int
solve [n, k] = sum $ zipWith (*) xs (drop (abs k) xs)
where
xs = [1 .. n - 1] ++ [n,n - 1 .. 1]
| null | https://raw.githubusercontent.com/anurudhp/CPHaskell/01ae8dde6aab4f6ddfebd122ded0b42779dd16f1/contests/atcoder/arc107/b.hs | haskell | import Control.Arrow ((>>>))
main :: IO ()
main = interact $ words >>> map read >>> solve >>> show
solve :: [Int] -> Int
solve [n, k] = sum $ zipWith (*) xs (drop (abs k) xs)
where
xs = [1 .. n - 1] ++ [n,n - 1 .. 1]
| |
81687841432710c5ea546494a78ac6fe6b15293891f3059905cd20dd37f0ae5d | rd--/hosc | Plain.hs | | Byte - level coding utility functions . This form does not require the binary library .
module Sound.Osc.Coding.Byte.Plain where
import Control.Exception (bracket) {- base -}
import Control.Monad.ST (runST, ST) {- base -}
import Data.Bits (Bits, shiftL, shiftR, (.&.)) {- base -}
import Data.Char (chr, ord) {- b... | null | https://raw.githubusercontent.com/rd--/hosc/efa22ad66d4cc58d5385a922ac50369c5f763042/Sound/Osc/Coding/Byte/Plain.hs | haskell | base
base
base
base
base
base
base
array
array
| pstr = pascal string
IO
* Util | | Byte - level coding utility functions . This form does not require the binary library .
module Sound.Osc.Coding.Byte.Plain where
| Fetch byte n of the value a ( zero indexed ) .
byte :: (Integral a, Bits a) => Int -> a -> Word8
byte n i = fromIntegral ((shiftR i (n * 8)) .&. 0xFF)
i8_bytes :: Int -> [Word8... |
5137493c18070c60074539ecb7b6164320e86737bfaf61211f15930f249024fa | waymonad/waymonad | Current.hs |
waymonad A wayland compositor in the spirit of xmonad
Copyright ( C ) 2017
This library is free software ; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
version 2.1 of the License , or ( at your op... | null | https://raw.githubusercontent.com/waymonad/waymonad/18ab493710dd54c330fb4d122ed35bc3a59585df/src/Waymonad/Utility/Current.hs | haskell | # SOURCE # |
waymonad A wayland compositor in the spirit of xmonad
Copyright ( C ) 2017
This library is free software ; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
version 2.1 of the License , or ( at your op... |
f2ae398a499224e4602aee7b9565df8e8e1dfade048bf03258040141ed5fafc1 | metawilm/cl-python | imp.lisp | ;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CLPYTHON.MODULE.IMP -*-
;;
This software is Copyright ( c ) Franz Inc. and .
Franz Inc. and grant you the rights to
;; distribute and use this software as governed by the terms
of the Lisp Lesser GNU Public License
;; (),
;; known as the LLGPL.
(in-package :cl... | null | https://raw.githubusercontent.com/metawilm/cl-python/bce7f80b0c67d3c9f514556f2d14d098efecdde8/lib/imp.lisp | lisp | -*- Mode: LISP; Syntax: COMMON-LISP; Package: CLPYTHON.MODULE.IMP -*-
distribute and use this software as governed by the terms
(),
known as the LLGPL.
Does not make sense for this implementation
imp.PY_SOURCE
imp.PY_COMPILED
imp.PKG_DIRECTORY | This software is Copyright ( c ) Franz Inc. and .
Franz Inc. and grant you the rights to
of the Lisp Lesser GNU Public License
(in-package :clpython.module.imp)
(defun |get_magic| ()
"")
(defun |find_module| (name path)
(declare (ignore name path))
(error "Todo: imp.find_module()"))
(defun |load_mod... |
74963df77cf7bf8ad6dfb3534e16c62b26999b968b98e4f1cdd7341d7b86373f | coinmetrics/haskell-tools | EOSArchive.hs | # LANGUAGE DefaultSignatures #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# LANGUAGE TupleSections #
# LANGUAGE Typ... | null | https://raw.githubusercontent.com/coinmetrics/haskell-tools/94d59497b6c4d829dd680df82c71fe607877ae76/coinmetrics-eos/CoinMetrics/EOSArchive.hs | haskell | # LANGUAGE OverloadedStrings #
read_varuint64
push_varuint64
schema structs
| Perform additional decoding of rows.
JSON structs for reading schema
# UNPACK #
# UNPACK #
# UNPACK #
# UNPACK #
# UNPACK #
get_status_request_v0
# UNPACK #
# UNPACK #
# UNPACK #
get_status_result_v0
# UNPACK #
# UNPACK #
# UNPACK #
# ... | # LANGUAGE DefaultSignatures #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# LANGUAGE TupleSections #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperator... |
16f19530cc52eebeedd3dbff76f4a631c65d2cc31226f5c92cc1059283a8c71c | BillHallahan/G2 | UnionPoly.hs | {-# LANGUAGE OverloadedStrings #-}
module UnionPoly (unionPolyTests) where
import G2.Language
import qualified G2.Language.ExprEnv as E
import G2.Liquid.Inference.UnionPoly
import qualified Data.Text as T
import Test.Tasty
import Test.Tasty.HUnit
unionPolyTests :: TestTree
unionPolyTests =
testGroup "UnionPoly... | null | https://raw.githubusercontent.com/BillHallahan/G2/0683a633f9dad2cd5066d2515645fa79bb105401/tests_lh/UnionPoly.hs | haskell | # LANGUAGE OverloadedStrings # |
module UnionPoly (unionPolyTests) where
import G2.Language
import qualified G2.Language.ExprEnv as E
import G2.Liquid.Inference.UnionPoly
import qualified Data.Text as T
import Test.Tasty
import Test.Tasty.HUnit
unionPolyTests :: TestTree
unionPolyTests =
testGroup "UnionPoly"
[
testCase "Let unifica... |
119b2c6f28a454c834ad7486e3cd5c650bc467f3da38779b1d53f586071cba35 | realworldocaml/book | ocamldep.mli | * ocamldep management
open Import
module Modules_data : sig
* Various information needed about a set of modules .
This is a subset of [ Compilation_context ] . We do n't use
[ Compilation_context ] directory as this would create a circular
dependency .
This is a subset of [Compilation_... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/dune_/src/dune_rules/ocamldep.mli | ocaml | * [read_immediate_deps_of ~obj_dir ~modules ~ml_kind unit] returns the
immediate dependencies found in the modules of [modules] for the file with
kind [ml_kind] of the module [unit]. If there is no such file with kind
[ml_kind], then an empty list of dependencies is returned. | * ocamldep management
open Import
module Modules_data : sig
* Various information needed about a set of modules .
This is a subset of [ Compilation_context ] . We do n't use
[ Compilation_context ] directory as this would create a circular
dependency .
This is a subset of [Compilation_... |
66babc356f0782b38c99d769c56b619e95a85f2f4bf9f508a869db346e7fabc0 | shuieryin/wechat_mud | npc_statem_sup.erl | %%%-------------------------------------------------------------------
@author shuieryin
( C ) 2015 , Shuieryin
%%% @doc
%%%
Npc_statem supervisor . This is a simple one for one supervisor which
npc_statem children dynamically are added to or removed from it .
%%%
%%% @end
Created : 01 . Nov 2015 6:12 PM
%%%... | null | https://raw.githubusercontent.com/shuieryin/wechat_mud/b2a9251a9b208fee5cd8c4213759750b95c8b8aa/src/npc/npc_statem_sup.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API
Supervisor callbacks
===================================================================
API functions
============================================================... | @author shuieryin
( C ) 2015 , Shuieryin
Npc_statem supervisor . This is a simple one for one supervisor which
npc_statem children dynamically are added to or removed from it .
Created : 01 . Nov 2015 6:12 PM
-module(npc_statem_sup).
-author("shuieryin").
-behaviour(supervisor).
-export([
start_link/0,... |
063f0f8477aa1d5d21335281f946c65233bf8f944da141dc0fc67321fd675e5a | mariari/Misc-Lisp-Scripts | guess_my_number.lisp | (defparameter *small* 1)
(defparameter *big* 100)
(defun guess-my-number ()
(ash (+ *small* *big*) -1))
(defun smaller ()
(setf *big* (1- (guess-my-number)))
(guess-my-number))
(defun bigger ()
(setf *small* (1+ (guess-my-number)))
(guess-my-number))
(defun start-over ()
(defparameter *small* 1)
(defp... | null | https://raw.githubusercontent.com/mariari/Misc-Lisp-Scripts/acecadc75fcbe15e6b97e084d179aacdbbde06a8/Books/LandOfLisp/Chapter%204/guess_my_number.lisp | lisp | (defparameter *small* 1)
(defparameter *big* 100)
(defun guess-my-number ()
(ash (+ *small* *big*) -1))
(defun smaller ()
(setf *big* (1- (guess-my-number)))
(guess-my-number))
(defun bigger ()
(setf *small* (1+ (guess-my-number)))
(guess-my-number))
(defun start-over ()
(defparameter *small* 1)
(defp... | |
71ac77bb03a95dee4aa99fcb7914210855a9991a34e9808a7318da846cc362d0 | chenyukang/eopl | checker.scm | ;; type-of-program : Program -> Type
(define type-of-program
(lambda (pgm)
(cases program pgm
(a-program (class-decls exp1)
(initialize-static-class-env! class-decls)
(for-each check-class-decl! class-decls)
(type-of exp1 (init-tenv)))))... | null | https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/ch9/base/typed-oo/checker.scm | scheme | type-of-program : Program -> Type
type-of : Exp -> Tenv
these tests either succeed or raise an error
!!
object stuff begins here
check the call to initialize
and return the class name as a type
this matches interp.scm: interp.scm calls
object->class-name, which fails on a non-object, so we need
to make sure ... | (define type-of-program
(lambda (pgm)
(cases program pgm
(a-program (class-decls exp1)
(initialize-static-class-env! class-decls)
(for-each check-class-decl! class-decls)
(type-of exp1 (init-tenv))))))
(define type-of
(lambda (exp ten... |
8a62b4e44582c014791530fe0cd87ce4fcb01610b2c1b7c0a95da4a9648c97b9 | cardmagic/lucash | threads.scm | ;Thread nomenclature for scsh.
(define fork/thread (structure-ref thread-fluids fork-thread))
(define fork/process (structure-ref scsh-level-0 fork))
(define wait/thread (structure-ref threads-internal wait))
(define wait/process (structure-ref scsh-level-0 wait))
| null | https://raw.githubusercontent.com/cardmagic/lucash/0452d410430d12140c14948f7f583624f819cdad/reference/scsh-0.6.6/scsh/threads.scm | scheme | Thread nomenclature for scsh. |
(define fork/thread (structure-ref thread-fluids fork-thread))
(define fork/process (structure-ref scsh-level-0 fork))
(define wait/thread (structure-ref threads-internal wait))
(define wait/process (structure-ref scsh-level-0 wait))
|
b709b6fa2d1311b74b365de43e9a9fb87440aae4f0a8b145798ed19ee54a7402 | hkuplg/fcore | Mixin.hs | {-# LANGUAGE TypeOperators, MultiParamTypeClasses, FlexibleInstances #-}
# OPTIONS_GHC -Wall #
module Mixin where
import Prelude hiding (log)
class a <: b where
up :: a -> b
instance (t1 <: t2) => (t -> t1) <: (t -> t2) where
up f = up . f
instance (t1 <: t2) => (t2 -> t) <: (t1 -> t) where
up f = f . up
ty... | null | https://raw.githubusercontent.com/hkuplg/fcore/e27b6dec5bfd319edb8c3e90d94a993bcc7b4c95/frontend/Mixin.hs | haskell | # LANGUAGE TypeOperators, MultiParamTypeClasses, FlexibleInstances #
The below provides an example. | # OPTIONS_GHC -Wall #
module Mixin where
import Prelude hiding (log)
class a <: b where
up :: a -> b
instance (t1 <: t2) => (t -> t1) <: (t -> t2) where
up f = up . f
instance (t1 <: t2) => (t2 -> t) <: (t1 -> t) where
up f = f . up
type Class t = t -> t
type Mixin s t = s -> t -> t
new :: Class a -> a
n... |
fe335ad80da0d21fd4df05647fa6a910401a7d3964aeeace4ac1c0401903d63e | tomgr/libcspm | Renamer.hs | # LANGUAGE FlexibleInstances , FunctionalDependencies ,
ExistentialQuantification , RankNTypes ,
OverloadedStrings , TypeSynonymInstances , MultiParamTypeClasses ,
UndecidableInstances #
ExistentialQuantification, RankNTypes,
OverloadedStrings, TypeSynonymInstances, MultiParamTypeClasses,
... | null | https://raw.githubusercontent.com/tomgr/libcspm/24d1b41954191a16e3b5e388e35f5ba0915d671e/src/CSPM/Renamer.hs | haskell | | Renames all variables to unique Names, in the process converting all
UnRenamedName into Name. This simplifies many subsequent phases as every
name is guaranteed to be unique so flat maps may be used, rather than
Hierarchical maps. Further, this also flags patterns that match channels
and datatype clauses.
| The... | # LANGUAGE FlexibleInstances , FunctionalDependencies ,
ExistentialQuantification , RankNTypes ,
OverloadedStrings , TypeSynonymInstances , MultiParamTypeClasses ,
UndecidableInstances #
ExistentialQuantification, RankNTypes,
OverloadedStrings, TypeSynonymInstances, MultiParamTypeClasses,
... |
b8d4336af3ac56f1e2c458bbfb2f5cbf4a2591fee1e41e136e70f03498142521 | mcfilib/ruby-marshal | Types.hs | # LANGUAGE PatternSynonyms #
--------------------------------------------------------------------
-- |
-- Module : Data.Ruby.Marshal.Types
Copyright : ( c ) , 2015
License : MIT
--
-- Maintainer:
-- Stability : experimental
-- Portability: portable
--
Common types for Ruby Marshal deserialisation .
--... | null | https://raw.githubusercontent.com/mcfilib/ruby-marshal/256c1c94aca12d4792d14c0ba2501c3878a23a53/src/Data/Ruby/Marshal/Types.hs | haskell | ------------------------------------------------------------------
|
Module : Data.Ruby.Marshal.Types
Maintainer:
Stability : experimental
Portability: portable
------------------------------------------------------------------
* Internal cache
* Ruby string encodings
* Ruby object
* Patterns
| Chara... | # LANGUAGE PatternSynonyms #
Copyright : ( c ) , 2015
License : MIT
Common types for Ruby Marshal deserialisation .
module Data.Ruby.Marshal.Types (
* Marshal
Marshal
, Cache
, RubyStringEncoding(..)
, RubyObject(..)
, pattern NilChar
, pattern FalseChar
, pattern TrueChar
, pattern Ar... |
1297dc77a36c87af93a7d5bf5464d1febebe608bb23a50dce53c4b1dd7a39695 | stepcut/minecraft-data | Block.hs | {-# language DeriveDataTypeable #-}
# language DeriveGeneric #
{-# language OverloadedStrings #-}
module Minecraft.Block where
import Data.Bimap (Bimap, fromList)
import Data.Data
import Data.Text (Text)
import Data.Monoid ((<>))
import qualified Data.Text as Text
import GHC.Generics
data NamespacedId = NamespacedId ... | null | https://raw.githubusercontent.com/stepcut/minecraft-data/2fa9508de9e21a3ed4835760656383fae6a9eb4b/Minecraft/Block.hs | haskell | # language DeriveDataTypeable #
# language OverloadedStrings # | # language DeriveGeneric #
module Minecraft.Block where
import Data.Bimap (Bimap, fromList)
import Data.Data
import Data.Text (Text)
import Data.Monoid ((<>))
import qualified Data.Text as Text
import GHC.Generics
data NamespacedId = NamespacedId { namespace :: Text, name :: Text }
deriving (Eq, Ord, Read, Show, Da... |
f783af7880f191b247a89b97640de34e8a40afa7d73334291a4dbb56125cfea5 | let-def/grenier | physh.ml | let null = ref ()
module Set = struct
type 'a t
external phys_set_alloc : 'a array -> unit ref -> 'a t = "ml_phys_set_alloc"
external phys_set_add : 'a t -> 'a -> unit ref-> unit = "ml_phys_set_add"
external phys_set_mem : 'a t -> 'a -> unit ref-> bool = "ml_phys_set_mem"
external phys_set_length : 'a t -> ... | null | https://raw.githubusercontent.com/let-def/grenier/3391e5e31db88e587100436e9407881fb8ef7873/physh/physh.ml | ocaml | let null = ref ()
module Set = struct
type 'a t
external phys_set_alloc : 'a array -> unit ref -> 'a t = "ml_phys_set_alloc"
external phys_set_add : 'a t -> 'a -> unit ref-> unit = "ml_phys_set_add"
external phys_set_mem : 'a t -> 'a -> unit ref-> bool = "ml_phys_set_mem"
external phys_set_length : 'a t -> ... | |
f523e29ee2afcfa70cf50adbb2b643f610d4071fb75ebc103b5ce28c957712f2 | conjure-cp/conjure | Party.hs | # LANGUAGE DeriveGeneric , DeriveDataTypeable , DeriveFunctor , , DeriveFoldable #
module Conjure.Language.Expression.Op.Party where
import Conjure.Prelude
import Conjure.Language.Expression.Op.Internal.Common
import qualified Data.Aeson as JSON -- aeson
import qualified Data.HashMap.Strict as M -... | null | https://raw.githubusercontent.com/conjure-cp/conjure/dd5a27df138af2ccbbb970274c2b8f22ac6b26a0/src/Conjure/Language/Expression/Op/Party.hs | haskell | aeson
unordered-containers
vector | # LANGUAGE DeriveGeneric , DeriveDataTypeable , DeriveFunctor , , DeriveFoldable #
module Conjure.Language.Expression.Op.Party where
import Conjure.Prelude
import Conjure.Language.Expression.Op.Internal.Common
data OpParty x = OpParty x x
deriving (Eq, Ord, Show, Data, Functor, Traversable, Foldable, Typeable... |
284efe0849d5e38aee1fb30f34689abc5964113258b8c25e5e38affa22600db4 | amnh/phylocaml | nodeData.ml | open Internal
module type S =
sig
type t
type m
type spec
val filter_codes : IntSet.t -> t -> t option
val filter_codes_comp : IntSet.t -> t -> t option
val cardinal : t -> int
val get_codes : t -> IntSet.t
val mem : int list option -> t -> bool
val union : t -> t -> t -> t
val compare : t -> t ... | null | https://raw.githubusercontent.com/amnh/phylocaml/86aebc4f2664752668b16707214b3cad099434c0/lib/nodeData.ml | ocaml | open Internal
module type S =
sig
type t
type m
type spec
val filter_codes : IntSet.t -> t -> t option
val filter_codes_comp : IntSet.t -> t -> t option
val cardinal : t -> int
val get_codes : t -> IntSet.t
val mem : int list option -> t -> bool
val union : t -> t -> t -> t
val compare : t -> t ... | |
c0148ab7b1a3ff7bfcc535b944e66ed9ab67269e8111653372407a758443e514 | qkrgud55/ocamlmulti | opttopmain.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/qkrgud55/ocamlmulti/74fe84df0ce7be5ee03fb4ac0520fb3e9f4b6d1f/toplevel/opttopmain.mli | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ I d : opttopmain.mli 11156 2011 - 0... |
9182ad451f4c22f13af40b8c4f620a8c1ed52424db08ac9a49fa8ce3c1bf1f28 | prismlab/irmin-scylla | irmin_scylla.mli |
* Copyright ( c ) 2013 - 2017 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND... | null | https://raw.githubusercontent.com/prismlab/irmin-scylla/f52c5c851233b4d9822ec937a31457d544ec0985/irmin-master/src/irmin-scylla/irmin_scylla.mli | ocaml | * Configuration values.
* An in-memory store for append-only values.
* An in-memory store with atomic-write guarantees. |
* Copyright ( c ) 2013 - 2017 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND... |
be9d53956e629f9121d5300107c3afd850f24e2a68de6ba1db94409d177618d1 | grin-compiler/grin | CodeGenBase.hs | # LANGUAGE LambdaCase , RecordWildCards , RankNTypes , TemplateHaskell #
module AbstractInterpretation.ExtendedSyntax.HeapPointsTo.CodeGenBase where
import Data.Int
import Data.Word
import Data.Set (Set)
import Data.Map (Map)
import Data.Vector (Vector)
import qualified Data.Bimap as Bimap
import qualified Data.Map a... | null | https://raw.githubusercontent.com/grin-compiler/grin/44ac2958810ecee969c8028d2d2a082d47fba51b/grin/src/AbstractInterpretation/ExtendedSyntax/HeapPointsTo/CodeGenBase.hs | haskell | mapping
internal
mapping
internal
creates regsiters for function arguments and result
Generate a node type from type information,
delete
FIXME: the following type signature is a bad oman ; it's not intuitive ; no-go ; refactor!
delete
For simple types, copies only pointer information
For nodes, copies the st... | # LANGUAGE LambdaCase , RecordWildCards , RankNTypes , TemplateHaskell #
module AbstractInterpretation.ExtendedSyntax.HeapPointsTo.CodeGenBase where
import Data.Int
import Data.Word
import Data.Set (Set)
import Data.Map (Map)
import Data.Vector (Vector)
import qualified Data.Bimap as Bimap
import qualified Data.Map a... |
86b74423f11818fc7a8b86fbab579d85c11b97d9b47598e28b3337a9e98652e8 | 8c6794b6/haskell-sc-scratch | Scratch05.hs | # LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
|
Module : $ Header$
CopyRight : ( c ) 8c6794b6
License : :
Stability : unstable
Portability : non - portable
Scratch written while reading typefun.pdf .
From /5 Phantom types/.
Module : $Header$
CopyRight : (c) 8... | null | https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/Scratch/LangExt/Typefun/Scratch05.hs | haskell | | Needs 'ScopedTypeVariables' language pragma. | # LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
|
Module : $ Header$
CopyRight : ( c ) 8c6794b6
License : :
Stability : unstable
Portability : non - portable
Scratch written while reading typefun.pdf .
From /5 Phantom types/.
Module : $Header$
CopyRight : (c) 8... |
9477815df1aac001de623abca6e910d2129a8a741e65d34d2d80ed8571edd922 | ruricolist/spinneret | cl-markdown.lisp | ;; We define this package to make ASDF package-inferred
;; systems happy
(defpackage #:spinneret/cl-markdown
(:use #:cl))
(in-package #:spinneret/cl-markdown)
;; Here we redefine a function inside of the main
;; package, to change it's behavior
(defun spinneret::parse-as-markdown (string)
"Expand STRING as markdow... | null | https://raw.githubusercontent.com/ruricolist/spinneret/25383a2d0005e2fffc0a0a10c5098c3a022c2cff/cl-markdown.lisp | lisp | We define this package to make ASDF package-inferred
systems happy
Here we redefine a function inside of the main
package, to change it's behavior | (defpackage #:spinneret/cl-markdown
(:use #:cl))
(in-package #:spinneret/cl-markdown)
(defun spinneret::parse-as-markdown (string)
"Expand STRING as markdown only if it contains markdown."
(declare (string string))
(let ((expansion
(with-output-to-string (s)
(let (markdown:*parse-active-f... |
808ccf772ed9cf6463bc234b8c80837da118fe2560f9ef893282e9d2f7a560af | ku-fpg/haskino-examples | StateMachine.hs | -------------------------------------------------------------------------------
-- |
-- Module : System.Hardware.Haskino.SamplePrograms.Deep.State
Copyright : ( c ) University of Kansas
-- License : BSD3
-- Stability : experimental
--
-- TBD
---------------------------------------------------------... | null | https://raw.githubusercontent.com/ku-fpg/haskino-examples/cdf10e43e5c8b5a38bc0bcbfb0e0faccfa9924e2/state/StateMachine.hs | haskell | -----------------------------------------------------------------------------
|
Module : System.Hardware.Haskino.SamplePrograms.Deep.State
License : BSD3
Stability : experimental
TBD
-----------------------------------------------------------------------------
fromEnum is currently not working with... | Copyright : ( c ) University of Kansas
module Main where
import System.Hardware.Haskino
import Data.Word
import LCD
hitachi :: LCDController
hitachi = Hitachi44780 { lcdRS = 8
, lcdEN = 9
, lcdD4 = 4
, lcdD5 = 5
, lcdD6 = 6
... |
804c6e67e863b844079d0e9490a14d899255f4684833222909724ebe1a80e7a9 | LPCIC/matita | nnumber_notation.mli | Copyright ( C ) 2004 , HELM Team .
*
* This file is part of HELM , an Hypertextual , Electronic
* Library of Mathematics , developed at the Computer Science
* Department , University of Bologna , Italy .
*
* is free software ; you can redistribute it and/or
* modify it under the terms of the GNU... | null | https://raw.githubusercontent.com/LPCIC/matita/794ed25e6e608b2136ce7fa2963bca4115c7e175/matita/components/ng_disambiguation/nnumber_notation.mli | ocaml | Copyright ( C ) 2004 , HELM Team .
*
* This file is part of HELM , an Hypertextual , Electronic
* Library of Mathematics , developed at the Computer Science
* Department , University of Bologna , Italy .
*
* is free software ; you can redistribute it and/or
* modify it under the terms of the GNU... | |
7f69bd106ffcccdae77e862b8286702ebab7018e2745e8b2d79974755774422c | Clozure/ccl | ppc-lap.lisp | -*- Mode : Lisp ; Package : CCL -*-
;;;
Copyright 1994 - 2009 Clozure Associates
;;;
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 appl... | null | https://raw.githubusercontent.com/Clozure/ccl/6c1a9458f7a5437b73ec227e989aa5b825f32fd3/compiler/PPC/ppc-lap.lisp | lisp | Package : CCL -*-
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 la... | Copyright 1994 - 2009 Clozure Associates
distributed under the License is distributed on an " AS IS " BASIS ,
(in-package "CCL")
(eval-when (:compile-toplevel :load-toplevel :execute)
(require "PPC32-ARCH")
(require "PPC64-ARCH")
(require "RISC-LAP")
(require "DLL-NODE")
(require "PPC-ASM")
(require ... |
736b936d577561c52fbd308486c1894dd948af6949f5f050e2f5de80bd42afcb | hspec/hspec | Discover.hs | # LANGUAGE FlexibleInstances #
# WARNING
" This module is used by @hspec - discover@. It is not part of the public API and may change at any time . "
#
"This module is used by @hspec-discover@. It is not part of the public API and may change at any time."
#-} (
Spec
, hspec
, IsFormatter (..)
, hspecWi... | null | https://raw.githubusercontent.com/hspec/hspec/e306bbd9bb5785b8b0eaf5ab136fcdb1bc9a3d31/src/Test/Hspec/Discover.hs | haskell | # LANGUAGE FlexibleInstances #
# WARNING
" This module is used by @hspec - discover@. It is not part of the public API and may change at any time . "
#
"This module is used by @hspec-discover@. It is not part of the public API and may change at any time."
#-} (
Spec
, hspec
, IsFormatter (..)
, hspecWi... | |
37c7deafdc36a213a0c29790af68f0da18d64c26c3ca5c79b13e6eba7d7c0056 | semilin/layoup | dof.lisp | (in-package :layoup/cli)
(defun dof-key-matrix (l)
(mapcar (lambda (row)
(-<>> row
(coerce <> 'list)
(remove #\SPACE)
(subseq <> 0 10)
(coerce <> 'string)))
l))
(defun dof-sync ()
(let* ((dof-url "/")
(names (-> (str:concat dof-url "_list.json")
dex:get
yason:parse)))
(lo... | null | https://raw.githubusercontent.com/semilin/layoup/27ec9ba9a9388cd944ac46206d10424e3ab45499/cli-src/dof.lisp | lisp | (in-package :layoup/cli)
(defun dof-key-matrix (l)
(mapcar (lambda (row)
(-<>> row
(coerce <> 'list)
(remove #\SPACE)
(subseq <> 0 10)
(coerce <> 'string)))
l))
(defun dof-sync ()
(let* ((dof-url "/")
(names (-> (str:concat dof-url "_list.json")
dex:get
yason:parse)))
(lo... | |
49d66e585f0162e56dc8a27ce1a22028dd0d05de4feff9e4164d97de9ee21615 | tsujigiri/axiom | axiom_test_helper.erl | -module(axiom_test_helper).
-compile(export_all).
build_request() ->
build_request([]).
build_request(Params) ->
Socket = undefined,
Transport = ranch_tcp,
Peer = undefined,
Method = proplists:get_value(method, Params, <<"GET">>),
Path = proplists:get_value(path, Params, <<"/">>),
Query = proplists:get_value('... | null | https://raw.githubusercontent.com/tsujigiri/axiom/009d6db9cf709b5fb1b2391fdc9f195e71f249d7/test/axiom_test_helper.erl | erlang | -module(axiom_test_helper).
-compile(export_all).
build_request() ->
build_request([]).
build_request(Params) ->
Socket = undefined,
Transport = ranch_tcp,
Peer = undefined,
Method = proplists:get_value(method, Params, <<"GET">>),
Path = proplists:get_value(path, Params, <<"/">>),
Query = proplists:get_value('... | |
222b22d00f58c9e84a2ed96be47ff21de50074d21dc629f900b500a78aed612a | passy/rss-markdown-proxy | Metrics.hs | {-# LANGUAGE OverloadedStrings #-}
module Lib.Metrics where
import Lib.Types (Metrics, Port, unPort)
import Network.Wai (Middleware)
import System.Remote.Monitoring (forkServer, serverMetricStore)
import qualified Network.Wai.Metrics as Metrics
getMetricsMiddleware :: Port Metrics -> IO Middleware
getMetricsMiddlewa... | null | https://raw.githubusercontent.com/passy/rss-markdown-proxy/71f08e8eda84701b23e369affbe59da3d9f5d53d/metrics/Lib/Metrics.hs | haskell | # LANGUAGE OverloadedStrings # |
module Lib.Metrics where
import Lib.Types (Metrics, Port, unPort)
import Network.Wai (Middleware)
import System.Remote.Monitoring (forkServer, serverMetricStore)
import qualified Network.Wai.Metrics as Metrics
getMetricsMiddleware :: Port Metrics -> IO Middleware
getMetricsMiddleware port = do
store <- serverMetri... |
3e49938e894ecf389ee6c5519e5e1cd99c67492e1dfb164400f4143a52f8495f | rtrusso/scp | expand.scm | (define *expand-start* #f)
(define *expand-count* 0)
(define *last-expand-count* 0)
(define *expand-remaining* 0)
(define *expand-reference-count* 0)
(define *expand-immediate-count* 0)
(define *expand-application-count* 0)
(define *expand-specform-count* 0)
(define *expand-macro-count* 0)
(define (expand-dump... | null | https://raw.githubusercontent.com/rtrusso/scp/2051e76df14bd36aef81aba519ffafa62b260f5c/src/scheme/syntax/core/expand.scm | scheme | (define (debug-expand . args)
(begin (for-each display args)
(newline))))
(debug-expand "expand top-level " expression)
(display "expanding name ")
(write expression)
(newline)
(debug-expand "expand reference " expression)
(display "expanding ... | (define *expand-start* #f)
(define *expand-count* 0)
(define *last-expand-count* 0)
(define *expand-remaining* 0)
(define *expand-reference-count* 0)
(define *expand-immediate-count* 0)
(define *expand-application-count* 0)
(define *expand-specform-count* 0)
(define *expand-macro-count* 0)
(define (expand-dump... |
60ba960fd1077031dd9e26d88fed2c1b19ccd9733a037cc7e932d284bcfb9f71 | gelisam/typelevel-rewrite-rules | Term.hs | module TypeLevel.Rewrite.Internal.Term where
import Data.Rewriting.Term (Term(Fun))
-- |
-- an expression like @(as ++ '[]) ++ bs@ would be represented as
@Fun appendTyCon [ Var " as " , Fun nilTyCon [ ] @
-- or rather
@Fun appendTyCon [ Fun starTyCon [ ] , " as " , Fun nilTyCon [ Fun starTyCon [ ] ] @
becaus... | null | https://raw.githubusercontent.com/gelisam/typelevel-rewrite-rules/9a693dacfedd7cccec753b687020fa40364756f9/src/TypeLevel/Rewrite/Internal/Term.hs | haskell | |
an expression like @(as ++ '[]) ++ bs@ would be represented as
or rather | module TypeLevel.Rewrite.Internal.Term where
import Data.Rewriting.Term (Term(Fun))
@Fun appendTyCon [ Var " as " , Fun nilTyCon [ ] @
@Fun appendTyCon [ Fun starTyCon [ ] , " as " , Fun nilTyCon [ Fun starTyCon [ ] ] @
because those polymorphic TyCons need to be specialized to the ' * ' kind
atomTerm
:: f... |
17403e588bb34679632ba271315b402daedea6f8d60bcd5a96c1b61abdd69d80 | kelsey-sorrels/zaffre | tileset.clj | (ns examples.tileset
(:require [zaffre.terminal :as zat]
[zaffre.glterminal :as zgl]
[zaffre.font :as zfont]
[zaffre.tilesets :as ztiles]
[zaffre.events :as zevents]
[zaffre.util :as zutil]
[taoensso.timbre :as log])
(:import (zaffre.terminal T... | null | https://raw.githubusercontent.com/kelsey-sorrels/zaffre/eb16a9b2095b54c835d39fa035533e5083fe7b02/src/examples/tileset.clj | clojure | render in background thread
key-chan (async/chan)
Every 33ms, draw a full frame
select new tile
draw new tile | (ns examples.tileset
(:require [zaffre.terminal :as zat]
[zaffre.glterminal :as zgl]
[zaffre.font :as zfont]
[zaffre.tilesets :as ztiles]
[zaffre.events :as zevents]
[zaffre.util :as zutil]
[taoensso.timbre :as log])
(:import (zaffre.terminal T... |
192043c33b6bd83a0a8c43b0a05a8b63a3162e25761bca4b80875497546e07f3 | pascal-knodel/haskell-craft | BinaryTree.hs | -- Binary tree.
module BinaryTree where
data Tree t
= Leaf
| Fork (Tree t) t (Tree t)
forks :: Tree t -> Integer
forks Leaf = 0
forks (Fork left _ right) = (forks left) + 1 + (forks right)
GHCi >
type Label = String
: {
let tree : : Tree Label
tree = Fork Leaf " root " Leaf
... | null | https://raw.githubusercontent.com/pascal-knodel/haskell-craft/c03d6eb857abd8b4785b6de075b094ec3653c968/Examples/%C2%B7%20Algebraic%20Data%20Types/Recursive/BinaryTree.hs | haskell | Binary tree. | module BinaryTree where
data Tree t
= Leaf
| Fork (Tree t) t (Tree t)
forks :: Tree t -> Integer
forks Leaf = 0
forks (Fork left _ right) = (forks left) + 1 + (forks right)
GHCi >
type Label = String
: {
let tree : : Tree Label
tree = Fork Leaf " root " Leaf
:}
forks tr... |
ca9bcdb6c9fc5b8bb82bf54e0ba75f98bf2aab9aac1ee287a9a900a4d78b0a6e | the-little-typer/pie | main.rkt | #lang racket/base
(require (for-syntax racket/base racket/match racket/string racket/format)
(for-syntax (for-syntax racket/base))
(for-syntax syntax/srcloc))
(require (for-syntax "parser.rkt"))
(require (for-syntax (except-in "basics.rkt" var-name? go-on)))
(require (for-syntax "rep.rkt" "typechecke... | null | https://raw.githubusercontent.com/the-little-typer/pie/a698d4cacd6823b5161221596d34bd17ce5282b8/main.rkt | racket | If there's an error, log all the tooltips we've
generated so far so the user gets some feedback.
Check whether there are free local variables
If there are free vars, print the
version with the horizontal line
If no free vars, show only the goal type.
find if last
Use normal Racket sexp indenting | #lang racket/base
(require (for-syntax racket/base racket/match racket/string racket/format)
(for-syntax (for-syntax racket/base))
(for-syntax syntax/srcloc))
(require (for-syntax "parser.rkt"))
(require (for-syntax (except-in "basics.rkt" var-name? go-on)))
(require (for-syntax "rep.rkt" "typechecke... |
16fc54462a1dbaba0e37362425d3b243f15a45f04878d1c8b3b8e1d6f412f6cb | falgon/htcc | CRules.hs | |
Module : Htcc . CRules
Description : The modules of C Rules
Copyright : ( c ) roki , 2019
License : MIT
Maintainer :
Stability : experimental
Portability : POSIX
The modules of C Rules
Module : Htcc.CRules
Description : The modules of C Rules
Copyright : (c) roki, 2019
Li... | null | https://raw.githubusercontent.com/falgon/htcc/3cef6fc362b00d4bc0ae261cba567bfd9c69b3c5/src/Htcc/CRules.hs | haskell | * Export modules | |
Module : Htcc . CRules
Description : The modules of C Rules
Copyright : ( c ) roki , 2019
License : MIT
Maintainer :
Stability : experimental
Portability : POSIX
The modules of C Rules
Module : Htcc.CRules
Description : The modules of C Rules
Copyright : (c) roki, 2019
Li... |
b6deba02c3fbcca1bb9b5f9c2311a77ad9b8a170a9af26a56b90c0c1d401fc6e | vmchale/morphism-zoo | SuffixBench.hs | # LANGUAGE TemplateHaskell #
module Main where
import Criterion.Main
import Suffix
shortString :: String
shortString = "tails"
mediumString :: String
mediumString = replicate 20 'a'
unicodeString :: String
unicodeString = "བོད་སྐད་ལ་པདི་ག་ར་རེད།"
longString :: String
longString = replicate 100 'a'
extraLongStri... | null | https://raw.githubusercontent.com/vmchale/morphism-zoo/4f1a040ddb3cb1f0292f94d98d34f3075c97d738/bench/SuffixBench.hs | haskell | # LANGUAGE TemplateHaskell #
module Main where
import Criterion.Main
import Suffix
shortString :: String
shortString = "tails"
mediumString :: String
mediumString = replicate 20 'a'
unicodeString :: String
unicodeString = "བོད་སྐད་ལ་པདི་ག་ར་རེད།"
longString :: String
longString = replicate 100 'a'
extraLongStri... | |
58e85102c8b615c5da5d648ba4eded764dff43ae0dfffefa8d6898949e303354 | cjohansen/gadget-inspector | browsable.cljc | (ns gadget.browsable)
(defprotocol Browsable
:extend-via-metadata true
(entries [data] "Return a sorted seq of key value pairs for browsing"))
(extend-type #?(:cljs cljs.core/PersistentVector
:clj clojure.lang.PersistentVector)
Browsable
(entries [v] (map-indexed vector v)))
(extend-type #?(:... | null | https://raw.githubusercontent.com/cjohansen/gadget-inspector/c7b8ed79fbba7218bb214955342ed19d5cc57bfd/lib/src/gadget/browsable.cljc | clojure | (ns gadget.browsable)
(defprotocol Browsable
:extend-via-metadata true
(entries [data] "Return a sorted seq of key value pairs for browsing"))
(extend-type #?(:cljs cljs.core/PersistentVector
:clj clojure.lang.PersistentVector)
Browsable
(entries [v] (map-indexed vector v)))
(extend-type #?(:... | |
12ec5bb3390902db6a5682424ef1818f30cb063e59eac975f7cc785e75861962 | schlepfilter/frp | net.cljc | (ns frp.primitives.net
(:require #?(:cljs [cljs.reader :as reader])
[aid.core :as aid]
[cats.protocols :as cats-protocols]
[cats.util :as util]
[com.rpl.specter :as s]
[linked.core :as linked]
[loom.graph :as graph]
[frp.time :as time... | null | https://raw.githubusercontent.com/schlepfilter/frp/4a889f0aefd3aa17371fe1f0cdfabdad01fece8f/src/frp/primitives/net.cljc | clojure | (ns frp.primitives.net
(:require #?(:cljs [cljs.reader :as reader])
[aid.core :as aid]
[cats.protocols :as cats-protocols]
[cats.util :as util]
[com.rpl.specter :as s]
[linked.core :as linked]
[loom.graph :as graph]
[frp.time :as time... | |
5123756f0b36d4080d55a8179a77b50f3bc8b63bb6b39135f057caedf40021a3 | snmsts/cl-langserver | hooks.lisp | (in-package :ls-base)
;;;; Hooks
;;;
We use Emacs - like ` add - hook ' and ` run - hook ' utilities to support
simple indirection . The interface is more CLish than the Emacs
;;; Lisp one.
(defmacro add-hook (place function)
"Add FUNCTION to the list of values on PLACE."
`(pushnew ,function ,place))
(defun ... | null | https://raw.githubusercontent.com/snmsts/cl-langserver/3b1246a5d0bd58459e7a64708f820bf718cf7175/src/helitage/hooks.lisp | lisp | Hooks
Lisp one. | (in-package :ls-base)
We use Emacs - like ` add - hook ' and ` run - hook ' utilities to support
simple indirection . The interface is more CLish than the Emacs
(defmacro add-hook (place function)
"Add FUNCTION to the list of values on PLACE."
`(pushnew ,function ,place))
(defun run-hook (functions &rest arg... |
cb1df736d96d6ebbb875901c3c5cd35b59818beb76f56902851845d14a9f7e91 | soulomoon/haskell-katas | Sieve.hs | module Kyu6.Sieve
( primes
)
where
import Data.List
-- primes :: Int -> [Int]
primes n
| n == 0 = []
| otherwise = foldl
(flip (\x -> (\\ (takeWhile (<= n) $ map (x *) [2 ..]))))
[2 .. n]
[2 .. n]
| null | https://raw.githubusercontent.com/soulomoon/haskell-katas/0861338e945e5cbaadf98138cf8f5f24a6ca8bb3/src/Kyu6/Sieve.hs | haskell | primes :: Int -> [Int] | module Kyu6.Sieve
( primes
)
where
import Data.List
primes n
| n == 0 = []
| otherwise = foldl
(flip (\x -> (\\ (takeWhile (<= n) $ map (x *) [2 ..]))))
[2 .. n]
[2 .. n]
|
a86b1a309e4d7aaa5b0d51cb661f08a1d4993343a80430f7df1085a9b94326db | janestreet/merlin-jst | gSet.ml | (******************************************************************************)
(* *)
(* *)
... | null | https://raw.githubusercontent.com/janestreet/merlin-jst/0152b4e8ef1b7cd0ddee2873aa1860a971585391/src/ocaml/preprocess/recover/gSet.ml | ocaml | ****************************************************************************
file LICEN... |
, Paris
, PPS , Université Paris Diderot
. All rights reserved . This file is distributed under the
terms of the GNU General Public License version 2 , as... |
ff768bdf8214e61289c579ad5dacbafd3f12697724cc5fc2fd2eec9bee27d21f | greglook/cljstyle | check_test.clj | (ns cljstyle.task.check-test
(:require
[cljstyle.task.check :as check]
[cljstyle.task.util :as u]
[cljstyle.test-util :refer [suppress-task-exit with-files capture-io]]
[clojure.java.io :as io]
[clojure.string :as str]
[clojure.test :refer [use-fixtures deftest testing is]]))
(use-fixtures :... | null | https://raw.githubusercontent.com/greglook/cljstyle/1f58e2e7af4c193aa77ad0695f6c2b9ac2c5c5ec/test/cljstyle/task/check_test.clj | clojure | (ns cljstyle.task.check-test
(:require
[cljstyle.task.check :as check]
[cljstyle.task.util :as u]
[cljstyle.test-util :refer [suppress-task-exit with-files capture-io]]
[clojure.java.io :as io]
[clojure.string :as str]
[clojure.test :refer [use-fixtures deftest testing is]]))
(use-fixtures :... | |
63ed59208218b8a680463537741f1da3dddd04a6f5e47b21f7c9c12cf66dba84 | kadena-io/pact | RowData.hs | # LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE ScopedTypeVariables #
-- |
-- Module : Pact.Types.RowData
Copyright : ( C ) 2021
-- License : BSD-style (see the file LICENSE)
Maintainer : < >
--
Versioned persistence for ' PactValue ' .
--... | null | https://raw.githubusercontent.com/kadena-io/pact/af024887dfd8eab522e2687bab586ee2b090557f/src/Pact/Types/RowData.hs | haskell | # LANGUAGE OverloadedStrings #
|
Module : Pact.Types.RowData
License : BSD-style (see the file LICENSE)
Needed for parsing guard
note: Parsing into `OldPactValue` here defaults to the code used in | # LANGUAGE LambdaCase #
# LANGUAGE DeriveGeneric #
# LANGUAGE ScopedTypeVariables #
Copyright : ( C ) 2021
Maintainer : < >
Versioned persistence for ' PactValue ' .
module Pact.Types.RowData
( RowData(..)
, RowDataVersion(..)
, RowDataValue(..)
, pactValueToRowData
, rowDataToPactValue
... |
1757333af79a28bf2b0e45213f67d437becd6fa728980b03381c336477c40a9c | Oblosys/proxima | DocUtils_Generated.hs | module DocUtils_Generated where
import DocTypes
import DocTypes_Generated
import PresTypes
--instance Show Node where
show = " < > "
show ( DocNode doc pth ) = " < " + + shallowShowDoc1 pth++ " > "
show ( ExpNode exp pth ) = " < " + + shallowShowExp1 exp++","++show pth++ " > "
-- show _ = "<N... | null | https://raw.githubusercontent.com/Oblosys/proxima/f154dff2ccb8afe00eeb325d9d06f5e2a5ee7589/invEditor/DocUtils_Generated.hs | haskell | instance Show Node where
show _ = "<NODE>"
because this function is only temporary
id functions: return (Just id) if node is the appropriate production, otherwise Nothing
obsolete, use bool_
-- constructors for boxed primitive types
mkString_ :: String -> String_
mkBool_ :: Bool -> Bool_
mkBool_ b = Bool_ ... | module DocUtils_Generated where
import DocTypes
import DocTypes_Generated
import PresTypes
show = " < > "
show ( DocNode doc pth ) = " < " + + shallowShowDoc1 pth++ " > "
show ( ExpNode exp pth ) = " < " + + shallowShowExp1 exp++","++show pth++ " > "
instance Eq Node where
nd1 == nd2 = ran... |
001875c56c8211e6de75179a9d883cca19aba0d2614fa229f65b48dfa6bb071a | codinuum/cca | f_pp_directive.ml |
Copyright 2013 - 2018 RIKEN
Copyright 2018 - 2020 Chiba Institude of Technology
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 b... | null | https://raw.githubusercontent.com/codinuum/cca/88ea07f3fe3671b78518769d804fdebabcd28e90/src/ast/analyzing/langs/fortran/parsing/src/labels/f_pp_directive.ml | ocaml | paren level |
Copyright 2013 - 2018 RIKEN
Copyright 2018 - 2020 Chiba Institude of Technology
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 b... |
40a41fa9411fe0ddd06947c882e8eea54dde6f44c9608cfb045526741ba5b4b4 | sharplispers/montezuma | parser.lisp | ;;;
Copyright ( c ) 2003 - 2005 , Gigamonkeys Consulting All rights reserved .
;;;
Parser generator , loosely based on META paper . The
;;; most obvious change is that we don't user reader macros because
;;; they're too much of a hassle.
;;;
(in-package #:montezuma.parser)
(defvar *productions* (make-hash-tabl... | null | https://raw.githubusercontent.com/sharplispers/montezuma/ee2129eece7065760de4ebbaeffaadcb27644738/src/util/parser.lisp | lisp |
most obvious change is that we don't user reader macros because
they're too much of a hassle.
of input they consume. CHARACTER-PARSERs consume characters and can
turn them into a vector of tokens or can proceed directly to a tree
might be produced by a CHARACTER-PARSER but not necessarily) and
return whatever... | Copyright ( c ) 2003 - 2005 , Gigamonkeys Consulting All rights reserved .
Parser generator , loosely based on META paper . The
(in-package #:montezuma.parser)
(defvar *productions* (make-hash-table :test #'eql))
Parsers -- different subclasses of PARSER differ based on the kind
or object representation .... |
b26f5be85b414e19ac87d82d77f1eedf19786fe290afef800ad13f209abb7441 | binsec/binsec | smtlib.mli | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2022
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/binsec/8ed9991d36451a3ae7487b966c4b38acca21a5b3/src/smtlib/smtlib.mli | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2022
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
f470687c2f36ec1780fdd9648cbef296c2b97a00633ead1f97d3b41201eee0a1 | borodust/alien-works | resources.lisp | (cl:in-package :alien-works.tools.resources)
(defun resize-file (path new-size)
(unless (zerop (%filament.util:aw+filament+tools+util+resize-file
'claw-utils:claw-string (namestring (truename path))
:unsigned-long new-size))
(error "Failed to resize file ~A" path)))
| null | https://raw.githubusercontent.com/borodust/alien-works/c4063ee2abb976a74509857f1c029256125e4f37/tools/resources/resources.lisp | lisp | (cl:in-package :alien-works.tools.resources)
(defun resize-file (path new-size)
(unless (zerop (%filament.util:aw+filament+tools+util+resize-file
'claw-utils:claw-string (namestring (truename path))
:unsigned-long new-size))
(error "Failed to resize file ~A" path)))
| |
517415bf1b1b6a9127b8957675e0730aaaaf1b00fa10cc0a0fc0b4fb4abf5473 | steshaw/PLAR | qelim.ml | (* ========================================================================= *)
(* Introduction to quantifier elimination. *)
(* *)
Copyright ( c ) 2003 - 2007 , . ( See " LICENSE.txt " for details . )
(* =... | null | https://raw.githubusercontent.com/steshaw/PLAR/c143b097d1028963f4c1d24f45a1a56c8b65b838/qelim.ml | ocaml | =========================================================================
Introduction to quantifier elimination.
=========================================================================
---------------... | Copyright ( c ) 2003 - 2007 , . ( See " LICENSE.txt " for details . )
let qelim bfn x p =
let cjs = conjuncts p in
let ycjs,ncjs = partition (mem x ** fv) cjs in
if ycjs = [] then p else
let q = bfn (Exists(x,list_conj ycjs)) in
itlist mk_and ncjs q;;
let lift_qelim afn nfn qfn =
let rec qelift var... |
c33ecfa3ac868f01187c9fbffe6dfc9ad03069dc14cdabf23bad035437a9f5ca | bottleneko/eraven | eraven_SUITE.erl | -module(eraven_SUITE).
-include_lib("eunit/include/eunit.hrl").
-compile([export_all, nowarn_export_all]).
-define(TEST_DSN, "@localhost:9000/1").
%%%===================================================================
%%% CT callbacks
%%%===================================================================
all() ->
... | null | https://raw.githubusercontent.com/bottleneko/eraven/b922adff52d14a2dd5a20abfcb790cfb6403f66f/test/eraven_SUITE.erl | erlang | ===================================================================
CT callbacks
===================================================================
===================================================================
Testcases
=================================================================== | -module(eraven_SUITE).
-include_lib("eunit/include/eunit.hrl").
-compile([export_all, nowarn_export_all]).
-define(TEST_DSN, "@localhost:9000/1").
all() ->
[set_environment_context,
set_process_extra,
set_user_context,
set_process_tags,
set_request_context,
log_error_test,
update_configuration... |
d571bd68966fd82d38b1cd9de4d942b4e16df5eacb6b9d011a05cd95aef2a2aa | haskell-CI/hackage-matrix-builder | Main.hs | # LANGUAGE DeriveGeneric #
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE RecursiveDo #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
... | null | https://raw.githubusercontent.com/haskell-CI/hackage-matrix-builder/bb813e9e4cf0d08352f33004c00ede987f45da56/src-ui.v3/src/Main.hs | haskell | # LANGUAGE FlexibleContexts #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
# LANGUAGE RecordWildCards #
# LANGUAGE RecursiveDo #
# LANGUAGE TypeOperators #
|
WARNING: the code that follows will make you cry;
a safety pig is provided below for your benefit.
... | # LANGUAGE DeriveGeneric #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE AllowAmbiguousTypes #
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -Wall -Wno - unused - imports #
Copyright : © 2018
SPDX - License - Identifier : GPL-3.0 - or -... |
a49305861d201a1fd1c105a5fe8a1dce2b311ab52e1b7dd3fc8766f596da7598 | geo2a/redfin-lib | Common.hs | module ISA.Example.Common where
import Data.SBV (SMTConfig (..), Timing (..), z3)
import ISA.Types
import ISA.Types.Symbolic
import ISA.Types.Symbolic.Address
defaultRegisters :: [(Register, Sym)]
defaultRegisters =
[ (R0, 0)
, (R1, 1)
, (R2, 2)
, (R3, 3)
]
defaultFlags :: [(Flag, Sym)]
defaultF... | null | https://raw.githubusercontent.com/geo2a/redfin-lib/8e4a477ba261dadb83a6d4fbd2dd379418840ed3/src/ISA/Example/Common.hs | haskell | module ISA.Example.Common where
import Data.SBV (SMTConfig (..), Timing (..), z3)
import ISA.Types
import ISA.Types.Symbolic
import ISA.Types.Symbolic.Address
defaultRegisters :: [(Register, Sym)]
defaultRegisters =
[ (R0, 0)
, (R1, 1)
, (R2, 2)
, (R3, 3)
]
defaultFlags :: [(Flag, Sym)]
defaultF... | |
18f3ef60d2e8463f170a6d6dd26e081dc5c24467c7f6b681e556d06ea804b9ee | geneweb/geneweb | sosaCache.mli | open Gwdb
(* Type pour ne pas créer à chaque fois un tableau tstab et mark *)
type sosa_t = {
tstab : (Gwdb.iper, int) Gwdb.Marker.t;
mark : (Gwdb.iper, bool) Gwdb.Marker.t;
mutable last_zil : (Gwdb.iper * Sosa.t) list;
sosa_ht : (Gwdb.iper, (Sosa.t * Gwdb.person) option) Hashtbl.t;
}
val build_sosa_tree_ht :... | null | https://raw.githubusercontent.com/geneweb/geneweb/747f43da396a706bd1da60d34c04493a190edf0f/lib/sosaCache.mli | ocaml | Type pour ne pas créer à chaque fois un tableau tstab et mark
print link if true
sosa_ref
sosa hash table | open Gwdb
type sosa_t = {
tstab : (Gwdb.iper, int) Gwdb.Marker.t;
mark : (Gwdb.iper, bool) Gwdb.Marker.t;
mutable last_zil : (Gwdb.iper * Sosa.t) list;
sosa_ht : (Gwdb.iper, (Sosa.t * Gwdb.person) option) Hashtbl.t;
}
val build_sosa_tree_ht : Config.config -> base -> person -> unit
* from the given person so... |
a5f147eb7e4c585760c6030a4c06b43b88ec8129f0132ac7cd9c0ef6e55a9df7 | iu-parfunc/verified-instances | TwoData.hs | {-@ LIQUID "--higherorder" @-}
{-@ LIQUID "--exactdc" @-}
{-@ LIQUID "--noadt" @-}
# LANGUAGE TemplateHaskell #
{-# LANGUAGE TypeFamilies #-}
module GenericProofs.VerifiedEq.Examples.Nat where
import Language.Haskell.Liquid.ProofCombinators
import GenericProofs.Iso
import GenericPro... | null | https://raw.githubusercontent.com/iu-parfunc/verified-instances/cebfdf1e3357a693360be74c90211be18ce3c045/generic-proofs/src/GenericProofs/VerifiedEq/Examples/TwoData.hs | haskell | @ LIQUID "--higherorder" @
@ LIQUID "--exactdc" @
@ LIQUID "--noadt" @
# LANGUAGE TypeFamilies #
@ axiomatize fromN @
@ axiomatize toN @
@ tofN :: a:N -> { toN (fromN a) == a } @
@ fotN :: a:RepN x -> { fromN (toN a) == a } @
@ axiomatize toMyProduct @ | # LANGUAGE TemplateHaskell #
module GenericProofs.VerifiedEq.Examples.Nat where
import Language.Haskell.Liquid.ProofCombinators
import GenericProofs.Iso
import GenericProofs.TH
import GenericProofs.VerifiedEq
import GenericProofs.VerifiedEq.Generics
import GenericProofs.VerifiedEq.Instances
import Generics.Deriving... |
2dd33bf871bb892ac123587725a73a06581be7d4f1f3ad0a68808da39b3959bb | VisionsGlobalEmpowerment/webchange | i_spy.clj | (ns webchange.dev-templates.i-spy
(:require [webchange.dev-templates :as t]
[webchange.templates.core :as templates]
[webchange.course.core :as core]))
(comment
(def test-course-slug "english")
(def scene-slug "i-spy-1")
(core/update-course-activity-template! test-course-slug scene-slu... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/118ba5ee407ba1261bac40a6ba5729ccda6e8150/env/dev/clj/webchange/dev_templates/i_spy.clj | clojure | (ns webchange.dev-templates.i-spy
(:require [webchange.dev-templates :as t]
[webchange.templates.core :as templates]
[webchange.course.core :as core]))
(comment
(def test-course-slug "english")
(def scene-slug "i-spy-1")
(core/update-course-activity-template! test-course-slug scene-slu... | |
92c2ea2a98c4b8f113dfc09789464c184226f792ec719e6b5ae618ade49ab211 | UU-ComputerScience/uulib | Example.hs | module Main where
-- import the the library functions from uulib
import UU.Parsing
import UU.Scanner
import our custom made
import Scanner
-- Some boilerplate code to use the parser
-- Give `parsetokens' your parser and a list of tokens, returned by the `scanTokens'
function exported by the Scanner module , ... | null | https://raw.githubusercontent.com/UU-ComputerScience/uulib/68a5e661547908979545b493da3a55418ca5a6aa/examples/parser/Example.hs | haskell | import the the library functions from uulib
Some boilerplate code to use the parser
Give `parsetokens' your parser and a list of tokens, returned by the `scanTokens'
messages in case of a parse error, or the parse tree.
define a parse tree
variable
= expr
body
write a parser for it
Note: * make sure that th... | module Main where
import UU.Parsing
import UU.Scanner
import our custom made
import Scanner
function exported by the Scanner module , then you get either a list of error
type TokenParser a = Parser Token a
parseTokens :: TokenParser a -> [Token] -> Either [String] a
parseTokens p tks
= if null msgs
th... |
e65c87a9d5ba0c6d742b41045baebdcce680ef9fb9d1099ad0bddf9060aee328 | darrenldl/stramon | path_trie.ml | type 'a t = {
value : 'a option;
children : 'a t String_map.t;
}
let empty : 'a t =
{
value = None;
children = String_map.empty;
}
let add (path : Abs_path.t) (v : 'a) (t : 'a t) : 'a t =
let rec aux t parts =
match parts with
| [] -> { t with value = Some v }
| x :: xs ->
let chil... | null | https://raw.githubusercontent.com/darrenldl/stramon/cc256173c46c13712b66898dd18693e7d6097040/lib/path_trie.ml | ocaml | type 'a t = {
value : 'a option;
children : 'a t String_map.t;
}
let empty : 'a t =
{
value = None;
children = String_map.empty;
}
let add (path : Abs_path.t) (v : 'a) (t : 'a t) : 'a t =
let rec aux t parts =
match parts with
| [] -> { t with value = Some v }
| x :: xs ->
let chil... | |
189bede2c867c30e40d241fd7b904dd0239d44603d07761996e5331df62970b7 | aryx/fork-efuns | mouse.ml | (*s: features/mouse.ml *)
(*s: copyright header efuns *)
(***********************************************************************)
(* *)
(* ... | null | https://raw.githubusercontent.com/aryx/fork-efuns/8f2f8f66879d45e26ecdca0033f9c92aec2b783d/features/mouse.ml | ocaml | s: features/mouse.ml
s: copyright header efuns
*********************************************************************
... |
Fabrice Le Fessant , projet Para / SOR , INRIA Rocquencourt
Copyright 1999 Institut National de Recherche en Informatique et
Automatique . Distributed only by permission .
open Efuns
module H = Highlight
l... |
fce78a99fd56b7bbcfab564b7f679c64fbfde2cd8cca01dcff1eb9b3d4a4337f | charlieg/Sparser | forms.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
copyright ( c ) 1995 - 1996 -- all rights reserved
;;;
;;; File: "forms"
;;; Module: "objects;rules:scan-patterns:"
version : September 1996
initiated 9/21/95 . Futzed with the interning 7/12/96 . Fleshed out
;; Update-no-space-patter... | null | https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/objects/rules/scan-patterns/forms.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
File: "forms"
Module: "objects;rules:scan-patterns:"
Update-no-space-pattern in a simplistic way 9/11 (has a pending problem
if the substantial check is included - see note).
------
form
------
---------------
work routines
---------------
should i... | copyright ( c ) 1995 - 1996 -- all rights reserved
version : September 1996
initiated 9/21/95 . Futzed with the interning 7/12/96 . Fleshed out
(in-package :sparser)
(defmacro define-no-space-pattern (name &rest args)
`(define-no-space-pattern/expr ',name ',args))
(defun define-no-space-patter... |
e498c315b124de17dc55f4d0406a959028440d7f4f4a6a2859df11c4e5e061ff | acl2/acl2 | logical-int.cpp.ref.ast.lsp |
(funcdef logical_or (a b) (block (return (logior1 a b))))(funcdef logical_and (a b) (block (return (logand1 a b))))(funcdef logical_not (a) (block (return (lognot1 a))))
| null | https://raw.githubusercontent.com/acl2/acl2/c2d69bad0ed3132cc19a00cb632de8b73558b1f9/books/projects/rac/tests/yaml_test/arithmetics/logical-int.cpp.ref.ast.lsp | lisp |
(funcdef logical_or (a b) (block (return (logior1 a b))))(funcdef logical_and (a b) (block (return (logand1 a b))))(funcdef logical_not (a) (block (return (lognot1 a))))
| |
610b4e659ea11c9fc2868b4fd7a01412d580bdcd2e9a6b4e6ed4d36e2dcebda8 | manuel-serrano/hop | mutable_strings.scm | (module mutable-strings (export (use-mutable-strings?)))
(define (use-mutable-strings?) #f)
| null | https://raw.githubusercontent.com/manuel-serrano/hop/481cb10478286796addd2ec9ee29c95db27aa390/scheme2js/mutable_strings.scm | scheme | (module mutable-strings (export (use-mutable-strings?)))
(define (use-mutable-strings?) #f)
| |
36c2d7cbcf03ddc272c83387128ead56d76a0585d6209f0d84c413a95371de70 | puppetlabs/puppetdb | export.clj | (ns puppetlabs.puppetdb.export
(:require [clojure.tools.logging :as log]
[clojure.walk]
[puppetlabs.puppetdb.scf.storage-utils :as sutils]
[puppetlabs.puppetdb.scf.hash :as hash]
[puppetlabs.kitchensink.core :as kitchensink]
[puppetlabs.puppetdb.anonymizer :... | null | https://raw.githubusercontent.com/puppetlabs/puppetdb/b3d6d10555561657150fa70b6d1e609fba9c0eda/src/puppetlabs/puppetdb/export.clj | clojure |
Utility Functions | (ns puppetlabs.puppetdb.export
(:require [clojure.tools.logging :as log]
[clojure.walk]
[puppetlabs.puppetdb.scf.storage-utils :as sutils]
[puppetlabs.puppetdb.scf.hash :as hash]
[puppetlabs.kitchensink.core :as kitchensink]
[puppetlabs.puppetdb.anonymizer :... |
028713113ceeef4482143fb321b7f9f5c7b1b892e8bb7eb181705518cbc3c9d6 | erleans/pgo | pgo_basic_SUITE.erl | -module(pgo_basic_SUITE).
-compile(export_all).
-include_lib("common_test/include/ct.hrl").
-include_lib("stdlib/include/assert.hrl").
-define(UUID, <<"727f42a6-e6a0-4223-9b72-6a5eb7436ab5">>).
-define(BIN_UUID, <<114,127,66,166,230,160,66,35,155,114,106,94,183,67,106,181>>).
-define(TXT_UUID, <<"727F42A6-E6A0-4223-... | null | https://raw.githubusercontent.com/erleans/pgo/80737e6c8b39ea682f60ebc4373e0bed6feadaf9/test/pgo_basic_SUITE.erl | erlang | -module(pgo_basic_SUITE).
-compile(export_all).
-include_lib("common_test/include/ct.hrl").
-include_lib("stdlib/include/assert.hrl").
-define(UUID, <<"727f42a6-e6a0-4223-9b72-6a5eb7436ab5">>).
-define(BIN_UUID, <<114,127,66,166,230,160,66,35,155,114,106,94,183,67,106,181>>).
-define(TXT_UUID, <<"727F42A6-E6A0-4223-... | |
66b5ea3da6eb8b5737daa87a347a4a1a63d2c22d7321e0e685afbd2d6960558d | Bigsy/pg-embedded-clj | state.clj | (ns pg-embedded-clj.state
(:require [clojure.tools.namespace.repl :as repl]))
(repl/disable-reload!)
(def state (atom nil))
| null | https://raw.githubusercontent.com/Bigsy/pg-embedded-clj/a7dce2df79bef943937a03f7de3cbc8efee47a8b/src/pg_embedded_clj/state.clj | clojure | (ns pg-embedded-clj.state
(:require [clojure.tools.namespace.repl :as repl]))
(repl/disable-reload!)
(def state (atom nil))
| |
89e73f21cb7fd5c2a47e3c7ad9d81751ad04ff65e9546dcd3e8862c83847d198 | jepsen-io/jepsen | linearizable_register.clj | (ns jepsen.tests.linearizable-register
"Common generators and checkers for linearizability over a set of independent
registers. Clients should understand three functions, for writing a value,
reading a value, and compare-and-setting a value from v to v'. Reads receive
`nil`, and replace it with the value actual... | null | https://raw.githubusercontent.com/jepsen-io/jepsen/a75d5a50dd5fa8d639a622c124bf61253460b754/jepsen/src/jepsen/tests/linearizable_register.clj | clojure | We randomize the limit a bit so that over time, keys
become misaligned, which prevents us from lining up
on Significant Event Boundaries. | (ns jepsen.tests.linearizable-register
"Common generators and checkers for linearizability over a set of independent
registers. Clients should understand three functions, for writing a value,
reading a value, and compare-and-setting a value from v to v'. Reads receive
`nil`, and replace it with the value actual... |
1be7e34d6c9cefa07f8e2f7fd26e9e3d2038b5ab62a3162d60273455d38b19b9 | letmaik/monadiccp | Queue.hs | # LANGUAGE TypeFamilies #
# LANGUAGE ViewPatterns #
# LANGUAGE FlexibleInstances #
- The Queue data type , a worklist data type for search .
-
- Monadic Constraint Programming
-
- The Queue data type, a worklist data type for search.
-
- Monadic Constraint Programming
- /~toms/Haskell/
-... | null | https://raw.githubusercontent.com/letmaik/monadiccp/fe4498e46a7b9d9e387fd5e4ed5d0749a89d0188/src/Control/CP/Queue.hs | haskell | popQ (Data.Sequence.viewl -> x Data.Sequence.:< xs) = (x,xs) | # LANGUAGE TypeFamilies #
# LANGUAGE ViewPatterns #
# LANGUAGE FlexibleInstances #
- The Queue data type , a worklist data type for search .
-
- Monadic Constraint Programming
-
- The Queue data type, a worklist data type for search.
-
- Monadic Constraint Programming
- /~toms/Haskell/
-... |
1f139154ced9ec93bc5b17523af8e2225a5f3a2271c53f26972a4a8add016d04 | openvstorage/alba | nsm_client.ml |
Copyright ( C ) iNuron -
This file is part of Open vStorage . For license information , see < LICENSE.txt >
Copyright (C) iNuron -
This file is part of Open vStorage. For license information, see <LICENSE.txt>
*)
open! Prelude
open Nsm_protocol
open Protocol
open Lwt.Infix
class client (nsm_host_clien... | null | https://raw.githubusercontent.com/openvstorage/alba/459bd459335138d6b282d332fcff53a1b4300c29/ocaml/src/nsm_client.ml | ocaml |
Copyright ( C ) iNuron -
This file is part of Open vStorage . For license information , see < LICENSE.txt >
Copyright (C) iNuron -
This file is part of Open vStorage. For license information, see <LICENSE.txt>
*)
open! Prelude
open Nsm_protocol
open Protocol
open Lwt.Infix
class client (nsm_host_clien... | |
7fc698c363cd9db094e055c56ab38b5271aa39e5da36695fdfa00071e289dba2 | ChrisPenner/charter | Charts.hs | module Charts (
-- * Serving Charts
serveChart
, serveDynamicChart
-- * Creating Charts
-- ** Automatic Charts
, autoChart
, autoChartWithHeaders
-- ** Manual Charts
, buildChart
... | null | https://raw.githubusercontent.com/ChrisPenner/charter/6fb718a4ee4ec7161d2e2f6c79a7febf48469d66/src/Charts.hs | haskell | * Serving Charts
* Creating Charts
** Automatic Charts
** Manual Charts
* Chart Options
* Assorted Types | module Charts (
serveChart
, serveDynamicChart
, autoChart
, autoChartWithHeaders
, buildChart
, defaultChartOptions
, ChartOptions(..)
, Chart
, Column(..)
, ChartStyle(..)
... |
fc533b128b2cc2ece96fd685d45c6590db1830c9080d83ff5830990d6f1b7667 | chenyukang/eopl | 37.scm | (load-relative "../libs/init.scm")
(load-relative "./base/exception-test.scm")
(load-relative "./base/exception-cases.scm")
;; add multi-arg into interpreter.
;; and add raising error when procedure number is not required number
(define the-lexical-spec
'((whitespace (whitespace) skip)
(comment ("%" (arbno (not... | null | https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/ch5/37.scm | scheme | add multi-arg into interpreter.
and add raising error when procedure number is not required number
new stuff
Lists. We will have lists of literal numbers only.
sllgen boilerplate ;;;;;;;;;;;;;;;;
extractors:
;;;;;;;;;;;;;;;; continuations ;;;;;;;;;;;;;;;;
procedures ;;;;;;;;;;;;;;;;
the interpreter ;;;;;;;;;;;... | (load-relative "../libs/init.scm")
(load-relative "./base/exception-test.scm")
(load-relative "./base/exception-cases.scm")
(define the-lexical-spec
'((whitespace (whitespace) skip)
(comment ("%" (arbno (not #\newline))) skip)
(identifier
(letter (arbno (or letter digit "_" "-" "?")))
symbol)
... |
d3431bd6ea01c28a64cb271b9c3b30867ff3ee80e50265750e8abcc2aa8de19a | sgbj/MaximaSharp | mathml.lisp | (in-package :maxima)
MathML - printing
Created by ( DMD ) , December 2002 / January 2003
;;
closely based on the original TeX conversion code in mactex.lisp ,
;; for which the following credits apply:
( c ) copyright 1987 ,
small corrections and additions : , 2001
additional additions : ( JM ... | null | https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/share/contrib/lurkmathml/mathml.lisp | lisp |
for which the following credits apply:
mathml(d10,"/tmp / foo.xml " ) ; ..
Method:
Producing MathML from a macsyma internal expression is done by
a reversal of the parsing process. Fundamentally, a
traversal of the expression tree is produced by the program,
with appropriate substitutions and recognition of th... | (in-package :maxima)
MathML - printing
Created by ( DMD ) , December 2002 / January 2003
closely based on the original TeX conversion code in mactex.lisp ,
( c ) copyright 1987 ,
small corrections and additions : , 2001
additional additions : ( JM ) , September 2001
additional corrections... |
be8812ff80e72ed106be4f88cb1c8aee2bd7437ae8fa2fb51537b820b59b948e | herd/herdtools7 | objUtil.ml | (****************************************************************************)
(* the diy toolsuite *)
(* *)
, University College London , UK .
, INRIA Par... | null | https://raw.githubusercontent.com/herd/herdtools7/6d781eb91debffdf56998171862a18e40908c3c5/litmus/objUtil.ml | ocaml | **************************************************************************
the diy toolsuite
en Automatique and ... | , University College London , UK .
, INRIA Paris - Rocquencourt , France .
Copyright 2010 - present Institut National de Recherche en Informatique et
This software is governed by the CeCILL - B license under French law and
modify and/ or redistribu... |
0c5159ed360dcb1b2ba290aa1aa7ed21050b553cd0f2538414b3e37a53cdcc98 | yetanalytics/pedestal-oidc | jwt_test.clj | (ns com.yetanalytics.pedestal-oidc.jwt-test
(:require [clojure.test :refer :all]
[com.yetanalytics.pedestal-oidc.jwt :refer :all]
[buddy.core.keys :as bkeys]
[buddy.sign.jwt :as jwt]))
(deftest get-keyset-test
(is (=
{"foo" (bkeys/public-key "dev-resources/keys/pubkey.pem... | null | https://raw.githubusercontent.com/yetanalytics/pedestal-oidc/e2294fc84dafca8300a7ab102e4d5841aa3f477b/src/test/com/yetanalytics/pedestal_oidc/jwt_test.clj | clojure | (ns com.yetanalytics.pedestal-oidc.jwt-test
(:require [clojure.test :refer :all]
[com.yetanalytics.pedestal-oidc.jwt :refer :all]
[buddy.core.keys :as bkeys]
[buddy.sign.jwt :as jwt]))
(deftest get-keyset-test
(is (=
{"foo" (bkeys/public-key "dev-resources/keys/pubkey.pem... | |
903b9b7db3dd116ff5a0ccf2a9a37b9fd891255fed2f9438aa37be7c92a3759d | MBcode/LispUtils | pfoil-cnf.lisp | A dual propositional version of FOIL for learning CNF .
See , " Encouraging Results on Learning CNF , " Machine Learning , to appear
Copyright ( c ) 1991 by . This program may be freely copied , used , or
;;;; modified provided that this copyright notice is included in each copy of this code
;;;; and parts t... | null | https://raw.githubusercontent.com/MBcode/LispUtils/8c9d09aa732fca1c7c5b42b6c5067b89de98cb49/stat/ml-progs/ml/pfoil-cnf.lisp | lisp | modified provided that this copyright notice is included in each copy of this code
and parts thereof.
Currently only handles discrete-valued features. Noise and missing data doesn't
cause any problems but there is no pruning.
can find no more conjuncts
all negative | A dual propositional version of FOIL for learning CNF .
See , " Encouraging Results on Learning CNF , " Machine Learning , to appear
Copyright ( c ) 1991 by . This program may be freely copied , used , or
(in-package :user)
(provide 'pfoil-cnf)
(eval-when (compile load eval)
(require 'data-utilities (ml-p... |
d859247032ad8f0c92f66b798240e38693c3d15c9d4195f7ead260a1c0e1ae17 | graninas/Functional-Design-and-Architecture | HDL.hs | module Andromeda.Hardware.HDL where
import Control.Monad.Free
type Guid = String
data ComponentClass = Sensors | Controllers
deriving (Read, Show)
data Parameter = Temperature | Pressure
deriving (Read, Show)
data ComponentDef = ComponentDef
{ componentClass :: ComponentClass
, componentGuid :: Guid
... | null | https://raw.githubusercontent.com/graninas/Functional-Design-and-Architecture/1736abc16d3e4917fc466010dcc182746af2fd0e/First-Edition/BookSamples/CH03/Services/ImpureStatelessRemote/Andromeda/Hardware/HDL.hs | haskell | module Andromeda.Hardware.HDL where
import Control.Monad.Free
type Guid = String
data ComponentClass = Sensors | Controllers
deriving (Read, Show)
data Parameter = Temperature | Pressure
deriving (Read, Show)
data ComponentDef = ComponentDef
{ componentClass :: ComponentClass
, componentGuid :: Guid
... | |
c6a197e5ec4e10c3dd4a2afeffc026708f364b000b58bc4ab0b69c432dab2d50 | casperschipper/ocaml-cisp | jack.ml | open Seq
external open_stream :
(float, Bigarray.float32_elt, Bigarray.c_layout) Bigarray.Array1.t
-> (float, Bigarray.float32_elt, Bigarray.c_layout) Bigarray.Array1.t
-> (int -> unit)
-> int * int
-> (int -> unit)
-> unit = "open_stream"
(* unit "open_stream" *)
let play in_channels sample_rate proc... | null | https://raw.githubusercontent.com/casperschipper/ocaml-cisp/dc74155cb1e73f7fa4d75eb467738eb770f44181/src/jack/jack.ml | ocaml | unit "open_stream"
just the number of channels
that's were I plug in
just the number of channels
that's were I plug in
just the number of channels
that's were I plug in
read line, discard \n
that's were I plug in
TODO
* midi in
| open Seq
external open_stream :
(float, Bigarray.float32_elt, Bigarray.c_layout) Bigarray.Array1.t
-> (float, Bigarray.float32_elt, Bigarray.c_layout) Bigarray.Array1.t
-> (int -> unit)
-> int * int
-> (int -> unit)
-> unit = "open_stream"
let play in_channels sample_rate proc_lst =
let streams = Ar... |
7ea9981c54f900f7900e6962ac0e2d99122ec771cc3a8d14f24b1587d7b461f3 | Clozure/ccl | compile-ccl.lisp | -*-Mode : LISP ; Package : CCL -*-
;;;
Copyright 1994 - 2009 Clozure Associates
;;;
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 appli... | null | https://raw.githubusercontent.com/Clozure/ccl/6c1a9458f7a5437b73ec227e989aa5b825f32fd3/lib/compile-ccl.lisp | lisp | Package : CCL -*-
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 la... | Copyright 1994 - 2009 Clozure Associates
distributed under the License is distributed on an " AS IS " BASIS ,
(in-package "CCL")
(require 'systems)
(defparameter *sysdef-modules*
'(systems compile-ccl))
(defparameter *level-1-modules*
'(level-1
l1-cl-package
l1-boot-1 l1-boot-2 l1-boot-3
l1-util... |
08384608116723e991124a1d22d501e6f73a82361fd9fa3f352b1f70821e51af | rogerallen/hello_lwjgl | project.clj | (require 'leiningen.core.eval)
;; per-os jvm-opts code cribbed from Overtone
(def JVM-OPTS
{:common []
:macosx ["-XstartOnFirstThread" "-Djava.awt.headless=true"]
:linux []
:windows []})
(defn jvm-opts
"Return a complete vector of jvm-opts for the current os."
[] (let [os (leiningen.core.eval/g... | null | https://raw.githubusercontent.com/rogerallen/hello_lwjgl/683b3f622a17e613cd792ded918048bd6d2fb87e/project.clj | clojure | per-os jvm-opts code cribbed from Overtone
Edit this to change the version.
Edit this to add/remove packages.
It's safe to just include all native dependencies, but you might
save some space if you know you don't need some platform.
These packages don't have any associated native ones.
Add your non-LWJGL depende... | (require 'leiningen.core.eval)
(def JVM-OPTS
{:common []
:macosx ["-XstartOnFirstThread" "-Djava.awt.headless=true"]
:linux []
:windows []})
(defn jvm-opts
"Return a complete vector of jvm-opts for the current os."
[] (let [os (leiningen.core.eval/get-os)]
(vec (set (concat (get JVM-OPTS... |
14bb83c89ecf9f61e117f4aff655bb992b7ce44a27b3ada6082e02521c94e6b9 | mathiasbourgoin/SPOC | Image_filter.ml |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2 , December 2004
Copyright ( C ) 2004 < >
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document , and changing it is allowed as long
as the name is changed .
... | null | https://raw.githubusercontent.com/mathiasbourgoin/SPOC/db8ac84fce7077caba1b2c33e9b2a01c1989620b/SpocLibs/Samples/Image_filter/Image_filter.ml | ocaml |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2 , December 2004
Copyright ( C ) 2004 < >
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document , and changing it is allowed as long
as the name is changed .
... | |
7f378a299c31629d5105c6e4c863c9dac29a7a7accbb25697cd8893dab4edbee | ocaml/dune | foo.ml | print_endline "public binary"
| null | https://raw.githubusercontent.com/ocaml/dune/0b33b3636f9f0c408f7aef83f8970fee57d26a1d/test/blackbox-tests/test-cases/env/env-bins/override-bins.t/pub/foo.ml | ocaml | print_endline "public binary"
| |
0305771c261f0ffc2707580b3b461078f7ac5ed257cc4e2cebbc6d4c5ad3c3e4 | jobjo/popper | arithmetic.ml | open Popper
open Sample
open Sample.Syntax
let simple_sum x y = x + y
let simple_diff x y = x - y
let simple_div x y = if y = 0 then None else Some (x / y)
type point =
{ x : int
; y : int
}
[@@deriving show, ord, popper]
let point_sum p1 p2 : point =
{ x = simple_sum p1.x p2.x; y = simple_sum p1.y p2.y }
l... | null | https://raw.githubusercontent.com/jobjo/popper/a22bc7750cb551d0b1be18097f52879e6be284c0/examples/arithmetic.ml | ocaml | Use built in sample and comparator | open Popper
open Sample
open Sample.Syntax
let simple_sum x y = x + y
let simple_diff x y = x - y
let simple_div x y = if y = 0 then None else Some (x / y)
type point =
{ x : int
; y : int
}
[@@deriving show, ord, popper]
let point_sum p1 p2 : point =
{ x = simple_sum p1.x p2.x; y = simple_sum p1.y p2.y }
l... |
b3b9539b84d10eaca2ae0cd91dc4d794babbda679122e4c02868b0fa925fcd36 | astrada/rxocaml | rxObserver.mli | Internal module ( see Rx . Observer )
val create :
?on_completed:(unit -> unit) ->
?on_error:(exn -> unit) ->
('a -> unit) ->
'a RxCore.observer
module type ObserverState = sig
type 'a state
val initial_state : unit -> 'a state
val on_completed : 'a state -> 'a state
val on_error : exn -> 'a sta... | null | https://raw.githubusercontent.com/astrada/rxocaml/6a4ea758108a07a8da129ba1555a260604f79091/src/rxObserver.mli | ocaml | Internal module ( see Rx . Observer )
val create :
?on_completed:(unit -> unit) ->
?on_error:(exn -> unit) ->
('a -> unit) ->
'a RxCore.observer
module type ObserverState = sig
type 'a state
val initial_state : unit -> 'a state
val on_completed : 'a state -> 'a state
val on_error : exn -> 'a sta... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.