_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 |
|---|---|---|---|---|---|---|---|---|
7ea5ab37554823c2a337b6ab03656b1501d430dbd1e3220640c45ab802c64b37 | joelburget/react-haskell | todomvc.hs | # LANGUAGE OverloadedStrings , NamedFieldPuns , Rank2Types , TemplateHaskell ,
LiberalTypeSynonyms , RebindableSyntax , DataKinds , CPP #
LiberalTypeSynonyms, RebindableSyntax, DataKinds, CPP #-}
module Main where
-- TODO:
-- * persistence
-- * routing
import Prelude hiding ((>>), return)
import Control.App... | null | https://raw.githubusercontent.com/joelburget/react-haskell/5de76473b7cfdd6b85ac618bea31e658794b54e2/example/todomvc/todomvc.hs | haskell | TODO:
* persistence
* routing
MODEL
UTILITY
this traversal is in lens but lens-family has a weird ix which isn't
what we want. definition just copied from lens.
TODO(joel) just use lens?
remove an item from the list by index
CONTROLLER
"If escape is pressed during the edit, the edit state should be left and
... | # LANGUAGE OverloadedStrings , NamedFieldPuns , Rank2Types , TemplateHaskell ,
LiberalTypeSynonyms , RebindableSyntax , DataKinds , CPP #
LiberalTypeSynonyms, RebindableSyntax, DataKinds, CPP #-}
module Main where
import Prelude hiding ((>>), return)
import Control.Applicative
import Data.String
import qual... |
595e9d404346111f2784c87ddef4e22c088ab41b7730527a7ab0d360b42156b2 | ndmitchell/supero | Example7.hs |
module Example7 where
main = putStrLn "Hello World!"
| null | https://raw.githubusercontent.com/ndmitchell/supero/a8b16ea90862e2c021bb139d7a7e9a83700b43b2/example/Example7.hs | haskell |
module Example7 where
main = putStrLn "Hello World!"
| |
6ba18e7e61da25d4391903ca5ce250b563efd0519035b17ceb305fd40dbaa499 | tfausak/factory | Main.hs | module Main (main) where
import Factory (main)
| null | https://raw.githubusercontent.com/tfausak/factory/27025465dc0045d43d8db1769bcc665fb55ee62e/executable/Main.hs | haskell | module Main (main) where
import Factory (main)
| |
2ff245396b5e4562b9e25cabccb5b14e73fd12b6137b1bdd8fdf78272ab3e203 | HunterYIboHu/htdp2-solution | wages-v3.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 wages-v3) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeati... | null | https://raw.githubusercontent.com/HunterYIboHu/htdp2-solution/6182b4c2ef650ac7059f3c143f639d09cd708516/Chapter4/Section23-Simultaneous-Processing/wages-v3.rkt | racket | about the language level of this file in a form that our tools can easily process.
data difinitions
a name represent the name of the record's employee;
a pay-rate represent the pay rate per hour of the employee.
constants
functions
[List-of Card] [List-of Record] -> [List-of Number]
employee. It will signals ... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname wages-v3) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(define-struct card [number hours])
A Card is ( ma... |
b7ea6dd340f31fc58bd1304e4505ab85f37f83d91868538ae207d0558f937da9 | multimodalrouting/osm-fulcro | d3svg_label_points.cljs | (ns app.ui.leaflet.layers.d3svg-label-points
(:require
[com.fulcrologic.fulcro.components :refer [defsc]]
[app.ui.leaflet.d3 :refer [d3SvgOverlay lngLat->Point color-by-accessibility accessibility-patterns feature->confident?]]))
(defn d3DrawCallback [sel proj data]
(let [radius 3
x-fn (fn [d] (.-x... | null | https://raw.githubusercontent.com/multimodalrouting/osm-fulcro/dedbf40686a18238349603021687694e5a4c31b6/src/main/app/ui/leaflet/layers/d3svg_label_points.cljs | clojure | (ns app.ui.leaflet.layers.d3svg-label-points
(:require
[com.fulcrologic.fulcro.components :refer [defsc]]
[app.ui.leaflet.d3 :refer [d3SvgOverlay lngLat->Point color-by-accessibility accessibility-patterns feature->confident?]]))
(defn d3DrawCallback [sel proj data]
(let [radius 3
x-fn (fn [d] (.-x... | |
c749d76b6e93e2df20fdf7252965da515495a85411df836c70217165c72385a0 | patrikja/AFPcourse | Middle.hs | {-# LANGUAGE GADTs #-}
module Middle where
import qualified Expr as E
import Expr.Gen () -- only instances
import Data.Maybe
import Test.QuickCheck
Alternative 1 : create two datatypes ExprI and ExprB
data ExprI where
LitI :: Int -> ExprI
(:+) :: ExprI -> ExprI -> Ex... | null | https://raw.githubusercontent.com/patrikja/AFPcourse/1a079ae80ba2dbb36f3f79f0fc96a502c0f670b6/L11/src/Middle.hs | haskell | # LANGUAGE GADTs #
only instances
| Check that the evals agree for well-typed terms
quickCheck prop_eval | module Middle where
import qualified Expr as E
import Data.Maybe
import Test.QuickCheck
Alternative 1 : create two datatypes ExprI and ExprB
data ExprI where
LitI :: Int -> ExprI
(:+) :: ExprI -> ExprI -> ExprI
IfI :: ExprB -> ExprI -> ExprI -> ExprI
der... |
a40c1f31e8d393c5e359804c9c6f8480feea7d56b06f400027467c598eaa6db1 | zytedata/sctools | views.cljs | (ns sctools.studio.views
(:require
["@mui/material/Button" :default Button]
["@mui/material/Checkbox" :default Checkbox]
["@mui/material/Dialog" :default Dialog]
["@mui/material/FormControlLabel" :default FormControlLabel]
["@mui/material/FormGroup" :default FormGroup]
["@mui/material/LinearPr... | null | https://raw.githubusercontent.com/zytedata/sctools/f63cdfea6699a52248fafecac3980a766eee0f62/src/sctools/studio/views.cljs | clojure | #p info
#p drag
#p infos
map of (k, v) => count
the job ids could be empty in db when user sets the url
directly.
#p (:_state state)
#p drag | (ns sctools.studio.views
(:require
["@mui/material/Button" :default Button]
["@mui/material/Checkbox" :default Checkbox]
["@mui/material/Dialog" :default Dialog]
["@mui/material/FormControlLabel" :default FormControlLabel]
["@mui/material/FormGroup" :default FormGroup]
["@mui/material/LinearPr... |
91d61016607acb472deb84fa5d30b82a56ac410b34bbf2fb5eaecbdcbb179db9 | ghc/packages-Cabal | Exe.hs | import Lib
main = putStrLn lib
| null | https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-testsuite/PackageTests/ConfigureComponent/SubLib/exe/Exe.hs | haskell | import Lib
main = putStrLn lib
| |
aaa9b4d0f1aad7244d660329834657053e02590920a12519f8258f84e471f0f7 | ocsigen/ocaml-eliom | function_in_ref.ml |
let f x = x + 1
let g x = x - 1
let run () =
let r = ref f in
r := g;
let n = !r 1 in
assert(n = 0)
| null | https://raw.githubusercontent.com/ocsigen/ocaml-eliom/497c6707f477cb3086dc6d8124384e74a8c379ae/testsuite/tests/basic-more/function_in_ref.ml | ocaml |
let f x = x + 1
let g x = x - 1
let run () =
let r = ref f in
r := g;
let n = !r 1 in
assert(n = 0)
| |
a959425c4168317af3ad5707d297ed995c26ecee7b25a95ffcef1472856b6419 | 5HT/ant | Graphic.ml |
open XNum;
type colour =
[ Grey of num
| RGB of num and num and num
| CMYK of num and num and num and num
];
type bezier 'a = ('a * 'a * 'a * 'a * 'a * 'a * 'a * 'a);
type path 'a = list (bezier 'a);
type path_cmd = [ Stroke | Fill | Clip ];
type line_cap = [ Butt | Circle | Square ];
type line_join = [ Miter... | null | https://raw.githubusercontent.com/5HT/ant/6acf51f4c4ebcc06c52c595776e0293cfa2f1da4/Runtime/Graphic.ml | ocaml |
open XNum;
type colour =
[ Grey of num
| RGB of num and num and num
| CMYK of num and num and num and num
];
type bezier 'a = ('a * 'a * 'a * 'a * 'a * 'a * 'a * 'a);
type path 'a = list (bezier 'a);
type path_cmd = [ Stroke | Fill | Clip ];
type line_cap = [ Butt | Circle | Square ];
type line_join = [ Miter... | |
282f8995b280cedf7e1eecc0c6733aa91edf9f511ef66e196634f74edafddbc8 | cartazio/tlaps | toolbox.ml |
* toolbox.ml --- toolbox interaction
*
* Copyright ( C ) 2008 - 2010 INRIA and Microsoft Corporation
* toolbox.ml --- toolbox interaction
*
* Copyright (C) 2008-2010 INRIA and Microsoft Corporation
*)
Revision.f "$Rev: 34565 $";;
open Ext
open Proof.T
open Expr.T
open Expr.Subst
open Property
open ... | null | https://raw.githubusercontent.com/cartazio/tlaps/562a34c066b636da7b921ae30fc5eacf83608280/src/backend/toolbox.ml | ocaml | *** duplicates prep.ml ****
---------------
Functions to deal with toolbox commands ("stop" and "kill").
Read standard input and update the [stopped] and [killed] variables.
Get any pending commands from the toolbox and return true iff the toolbox
sent "stop" at any point in the past.
Get any pending comman... |
* toolbox.ml --- toolbox interaction
*
* Copyright ( C ) 2008 - 2010 INRIA and Microsoft Corporation
* toolbox.ml --- toolbox interaction
*
* Copyright (C) 2008-2010 INRIA and Microsoft Corporation
*)
Revision.f "$Rev: 34565 $";;
open Ext
open Proof.T
open Expr.T
open Expr.Subst
open Property
open ... |
51e5b767f30ebc109ca1502b67ce2e9f466fb9a114ee976f1f26117069831693 | snowleopard/hadrian | Type.hs | # LANGUAGE TypeFamilies #
-----------------------------------------------------------------------------
-- |
Module : . Oracles . . Type
Copyright : ( c ) 2014 - 2018
License : MIT ( see the file LICENSE )
-- Maintainer :
-- Stability : experimental
--
-- This module defines the types of keys use... | null | https://raw.githubusercontent.com/snowleopard/hadrian/b9a3f9521b315942e1dabb006688ee7c9902f5fe/src/Hadrian/Oracles/Cabal/Type.hs | haskell | ---------------------------------------------------------------------------
|
Maintainer :
Stability : experimental
This module defines the types of keys used by the /Cabal oracles/. See the
---------------------------------------------------------------------------
@(Compiler, Maybe Platform)@ is fully determi... | # LANGUAGE TypeFamilies #
Module : . Oracles . . Type
Copyright : ( c ) 2014 - 2018
License : MIT ( see the file LICENSE )
module " Hadrian . Oracles . " for supported Cabal oracle queries , and the
module " Hadrian . Oracles . . Rules " for the corresponing Shake rules .
module Hadrian.Oracl... |
b57b94380bbd26c620cb32ef6771958586bd97ed28b89aa72335c71f951c963a | arcfide/oleg | SXs.scm | Evaluation of this file yields LaTeX data for an article
$ I d : SXs.scm , v 3.1 2004/11/03 22:45:29 oleg Exp $
(define Content
'(html:begin
(Header
(title "(S)XML tools")
(description "W3C-compliant XML processing in Scheme. Submitted to the International LISP conference.")
(Date-Revision-yyyymmdd... | null | https://raw.githubusercontent.com/arcfide/oleg/c6826870436925fd4c873c01d7fcc24a7a7f95dc/ssax/docs/SXs.scm | scheme | --------------------------------------------------
--------------------------------------------------
--------------------------------------------------
and higher-level, abbreviated
--------------------------------------------------
--------------------------------------------------
therefore, preparing such a mani... | Evaluation of this file yields LaTeX data for an article
$ I d : SXs.scm , v 3.1 2004/11/03 22:45:29 oleg Exp $
(define Content
'(html:begin
(Header
(title "(S)XML tools")
(description "W3C-compliant XML processing in Scheme. Submitted to the International LISP conference.")
(Date-Revision-yyyymmdd... |
fdb209983388067c8a6f6cc203a9ddef54e05e7839a4bbba184ada32065af676 | onyx-platform/onyx | serialize.clj | (ns onyx.messaging.serialize
(:require [onyx.compression.nippy :refer [messaging-compress messaging-decompress]]
[onyx.types :as t :refer [barrier ready ready-reply heartbeat]]
[onyx.messaging.serializers.helpers :refer [uncoerce-peer-id coerce-peer-id]]
[onyx.messaging.serializers... | null | https://raw.githubusercontent.com/onyx-platform/onyx/74f9ae58cdbcfcb1163464595f1e6ae6444c9782/src/onyx/messaging/serialize.clj | clojure | (ns onyx.messaging.serialize
(:require [onyx.compression.nippy :refer [messaging-compress messaging-decompress]]
[onyx.types :as t :refer [barrier ready ready-reply heartbeat]]
[onyx.messaging.serializers.helpers :refer [uncoerce-peer-id coerce-peer-id]]
[onyx.messaging.serializers... | |
db108ee41e24499342984b1ecbf86a6474facca17b7bfa771094036f3257885c | semilin/layoup | tesc.lisp |
(MAKE-LAYOUT :NAME "tesc" :MATRIX
(APPLY #'KEY-MATRIX '("krngvjpuo/" "tlhsfyciae" "qzbmxwd,.;"))
:SHIFT-MATRIX NIL :KEYBOARD NIL) | null | https://raw.githubusercontent.com/semilin/layoup/27ec9ba9a9388cd944ac46206d10424e3ab45499/data/layouts/tesc.lisp | lisp |
(MAKE-LAYOUT :NAME "tesc" :MATRIX
(APPLY #'KEY-MATRIX '("krngvjpuo/" "tlhsfyciae" "qzbmxwd,.;"))
:SHIFT-MATRIX NIL :KEYBOARD NIL) | |
7912fa978082eaac5180c648e45d8495f4aa7d9c7eddf34e85972c5fae1bdf28 | chaw/r7rs-libs | analog-clock.sps | ;; An analog clock, translating the Tcl example at
;; (Note: due to the time-coding used, this only displays GMT)
(import (scheme base)
(scheme inexact)
(scheme time)
(rebottled pstk)
(only (robin constants) PI)
(slib time-core))
Draws the hands on the canvas using the curre... | null | https://raw.githubusercontent.com/chaw/r7rs-libs/b8b625c36b040ff3d4b723e4346629a8a0e8d6c2/rebottled-examples/pstk/analog-clock.sps | scheme | An analog clock, translating the Tcl example at
(Note: due to the time-coding used, this only displays GMT)
second hand
minute hand
hour hand |
(import (scheme base)
(scheme inexact)
(scheme time)
(rebottled pstk)
(only (robin constants) PI)
(slib time-core))
Draws the hands on the canvas using the current time , and repeats each second
(define (hands canvas)
(canvas 'delete 'withtag "hands")
(let* ((time (time:... |
fe0d63ae5717d96f0b3b6c4c900b1273a3c50413196564eeaceb3ec82ce8e5fa | triffon/fp-2021-22 | class.08.rkt | #lang racket
(define a1
(list (cons 1 '(2 3 4))
(cons 1 3)
(cons 15 2)
(cons 6 "neshto")))
(define a2
'((1 2) (2 3) (3 1 4) (4 3 5) (5 5)))
(define (get-value x)
(cdr x))
(define (assoc k l)
(cond
((null? l) #f)
((equal? k (car (car l))) (get-value (car l)))
(else (assoc k (... | null | https://raw.githubusercontent.com/triffon/fp-2021-22/fd534461df12a9a6af72b644ba4211474b33fff3/exercises/6/08-more/class.08.rkt | racket | като запазва само първата стойност.
Да се напише функция (predecessors v g),
която връща списък с всички предшественици | #lang racket
(define a1
(list (cons 1 '(2 3 4))
(cons 1 3)
(cons 15 2)
(cons 6 "neshto")))
(define a2
'((1 2) (2 3) (3 1 4) (4 3 5) (5 5)))
(define (get-value x)
(cdr x))
(define (assoc k l)
(cond
((null? l) #f)
((equal? k (car (car l))) (get-value (car l)))
(else (assoc k (... |
2db48d88c4043b20de2bed11372ba122703e09cbb84449a2dfff864451e22d30 | bhauman/advent-of-clojure | day22.clj | (ns advent-2015.day22
(:require
[clojure.pprint :as p]
[clojure.set :refer [union intersection difference]]))
(def spells
#{[53 4 0 0 0 0]
[73 2 2 0 0 0]
[113 0 0 7 0 6]
[173 3 0 0 0 6]
[229 0 0 0 101 5]})
(def boss
[0 8 0 0 0 0 0])
(defn update-effects [{:keys [effects] :as state} acti... | null | https://raw.githubusercontent.com/bhauman/advent-of-clojure/856763baf45bf7bf452ffd304dc1b89f9bc879a6/src/advent-2015/day22.clj | clojure | immediate
this is the magic sauce
evaluate the rate of damage and make sure we don't get too far ahead
game over | (ns advent-2015.day22
(:require
[clojure.pprint :as p]
[clojure.set :refer [union intersection difference]]))
(def spells
#{[53 4 0 0 0 0]
[73 2 2 0 0 0]
[113 0 0 7 0 6]
[173 3 0 0 0 6]
[229 0 0 0 101 5]})
(def boss
[0 8 0 0 0 0 0])
(defn update-effects [{:keys [effects] :as state} acti... |
1a58b35ea6f71f6b24541c74fdecccc00400aca5703b94f9861e2504116bea03 | kawu/crf-chain1 | Model.hs | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE TemplateHaskell #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
| Internal implementation of the CRF model .
module Data.CRF.Chain1.Model
( FeatIx (..)
, Model (..)
, mkModel
, lbSet
, valueL
, featToIx
, featToInt
, sgValue
, sgIxs
, obIxs
, nextIxs... | null | https://raw.githubusercontent.com/kawu/crf-chain1/ff12f620e0dd3fa1b831902a10b687d6b9a37861/src/Data/CRF/Chain1/Model.hs | haskell | | A feature index. To every model feature a unique index is assigned.
| A label and a feature index determined by that label.
| The model is realy a map from features to potentials, but for the sake
of efficiency the internal representation is more complex.
| Value (potential) of the model for feature index.
| A... | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE TemplateHaskell #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
| Internal implementation of the CRF model .
module Data.CRF.Chain1.Model
( FeatIx (..)
, Model (..)
, mkModel
, lbSet
, valueL
, featToIx
, featToInt
, sgValue
, sgIxs
, obIxs
, nextIxs... |
056b6c15447648e6b856bd300ccbd36d79ae20559a3be93805fffa739ccae0be | tanders/cluster-engine | 05i.rules-stop-search.lisp | (in-package cluster-engine)
July 2012
;Rules for how to stop a search before it reaches maximum index
July 2013 - developed and fixed a bug
( defvar * stop ? * nil ) ; this is defined in 02.engine.lisp
stop at time ( 2012/13 )
(defun stoprule-n-rhythmengine-all-at-timepoint-OR (engines stoptime flag-for-metric-engin... | null | https://raw.githubusercontent.com/tanders/cluster-engine/064ad4fd107f8d9a3dfcaf260524c2ab034c6d3f/sources/05i.rules-stop-search.lisp | lisp | Rules for how to stop a search before it reaches maximum index
this is defined in 02.engine.lisp
this is just to take away error message for unused variables
this is just to take away error message for unused variables
always true
this is just to take away error message for unused variables
always true
rule-n-engines... | (in-package cluster-engine)
July 2012
July 2013 - developed and fixed a bug
stop at time ( 2012/13 )
(defun stoprule-n-rhythmengine-all-at-timepoint-OR (engines stoptime flag-for-metric-engine)
"Formats a rule for stoptime in n engines. The engines have to be a rhythm engines. The rule checks if the START TIME of ... |
e891b38641b7a14f445901a3c858442f1c2fd95dfdc7145984d4c1bfaf0856be | takikawa/racket-ppa | info.rkt | (module info setup/infotab (#%module-begin (define collection (quote multi)) (define deps (quote ("base" ("scribble-lib" #:version "1.46")))) (define build-deps (quote ("scheme-lib" "at-exp-lib"))) (define pkg-desc "Racket Documentation driver") (define pkg-authors (quote (eli jay matthias mflatt robby ryanc samth))) (... | null | https://raw.githubusercontent.com/takikawa/racket-ppa/5f2031309f6359c61a8dfd1fec0b77bbf9fb78df/share/pkgs/racket-index/info.rkt | racket | (module info setup/infotab (#%module-begin (define collection (quote multi)) (define deps (quote ("base" ("scribble-lib" #:version "1.46")))) (define build-deps (quote ("scheme-lib" "at-exp-lib"))) (define pkg-desc "Racket Documentation driver") (define pkg-authors (quote (eli jay matthias mflatt robby ryanc samth))) (... | |
8af110d93f73c4bf5f87ccd49c3b420549c67b0e84fc19b286c85f2ea95e20ba | garrigue/lablgtk | testdnd.ml | (**************************************************************************)
Lablgtk - Examples
(* *)
(* This code is in the public domain. *)
(* You may f... | null | https://raw.githubusercontent.com/garrigue/lablgtk/504fac1257e900e6044c638025a4d6c5a321284c/examples/testdnd.ml | ocaml | ************************************************************************
This code is in the public domain.
You may freely copy parts of it in your application.
... | Lablgtk - Examples
this is a translation in of the gtk+ example testdnd.c
open Gaux
open Gtk
open GObj
let _ = GMain.init ()
let drag_icon_xpm = [|
"36 48 9 1";
" c None";
". c #020204";
"+ c #8F8F90";
"@ c #D3D3D2";
"# c #AEAEAC";
"$ c #ECECEC";
"% c #... |
61ee2beb99054a93d9de8b583c9cc92327075aee63ef1b886ced97103d466fc3 | privet-kitty/cl-competitive | dictionary-order.lisp | (defpackage :cp/test/dictionary-order
(:use :cl :fiveam :cp/dictionary-order)
(:import-from :cp/test/base #:base-suite))
(in-package :cp/test/dictionary-order)
(in-suite base-suite)
(test dictionary-order
;; list
(is (dict< #'< '(1 1) '(1 2)))
(is (dict< #'< '(1 1) '(1 1 0)))
(is (not (dict< #'< '(1 2) '(1... | null | https://raw.githubusercontent.com/privet-kitty/cl-competitive/4d1c601ff42b10773a5d0c5989b1234da5bb98b6/module/test/dictionary-order.lisp | lisp | list
vector | (defpackage :cp/test/dictionary-order
(:use :cl :fiveam :cp/dictionary-order)
(:import-from :cp/test/base #:base-suite))
(in-package :cp/test/dictionary-order)
(in-suite base-suite)
(test dictionary-order
(is (dict< #'< '(1 1) '(1 2)))
(is (dict< #'< '(1 1) '(1 1 0)))
(is (not (dict< #'< '(1 2) '(1 2))))
(... |
a8897a833aeb06be9aa339e8d0bdba035afce39a9e9759fedc0357875ef993a9 | xu-hao/QueryArrow | Commands.hs | # LANGUAGE DeriveFunctor , RankNTypes , GADTs , StandaloneDeriving , MultiParamTypeClasses #
module QueryArrow.FileSystem.Commands (
File(fHost), fsreplaceFileName, fsfileName, fsRelP, fsDir, fsreplaceRelP,
fileToResultValue, resultValueToFile,
Stats(..), FSProgram,
fsid, fsmode, stat, fswrite, fsre... | null | https://raw.githubusercontent.com/xu-hao/QueryArrow/4dd5b8a22c8ed2d24818de5b8bcaa9abc456ef0d/QueryArrow-db-filesystem/src/QueryArrow/FileSystem/Commands.hs | haskell | # LANGUAGE DeriveFunctor , RankNTypes , GADTs , StandaloneDeriving , MultiParamTypeClasses #
module QueryArrow.FileSystem.Commands (
File(fHost), fsreplaceFileName, fsfileName, fsRelP, fsDir, fsreplaceRelP,
fileToResultValue, resultValueToFile,
Stats(..), FSProgram,
fsid, fsmode, stat, fswrite, fsre... | |
c370916c7e097dfe715fc423a982159e1bfd89fc79589da393e552f55867cb0f | clojure-lsp/clojure-lsp | shared_test.clj | (ns clojure-lsp.shared-test
(:require
[clojure-lsp.shared :as shared]
[clojure-lsp.test-helper :as h]
[clojure.test :refer [are deftest is testing]]
[medley.core :as medley]))
(h/reset-components-before-test)
(deftest deep-merge
(testing "simple deep merge"
(is (= {:a {:b 2 :c 3}} (shared/deep-mer... | null | https://raw.githubusercontent.com/clojure-lsp/clojure-lsp/2b078904ff3bcb79640f20264b8faa16a6c5b204/lib/test/clojure_lsp/shared_test.clj | clojure | standard
with spaces
TODO: this fails because `(unescape-uri uri)` converts %20 to a space
character, which we don't want. But, we can't remove `(unescape-uri uri)`,
paths to contain spaces, so I'm leaving this test commented out. Would be
nice to fix someday.
standard
coc.nvim
coc.nvim doesn't include // auth... | (ns clojure-lsp.shared-test
(:require
[clojure-lsp.shared :as shared]
[clojure-lsp.test-helper :as h]
[clojure.test :refer [are deftest is testing]]
[medley.core :as medley]))
(h/reset-components-before-test)
(deftest deep-merge
(testing "simple deep merge"
(is (= {:a {:b 2 :c 3}} (shared/deep-mer... |
fb7eba958584be7b10a76fb303ca4fc5f262c98c81bbd85c1726bf01244fdf49 | tekul/broch | TokenSpec.hs | {-# LANGUAGE OverloadedStrings #-}
# OPTIONS_GHC -fno - warn - missing - signatures #
module Broch.OAuth2.TokenSpec where
import Control.Monad.Identity
import Crypto.Random
import qualified Data.Aeson as A
import Data.ByteArray.Encoding
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as BL... | null | https://raw.githubusercontent.com/tekul/broch/885ace4652cad4dcd806c8c31c1a59bf6a9a3337/tests/Broch/OAuth2/TokenSpec.hs | haskell | # LANGUAGE OverloadedStrings #
This is really just a special case of not equal to the authorization value | # OPTIONS_GHC -fno - warn - missing - signatures #
module Broch.OAuth2.TokenSpec where
import Control.Monad.Identity
import Crypto.Random
import qualified Data.Aeson as A
import Data.ByteArray.Encoding
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as BL
import Data.Map (Map)
import Data.... |
b21f83f2e2d9d3ff3d2428e0ab03f115bba3dde22515669105f5d8ec7fcec6ec | tonyg/rmacs | display-gui.rkt | #lang racket/base
;; Implicitly provides a factory via display.rkt's `register-tty-backend!`.
(require racket/set)
(require racket/match)
(require racket/class)
(require racket/gui/base)
(require racket/generic)
(require "display.rkt")
(struct gui (frame ;; frame%
canvas ;; canvas%
keys-ch ;... | null | https://raw.githubusercontent.com/tonyg/rmacs/8c99dd5dfa22f1f34707bbe957de268dc6a7a632/rmacs/display-gui.rkt | racket | Implicitly provides a factory via display.rkt's `register-tty-backend!`.
frame%
canvas%
Channel
(Option Key)
Screen
(define/override (on-event e) | #lang racket/base
(require racket/set)
(require racket/match)
(require racket/class)
(require racket/gui/base)
(require racket/generic)
(require "display.rkt")
)
#:methods gen:tty
[(define (tty-pending-screen t) (gui-screen t))
(define (set-tty-pending-screen! t s) (set-gui-screen! t s))
(defin... |
8d1be37002d4612ecc828f83aaac24c46d26c353aafeebb1981dcb6a9e82b436 | lgandersen/edgedns | edge_core_traffic_monitor.erl | %%%-------------------------------------------------------------------
@author
( C ) 2017 , Lasse Grinderslev Andersen
%%% @doc
%%%
%%% @end
%%%-------------------------------------------------------------------
-module(edge_core_traffic_monitor).
-behaviour(gen_server).
%% API
-export([start_link/0,
... | null | https://raw.githubusercontent.com/lgandersen/edgedns/6f1d414eed5ec412b934d3a82a694597fdee4649/apps/edge_core/src/edge_core_traffic_monitor.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API
gen_server callbacks
===================================================================
API
===================================================================
---... | @author
( C ) 2017 , Lasse Grinderslev Andersen
-module(edge_core_traffic_monitor).
-behaviour(gen_server).
-export([start_link/0,
register_lookup/3,
register_query_status/1,
reset_stat_table/0,
get_dampened_ip_masks/0
]).
-export([init/1,
handle_call/3,
... |
e2778c426369e1d2ecf0f06cbc7987dbeb9622e501acf8c539341380787c02b6 | tsloughter/kuberl | kuberl_v2beta1_pods_metric_status.erl | -module(kuberl_v2beta1_pods_metric_status).
-export([encode/1]).
-export_type([kuberl_v2beta1_pods_metric_status/0]).
-type kuberl_v2beta1_pods_metric_status() ::
#{ 'currentAverageValue' := binary(),
'metricName' := binary(),
'selector' => kuberl_v1_label_selector:kuberl_v1_label_selector()
}... | null | https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v2beta1_pods_metric_status.erl | erlang | -module(kuberl_v2beta1_pods_metric_status).
-export([encode/1]).
-export_type([kuberl_v2beta1_pods_metric_status/0]).
-type kuberl_v2beta1_pods_metric_status() ::
#{ 'currentAverageValue' := binary(),
'metricName' := binary(),
'selector' => kuberl_v1_label_selector:kuberl_v1_label_selector()
}... | |
f1a151acbef5238559664ef8419a419a1f975a551539441b0a5d63b59f5d7cd8 | spell-music/csound-expression | Tibetan.hs | | Example requires the package ` random ` to be installed
This remarkable tibetan harmonic chant like effect is created by nine sinusoidal
oscillators , whose frequencies are almost identical : separated by a fraction of
1 Hz from each other . Thus for each component , amplitude modulation leads to its
enhan... | null | https://raw.githubusercontent.com/spell-music/csound-expression/29c1611172153347b16d0b6b133e4db61a7218d5/csound-expression/examples/Tibetan.hs | haskell | ---------------------------------------------------------
scores
intersection
myxo mode
constants
an A
tones
----------------------------------------------------------
blurp
----------------------------------------------------------
stars
---------------------------------------------------------- | | Example requires the package ` random ` to be installed
This remarkable tibetan harmonic chant like effect is created by nine sinusoidal
oscillators , whose frequencies are almost identical : separated by a fraction of
1 Hz from each other . Thus for each component , amplitude modulation leads to its
enhan... |
007304cc78ea158cdb645810e0df529807b9d13d1477b0df615705115744e8fa | composewell/streamly | Type.hs | -- |
Module : Streamly . Internal . Data . Fold . Type
Copyright : ( c ) 2019 Composewell Technologies
( c ) 2013
-- License : BSD3
-- Maintainer :
-- Stability : experimental
Portability : GHC
--
-- = Stream Consumers
--
-- We can classify stream consumers in the following cate... | null | https://raw.githubusercontent.com/composewell/streamly/ba0d42aec0dffda628a4872063f63d90e6ccb1ad/core/src/Streamly/Internal/Data/Fold/Type.hs | haskell | |
License : BSD3
Maintainer :
Stability : experimental
= Stream Consumers
We can classify stream consumers in the following categories in order of
increasing complexity and power:
* Accumulators: Tee/Zip is simple, cannot be appended, good for scanning.
* Terminating folds: Tee/Zip varies based on t... | Module : Streamly . Internal . Data . Fold . Type
Copyright : ( c ) 2019 Composewell Technologies
( c ) 2013
Portability : GHC
First two are represented by the ' Fold ' type and the last two by the
' Parser ' type .
= = Folds that terminate after one or more input
applied after ... |
699f549c5ecd59ccc27f2a85b46ae3f526df102e3010ecec7a34f8bffc193de6 | Dasudian/DSDIN | dsdo_response_tx.erl |
-module(dsdo_response_tx).
-include("oracle_txs.hrl").
-behavior(dsdtx).
%% Behavior API
-export([new/1,
type/0,
fee/1,
ttl/1,
nonce/1,
origin/1,
check/5,
process/5,
accounts/1,
signers/2,
serialization_template/1,
se... | null | https://raw.githubusercontent.com/Dasudian/DSDIN/b27a437d8deecae68613604fffcbb9804a6f1729/apps/dsdoracle/src/dsdo_response_tx.erl | erlang | Behavior API
Additional getters
swagger schema name
-- Local functions ------------------------------------------------------- |
-module(dsdo_response_tx).
-include("oracle_txs.hrl").
-behavior(dsdtx).
-export([new/1,
type/0,
fee/1,
ttl/1,
nonce/1,
origin/1,
check/5,
process/5,
accounts/1,
signers/2,
serialization_template/1,
serialize/1,
... |
1c249a09ea56660904d1e5ce6c645cffae3b780bb14b3a85a02a9f457c1110a9 | josefs/Gradualizer | record_info.erl | -module(record_info).
-export([fields/0, size/0]).
-record(fruitz, {ananas, bananas :: atom(), cananas = 2}).
-spec fields() -> [ananas | bananas | cananas].
fields() -> record_info(fields, fruitz).
-spec size() -> 4.
size() ->
N = record_info(size, fruitz),
N.
| null | https://raw.githubusercontent.com/josefs/Gradualizer/208f5816b0157f282212fc036ba7560f0822f9fc/test/should_pass/record_info.erl | erlang | -module(record_info).
-export([fields/0, size/0]).
-record(fruitz, {ananas, bananas :: atom(), cananas = 2}).
-spec fields() -> [ananas | bananas | cananas].
fields() -> record_info(fields, fruitz).
-spec size() -> 4.
size() ->
N = record_info(size, fruitz),
N.
| |
15db605c3f5e45d182a9748ece4c1c5af5d90ff9e2be551aeda22bbf573d18c6 | bennn/dissertation | unsafe.rkt | #lang typed/racket #:transient
(require (prefix-in : racket/unsafe/ops)
racket/flonum
racket/fixnum)
(provide (all-defined-out))
(define unsafe-vector-ref vector-ref)
(define unsafe-vector-set! vector-set!)
(define unsafe-vector-length vector-length)
(define unsafe-flvector-ref flvector-ref)
(defi... | null | https://raw.githubusercontent.com/bennn/dissertation/779bfe6f8fee19092849b7e2cfc476df33e9357b/dissertation/QA/math-test/jpeg/s-d/math/private/unsafe.rkt | racket |
(define unsafe-vector-ref :unsafe-vector-ref)
(define unsafe-vector-set! :unsafe-vector-set!)
(define unsafe-vector-length :unsafe-vector-length)
(define unsafe-flvector-ref :unsafe-flvector-ref)
(define unsafe-flvector-set! :unsafe-flvector-set!)
(define unsafe-fx* :unsafe-fx*)
(define unsafe-fx+ :unsafe-fx+)
(defi... | #lang typed/racket #:transient
(require (prefix-in : racket/unsafe/ops)
racket/flonum
racket/fixnum)
(provide (all-defined-out))
(define unsafe-vector-ref vector-ref)
(define unsafe-vector-set! vector-set!)
(define unsafe-vector-length vector-length)
(define unsafe-flvector-ref flvector-ref)
(defi... |
2aff92504699385e3e369ec0390db1147355819286a8077913d0b8c897f29470 | walmartlabs/apache-http-client | apache_http_client.clj | (ns com.walmartlabs.apache-http-client
"Provides a ring compatible http interface that uses Apache
HttpClient as implementation"
(:import (java.io InputStream)
(org.apache.http HttpHost HttpResponse Header HttpRequest)
(org.apache.http.entity InputStreamEntity)
(org.apache.http.im... | null | https://raw.githubusercontent.com/walmartlabs/apache-http-client/7b2e74fb7edfdd5722d5887db5b84f9ec33d50fb/src/com/walmartlabs/apache_http_client.clj | clojure |
## Request transformations
## Response transformations
| (ns com.walmartlabs.apache-http-client
"Provides a ring compatible http interface that uses Apache
HttpClient as implementation"
(:import (java.io InputStream)
(org.apache.http HttpHost HttpResponse Header HttpRequest)
(org.apache.http.entity InputStreamEntity)
(org.apache.http.im... |
1ab30d63def629f40947ec587afff164a9e439a4325fcabb35f2e31fb6ddcfa1 | RefactoringTools/HaRe | UtilsSpec.hs | # LANGUAGE CPP #
module UtilsSpec (main, spec) where
import Test.Hspec
import TestUtils
import qualified GHC as GHC
import qualified HscTypes as GHC
import Control.Exception
import Control.Monad.State
import Data.List
import qualified GhcMod.Types as GM (mpModule)
import Language.Hask... | null | https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/test/UtilsSpec.hs | haskell | ---------------------------------------------------------------------
((_, _, mod), toks) <- parsedFileBGhc
((_, Just renamed, _), toks) <- parsedFileBGhc
-------------------------------------------------------------------
---------------------------------
---------------------------------
----------------------... | # LANGUAGE CPP #
module UtilsSpec (main, spec) where
import Test.Hspec
import TestUtils
import qualified GHC as GHC
import qualified HscTypes as GHC
import Control.Exception
import Control.Monad.State
import Data.List
import qualified GhcMod.Types as GM (mpModule)
import Language.Hask... |
77de80e57611adb04595d8c4ece26a048fa6f6eb09694313f74830789395af79 | tisnik/clojure-examples | core.clj | (ns test-clj-flotr.core
(:gen-class))
(require '[hiccup.page :as page])
(require '[clj-flotr.generator :as generator])
(defn test-pie-charts
"Creates HTML page with various types of pie-charts."
[]
(let [data [{:values 10 :label "foo"}
{:values 10 :label "bar"}
{:... | null | https://raw.githubusercontent.com/tisnik/clojure-examples/984af4a3e20d994b4f4989678ee1330e409fdae3/test-clj-flotr/src/test_clj_flotr/core.clj | clojure | </tr>
</tr>
</table>
</tr>
</tr>
</table> | (ns test-clj-flotr.core
(:gen-class))
(require '[hiccup.page :as page])
(require '[clj-flotr.generator :as generator])
(defn test-pie-charts
"Creates HTML page with various types of pie-charts."
[]
(let [data [{:values 10 :label "foo"}
{:values 10 :label "bar"}
{:... |
7b258dffadb965f464cf9ac8fd679e9b3a1ef0198719fdd64cba1627c5913b19 | haskell-works/hw-kafka-conduit | CombinatorSpec.hs | # LANGUAGE ScopedTypeVariables #
module Kafka.Conduit.CombinatorSpec (spec) where
import Data.Conduit
import Data.List.Extra
import Kafka.Conduit.Combinators
import Prelude
import Test.Hspec
import Test.QuickCheck
import qualified Data.Conduit.List as CL
import qualified Prelude as P
HLINT ignore " Redu... | null | https://raw.githubusercontent.com/haskell-works/hw-kafka-conduit/a22a3985b0d0c0dac9a1cf52d600e9ed9ee481ea/test/Kafka/Conduit/CombinatorSpec.hs | haskell | # LANGUAGE ScopedTypeVariables #
module Kafka.Conduit.CombinatorSpec (spec) where
import Data.Conduit
import Data.List.Extra
import Kafka.Conduit.Combinators
import Prelude
import Test.Hspec
import Test.QuickCheck
import qualified Data.Conduit.List as CL
import qualified Prelude as P
HLINT ignore " Redu... | |
0ea08e1a6e11252458dd45de5616a67ba242566bce7422d37ea2ad0e29980ff4 | yetanalytics/flint | prefix.cljc | (ns com.yetanalytics.flint.validate.prefix
(:require [clojure.zip :as zip]))
(defn- invalid-prefix?
"Does the prefix of `prefix-iri` exist in the `prefixes` map/set?
(Or for non-namespaced `prefix-iri`, does `:$` exist?)"
[prefixes prefix-iri]
(if-some [pre (namespace prefix-iri)]
(not (contains? prefix... | null | https://raw.githubusercontent.com/yetanalytics/flint/7be4599d6acf8fd6867def76617bac8afba1dcfc/src/main/com/yetanalytics/flint/validate/prefix.cljc | clojure | otherwise return `nil`." | (ns com.yetanalytics.flint.validate.prefix
(:require [clojure.zip :as zip]))
(defn- invalid-prefix?
"Does the prefix of `prefix-iri` exist in the `prefixes` map/set?
(Or for non-namespaced `prefix-iri`, does `:$` exist?)"
[prefixes prefix-iri]
(if-some [pre (namespace prefix-iri)]
(not (contains? prefix... |
7c32b283562d20012f0e2cf0b4dff3379a720b5a3934a0338339de0b2e66383a | sbcl/sbcl | meta-vmdef.lisp | ;;;; This file contains the implementation-independent facilities used
;;;; for defining the compiler's interface to the VM in a given
;;;; implementation that are needed at meta-compile time. They are
;;;; separated out from vmdef.lisp so that they can be compiled and
;;;; loaded without trashing the running compiler.... | null | https://raw.githubusercontent.com/sbcl/sbcl/f2433cfdf134bfabab53f4b1434a57ef3182fd94/src/compiler/meta-vmdef.lisp | lisp | This file contains the implementation-independent facilities used
for defining the compiler's interface to the VM in a given
implementation that are needed at meta-compile time. They are
separated out from vmdef.lisp so that they can be compiled and
loaded without trashing the running compiler.
more information.... | FIXME : The " trashing the running [ CMU CL ] compiler " motivation no
longer makes sense in SBCL , since we can cross - compile cleanly .
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and r... |
0a100c0368ed808e557ca05bbc7612d2df6081f1a974189c280f8861993e8e7a | unison-code/unison | ReadWriteInfoGen.hs | |
Copyright : Copyright ( c ) 2016 , RISE SICS AB
License : BSD3 ( see the LICENSE file )
Maintainer :
Copyright : Copyright (c) 2016, RISE SICS AB
License : BSD3 (see the LICENSE file)
Maintainer :
-}
Main authors :
< >
This file is part of Unison , see -code.github.io ... | null | https://raw.githubusercontent.com/unison-code/unison/9f8caf78230f956a57b50a327f8d1dca5839bf64/src/unison-specsgen/src/SpecsGen/ReadWriteInfoGen.hs | haskell | |
Copyright : Copyright ( c ) 2016 , RISE SICS AB
License : BSD3 ( see the LICENSE file )
Maintainer :
Copyright : Copyright (c) 2016, RISE SICS AB
License : BSD3 (see the LICENSE file)
Maintainer :
-}
Main authors :
< >
This file is part of Unison , see -code.github.io ... | |
6603cee59283f5ddd8deda57add905e4a949e6c84894f3cc300ee6ddc3e378ec | shayan-najd/QFeldspar | Haskell.hs | module Examples.Image.SwirlHS where
import Prelude (sin,cos,atan2,round,words)
import QFeldspar.MyPrelude
import QFeldspar.Prelude.Haskell
import System.IO.Unsafe
swirl :: Float -> Vec (Vec (Word32, Word32, Word32))
-> Vec (Vec (Word32, Word32, Word32))
swirl scale vec =
let height = len vec
w... | null | https://raw.githubusercontent.com/shayan-najd/QFeldspar/ed60ce02794a548833317388f6e82e2ab1eabc1c/Examples/Swirl/Haskell.hs | haskell | module Examples.Image.SwirlHS where
import Prelude (sin,cos,atan2,round,words)
import QFeldspar.MyPrelude
import QFeldspar.Prelude.Haskell
import System.IO.Unsafe
swirl :: Float -> Vec (Vec (Word32, Word32, Word32))
-> Vec (Vec (Word32, Word32, Word32))
swirl scale vec =
let height = len vec
w... | |
24a1b51ffe607fca2e4a99c195f48e97264e66559b3fa9fc0bbc5aa1a1fd7a08 | friemen/cronstar | core.cljc | (ns cronstar.core
"Main API functions for generating DateTime sequences."
(:require
#?(:clj [clj-time.core :as t]
:cljs [cljs-time.core :as t])
[cronstar.parser :as cron-parser]
[cronstar.generator :as cron-gen]
[cronstar.datetime :as cron-datetime]))
(defn times
"Expects a `cron-expr` and an ... | null | https://raw.githubusercontent.com/friemen/cronstar/59ed94bf03b9bbe16825d3e6b36698c979872d85/src/cronstar/core.cljc | clojure | (ns cronstar.core
"Main API functions for generating DateTime sequences."
(:require
#?(:clj [clj-time.core :as t]
:cljs [cljs-time.core :as t])
[cronstar.parser :as cron-parser]
[cronstar.generator :as cron-gen]
[cronstar.datetime :as cron-datetime]))
(defn times
"Expects a `cron-expr` and an ... | |
6cad6bae85c7a37a2688feaa9eb7df0e892cd5d54b75338a79cacebb05d17076 | basho/riak_kv | sms.erl | %% -------------------------------------------------------------------
%%
%% sms: Streaming merge sort
%%
Copyright ( c ) 2007 - 2011 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in com... | null | https://raw.githubusercontent.com/basho/riak_kv/aeef1591704d32230b773d952a2f1543cbfa1889/src/sms.erl | erlang | -------------------------------------------------------------------
sms: Streaming merge sort
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific ... | Copyright ( c ) 2007 - 2011 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
... |
4073c130f4511f813b11cbf07597dd4bc44202b750f0bea70ee9e238c4c3dc22 | Tclv/HaskellBook | First.hs | module First where
import Optional
import Data.Monoid
import Test.QuickCheck
newtype First' a =
First' { getFirst' :: Optional a }
deriving (Eq, Show)
instance Arbitrary a => Arbitrary (First' a) where
arbitrary = do
a <- arbitrary
return (First' a)
instance Monoid (First' a) where
mempty = F... | null | https://raw.githubusercontent.com/Tclv/HaskellBook/78eaa5c67579526b0f00f85a10be3156bc304c14/ch15/First.hs | haskell | module First where
import Optional
import Data.Monoid
import Test.QuickCheck
newtype First' a =
First' { getFirst' :: Optional a }
deriving (Eq, Show)
instance Arbitrary a => Arbitrary (First' a) where
arbitrary = do
a <- arbitrary
return (First' a)
instance Monoid (First' a) where
mempty = F... | |
33e616cac5ceb5e4d6cd78269a61022c0b433ba210cbc52cbb2113558fb87810 | ocaml-sf/learn-ocaml-corpus | test.ml | open Report
open Test_lib
let rec sample_clist sample () =
let rec sample_rec level =
match Random.int level with
| 0 -> CEmpty
| 1 -> CSingle (sample ())
| _ -> CApp (sample_rec (level - 1), sample_rec (level - 1)) in
match sample_rec 5 with
| CEmpty -> sample_clist sample ()
| res -> res
let... | null | https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/mooc/week3/seq4/ex3/test.ml | ocaml | open Report
open Test_lib
let rec sample_clist sample () =
let rec sample_rec level =
match Random.int level with
| 0 -> CEmpty
| 1 -> CSingle (sample ())
| _ -> CApp (sample_rec (level - 1), sample_rec (level - 1)) in
match sample_rec 5 with
| CEmpty -> sample_clist sample ()
| res -> res
let... | |
4ad6f72b718701130bdef2fb8541f5a9978b911693c2b45844c527ef563b2b30 | reborg/clojure-essential-reference | 2.clj | (ns myns)
< 1 >
def-meta-doc
< 2 >
(clojure.repl/doc def-meta-doc) ; <3>
;; -------------------------
;; myns/def-meta-doc
;; A def with metadata and docstring.
(:created-at (meta (var def-meta-doc)))
;; "date" | null | https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/OtherFunctions/VarsandNamespaces/def%2Cdeclare%2Cinternanddefonce/2.clj | clojure | <3>
-------------------------
myns/def-meta-doc
A def with metadata and docstring.
"date" | (ns myns)
< 1 >
def-meta-doc
< 2 >
(:created-at (meta (var def-meta-doc))) |
e03f3de5aedf0c8da5335bcc6bda9a12f4edc31a4c90ec1eb39922ac9ec8b2d0 | kyleburton/sandbox | config.clj | (ns graph-services.config
(:require
[clojure.tools.nrepl.server :refer [start-server stop-server]]
[cider.nrepl :refer [cider-nrepl-handler]]
[clojure.tools.logging :as log]
[clojure.data.json :as json]
[schema.core :as s]))
(defonce config (atom {}))
(def... | null | https://raw.githubusercontent.com/kyleburton/sandbox/cccbcc9a97026336691063a0a7eb59293a35c31a/examples/neo4j/graph-services/src/graph_services/config.clj | clojure | (ns graph-services.config
(:require
[clojure.tools.nrepl.server :refer [start-server stop-server]]
[cider.nrepl :refer [cider-nrepl-handler]]
[clojure.tools.logging :as log]
[clojure.data.json :as json]
[schema.core :as s]))
(defonce config (atom {}))
(def... | |
7a68d24370effddecb753938c202f031e59f7f8d3706ccffe8d342d9e2c2683b | hunt-framework/hunt | HashedCompactDocuments.hs | # LANGUAGE GeneralizedNewtypeDeriving #
-- ----------------------------------------------------------------------------
|
Module : . Index . HashedCompactDocuments
Copyright : Copyright ( C ) 2012
License : MIT
Maintainer : ( )
Stability : experimental
Like . Index . Has... | null | https://raw.githubusercontent.com/hunt-framework/hunt/d692aae756b7bdfb4c99f5a3951aec12893649a8/hunt-test/test/HashedCompactDocuments.hs | haskell | ----------------------------------------------------------------------------
----------------------------------------------------------------------------
* Documents type
* Construction
* Conversion
, toDocument
, fromDocument
----------------------------------------------------------------------------
| The tab... | # LANGUAGE GeneralizedNewtypeDeriving #
|
Module : . Index . HashedCompactDocuments
Copyright : Copyright ( C ) 2012
License : MIT
Maintainer : ( )
Stability : experimental
Like . Index . HashedDocuments but using CompressedDoc directly .
Conversion and exposing the ... |
11a02c7b769323f6f9d2e048e5b70824606b1c05aaa5b196ada7835730080064 | moon-chilled/loop | loop11.scm | ;-*- Mode: Lisp -*-
Author :
Created : Sat Nov 16 21:39:33 2002
Contains : Tests for loop termination clauses REPEAT , WHILE and
Tests of REPEAT
(deftest loop.11.1
(let ((z 0))
(values
(loop repeat 10 do (incf z))
z))
()
10)
(deftest loop.11.2
(loop repeat 10 collect 'a)
(... | null | https://raw.githubusercontent.com/moon-chilled/loop/a2c7c37e5707c7c180b57851436513a924196ac1/test/loop11.scm | scheme | -*- Mode: Lisp -*-
a variable clause, and no main clause can precede a variable
clause.
(a b c))
Enough implementors have complained about this test that
I'm removing it. The standard is self-contradictory
(deftest loop.11.9
(a b c))
Tests of WHILE
More tests of a bug that showed up in c.l.l
Test that... | Author :
Created : Sat Nov 16 21:39:33 2002
Contains : Tests for loop termination clauses REPEAT , WHILE and
Tests of REPEAT
(deftest loop.11.1
(let ((z 0))
(values
(loop repeat 10 do (incf z))
z))
()
10)
(deftest loop.11.2
(loop repeat 10 collect 'a)
(a a a a a a a a a a))
(... |
89219f8b53c835508640ecc17239dcaad7a7975da4aa8a2e7534789a657764b5 | JacquesCarette/Drasil | Requirements.hs | module Drasil.SWHS.Requirements where --all of this file is exported
import Language.Drasil
import Language.Drasil.Chunk.Concept.NamedCombinators
import qualified Language.Drasil.NounPhrase.Combinators as NP
import qualified Language.Drasil.Sentence.Combinators as S
import Drasil.DocLang (inReq)
import Drasil.DocLang... | null | https://raw.githubusercontent.com/JacquesCarette/Drasil/a1c22b739c958ae169e8fe4fb2ea2b0a670dc7df/code/drasil-example/swhs/lib/Drasil/SWHS/Requirements.hs | haskell | all of this file is exported
----------------------------
----------------------------
----------------------------
Section 5 : REQUIREMENTS --
----------------------------
---------------------------------
---------------------------------
List structure same between all examples
How to include pi?
How t... |
import Language.Drasil
import Language.Drasil.Chunk.Concept.NamedCombinators
import qualified Language.Drasil.NounPhrase.Combinators as NP
import qualified Language.Drasil.Sentence.Combinators as S
import Drasil.DocLang (inReq)
import Drasil.DocLang.SRS (datCon, propCorSol)
import Data.Drasil.Concepts.Computation (... |
a7f5cf22d309c96d39727cd2eaa4e68a517805e53655b2c949fc5987f82fcf55 | TheClimateCorporation/prng | threefish_test.clj | (ns com.climate.prng.generators.threefish-test
(:require
[clojure.test :refer :all]
[criterium.core :refer [quick-bench]]
[com.climate.prng.core :as prng]
[com.climate.prng.generators.threefish :as tf])
(:import
[com.climate.prng.generators.threefish ThreefishState]))
(deftest test-seed-state
... | null | https://raw.githubusercontent.com/TheClimateCorporation/prng/60449e0da796c5afdc21e57dd39160bb1a6f9705/test/com/climate/prng/generators/threefish_test.clj | clojure | mutating the provided seed does not change the state
empty array is not allowed
does not match available block size
mutating the copy does not affect the original | (ns com.climate.prng.generators.threefish-test
(:require
[clojure.test :refer :all]
[criterium.core :refer [quick-bench]]
[com.climate.prng.core :as prng]
[com.climate.prng.generators.threefish :as tf])
(:import
[com.climate.prng.generators.threefish ThreefishState]))
(deftest test-seed-state
... |
18b12bc1c1471800059782249183fcc6f3ba760ebcc3b2a9ae7a12b55b6b1a96 | bbc/haskell-workshop | C3TypesAndTypeclasses.hs | module C3TypesAndTypeclasses where
-- last, length, and take are all from the standard library, Prelude
You can find out the type in ghci with " : t last " , but attempt to answer first
-- What is the type of last?
-- last :: [a] -> a
-- What is the type of length?
-- length :: Foldable t => t a -> Int
-- What is... | null | https://raw.githubusercontent.com/bbc/haskell-workshop/475b9bac04167665030d7863798ccd27dfd589d0/imjacobclark/exercises/week2/src/C3TypesAndTypeclasses.hs | haskell | last, length, and take are all from the standard library, Prelude
What is the type of last?
last :: [a] -> a
What is the type of length?
length :: Foldable t => t a -> Int
What is the type of take?
take :: Int -> [a] -> [a]
myConcat :: [a] -> [a] -> [a]
Can you use type classes to constrain the polymorphic typ... | module C3TypesAndTypeclasses where
You can find out the type in ghci with " : t last " , but attempt to answer first
WHat is the type of myConcat ?
myConcat a b = a ++ b
mul :: Num a => a -> a -> a
mul a b = a * b
hasShowableInside :: Show a => [a] -> Bool
hasShowableInside xs = null xs
hasNumbersInside :... |
8f2f86aa8b272c671e2c60d746d8c48af075e4bacb6fd0aed54098245a61fad6 | rill-event-sourcing/wheel | macro_utils.clj | (ns ^:no-doc rill.wheel.macro-utils
"A collection of helper functions used by the rill/wheel def*
macros")
(defn parse-doc-string
"provide defn-style doc-string suppport for def* macros"
[[sym & [doc-string? :as rst-args]]]
(if (string? doc-string?)
(into [(vary-meta sym assoc :doc doc-string?)] (drop 1 ... | null | https://raw.githubusercontent.com/rill-event-sourcing/wheel/36bf725fbee3b29a1989e95e4eb10bb599a2d4a0/src/rill/wheel/macro_utils.clj | clojure | (ns ^:no-doc rill.wheel.macro-utils
"A collection of helper functions used by the rill/wheel def*
macros")
(defn parse-doc-string
"provide defn-style doc-string suppport for def* macros"
[[sym & [doc-string? :as rst-args]]]
(if (string? doc-string?)
(into [(vary-meta sym assoc :doc doc-string?)] (drop 1 ... | |
be8a996afca0858fa54437511959913faef440fe7e0f2767545c5d44fd2ed713 | russmatney/reframe-games | core.cljs | (ns games.grid.core
(:require
[clojure.set :as set]
[clojure.walk :as walk]
[adzerk.cljs-console :as log]
[clojure.string :as string]))
TODO break grid / cell functions into grid.cells namespace
(defn cell->str
"Converts a cell into a coords and keys str."
[{:keys [x y falling occupied flagged] :a... | null | https://raw.githubusercontent.com/russmatney/reframe-games/ff05f6ad4794e4505b6231522af0c90c3e212631/src/games/grid/core.cljs | clojure |
Grid, row, and cell creation
TODO be nice to write a build-grid-for-shape to auto-size itself
could include a x/y buffer, and be used to dry up queue/hold/test grid usage
Row manipulation
Cell Prop Updates
clear prop-stack if target was empty
Cell Transforms
iterate over cells
first cell - create set,... | (ns games.grid.core
(:require
[clojure.set :as set]
[clojure.walk :as walk]
[adzerk.cljs-console :as log]
[clojure.string :as string]))
TODO break grid / cell functions into grid.cells namespace
(defn cell->str
"Converts a cell into a coords and keys str."
[{:keys [x y falling occupied flagged] :a... |
579baeebf49edebf3c60c5bbf3a4d8cfb75d8867d53f426dd60f66e08293b78b | ntoronto/drbayes | search-tree.rkt | #lang typed/racket/base
(require racket/match
racket/list
racket/promise
"../flonum.rkt"
"../utils.rkt"
"../untyped-utils.rkt"
"utils.rkt")
(provide (all-defined-out))
;; ============================================================================================... | null | https://raw.githubusercontent.com/ntoronto/drbayes/e59eb7c7867118bf4c77ca903e133c7530e612a3/drbayes/private/search/search-tree.rkt | racket | ===================================================================================================
Statistics
===================================================================================================
===================================================================================================
====... | #lang typed/racket/base
(require racket/match
racket/list
racket/promise
"../flonum.rkt"
"../utils.rkt"
"../untyped-utils.rkt"
"utils.rkt")
(provide (all-defined-out))
(define search-stats? #t)
(define: search-stats : (HashTable Symbol Natural) (make-hasheq em... |
488457f43ae4fceffde01bdd64a7f8c24c0499c149a14e3b62d68c394c53ce3a | Andromedans/andromeda | unabstract.ml | (** Unabstract *)
(** XXX this file is not used anywhere. *)
(** [unabstract_is_type x t1 t2] instantiates bound variable [0] in [t2] with a
fresh atom of type [t1]. The freshly generated atom is returned, as well as
the type. *)
let is_type x t1 t2 =
let a = Mk.fresh_atom x t1 in
a, Instantiate_bound.is_... | null | https://raw.githubusercontent.com/Andromedans/andromeda/a5c678450e6c6d4a7cd5eee1196bde558541b994/src/nucleus/unabstract.ml | ocaml | * Unabstract
* XXX this file is not used anywhere.
* [unabstract_is_type x t1 t2] instantiates bound variable [0] in [t2] with a
fresh atom of type [t1]. The freshly generated atom is returned, as well as
the type. |
let is_type x t1 t2 =
let a = Mk.fresh_atom x t1 in
a, Instantiate_bound.is_type (Mk.atom a) t2
let is_term x t e =
let a = Mk.fresh_atom x t in
a, Instantiate_bound.is_term (Mk.atom a) e
let eq_type x t eq =
let a = Mk.fresh_atom x t in
a, Instantiate_bound.eq_type (Mk.atom a) eq
let eq_term x t eq =
... |
3f5a9afcf9c73e9a3dae13626f406ac85194970207c3912ba8473534e30e8253 | Stratus3D/programming_erlang_exercises | job_centre.erl | -module(job_centre).
-behaviour(gen_server).
% API
-export([start_link/0, add_job/1, work_wanted/0, job_done/1, statistics/0]).
%% gen_server callbacks
-export([init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
terminate/2,
code_change/3]).
% API functions
start_link... | null | https://raw.githubusercontent.com/Stratus3D/programming_erlang_exercises/e4fd01024812059d338facc20f551e7dff4dac7e/chapter_22/exercise_2/job_centre.erl | erlang | API
gen_server callbacks
API functions
gen_server callbacks
Initial the gen_server state with an integer for future IDs and a ets
table
Insert the ID and work function into the ets table
Find a job
If none return `no`
If one is found mark it as in_progess and return it to the caller
Mark the job as done in t... | -module(job_centre).
-behaviour(gen_server).
-export([start_link/0, add_job/1, work_wanted/0, job_done/1, statistics/0]).
-export([init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
terminate/2,
code_change/3]).
start_link() ->
gen_server:start_link({local, ?MODUL... |
70f369ae4b7aa4766ad1f1e1ffc57ee6a9e0ee1ed412db29dc7c8fab14139dcb | nniclausse/manderlbot | mdb_bhv_rejoin.erl | %%% File : mdb_bhv_reconf.erl
Author : < >
%%% Purpose : When kicked, rejoin the chan
Created : 12 Aug 2003 by < >
%%%----------------------------------------------------------------------
%%%
This file is part of Manderlbot .
%%%
Manderlbot is free software ; you can redistribute it and/or modify
... | null | https://raw.githubusercontent.com/nniclausse/manderlbot/a65cfffc50801c09551b70d6bbd7a19e6b2c57dd/src/mdb_bhv_rejoin.erl | erlang | File : mdb_bhv_reconf.erl
Purpose : When kicked, rejoin the chan
----------------------------------------------------------------------
(at your option) any later version.
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General... | Author : < >
Created : 12 Aug 2003 by < >
This file is part of Manderlbot .
Manderlbot 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
Manderlbot is dis... |
fc00bbbdb6d05ce714d40cdd3e75d6840ea3269f804486acbd1a3329fcea146e | footprintanalytics/footprint-web | builder.clj | (ns metabase.util.date-2.parse.builder
"Utility functions for programatically building a `DateTimeFormatter`. Easier to understand than chaining a hundred
Java calls and trying to keep the structure straight.
The basic idea here is you pass a number of `sections` to `formatter` to build a `DateTimeFormatter` — s... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/src/metabase/util/date_2/parse/builder.clj | clojure | (ns metabase.util.date-2.parse.builder
"Utility functions for programatically building a `DateTimeFormatter`. Easier to understand than chaining a hundred
Java calls and trying to keep the structure straight.
The basic idea here is you pass a number of `sections` to `formatter` to build a `DateTimeFormatter` — s... | |
ef4842b65ea3add48b173e12b9c17f94934b6b8798b14c01df5551d1d5f37fc6 | urbanslug/graphite | test-edit-distance.rkt | #lang racket
(require rackunit
"../../graphite/algorithms/edit-distance.rkt")
(check-equal? (align "distance" "editing")
'((#\- . #\e)
(#\d . #\d)
(#\i . #\i)
(#\s . #\-)
(#\t . #\t)
(#\a . #\i)
(#\... | null | https://raw.githubusercontent.com/urbanslug/graphite/bcac6bd61172c52d1cc89c0bd0abe8ad3c6a6576/tests/algorithms/test-edit-distance.rkt | racket | #lang racket
(require rackunit
"../../graphite/algorithms/edit-distance.rkt")
(check-equal? (align "distance" "editing")
'((#\- . #\e)
(#\d . #\d)
(#\i . #\i)
(#\s . #\-)
(#\t . #\t)
(#\a . #\i)
(#\... | |
396ad622673a33b652b0583d301af07bf3b32afeac312c3179bf609aca210470 | srdqty/talc-3.0 | poppeep.ml | (**********************************************************************)
( c ) , , ,
June 1998 , all rights reserved .
(**********************************************************************)
(* poppeep.ml -- peephole optimizer for the stack based code ... | null | https://raw.githubusercontent.com/srdqty/talc-3.0/df83dd5ff0e2b189b13280ddae233d8277199350/popcorn/poppeep.ml | ocaml | ********************************************************************
********************************************************************
poppeep.ml -- peephole optimizer for the stack based code generator.
peephole optimization
End Cyclone
ADD ESP, imm1 ========> ADD ESP, imm1+imm2
ADD ESP, imm2
... | ( c ) , , ,
June 1998 , all rights reserved .
open Numtypes;;
module T = Tal
let optimize in_template insts =
let some_optimization = ref false in
let rec click(insts) = (some_optimization := true; peephole insts)
and peephole insts =
match ... |
b3918485e55197498121189320b31066d28e2aaa2223d9a81c16f084f83593c1 | HealthSamurai/dojo.clj | model.cljc | (ns app.welcome.model
(:require
[re-frame.core :as rf]
[app.routes :refer [href]]))
(def page-key :welcome/index)
(rf/reg-event-fx
page-key
(fn [{db :db} [_ phase params]]
(cond
(= :init phase)
{:db (assoc db page-key
{:title "Dashboard"
:blocks [{:id "db" :ti... | null | https://raw.githubusercontent.com/HealthSamurai/dojo.clj/94922640f534897ab2b181c608b54bfbb8351d7b/ui/src/app/welcome/model.cljc | clojure | (ns app.welcome.model
(:require
[re-frame.core :as rf]
[app.routes :refer [href]]))
(def page-key :welcome/index)
(rf/reg-event-fx
page-key
(fn [{db :db} [_ phase params]]
(cond
(= :init phase)
{:db (assoc db page-key
{:title "Dashboard"
:blocks [{:id "db" :ti... | |
e62b1c5d3e2fa59e2b9d15b59d190b4ba1a0dd54b8a694d01a5fcaa56fca9e5d | dotemacs/pdfboxing | split.clj | (ns pdfboxing.split
(:require [clojure.string :as s]
[pdfboxing.common :as common]
[pdfboxing.merge :as merge])
(:import (org.apache.pdfbox.multipdf PDFMergerUtility Splitter)))
(defn check-if-integer
[coll]
(if (every? integer? coll)
true
(merge/throw-exception ":start and :end... | null | https://raw.githubusercontent.com/dotemacs/pdfboxing/3dafff7102d99df072b09626c9349ba3a9719bf6/src/pdfboxing/split.clj | clojure | (ns pdfboxing.split
(:require [clojure.string :as s]
[pdfboxing.common :as common]
[pdfboxing.merge :as merge])
(:import (org.apache.pdfbox.multipdf PDFMergerUtility Splitter)))
(defn check-if-integer
[coll]
(if (every? integer? coll)
true
(merge/throw-exception ":start and :end... | |
0683326b20fcfcc29f1fb407bfdbd871cd452d5f2ccc073621034e32e191f419 | semilin/layoup | Fnerb.lisp |
(MAKE-LAYOUT :NAME "Fnerb" :MATRIX
(APPLY #'KEY-MATRIX '("twgsbqlnay" "rhjkdupeoi" "xfmzcv',./"))
:SHIFT-MATRIX NIL :KEYBOARD NIL) | null | https://raw.githubusercontent.com/semilin/layoup/27ec9ba9a9388cd944ac46206d10424e3ab45499/data/layouts/Fnerb.lisp | lisp |
(MAKE-LAYOUT :NAME "Fnerb" :MATRIX
(APPLY #'KEY-MATRIX '("twgsbqlnay" "rhjkdupeoi" "xfmzcv',./"))
:SHIFT-MATRIX NIL :KEYBOARD NIL) | |
df743f9db510a4e3d7e19c76a07e5103ac76787612996026bed70e7acdc275fa | v-kolesnikov/sicp | 2_55.clj | (ns sicp.chapter02.2-55)
| null | https://raw.githubusercontent.com/v-kolesnikov/sicp/4298de6083440a75898e97aad658025a8cecb631/src/sicp/chapter02/2_55.clj | clojure | (ns sicp.chapter02.2-55)
| |
d0c0c11776a442f1382e481602d9c1a1dc345ead0007eb277ad98aa98857be22 | mzp/scheme-abc | bytesOut.mli | *
ABC primitive data type .
Provide the type of ABC primitive data type and byte encodeing function .
@author mzp
@see < > AVM2 Overview(pdf )
ABC primitive data type.
Provide the type of ABC primitive data type and byte encodeing function.
@author mzp
@see <> AVM2 Overvie... | null | https://raw.githubusercontent.com/mzp/scheme-abc/2cb541159bcc32ae4d033793dea6e6828566d503/swflib/bytesOut.mli | ocaml | * the type of a primitive data type
* create u8
@raise InvalidArgumnet If n > 0xFF or n < 0.
* create u30
* create s32
* create s24
* [label l] create label. This label is refered by [lable_ref l].
This value is removed when encode.
* [label_ref l] refer to [label l] position.
This value become s24 whe... | *
ABC primitive data type .
Provide the type of ABC primitive data type and byte encodeing function .
@author mzp
@see < > AVM2 Overview(pdf )
ABC primitive data type.
Provide the type of ABC primitive data type and byte encodeing function.
@author mzp
@see <> AVM2 Overvie... |
9f593bb603e6afa5ed1b010911acce75ca6881c1ae54c6ceca82d3ee1fe4370b | polymeris/cljs-aws | lex_runtime.cljs | (ns cljs-aws.lex-runtime
(:require [cljs-aws.base.requests])
(:require-macros [cljs-aws.base.service :refer [defservice]]))
(defservice "LexRuntime" "runtime.lex-2016-11-28.min.json")
| null | https://raw.githubusercontent.com/polymeris/cljs-aws/3326e7c4db4dfc36dcb80770610c14c8a7fd0d66/src/cljs_aws/lex_runtime.cljs | clojure | (ns cljs-aws.lex-runtime
(:require [cljs-aws.base.requests])
(:require-macros [cljs-aws.base.service :refer [defservice]]))
(defservice "LexRuntime" "runtime.lex-2016-11-28.min.json")
| |
435d2b3c637240b45d1eaee18678b2aed058ae52a176e72d9eb25a7a3bf5efa7 | hatsugai/Guedra | test_form4.ml | open Csp
open Guedra
let init () =
let (wch, pch) = create_toplevel_window "Guedra" 0 0 768 512 in
let rch = make_chan () in
let rch_form1 = make_chan () in
let rch_form2 = make_chan () in
let wch_form1 = make_chan () in
let wch_form2 = make_chan () in
let wch1 = make_chan () in
let wch2 = make_chan ()... | null | https://raw.githubusercontent.com/hatsugai/Guedra/592e9b4cff151228735d2c61c337154cde8b5329/test/test_form4.ml | ocaml | open Csp
open Guedra
let init () =
let (wch, pch) = create_toplevel_window "Guedra" 0 0 768 512 in
let rch = make_chan () in
let rch_form1 = make_chan () in
let rch_form2 = make_chan () in
let wch_form1 = make_chan () in
let wch_form2 = make_chan () in
let wch1 = make_chan () in
let wch2 = make_chan ()... | |
1a88d17e1e9f84316b10f60ea296a1473a7414c920ba118a68d2a9f0d6ba3427 | 8c6794b6/guile-tjit | srfi-1.scm | ;;; srfi-1.scm --- List Library
Copyright ( C ) 2001 , 2002 , 2003 , 2004 , 2005 , 2006 , 2009 , 2010 , 2011 , 2014 Free Software Foundation , Inc.
;;
;; 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 Sof... | null | https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/module/srfi/srfi-1.scm | scheme | srfi-1.scm --- List Library
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
either
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS ... |
Copyright ( C ) 2001 , 2002 , 2003 , 2004 , 2005 , 2006 , 2009 , 2010 , 2011 , 2014 Free Software Foundation , Inc.
version 3 of the License , or ( at your option ) any later version .
You should have received a copy of the GNU Lesser General Public
Foundation , Inc. , 51 Franklin Street , Fifth Floor , Bosto... |
a9a8fc9f6e6447641f9a55524db5e3171396b2bbd9e15d73da8508dfa797a096 | ekmett/ekmett.github.com | Binary.hs | # LANGUAGE FlexibleInstances , MultiParamTypeClasses , OverloadedStrings #
-----------------------------------------------------------------------------
-- |
-- Module : Data.Monoid.Lexical.Binary
Copyright : ( c ) 2009
-- License : BSD-style
-- Maintainer :
-- Stability : experimental
Port... | null | https://raw.githubusercontent.com/ekmett/ekmett.github.com/8d3abab5b66db631e148e1d046d18909bece5893/haskell/monoids/_darcs/pristine/Data/Monoid/Lexical/Binary.hs | haskell | ---------------------------------------------------------------------------
|
Module : Data.Monoid.Lexical.Binary
License : BSD-style
Maintainer :
Stability : experimental
Reduce
--------------------------------------------------------------------------- | # LANGUAGE FlexibleInstances , MultiParamTypeClasses , OverloadedStrings #
Copyright : ( c ) 2009
Portability : non - portable ( MPTCs , )
module Data.Monoid.Lexical.Binary
( module Data.Monoid.Reducer
) where
import Prelude hiding (lex)
import Control.Functor.Extras
import Control.Functor.Poin... |
0a5b366e568c495002c4b8351a47d4ad17e1f9a3db1a74f700d3dc2b42b52cc8 | clojure/core.typed | case.clj | Copyright ( c ) , contributors .
;; 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/clojure/core.typed/f5b7d00bbb29d09000d7fef7cca5b40416c9fa91/typed/checker.jvm/src/clojure/core/typed/checker/check/case.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 ) , contributors .
(ns clojure.core.typed.checker.check.case
(:require [clojure.core.typed.checker.type-rep :as r]
[clojure.core.typed.checker.utils :as u]
[clojure.core.typed.util-vars :as vs]
[clojure.core.typed.contract-utils :as con]
[cloju... |
c49e0642be1868726e307a8de5c1d8ae9d96e4d642c874254b5a7481a3199184 | GaloisInc/renovate | Rewriter.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Renovate.BinaryFormat.ELF.Rewriter (
ElfRewriter,
runElfRewriter... | null | https://raw.githubusercontent.com/GaloisInc/renovate/89b82366f84be894c3437852e39c9b4e28666a37/renovate/src/Renovate/BinaryFormat/ELF/Rewriter.hs | haskell | # LANGUAGE GADTs #
| Read-only environment for ELF rewriting
^ Address of the new text section
^ Maximum size of the new text section
Compute the address to start laying out new code.
The new code's virtual address should satisfy a few constraints:
will be yet. So we just pick the biggest chunk of address spac... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Renovate.BinaryFormat.ELF.Rewriter (
ElfRewriter,
runElfRewriter,
RewriterState(..),
... |
f0186142975a0803617bf66b4ce17ab51bbfc2326ed413f6fa0d87eef2abb23d | Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library | MandateSepaDebit.hs | {-# LANGUAGE MultiWayIf #-}
CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
{-# LANGUAGE OverloadedStrings #-}
-- | Contains the types generated from the schema MandateSepaDebit
module StripeAPI.Types.MandateSepaDebit where
import qual... | null | https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Types/MandateSepaDebit.hs | haskell | # LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
| Contains the types generated from the schema MandateSepaDebit
| Defines the object schema located at @components.schemas.mandate_sepa_debit@ in the specification.
| reference: The unique reference of the mandate.
Constraints:
| url: The URL of the mandate.... | CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
module StripeAPI.Types.MandateSepaDebit where
import qualified Control.Monad.Fail
import qualified Data.Aeson
import qualified Data.Aeson as Data.Aeson.Encoding.Internal
import qualified ... |
0b25e56ead4b4a4045a422e3fae90eb153d8c6c6e794daf75c7ceed443915732 | deadtrickster/cl-statsd | package.lisp | (in-package :cl-user)
(defpackage :cl-statsd.test
(:use :cl :prove))
(defmacro with-capture-client (&body body)
`(let ((statsd:*client* (statsd:make-capture-client))
(statsd:*random-range* 0))
,@body
(statsd:capture-client.recv)))
| null | https://raw.githubusercontent.com/deadtrickster/cl-statsd/7790c95c097f690994256519d24106b53c3e5e37/t/package.lisp | lisp | (in-package :cl-user)
(defpackage :cl-statsd.test
(:use :cl :prove))
(defmacro with-capture-client (&body body)
`(let ((statsd:*client* (statsd:make-capture-client))
(statsd:*random-range* 0))
,@body
(statsd:capture-client.recv)))
| |
5f7e1175717e299cab35c4ffcac2952ff03773eefeaa7a08dd18db60376baafb | mirage/emile | emile.ml | type mailbox = {
name : phrase option;
local : local;
domain : domain * domain list;
}
and domain = [ `Domain of string list | `Addr of addr | `Literal of string ]
and addr =
| IPv4 of Ipaddr.V4.t
| IPv6 of Ipaddr.V6.t
| Ext of (string * string)
and phrase = [ `Dot | `Word of word | `Encoded of string * ... | null | https://raw.githubusercontent.com/mirage/emile/685f993b9e940618dae6cd89d03a04eac4d9f322/lib/emile.ml | ocaml | Pretty-printers
Encoder
XXX(dinosaure): safe due to [`Buffer].
Equal
XXX(dinosaure): both error return [false].
XXX(dinosaure): both error are equal.
XXX(dinosaure) we should resolve domain and compare with IP
address if they are equal or not.
"\t"
"\n"
See [is_quoted_pair]
TODO: replace skip_... | type mailbox = {
name : phrase option;
local : local;
domain : domain * domain list;
}
and domain = [ `Domain of string list | `Addr of addr | `Literal of string ]
and addr =
| IPv4 of Ipaddr.V4.t
| IPv6 of Ipaddr.V6.t
| Ext of (string * string)
and phrase = [ `Dot | `Word of word | `Encoded of string * ... |
cc29e4960972b94f99dcae775563b9527aa349a61463762dfe1615a344c3be17 | expipiplus1/vulkan | Enums.hs | {-# language CPP #-}
-- No documentation found for Chapter "Enums"
module Vulkan.Core12.Enums ( module Vulkan.Core12.Enums.DescriptorBindingFlagBits
, module Vulkan.Core12.Enums.DriverId
, module Vulkan.Core12.Enums.ResolveModeFlagBits
... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/b1e33d1031779b4740c279c68879d05aee371659/src/Vulkan/Core12/Enums.hs | haskell | # language CPP #
No documentation found for Chapter "Enums" | module Vulkan.Core12.Enums ( module Vulkan.Core12.Enums.DescriptorBindingFlagBits
, module Vulkan.Core12.Enums.DriverId
, module Vulkan.Core12.Enums.ResolveModeFlagBits
, module Vulkan.Core12.Enums.SamplerReductionMode
... |
7180fe34e70741d9b3f7b55607a11c90259c4ee30864916ac3b3913bbdbbfcc7 | Quogic/DunnetPredecessor | tops20.lsp |
(load "isis:comred")
(load "isis:macros")
(defspec command nil "Command"
"Unrecognized command - does not match switch or keyword")
(defspec info nil "Info keyword" "Does not match switch or keyword ")
(defspec tnet nil "Command"
"Unrecognized command - does not match switch or keyword")
(defspec connect nil "Netwo... | null | https://raw.githubusercontent.com/Quogic/DunnetPredecessor/f11707abde8c88a436df02f8153c07e938a7fb6b/tops20.lsp | lisp |
(load "isis:comred")
(load "isis:macros")
(defspec command nil "Command"
"Unrecognized command - does not match switch or keyword")
(defspec info nil "Info keyword" "Does not match switch or keyword ")
(defspec tnet nil "Command"
"Unrecognized command - does not match switch or keyword")
(defspec connect nil "Netwo... | |
8c545b6679b881d794062ba919eed17b95416c93eada88174827fa008d8d0911 | cosmicoptima/dictator | Game.hs | -- | Specifies the game involving trinkets, locations and credits.
# LANGUAGE LambdaCase #
{-# LANGUAGE MultiWayIf #-}
# LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
module Game
( sendWebhookMessage
, postAsUser
, impersonateNameRandom
... | null | https://raw.githubusercontent.com/cosmicoptima/dictator/b2624053cd3b7525a84e1f3dfc3e83471f976628/src/Game.hs | haskell | | Specifies the game involving trinkets, locations and credits.
# LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
In order to get the message ID we have to look through recent messages. |
# LANGUAGE LambdaCase #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE ScopedTypeVariables #
module Game
( sendWebhookMessage
, postAsUser
, impersonateNameRandom
) where
import Relude hiding ( First
, get
... |
32eb7633f2b403a76a2c6d1a66784e215fa0b4b5c8a96e9e41f905ef94ea2068 | mbj/stratosphere | RStudioServerProAppSettingsProperty.hs | module Stratosphere.SageMaker.Domain.RStudioServerProAppSettingsProperty (
RStudioServerProAppSettingsProperty(..),
mkRStudioServerProAppSettingsProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.Reso... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/sagemaker/gen/Stratosphere/SageMaker/Domain/RStudioServerProAppSettingsProperty.hs | haskell | module Stratosphere.SageMaker.Domain.RStudioServerProAppSettingsProperty (
RStudioServerProAppSettingsProperty(..),
mkRStudioServerProAppSettingsProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.Reso... | |
70afa6dd74d89ab76b38ac0340f7161eff39648c656a214bcd8e82c1d4d1cfc4 | fukamachi/quri | util.lisp | (in-package :cl-user)
(defpackage quri.util
(:use :cl)
(:import-from :alexandria
:with-gensyms)
(:export :simple-byte-vector
:standard-alpha-char-p
:standard-alpha-byte-p
:standard-alphanumeric-p
:standard-alphanumeric-byte-p
:with-array-parsi... | null | https://raw.githubusercontent.com/fukamachi/quri/d09ebb553f4a51e5d52036312ba4ee5b67c79cd0/src/util.lisp | lisp | (in-package :cl-user)
(defpackage quri.util
(:use :cl)
(:import-from :alexandria
:with-gensyms)
(:export :simple-byte-vector
:standard-alpha-char-p
:standard-alpha-byte-p
:standard-alphanumeric-p
:standard-alphanumeric-byte-p
:with-array-parsi... | |
fd5798e9260736cf76f200453e4ae5261b87a1a61fb3374d7a54de4f0cbee51d | Shirakumo/kandria | actions.lisp | (in-package #:org.shirakumo.fraf.kandria)
(defmethod handle ((ev quit-game) (controller controller)))
(define-action-set in-editor)
(define-action undo (in-editor))
(define-action redo (in-editor))
(define-action-set in-menu (exclusive-action-set))
(define-action skip (in-menu))
(define-action advance (in-menu))
(de... | null | https://raw.githubusercontent.com/Shirakumo/kandria/94fd727bd93e302c6a28fae33815043d486d794b/actions.lisp | lisp | (in-package #:org.shirakumo.fraf.kandria)
(defmethod handle ((ev quit-game) (controller controller)))
(define-action-set in-editor)
(define-action undo (in-editor))
(define-action redo (in-editor))
(define-action-set in-menu (exclusive-action-set))
(define-action skip (in-menu))
(define-action advance (in-menu))
(de... | |
4e5136eb5349b901d0b8db2ee9d1daf8538093047b443ac8f2dbfaf8f6f41bc2 | ska80/cl-muproc | muproc-clozure.lisp | Copyright ( c ) 2005 - 2006 , . All rights reserved .
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;; * Redistributions of source code must retain the above copyright
;;; notice, this list of condi... | null | https://raw.githubusercontent.com/ska80/cl-muproc/85d228c3997798a07511e1cde55b99f1ad124061/src/muproc-clozure.lisp | lisp | Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form mus... | Copyright ( c ) 2005 - 2006 , . All rights reserved .
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
WRITTEN BY :
(in-package :cl-muproc.compat)
(defmacro %with-debugging-stack% (&body body)
"This macro sets u... |
5554f2bb3f91330ea7a0fa8f8c5868920cead68f021100f3478970f6a298fc4f | TheBestTvarynka/Lisp-SQL-Parser | textprocessing.lisp |
(defun removeOperator (stringWhere)
"remove one first word from stringWhere"
(setf stringWhere (string-left-trim " " stringWhere))
(let ((spasePosition (position #\SPACE stringWhere)))
(setq spasePosition (if (not spasePosition)(length stringWhere)spasePosition))
(string-left-trim " " (subseq stringW... | null | https://raw.githubusercontent.com/TheBestTvarynka/Lisp-SQL-Parser/d8f1283fc00e394d76e4ac28e434c99d1bee72aa/src/textprocessing.lisp | lisp |
(defun removeOperator (stringWhere)
"remove one first word from stringWhere"
(setf stringWhere (string-left-trim " " stringWhere))
(let ((spasePosition (position #\SPACE stringWhere)))
(setq spasePosition (if (not spasePosition)(length stringWhere)spasePosition))
(string-left-trim " " (subseq stringW... | |
97b10ac76af9ce415e391025194418a7cd689bada121d4b34ee63346b4e44973 | gfour/gic | hof2.hs | result = g add 1
g f x = h (f x) ... | null | https://raw.githubusercontent.com/gfour/gic/d5f2e506b31a1a28e02ca54af9610b3d8d618e9a/Examples/Data/hof2.hs | haskell | result = g add 1
g f x = h (f x) ... | |
c19998932932aab60461f874295baf396874f51944b895010dcc622c7bb68de0 | frodwith/cl-urbit | tape.lisp | (defpackage #:urbit/hoon/tape
(:use #:cl #:urbit/intbytes #:urbit/nock/cord #:urbit/nock/data)
(:import-from #:urbit/nock/math #:met #:end)
(:import-from #:urbit/nock/data/slimcell #:slim-cons)
(:export #:string->tape #:tape->string #:cord->tape #:tape->cord))
(in-package #:urbit/hoon/tape)
(defun string->tap... | null | https://raw.githubusercontent.com/frodwith/cl-urbit/65af924ee58c4c974056f369158bbc1401308fea/hoon/tape.lisp | lisp | (defpackage #:urbit/hoon/tape
(:use #:cl #:urbit/intbytes #:urbit/nock/cord #:urbit/nock/data)
(:import-from #:urbit/nock/math #:met #:end)
(:import-from #:urbit/nock/data/slimcell #:slim-cons)
(:export #:string->tape #:tape->string #:cord->tape #:tape->cord))
(in-package #:urbit/hoon/tape)
(defun string->tap... | |
897bc63260a40821abc5ac2689c7ae334bcdab8610511337187081f2fab79992 | sadiqj/ocaml-esp32 | ccomp.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/sadiqj/ocaml-esp32/33aad4ca2becb9701eb90d779c1b1183aefeb578/utils/ccomp.mli | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
val command: string -> int
val run_command: string -> unit
val compile_file: ?output:string -> ?opt:stri... |
ba6d7ae231531fcd924ee24f7b99b27a2743d069824bec4e33f21ad36f53c204 | ivanjovanovic/sicp | e-1.35.scm | Exercise 1.35 .
;
; Show that the golden ratio Phi (section 1.2.2) is a fixed point of the
; transformation x -> 1 + 1/x, and use this fact to compute by means of the fixed-point procedure.
;
; ---------------------------
(load "1.3.scm") ; reusing fixed-point
(define (phi precision)
(fixed-point
(lambda (x)... | null | https://raw.githubusercontent.com/ivanjovanovic/sicp/a3bfbae0a0bda414b042e16bbb39bf39cd3c38f8/1.3/e-1.35.scm | scheme |
Show that the golden ratio Phi (section 1.2.2) is a fixed point of the
transformation x -> 1 + 1/x, and use this fact to compute by means of the fixed-point procedure.
---------------------------
reusing fixed-point | Exercise 1.35 .
(define (phi precision)
(fixed-point
(lambda (x) (+ 1 (/ 1 x)))
1.0
precision))
(display (phi 0.00000001))
(newline)
|
be5b819627daf7ccc16a40deba3fbb572e56754f1820e6dbfee0dba37296bb66 | tgass/macbeth | Bitmask.hs | # LANGUAGE DefaultSignatures #
module Macbeth.Fics.Utils.Bitmask (
ToBitMask (..),
fromBitMask,
isInBitMask
) where
import Control.Monad
import Data.Bits
Thank you
-a-list-of-enums-bitwise-as-an-int
Thank you Nikita Volkov
-a-list-of-enums-bitwise-as-an-int
-}
class ToBitMask a where
toBitMask ... | null | https://raw.githubusercontent.com/tgass/macbeth/c64b3cc9b641444688b14a2838ee554932f0e9e6/macbeth-fics/src/Macbeth/Fics/Utils/Bitmask.hs | haskell | | Not making this a typeclass, since it already generalizes over all | # LANGUAGE DefaultSignatures #
module Macbeth.Fics.Utils.Bitmask (
ToBitMask (..),
fromBitMask,
isInBitMask
) where
import Control.Monad
import Data.Bits
Thank you
-a-list-of-enums-bitwise-as-an-int
Thank you Nikita Volkov
-a-list-of-enums-bitwise-as-an-int
-}
class ToBitMask a where
toBitMask ... |
443e9a6b6deed9c8064226b664f21684ab0a7bf85100e4b269809eccd3b1e78b | liqd/thentos | Core.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
modul... | null | https://raw.githubusercontent.com/liqd/thentos/f7d53d8e9d11956d2cc83efb5f5149876109b098/thentos-core/src/Thentos/Backend/Core.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE OverloadedStrings #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
* action
* error handling
| Convert plain-text errors not caught by 'mkServantErr' into proper JSON o... | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
module Thentos.Backend.Core
where
import Thentos.Prelude hiding ((.=))
import Control.Monad.Trans.Except (ExceptT(ExceptT))
import Data.Aeson (Value(String), ToJSON(toJSON), (.=), encode, object)
import Data.CaseInsensitive (CI, mk, foldCase, f... |
eb7018b6fab0dfd8ea8fb285e23c836061328de48446a3a2fd9430001fa7dc10 | adobe/Chronikis | SSMConstructionSpec.hs |
Copyright 2019 Adobe . All rights reserved . This file is licensed to you under
the Apache License , Version 2.0 ( the " License " ) ; you may not use this file
except in compliance with the License . You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , sof... | null | https://raw.githubusercontent.com/adobe/Chronikis/b83b9e38341cdc1539fc7625c6355c6fd176d8a3/compiler/test/SSMConstructionSpec.hs | haskell |
Copyright 2019 Adobe . All rights reserved . This file is licensed to you under
the Apache License , Version 2.0 ( the " License " ) ; you may not use this file
except in compliance with the License . You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , sof... | |
dd4404d9f97cd5f3665cad7360f4d4a88b6a1ced6491531526d815f702233c2a | SquidDev/illuaminate | lsp_definition.ml | open Lsp_test
open Lsp.Types
let tests =
Omnomnom.Tests.group "Definitions"
[ test ~name:"Find the definition of a local" (fun t ->
let uri = open_file t "vars.lua" in
request t (TextDocumentDefinition { textDocument = { uri }; position = pos 0 6 })
|> Check.ok_response
|>... | null | https://raw.githubusercontent.com/SquidDev/illuaminate/da18b101b4710881b71c42554d70a3a7d17c3cd6/test/lsp_definition.ml | ocaml | open Lsp_test
open Lsp.Types
let tests =
Omnomnom.Tests.group "Definitions"
[ test ~name:"Find the definition of a local" (fun t ->
let uri = open_file t "vars.lua" in
request t (TextDocumentDefinition { textDocument = { uri }; position = pos 0 6 })
|> Check.ok_response
|>... | |
7f08821ccefd40297db19961bc4ca225641ff935d22bc3c9b7512e256005495a | biocom-uib/vpf-tools | Basic.hs | # language AllowAmbiguousTypes #
{-# language Strict #-}
{-# language TypeSynonymInstances #-}
{-# language UndecidableInstances #-}
module VPF.Frames.Dplyr.Basic where
import GHC.TypeLits (KnownSymbol)
import Prelude hiding (drop, filter, zipWith)
import qualified Control.Lens as L
import Control.Lens.Type
import ... | null | https://raw.githubusercontent.com/biocom-uib/vpf-tools/dd88a543f28eb339cf0dcb89f34479c84b3a8056/src/VPF/Frames/Dplyr/Basic.hs | haskell | # language Strict #
# language TypeSynonymInstances #
# language UndecidableInstances #
# inline foldedRows #
generalized 'rows', but slower
# inline traverseRows #
# inline (!@) #
# inline cols #
# inline frameProductWith #
# inline drop #
# inline select #
# inline select_ #
# inline mutate #
# inline replace #
# in... | # language AllowAmbiguousTypes #
module VPF.Frames.Dplyr.Basic where
import GHC.TypeLits (KnownSymbol)
import Prelude hiding (drop, filter, zipWith)
import qualified Control.Lens as L
import Control.Lens.Type
import qualified Data.Vector as Vec
import qualified Data.Vector.Generic as GVec
import qualified ... |
a37f9940d4afb8b14310084004bc1a206d380892b36da7feeb29ad95c9af9956 | hrefhref/styx | styx_web.erl | -module(styx_web).
-export([render/3, render_form/1, reply_html/3, reply_html/4, temporary_redirect/2, req_param/2, identity_name/1]).
identity_name(#{<<"identity">> := Identity}) ->
identity_name(Identity);
identity_name(#{<<"traits">> := #{<<"name">> := #{<<"first">> := F, <<"last">> := L}}}) when is_binary(F),... | null | https://raw.githubusercontent.com/hrefhref/styx/a808f89428daa2e90ceb7a9876a317e4e85fe5bf/apps/styx_web/src/styx_web.erl | erlang | -module(styx_web).
-export([render/3, render_form/1, reply_html/3, reply_html/4, temporary_redirect/2, req_param/2, identity_name/1]).
identity_name(#{<<"identity">> := Identity}) ->
identity_name(Identity);
identity_name(#{<<"traits">> := #{<<"name">> := #{<<"first">> := F, <<"last">> := L}}}) when is_binary(F),... | |
54ff9fb36d65791a4cac73c7f378d15f5689ac172f97f9b86eba3457c9a2959f | spurious/sagittarius-scheme-mirror | query-string.scm | ;;; -*- Scheme -*-
;;;
query-string.scm - OAuth 1.0 library .
;;;
Copyright ( c ) 2010 - 2012 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; 1. Redistributions of sour... | null | https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/sitelib/net/oauth/query-string.scm | scheme | -*- Scheme -*-
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
... | query-string.scm - OAuth 1.0 library .
Copyright ( c ) 2010 - 2012 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
(li... |
25df48e1cad3d6314013d44236da2f3b6e57b2b39cf067ac1576cddb548bd19f | HaskellForCats/HaskellForCats | stockPricesYesterdays.hs | -- stockPricesYesterdays
stockPricesYesterdays = [("0060",500.00),("0120",505.00)]
| null | https://raw.githubusercontent.com/HaskellForCats/HaskellForCats/2d7a15c0cdaa262c157bbf37af6e72067bc279bc/stockPricesYesterdays.hs | haskell | stockPricesYesterdays |
stockPricesYesterdays = [("0060",500.00),("0120",505.00)]
|
b67a6c91384642949d05a50c5589c374a462252dcdc5c149b9a4ebdbb8fb5ec9 | keigoi/ocaml-mpst | actionOut.mli | type 'a select
type ('v, 'a) out
val make_select :
('a, 'b) Rows.method_ ->
('b, 'c select) Rows.method_ ->
int DynChan.endpoint ->
'c LinState.t ->
'a LinState.t
val select : 's select -> 's
val make_out :
('a, ('v, 'c) out) Rows.method_ ->
'v DynChan.endpoint ->
'c LinState.t ->
'a LinState.t
va... | null | https://raw.githubusercontent.com/keigoi/ocaml-mpst/cfd1bda8f0cb426054d2c5b2f10f67907175edfc/lib/unicast/actionOut.mli | ocaml | type 'a select
type ('v, 'a) out
val make_select :
('a, 'b) Rows.method_ ->
('b, 'c select) Rows.method_ ->
int DynChan.endpoint ->
'c LinState.t ->
'a LinState.t
val select : 's select -> 's
val make_out :
('a, ('v, 'c) out) Rows.method_ ->
'v DynChan.endpoint ->
'c LinState.t ->
'a LinState.t
va... | |
b28594f526d7879ce8329ac1eca425c5a3677ad8c6f364d6f2e61ae32be7d7cf | dpiponi/Moodler | test_cackle.hs | do
restart
root <- getRoot
let out = "out"
let keyboard = "keyboard"
let trigger = "trigger"
audio_saw0 <- new' "audio_saw"
audio_sin1 <- new' "audio_sin"
audio_square2 <- new' "audio_square"
audio_triangle3 <- new' "audio_triangle"
bounce4 <- new' "bounce"
butterhp5 <- new' ... | null | https://raw.githubusercontent.com/dpiponi/Moodler/a0c984c36abae52668d00f25eb3749e97e8936d3/Moodler/saves/test_cackle.hs | haskell | do
restart
root <- getRoot
let out = "out"
let keyboard = "keyboard"
let trigger = "trigger"
audio_saw0 <- new' "audio_saw"
audio_sin1 <- new' "audio_sin"
audio_square2 <- new' "audio_square"
audio_triangle3 <- new' "audio_triangle"
bounce4 <- new' "bounce"
butterhp5 <- new' ... | |
f28972c4193e252e12808112eb8801edc4b2aa34fbd03bc26ad17a688b5114b5 | m4b/bin2json | B2J_MachSymbolTable.ml | open Mach.SymbolTable
open B2J_Json
type nlist = {
n_strx : int ; ( * 4
type nlist = {
n_strx: int; (* 4 *)
1
1
2
8
}
*)
let nlist_to_json (nlist,name) =
`O [
"n_strx", to_hex nlist.n_strx;
"n_type", to_hex nlist.n_type;
"n_sect", to_hex nlist.n_sect;
"n_desc", to_hex nlist.n_desc;
... | null | https://raw.githubusercontent.com/m4b/bin2json/9aeeef017a4446cfc134e593aca76e8ac573b7f7/lib/mach/B2J_MachSymbolTable.ml | ocaml | 4 | open Mach.SymbolTable
open B2J_Json
type nlist = {
n_strx : int ; ( * 4
type nlist = {
1
1
2
8
}
*)
let nlist_to_json (nlist,name) =
`O [
"n_strx", to_hex nlist.n_strx;
"n_type", to_hex nlist.n_type;
"n_sect", to_hex nlist.n_sect;
"n_desc", to_hex nlist.n_desc;
"n_value", to_hex nl... |
d3f2bb5fa19d9bcbdcc5472a1476a7b1a98f45c6fe5fe4bef5ee44e2158ff47f | LeventErkok/sbvPlugin | Plugin.hs | ---------------------------------------------------------------------------------
-- |
-- Module : Data.SBV.Plugin
Copyright : ( c )
-- License : BSD3
-- Maintainer :
-- Stability : experimental
--
-- (The sbvPlugin is hosted at <>.
-- Comments, bug reports, and patches are always welcome.)
--... | null | https://raw.githubusercontent.com/LeventErkok/sbvPlugin/b6a6e94cd237a4f64f985783931bd7656e7a6a69/Data/SBV/Plugin.hs | haskell | -------------------------------------------------------------------------------
|
Module : Data.SBV.Plugin
License : BSD3
Maintainer :
Stability : experimental
(The sbvPlugin is hosted at <>.
Comments, bug reports, and patches are always welcome.)
=== /Example/
> {-# OPTIONS_GHC -fplugin=... | Copyright : ( c )
= = SBVPlugin : A GHC Plugin for SBV , SMT Based Verification
< SBV > is a library for express properties about programs and
automatically proving them using SMT solvers . The SBVPlugin allows
simple annotations on functions to prove them directly during
GHC compilation time .
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.