_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 |
|---|---|---|---|---|---|---|---|---|
eb98ed9c3b928eebee1bfefea418cffab3326db907d56cee3296ef5e93d3e754 | part-cw/lambdanative | lnjstest.scm | (define intValue (method "intValue" "java.lang.Double")) ;; FIXME teach jscheme fixnums!
;; Try this to find out how where methods are defined:
;;
(procedure? (method "checkOrRequestPermission" (android-app-class) "java.lang.String"))
;; Just to see an error:
;;
(error "nananana")
| null | https://raw.githubusercontent.com/part-cw/lambdanative/74ec19dddf2f2ff787ee70ad677bc13b9dfafc29/apps/DemoAndroidLNjScheme/lnjstest.scm | scheme | FIXME teach jscheme fixnums!
Try this to find out how where methods are defined:
Just to see an error:
|
(procedure? (method "checkOrRequestPermission" (android-app-class) "java.lang.String"))
(error "nananana")
|
a564c393245eda52a07c14ec52e03577c29f0e0816615f8d885a50b70dd57868 | HaskellForCats/HaskellForCats | ch3Prob.hs | module Ch3Prob where
-------------1 - --------------
: : [ ]
: : ( , , )
[ ( False,`O`),(True,'1 ' ) ] -- : : [ ( , ) ]
([False,True],['0','1']) -- :: ([Bool],[Char])
[tail,init,reverse] -- :: [[a] -> [a]]
! ! note line 8 is a list ,
--where each function takes a list,
--and returns a list
{-----... | null | https://raw.githubusercontent.com/HaskellForCats/HaskellForCats/2d7a15c0cdaa262c157bbf37af6e72067bc279bc/MenaBeginning/Ch002-Ch03/ch3Prob.hs | haskell | -----------1 - --------------
: : [ ( , ) ]
:: ([Bool],[Char])
:: [[a] -> [a]]
where each function takes a list,
and returns a list
--------------2--------------
:: [a] -> a
:: (a,b) -> (b,a)
:: a -> b -> (a,b)
twice :: (a -> a) -> a -> a
note class constraints
-------------4 - ---------------
Func... | module Ch3Prob where
: : [ ]
: : ( , , )
! ! note line 8 is a list ,
swap :: (a,b) -> (b,a)
pair :: a -> b -> (a,b)
double :: Num a => a -> a
double x = x * 2
palindrome :: Eq a => [a] -> Bool
palindrome xs = reverse xs == xs
twice f x = f (f x)
let blah b = 2.0 * b
let a = 8... |
68f6d5b3b204f7e6a3236f5e905f17e3b07ccdbe19d19eef2ecc8dddf35efb46 | immutant/immutant | walk.clj | Copied and modified from riddley , v0.1.12 ( ) , MIT licnensed , Copyright
(ns ^:no-doc from.riddley.walk
(:refer-clojure :exclude [macroexpand])
(:require
[from.riddley.compiler :as cmp]))
(defn macroexpand
"Expands both macros and inline functions. Optionally takes a `special-form?` predicate which
... | null | https://raw.githubusercontent.com/immutant/immutant/6ff8fa03acf73929f61f2ca75446cb559ddfc1ef/web/src/from/riddley/walk.clj | clojure | might look like a macro, but for our purposes it isn't
if we can't macroexpand any further, check if it's an inlined function
unfortunately, static function calls can look a lot like what we just
expanded, so prevent infinite expansion
register a local for the function, if it's named
special case to handle cloju... | Copied and modified from riddley , v0.1.12 ( ) , MIT licnensed , Copyright
(ns ^:no-doc from.riddley.walk
(:refer-clojure :exclude [macroexpand])
(:require
[from.riddley.compiler :as cmp]))
(defn macroexpand
"Expands both macros and inline functions. Optionally takes a `special-form?` predicate which
... |
3c9077a4c0ae192cbe052a9caa3ac00e8bc75badd8e3c91a0ab8974b9e13188b | AdaCore/why3 | cfg_main.mli | (********************************************************************)
(* *)
The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University
(* ... | null | https://raw.githubusercontent.com/AdaCore/why3/74914e765153d7eb4b34cd0246a623719f4aa670/plugins/cfg/cfg_main.mli | ocaml | ******************************************************************
This software is distributed under the terms of the GNU Lesser
on linking described in file LICENSE. ... | The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University
General Public License version 2.1 , with the special exception
open Cfg_ast
open Why3
val set_stackify :
(cfg_fundef -> Ptree.fundef) -> unit
|
7da99a7ff4e6edf678e04706a44d9735846696f55145ce2c195ab9bf30728cd2 | 314eter/ocaml-stringsearch-benchmark | hash.ml | let name = "hash"
exception Found of int
let start_search pattern maxi text =
let hash = ref 0 in
let identical = ref true in
for pos = 0 to maxi do
let patternchar = String.unsafe_get pattern pos |> int_of_char in
let textchar = String.unsafe_get text pos |> int_of_char in
hash := !hash + textchar ... | null | https://raw.githubusercontent.com/314eter/ocaml-stringsearch-benchmark/bcf81514a2cffa919bc4283fb5be96a38dacf56d/hash.ml | ocaml | let name = "hash"
exception Found of int
let start_search pattern maxi text =
let hash = ref 0 in
let identical = ref true in
for pos = 0 to maxi do
let patternchar = String.unsafe_get pattern pos |> int_of_char in
let textchar = String.unsafe_get text pos |> int_of_char in
hash := !hash + textchar ... | |
ec2edcd26979b519a4abfd812fe64cd155e4c97845455551835ff7e7b2a4a4b0 | 5HT/ant | Trie.ml |
open Unicode.Types;
type trie 'a =
{
array of 3n entries : offset , char , data , offset , char , data , ...
t_data : array 'a; (* array of the actual data *)
t_data_len : mutable int (* number of used enties in the |t_data| array *)
};
value m... | null | https://raw.githubusercontent.com/5HT/ant/6acf51f4c4ebcc06c52c595776e0293cfa2f1da4/Runtime/Trie.ml | ocaml | array of the actual data
number of used enties in the |t_data| array
|lookup <trie> <pos> <str>| checks whether <str> occures in <trie> starting at <pos>.
|build <data>| creates a simple_trie from a list of (key, value) pairs.
|compress <trie>| transla... |
open Unicode.Types;
type trie 'a =
{
array of 3n entries : offset , char , data , offset , char , data , ...
};
value make len =
{
t_tree = Array.make (3*len) (-1);
t_data = Array.make len (Obj.magic 0);
t_data_len = 0
};
value shrink trie len =
{
t_tree = Array.sub trie.t_tree 0 (3*len);
t_... |
67ce2ee26243e0aeb5ee78998735eed4eaa48056b3bba5ba388508e11108e781 | snauts/abop | povray.lisp | ;;;; -*- Mode: Lisp -*-
;;;;
Copyright ( c ) 2008 - 2009
;;;;
(defpackage #:povray
(:use #:common-lisp #:abop))
(in-package #:povray)
(defvar *number* nil)
(export '*number*)
(defun point-povray (p &optional nz?)
(format nil "<~6F,~6F~:[,~6F~;~*~]>" (point-x p) (point-y p) nz? (point-z p)))
(defun format-p... | null | https://raw.githubusercontent.com/snauts/abop/23cab3a04edab50a1f97f779890bf5c1704ae110/povray.lisp | lisp | -*- Mode: Lisp -*-
| Copyright ( c ) 2008 - 2009
(defpackage #:povray
(:use #:common-lisp #:abop))
(in-package #:povray)
(defvar *number* nil)
(export '*number*)
(defun point-povray (p &optional nz?)
(format nil "<~6F,~6F~:[,~6F~;~*~]>" (point-x p) (point-y p) nz? (point-z p)))
(defun format-povray-color (c)
(format nil "<~6... |
b28970f34b66d0481d4b34c04bbc010337acc7bd9fc54b99b1100e511eb94f4e | yesodweb/persistent | CompositeTest.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE GeneralizedNewtypeDeriving #
FIXME
# OPTIONS_GHC -Wno - incomplete - uni - patterns #
module CompositeTest where
import qualified Data.Map as Map
import Data.Maybe (isJust)
import Init
mpsGeneric = False is due to a bug or at least lack of a feature in mkKeyTypeDec TH.hs
sh... | null | https://raw.githubusercontent.com/yesodweb/persistent/eaf9d561a66a7b7a8fcbdf6bd0e9800fa525cc13/persistent-test/src/CompositeTest.hs | haskell | c1 FKs p1
TODO: push into persistent-qq test suite
it "RawSql Key instance with sqlQQ" $ runDb $ do
key <- insert p1
keyFromRaw' <- [sqlQQ|
SELECT @{TestParentName}, @{TestParentName2}, @{TestParentAge}
FROM ^{TestParent}
|]
[key] @== keyFromRaw'
TODO: put int... | # LANGUAGE DeriveGeneric #
# LANGUAGE GeneralizedNewtypeDeriving #
FIXME
# OPTIONS_GHC -Wno - incomplete - uni - patterns #
module CompositeTest where
import qualified Data.Map as Map
import Data.Maybe (isJust)
import Init
mpsGeneric = False is due to a bug or at least lack of a feature in mkKeyTypeDec TH.hs
sh... |
6fd36f491e1ef8fb220c3bde755baa7f00778d6186748c5dce09a37181798bdd | mjambon/atdgen | ag_string_match.ml |
open Printf
type position = [ `Length | `Position of int | `End ]
type value = [ `Int of int | `Char of char ]
type 'a tree =
[ `Node of (position * (value * 'a tree) list)
| `Branch of ((position * value) list * 'a tree)
| `Leaf of 'a ]
let group_by f l =
let tbl = Hashtbl.create 20 in
List.iter (
... | null | https://raw.githubusercontent.com/mjambon/atdgen/9b031da2f182a1fa60bc76ff3a3228ff7b45a8a3/src/ag_string_match.ml | ocaml |
Create branches where possible.
As a result, all the nodes become part of a branch.
reached end of string but multiple strings remain |
open Printf
type position = [ `Length | `Position of int | `End ]
type value = [ `Int of int | `Char of char ]
type 'a tree =
[ `Node of (position * (value * 'a tree) list)
| `Branch of ((position * value) list * 'a tree)
| `Leaf of 'a ]
let group_by f l =
let tbl = Hashtbl.create 20 in
List.iter (
... |
f5d93466ead12f3324f6ee8b098d153ffebfa1ed991cced23dbc6e7407068e68 | opencog/opencog | relex-utils.scm | ;
; relex-utils.scm
;
;;; Commentary:
;
Assorted RelEx - related utilities . Note that is partly
deprecated ; it only works for English , and is unlikely to be
; developed further in the future.
;
; Operations include:
; -- looping over all RelEx relations
; -- get part-of-speech, lemma of word.
; -- get preposi... | null | https://raw.githubusercontent.com/opencog/opencog/47c8743d5c7825705cdfda7009355db1f6472267/opencog/nlp/scm/oc/relex-utils.scm | scheme |
relex-utils.scm
Commentary:
it only works for English , and is unlikely to be
developed further in the future.
Operations include:
-- looping over all RelEx relations
-- get part-of-speech, lemma of word.
-- get prepositions
The function names that can be found here are:
-- parse-get-relex-relations G... | Assorted RelEx - related utilities . Note that is partly
-- interp - get - r2l - outputs Get all R2L outputs in an Interpretation .
Copyright ( c ) 2008 , 2009 , 2013 Linas Vepstas < >
(use-modules (ice-9 regex))
(use-modules (srfi srfi-1))
(define-public (parse-get-relex-relations parse-node)
"
parse-g... |
b063c48502a43d67ab1f9e9eac77c288ab53b2976406c4f809b38e6df7f09085 | Mattiemus/LaneWars | Object.hs | module Game.Server.Object where
import Network.Socket hiding (send, sendTo, recv, recvFrom)
import Network.Socket.ByteString
import FRP.Yampa as Yampa
import FRP.Yampa.Geometry
import IdentityList
import Game.Shared.Object
import Game.Shared.Types
import Game.Shared.Networking
import Game.Server.Networ... | null | https://raw.githubusercontent.com/Mattiemus/LaneWars/4c4a0a11f49cbd9ff722aedf3e0f352e49b140fe/Game/Server/Object.hs | haskell | ---------------------
Game object types --
---------------------
|Data structure for input to game objects
^Object id allocated by the engine
^Network input
^List of all game objects
^List of objects that the object is colliding with
|Data structure for the output from game objects
^Event that is set when this ... | module Game.Server.Object where
import Network.Socket hiding (send, sendTo, recv, recvFrom)
import Network.Socket.ByteString
import FRP.Yampa as Yampa
import FRP.Yampa.Geometry
import IdentityList
import Game.Shared.Object
import Game.Shared.Types
import Game.Shared.Networking
import Game.Server.Networ... |
c048b6aebac8958c03ac5cda8b756b87a630e52070a550daad481f6f9172ddc5 | hidaris/thinking-dumps | 04_parens_matter.rkt | #lang racket
(provide (all-defined-out))
[ first big difference from ML ( and Java ) ] PARENS MATTER ! !
(define fact
(lambda (n)
(cond
((= n 0) 1)
(else (* n (fact (- n 1)))))))
(define fact2
(lambda (n)
(cond
((= n 0) (1))
(else (* n (fact (- n 1)))))))
(define fact3
(lambd... | null | https://raw.githubusercontent.com/hidaris/thinking-dumps/3fceaf9e6195ab99c8315749814a7377ef8baf86/cse341/racket/04_parens_matter.rkt | racket | #lang racket
(provide (all-defined-out))
[ first big difference from ML ( and Java ) ] PARENS MATTER ! !
(define fact
(lambda (n)
(cond
((= n 0) 1)
(else (* n (fact (- n 1)))))))
(define fact2
(lambda (n)
(cond
((= n 0) (1))
(else (* n (fact (- n 1)))))))
(define fact3
(lambd... | |
b4e0258d87bf6c4cf32dd2f6ecf6cfed5bc5e0755f399358e8769ba5ae2e99f5 | kadena-io/pact | Gas.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE TemplateHaskell #
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeFamilies #
# LANGUAGE LambdaCase #
-- |
-- Module : Pact.Types.Gas
Copyright : ( C ) 2016
-- License : BSD-style (see the file LICENSE)
Maintainer : ... | null | https://raw.githubusercontent.com/kadena-io/pact/5f5aa8ee7e0a88fead9c8ac5b8cf047ef456a1e4/src/Pact/Types/Gas.hs | haskell | # LANGUAGE OverloadedStrings #
|
Module : Pact.Types.Gas
License : BSD-style (see the file LICENSE)
Gas (compute and space cost calculation) types.
* types
* optics
| API Price value, basically a newtype over `Decimal`
| DB Read value for per-row gas costing.
Data is included if variable-size.
^ ... | # LANGUAGE DeriveGeneric #
# LANGUAGE TemplateHaskell #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE TypeFamilies #
# LANGUAGE LambdaCase #
Copyright : ( C ) 2016
Maintainer : < >
module Pact.Types.Gas
Gas(..)
, GasPrice(..)
, GasEnv(..)
, ReadValue(..)
, WriteValue(..)
, GasModel... |
8fa2fe45bfa5a86171dd157100b806f9d3e7b678f244a780756c077c5eb6a8cf | jasonstolaruk/CurryMUD | Dispatch.hs | # LANGUAGE NamedFieldPuns , OverloadedStrings , RecordWildCards #
module Mud.Interp.Dispatch where
import Mud.Cmds.Pla
import Mud.Data.Misc
import Mud.Data.State.ActionParams.ActionParams
import Mud.Data.State.MudData
import Mud.Data.State.Util.Get
import Mu... | null | https://raw.githubusercontent.com/jasonstolaruk/CurryMUD/f9775fb3ede08610f33f27bb1fb5fc0565e98266/lib/Mud/Interp/Dispatch.hs | haskell | ==================================================
--- | # LANGUAGE NamedFieldPuns , OverloadedStrings , RecordWildCards #
module Mud.Interp.Dispatch where
import Mud.Cmds.Pla
import Mud.Data.Misc
import Mud.Data.State.ActionParams.ActionParams
import Mud.Data.State.MudData
import Mud.Data.State.Util.Get
import Mu... |
dcd8865519981eb072267674ae79cef4e4bcec552715c6feabdbb3cf975c03ea | HumbleUI/HumbleUI | image_snapshot.clj | (ns examples.image-snapshot
(:require
[io.github.humbleui.ui :as ui])
(:import
[io.github.humbleui.skija Paint Shader]))
(def ui
(ui/with-bounds ::bounds
(ui/dynamic ctx [{:keys [scale] ::keys [bounds]} ctx
{:keys [height]} bounds]
(let [shader (Shader/makeLinearGradient
... | null | https://raw.githubusercontent.com/HumbleUI/HumbleUI/ab2ea41a97db6390e65357a79e5806af7052a308/dev/examples/image_snapshot.clj | clojure | (ns examples.image-snapshot
(:require
[io.github.humbleui.ui :as ui])
(:import
[io.github.humbleui.skija Paint Shader]))
(def ui
(ui/with-bounds ::bounds
(ui/dynamic ctx [{:keys [scale] ::keys [bounds]} ctx
{:keys [height]} bounds]
(let [shader (Shader/makeLinearGradient
... | |
75ef0f3573d3ca2844a9b508b797cfc410dd8d698a6bee02a55d730d9b554486 | fugue/fregot | Yaml.hs | |
Copyright : ( c ) 2020 Fugue , Inc.
License : Apache License , version 2.0
Maintainer :
Stability : experimental
Portability : POSIX
Convert a YAML document to a prepared rule .
Copyright : (c) 2020 Fugue, Inc.
License : Apache License, version 2.0
Maintainer :
Stability : exper... | null | https://raw.githubusercontent.com/fugue/fregot/c3d87f37c43558761d5f6ac758d2f1a4117adb3e/lib/Fregot/Prepare/Yaml.hs | haskell | # LANGUAGE OverloadedStrings # | |
Copyright : ( c ) 2020 Fugue , Inc.
License : Apache License , version 2.0
Maintainer :
Stability : experimental
Portability : POSIX
Convert a YAML document to a prepared rule .
Copyright : (c) 2020 Fugue, Inc.
License : Apache License, version 2.0
Maintainer :
Stability : exper... |
ed802e1bc47c44682ceabad196ef26a117bede39622761336f508253e8e8a61d | fission-codes/fission | CLI.hs | module Fission.CLI (cli, interpret) where
import qualified Data.Version as Version
import qualified Paths_fission_cli as CLI
import qualified RIO as Logger
import Options.Applicative
impor... | null | https://raw.githubusercontent.com/fission-codes/fission/04894a560b7946e9523ef69877dcd28b83d69863/fission-cli/library/Fission/CLI.hs | haskell | module Fission.CLI (cli, interpret) where
import qualified Data.Version as Version
import qualified Paths_fission_cli as CLI
import qualified RIO as Logger
import Options.Applicative
impor... | |
423a6826240cce0bbde13c2055f83a4dde75ff0348188d98f7c54542b2f3f0a1 | amnh/poy5 | file.ml | POY 5.1.1 . A phylogenetic analysis program using Dynamic Homologies .
Copyright ( C ) 2014 , , , Ward Wheeler ,
and the American Museum of Natural History .
(* *)
(* This program is free softwa... | null | https://raw.githubusercontent.com/amnh/poy5/da563a2339d3fa9c0110ae86cc35fad576f728ab/src/nexus/file.ml | ocaml |
This program is free software; you can redistribute it and/or modify
(at your option) any later version.
This progra... | POY 5.1.1 . A phylogenetic analysis program using Dynamic Homologies .
Copyright ( C ) 2014 , , , Ward Wheeler ,
and the American Museum of Natural History .
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; ... |
98bb23fae9aec8c3d8582df0b475d11c7dc5241a8fa29fcfc806ce27e1773b51 | hanshuebner/cadr2 | macros.lisp | Macros for ZWEI . -*- Mode : LISP ; Package : ZWEI -*-
* * ( c ) Copyright 1980 Massachusetts Institute of Technology * *
(DEFMACRO CHARMAP ((FROM-BP-FORM TO-BP-FORM . RETURN-FORMS) . BODY)
`(CHARMAP-PER-LINE (,FROM-BP-FORM ,TO-BP-FORM . ,RETURN-FORMS) (NIL) . ,BODY))
(DEFMACRO CHARMAP-PER-LINE ((FROM-BP-F... | null | https://raw.githubusercontent.com/hanshuebner/cadr2/2398a1303804d41c4cdcb2d3d8454cd4a48912b8/mit/nzwei/macros.lisp | lisp | Package : ZWEI -*-
Note that index can take on the value of the length of a line, which means the CR
No ADI, destination-return
stream for the rest of the form. An unwind-protect closes the file.
PRESERVE-POINT
Bind off the read-only attribute of the specified interval temporarily.
A bug with this is that the fa... | * * ( c ) Copyright 1980 Massachusetts Institute of Technology * *
(DEFMACRO CHARMAP ((FROM-BP-FORM TO-BP-FORM . RETURN-FORMS) . BODY)
`(CHARMAP-PER-LINE (,FROM-BP-FORM ,TO-BP-FORM . ,RETURN-FORMS) (NIL) . ,BODY))
(DEFMACRO CHARMAP-PER-LINE ((FROM-BP-FORM TO-BP-FORM . RETURN-FORMS) LINE-FORMS . BODY)
`(LET ((... |
80756389854f50b730acad6c92c8f6fc5c5810d921f858407bf4592d1ad83535 | motemen/jusk | JSString.hs |
JSString.hs
Stringオブジェクト
/~oz-07ams/prog/ecma262r3/15-5_String_Objects.html
JSString.hs
Stringオブジェクト
/~oz-07ams/prog/ecma262r3/15-5_String_Objects.html
-}
module JSString where
import Prelude hiding (toInteger)
import Control.Monad
import Data.Maybe
import Data.Char
import Text.Regex
i... | null | https://raw.githubusercontent.com/motemen/jusk/4975915b8550aa09c452fb89dcad7bfcb1037c39/src/JSString.hs | haskell | String()
String.prototype.toString
String.prototype.valueOf
String.prototype.charAt
String.prototype.replace
String.prototype.substring
String.prototype.toUpperCase |
JSString.hs
Stringオブジェクト
/~oz-07ams/prog/ecma262r3/15-5_String_Objects.html
JSString.hs
Stringオブジェクト
/~oz-07ams/prog/ecma262r3/15-5_String_Objects.html
-}
module JSString where
import Prelude hiding (toInteger)
import Control.Monad
import Data.Maybe
import Data.Char
import Text.Regex
i... |
ec4dbf3d694942b8d8b1e0a07d40c1aca3ba89b142d2eecebf72300b58f7cdf2 | Convex-Dev/convex-web | public_api_test.clj | (ns convex-web.public-api-test
(:require
[convex-web.component]
[convex-web.client :as client]
[convex-web.config :as config]
[convex-web.web-server :as web-server]
[convex-web.system :as sys]
[convex-web.test :as test]
[clojure.test :refer [deftest is testing use-fixtures]]
[clojure.data... | null | https://raw.githubusercontent.com/Convex-Dev/convex-web/9f13d5655427eab9477cc5b9ba56faa0eb3bb1b4/src/test/clojure/convex_web/public_api_test.clj | clojure | JSON does not have sets, so the encoder uses a vector instead.
==========
==========
Prepare is successful
Prepare response must contain these keys
Submit is successful
Submit response must contain these keys
Submit response result value
==========
==========
Prepare is successful, but transaction should fai... | (ns convex-web.public-api-test
(:require
[convex-web.component]
[convex-web.client :as client]
[convex-web.config :as config]
[convex-web.web-server :as web-server]
[convex-web.system :as sys]
[convex-web.test :as test]
[clojure.test :refer [deftest is testing use-fixtures]]
[clojure.data... |
e2c88390c3ec8c85792e9de10b569bc0ceb9b26df3b4c7b239a6dfcd9ce405ae | ucsd-progsys/dsolve | len.ml | DSOLVE -dontgenmlq
type 'a t =
Empty
meaning : node of left el , left n.els , element , right el , , heigth
| Node of 'a t * int * 'a * 'a t * int * int
let height t =
match t with
Empty -> 0
| Node(_, _, _, _, _, h) -> h
let length t =
match t with
Empty -> 0
| Node (_, cl, _, _, cr, _)... | null | https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/postests/vec/len.ml | ocaml | defer this particular property to runtime
This is a recursive version of balance, which balances a tree all the way down.
The trees l and r can be of any height, but they need to be internally balanced.
Useful to implement concat.
although it's not obvious from setappend, length v > 0 due to dep on set
... | DSOLVE -dontgenmlq
type 'a t =
Empty
meaning : node of left el , left n.els , element , right el , , heigth
| Node of 'a t * int * 'a * 'a t * int * int
let height t =
match t with
Empty -> 0
| Node(_, _, _, _, _, h) -> h
let length t =
match t with
Empty -> 0
| Node (_, cl, _, _, cr, _)... |
84d4bf065765c785e48fe144f946a35245f75cba05acade50a87d0e804c09470 | j-mie6/ParsleyHaskell | Vec.hs | module Parsley.Internal.Common.Vec (module Parsley.Internal.Common.Vec, Nat(..)) where
import Parsley.Internal.Common.Indexed (Nat(..))
data Vec n a where
VNil :: Vec Zero a
VCons :: a -> Vec n a -> Vec (Succ n) a
replicateVec :: SNat n -> a -> Vec n a
replicateVec SZero _ = VNil
replicateVec (SSucc n) x = V... | null | https://raw.githubusercontent.com/j-mie6/ParsleyHaskell/045ab78ed7af0cbb52cf8b42b6aeef5dd7f91ab2/parsley-core/src/ghc/Parsley/Internal/Common/Vec.hs | haskell | module Parsley.Internal.Common.Vec (module Parsley.Internal.Common.Vec, Nat(..)) where
import Parsley.Internal.Common.Indexed (Nat(..))
data Vec n a where
VNil :: Vec Zero a
VCons :: a -> Vec n a -> Vec (Succ n) a
replicateVec :: SNat n -> a -> Vec n a
replicateVec SZero _ = VNil
replicateVec (SSucc n) x = V... | |
ccca28eaedf6c3ba2d82346d86941c54c99dd55e36b0320537c93c7619f5ec8f | carcigenicate/mandelbrot | project.clj | (defproject mandelbrot "2"
:description "FIXME: write description"
:dependencies [[org.clojure/clojure "1.10.0"]
[helpers "1"]
[seesaw "1.5.0"]
[org.clojure/core.async "0.4.490"]]
:main mandelbrot.main
:target-path "target/%s"
:profiles {:uberjar {:aot :a... | null | https://raw.githubusercontent.com/carcigenicate/mandelbrot/1de3aff9909b3bb3a69974304baa504586a2a7ec/project.clj | clojure | (defproject mandelbrot "2"
:description "FIXME: write description"
:dependencies [[org.clojure/clojure "1.10.0"]
[helpers "1"]
[seesaw "1.5.0"]
[org.clojure/core.async "0.4.490"]]
:main mandelbrot.main
:target-path "target/%s"
:profiles {:uberjar {:aot :a... | |
efb38e8bba974d6f3f122f85d645c9c8f293f44aad434d2e5458a12eb846f0d1 | input-output-hk/plutus | Spec.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE OverloadedStrings #
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
# LANGUAGE TypeApplic... | null | https://raw.githubusercontent.com/input-output-hk/plutus/863613c90abecb8271e9d80d868f2adb77b4d844/plutus-tx-plugin/test/TH/Spec.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
want to see the raw structure, so using Show | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -fplugin PlutusTx . Plugin #
# OPTIONS_GHC -fplugin - opt PlutusTx . Plugin : context - lev... |
f593cf0b610fc906bb2f4a0947e4571f6c79dc166566a551358f2b4cad96f976 | typedclojure/typedclojure | errors.clj | Copyright ( c ) , , Rich Hickey & 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 ... | null | https://raw.githubusercontent.com/typedclojure/typedclojure/9cbba7278bf376213485a6f9e423acbef044bf27/typed/clj.reader/src/typed/clj/reader/impl/errors.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 ) , , Rich Hickey & contributors .
(ns typed.clj.reader.impl.errors
(:require [typed.clj.reader.reader-types :as types]
[typed.clj.reader.impl.inspect :as i]))
(defn- location-details [rdr ex-type]
(let [details {:type :reader-exception
:ex-kind ex-type}]
(if... |
731a9b798d073e63162b5658389f9019be3996c47e41cda9d422bd7e888228c7 | jtuple/riak_zab | riak_zab_util.erl | -module(riak_zab_util).
-export([command/3, command/4, sync_command/3]).
%% API
command(Preflist, Msg, VMaster) ->
command(Preflist, Msg, noreply, VMaster).
command(Key, Msg, Sender, VMaster) ->
Preflist = get_preflist(Key),
riak_zab_ensemble_master:command(Preflist, Msg, Sender, VMaster).
sync_command(Ke... | null | https://raw.githubusercontent.com/jtuple/riak_zab/ebd54aa540cf65e49d6e0890005e714ee756914a/src/riak_zab_util.erl | erlang | API | -module(riak_zab_util).
-export([command/3, command/4, sync_command/3]).
command(Preflist, Msg, VMaster) ->
command(Preflist, Msg, noreply, VMaster).
command(Key, Msg, Sender, VMaster) ->
Preflist = get_preflist(Key),
riak_zab_ensemble_master:command(Preflist, Msg, Sender, VMaster).
sync_command(Key, Msg,... |
745f68e9c49f0fe59ef19fdccc64ea5ae1b1513b6b30979279ee52156c51d293 | facundoolano/advenjure | input.clj | (ns advenjure.ui.input
(:require [clojure.string :as string]
[clojure.core.async :refer [go <!]]
[advenjure.items :refer [all-item-names]]
[advenjure.rooms :refer [visible-name-mappings]]
[advenjure.utils :refer [direction-mappings current-room room-as-item]])
(:impor... | null | https://raw.githubusercontent.com/facundoolano/advenjure/2f05fdae9439ab8830753cc5ef378be66b7db6ef/src/advenjure/ui/input.clj | clojure | (ns advenjure.ui.input
(:require [clojure.string :as string]
[clojure.core.async :refer [go <!]]
[advenjure.items :refer [all-item-names]]
[advenjure.rooms :refer [visible-name-mappings]]
[advenjure.utils :refer [direction-mappings current-room room-as-item]])
(:impor... | |
62811d292156e73ada20d1a638913a44daacb4bbad18ca77662d139b8ad2ed52 | nuprl/gradual-typing-performance | gradual-bib.rkt | #lang at-exp racket
;; This module defines a gradual typing bibliography in
autobib format , suitable for use in papers written in Scribble
;; FIXME: this doesn't have all the papers from the README yet
(require racket/format
scriblib/autobib)
(provide (all-defined-out))
;; shortens names
(abbreviate-gi... | null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/paper/jfp-2016/gradual-bib.rkt | racket | This module defines a gradual typing bibliography in
FIXME: this doesn't have all the papers from the README yet
shortens names
----------------------------------------
In a submodule so that it doesn't get exported automatically by
the outer module
-- added by jan
#:url "-3-662-44202-9_11"
--------------------... | #lang at-exp racket
autobib format , suitable for use in papers written in Scribble
(require racket/format
scriblib/autobib)
(provide (all-defined-out))
(abbreviate-given-names #f)
(module util racket/base
(require racket/format)
(provide (all-defined-out))
(define short? #f)
(define-syntax d... |
14690f66a09520f3d0746f6254b260e6ea55bc2c26a43cdda6a4d5cb28fcecde | lemmaandrew/CodingBatHaskell | lastDigit.hs | From
Given three ints , a b c , return true if two or more of them have the same rightmost
digit . The ints are non - negative . Note : the % \"mod\ " operator computes the remainder ,
e.g. 17 % 10 is 7 .
Given three ints, a b c, return true if two or more of them have the same rightmost
digit. The ints are... | null | https://raw.githubusercontent.com/lemmaandrew/CodingBatHaskell/d839118be02e1867504206657a0664fd79d04736/CodingBat/Logic-1/lastDigit.hs | haskell | From
Given three ints , a b c , return true if two or more of them have the same rightmost
digit . The ints are non - negative . Note : the % \"mod\ " operator computes the remainder ,
e.g. 17 % 10 is 7 .
Given three ints, a b c, return true if two or more of them have the same rightmost
digit. The ints are... | |
5c819c33262bbc4efb92fda85957f38262b86da44ef5a252eec80f7f97ff5d1f | ghc/packages-Cabal | ParserTests.hs | # LANGUAGE CPP #
module Main
( main
) where
import Prelude ()
import Prelude.Compat
import Test.Tasty
import Test.Tasty.Golden.Advanced (goldenTest)
import Test.Tasty.HUnit
import Control.Monad (unless, void)
import Data.Algorithm.Diff (PolyDiff (..), get... | null | https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/Cabal/tests/ParserTests.hs | haskell | -----------------------------------------------------------------------------
Warnings
-----------------------------------------------------------------------------
Verify that we trigger warnings
TODO: not implemented yet
, warningTest PWTExtraTestModule "extratestmodule.cabal"
----------------------------------... | # LANGUAGE CPP #
module Main
( main
) where
import Prelude ()
import Prelude.Compat
import Test.Tasty
import Test.Tasty.Golden.Advanced (goldenTest)
import Test.Tasty.HUnit
import Control.Monad (unless, void)
import Data.Algorithm.Diff (PolyDiff (..), get... |
46c59a3e9f7270be9984c3ccebf4dc3322d020069996f2ae502b3a143c09538f | mhkoji/Senn | named-pipe.lisp | (defpackage :senn.im.kkc.named-pipe
(:use :cl)
(:export :kkc
:close-kkc
:make-kkc-and-connect))
(in-package :senn.im.kkc.named-pipe)
(defstruct connection file pipe-name)
(defun connect (pipe-name)
(let ((file (senn-ipc.named-pipe:create-client-file pipe-name)))
(when file
(make-... | null | https://raw.githubusercontent.com/mhkoji/Senn/5304b003be3333957f5556ab29d5500ecb25de9a/senn/src/im/kkc/named-pipe.lisp | lisp | (defpackage :senn.im.kkc.named-pipe
(:use :cl)
(:export :kkc
:close-kkc
:make-kkc-and-connect))
(in-package :senn.im.kkc.named-pipe)
(defstruct connection file pipe-name)
(defun connect (pipe-name)
(let ((file (senn-ipc.named-pipe:create-client-file pipe-name)))
(when file
(make-... | |
201a6674495bc89f28950f4383fda1773a4b00320ef615c1cd58a28abd25b892 | charlieg/Sparser | blank-lines.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
copyright ( c ) 1995 -- all rights reserved
;;;
;;; File: "blank lines"
;;; Module: "grammar;rules:FSAs:newlines:"
Version : July 1995
initiated 1/5/95 . Added Blank - line / indent 7/5 .
(in-package :sparser)
;;;-------------------... | null | https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/grammar/rules/FSAs/newlines/blank-lines.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
File: "blank lines"
Module: "grammar;rules:FSAs:newlines:"
---------------------------------
blank lines indicate paragraphs
---------------------------------
that the next real word starts a paragraph.
//// 1/13/94 artificially enforcing the text... | copyright ( c ) 1995 -- all rights reserved
Version : July 1995
initiated 1/5/95 . Added Blank - line / indent 7/5 .
(in-package :sparser)
(defun use-blank-line-nl-fsa ()
(setf (symbol-function 'newline-fsa)
(symbol-function 'blank-line-nl-fsa))
(setq *newline-fsa-in-use* 'blank-line-nl... |
e1a71010029990ac18aaf86c575a6ab7332d66d15c5bb17987579d1bd43ad46d | unnohideyuki/bunny | sample010.hs | main = putStrLn "Hello, world!"
| null | https://raw.githubusercontent.com/unnohideyuki/bunny/501856ff48f14b252b674585f25a2bf3801cb185/compiler/test/samples/sample010.hs | haskell | main = putStrLn "Hello, world!"
| |
dacecff599ace00a6d35dbab0113f841cfe3a6016976cd8cc23d0fe9fa632abc | racket/redex | iswim.rkt | #lang racket/base
#|
This file is required by other files that are used to generate output
(eg iswim-ex.rkt and iswim-test.rkt) so in order for those to generate
their output properly, this file must be silent (ie, must only contain
definitions or other void-producing expressions)
|#
(require redex)
START lang
(... | null | https://raw.githubusercontent.com/racket/redex/4c2dc96d90cedeb08ec1850575079b952c5ad396/redex-test/redex/tests/sewpr/iswim/iswim.rkt | racket |
This file is required by other files that are used to generate output
(eg iswim-ex.rkt and iswim-test.rkt) so in order for those to generate
their output properly, this file must be silent (ie, must only contain
definitions or other void-producing expressions)
STOP lang
START delta
STOP delta
STOP red
by ge... | #lang racket/base
(require redex)
START lang
(define-language iswim
((M N L K) X (λ X M) (M M) b (o2 M M) (o1 M))
(o o1 o2)
(o1 add1 sub1 iszero)
(o2 + - * ↑)
(b number)
((V U W) b X (λ X M))
(E hole (V E) (E M) (o V ... E M ...))
((X Y Z) variable-not-otherwise-mentioned))
(define-metafunction is... |
daa37595e880f2fc946d51d9faa2751b0b73a3b7de6766e6ff82fd406aa5c511 | pirapira/coq2rust | ground.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/plugins/firstorder/ground.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
need special backtracking
need sp... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Formula
open Sequent
ope... |
a886a18d86667b60c5a8897081cc500c8aec9e6c8ad33425a7be0406766b985e | egobrain/repo | repo.erl | -module(repo).
-export([
%% Query api
query/1, query/2,
all/1, all/2, all/3,
zlist/2, zlist/3, zlist/4,
get_one/1, get_one/2, get_one/3,
insert/2, insert/3, insert/4,
upsert/2, upsert/3, upsert/4,
update/2, update/3, update/4,
set/2, set... | null | https://raw.githubusercontent.com/egobrain/repo/4de66b72f423c21611da7d11df267aae3f6b94f8/src/repo.erl | erlang | Query api
=== all/1,2,3 ===============================================================
=== zlist/2,3,4 =============================================================
=== get_one/1,2,3 ===========================================================
=== upsert/2,3,4 ======================================================... | -module(repo).
-export([
query/1, query/2,
all/1, all/2, all/3,
zlist/2, zlist/3, zlist/4,
get_one/1, get_one/2, get_one/3,
insert/2, insert/3, insert/4,
upsert/2, upsert/3, upsert/4,
update/2, update/3, update/4,
set/2, set/3,
delete/1,... |
16894180cf54ffd48028f910ffb9633b8605e8250d263cf8413d4197c8a05215 | clojure-interop/java-jdk | StreamSource.clj | (ns javax.xml.transform.stream.StreamSource
"Acts as an holder for a transformation Source in the form
of a stream of XML markup.
Note: Due to their internal use of either a Reader or InputStream instance,
StreamSource instances may only be used once."
(:refer-clojure :only [require comment defn ->])
(:imp... | null | https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.xml/src/javax/xml/transform/stream/StreamSource.clj | clojure | (ns javax.xml.transform.stream.StreamSource
"Acts as an holder for a transformation Source in the form
of a stream of XML markup.
Note: Due to their internal use of either a Reader or InputStream instance,
StreamSource instances may only be used once."
(:refer-clojure :only [require comment defn ->])
(:imp... | |
bd6b0f19a697dd80f21afd20c29140e5d0cb0611b1e1cc91243d93f2fd9b39ac | RokLenarcic/memento | multi.clj | (ns memento.multi
{:author "Rok Lenarčič"}
(:require [memento.base :as b])
(:import (memento.base ICache)
(memento.multi ConsultingCache DaisyChainCache MultiCache TieredCache)))
(comment
"A daisy chained cache.
Entry is returned from cache IF PRESENT, otherwise upstream is hit. The returned valu... | null | https://raw.githubusercontent.com/RokLenarcic/memento/47b5129048d0cf9cad935a731cdd1b9c59101f48/src/memento/multi.clj | clojure | (ns memento.multi
{:author "Rok Lenarčič"}
(:require [memento.base :as b])
(:import (memento.base ICache)
(memento.multi ConsultingCache DaisyChainCache MultiCache TieredCache)))
(comment
"A daisy chained cache.
Entry is returned from cache IF PRESENT, otherwise upstream is hit. The returned valu... | |
d2183362822878b4081e3943f4bf3c30c55f9090bbc8d5339d9197080ed4e0fe | rururu/rete4frames | grid3x3-p9.clj | ;;; The puzzle is:
;;;
4 1 3 * * 6 * * *
9 * * 3 * * 4 * *
* 2 * * * 4 * * 1
;;;
* * 9 * * * * * *
* 8 * 4 7 5 * 1 *
* * * * * * 5 * *
;;;
6 * * 7 * * * 9 *
* * 5 * * 1 * * 3
* * * 5 * * 2 4 8
;;;
;;; The solution is:
;;;
4 1 3 2 5 ... | null | https://raw.githubusercontent.com/rururu/rete4frames/b4c19af125db0918c1cf57240b1dafd768ffc52a/examples/sudoku/grid3x3-p9.clj | clojure | The puzzle is:
The solution is:
Rules used:
Naked Single
Locked Candidate Single Line
Naked Triples | 4 1 3 * * 6 * * *
9 * * 3 * * 4 * *
* 2 * * * 4 * * 1
* * 9 * * * * * *
* 8 * 4 7 5 * 1 *
* * * * * * 5 * *
6 * * 7 * * * 9 *
* * 5 * * 1 * * 3
* * * 5 * * 2 4 8
4 1 3 2 5 6 9 8 7
9 6 8 3 1 7 4 5 2
5 2 7 8 9 4 6 ... |
a926a6f341db80c4127fd239cfcaffe0f3f993f7b67a7d421e00c7e46d001ebf | haskell-github/github | GitData.hs | -----------------------------------------------------------------------------
-- |
-- License : BSD-3-Clause
Maintainer : < >
--
module GitHub.Data.GitData where
import GitHub.Data.Definitions
import GitHub.Data.Name (Name)
import GitHub.Data.URL (URL)
import GitHub.Internal.Prelude
import... | null | https://raw.githubusercontent.com/haskell-github/github/81d9b658c33a706f18418211a78d2690752518a4/src/GitHub/Data/GitData.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-3-Clause
| The options for querying commits.
Can be empty for submodule
JSON instances | Maintainer : < >
module GitHub.Data.GitData where
import GitHub.Data.Definitions
import GitHub.Data.Name (Name)
import GitHub.Data.URL (URL)
import GitHub.Internal.Prelude
import Prelude ()
import qualified Data.Vector as V
data CommitQueryOption
= CommitQuerySha !Text
| CommitQueryPa... |
a0c247840a8d0667895a48df3f4459b0f22cd36229601fe6f82df4dcced182fd | blindglobe/clocc | iter.lisp | ;;; itaration: collecting and multi-dim
;;;
Copyright ( C ) 1997 - 2001 , 2005 , 2007 - 2008 by
This is Free Software , covered by the GNU GPL ( v2 + )
;;; See
;;;
$ I d : iter.lisp , v 1.12 2008/06/16 16:02:33 sds Exp $
;;; $Source: /cvsroot/clocc/clocc/src/cllib/iter.lisp,v $
(eval-when (:compile-toplevel :... | null | https://raw.githubusercontent.com/blindglobe/clocc/a50bb75edb01039b282cf320e4505122a59c59a7/src/cllib/iter.lisp | lisp | itaration: collecting and multi-dim
See
$Source: /cvsroot/clocc/clocc/src/cllib/iter.lisp,v $
`to-list'
`map-vec'
`mesg'
`dot', `approx=-abs', `normalize'
{{{ iterate
}}}{{{ optimize
test case:
1.0 ; 152
progress report
already called: ~:d; calls left: ~:d
}}}
file iter.lisp ends here | Copyright ( C ) 1997 - 2001 , 2005 , 2007 - 2008 by
This is Free Software , covered by the GNU GPL ( v2 + )
$ I d : iter.lisp , v 1.12 2008/06/16 16:02:33 sds Exp $
(eval-when (:compile-toplevel :load-toplevel :execute)
(require :cllib-base (translate-logical-pathname "clocc:src;cllib;base"))
(require :cll... |
b5483a68c83a5cb07796d761091699cc2149fe2673049f06ff2379fa5553015f | janestreet/lwt-async | lwt_chan.ml | Lightweight thread library for
* Module Lwt_chan
* Copyright ( C ) 2005 - 2008
* Laboratoire PPS - CNRS Université Paris Diderot
* 2009
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public Lice... | null | https://raw.githubusercontent.com/janestreet/lwt-async/c738e6202c1c7409e079e513c7bdf469f7f9984c/src/unix/lwt_chan.ml | ocaml | Lightweight thread library for
* Module Lwt_chan
* Copyright ( C ) 2005 - 2008
* Laboratoire PPS - CNRS Université Paris Diderot
* 2009
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public Lice... | |
29e05e2ae0340eb1df812a111d2ddb47ed7e3fae67869dca0d7dffb5670f2cda | 2600hz-archive/whistle | cb_user_auth.erl | %%%-------------------------------------------------------------------
@author < >
( C ) 2011 , VoIP , INC
%%% @doc
%%% User auth module
%%%
%%%
%%% @end
Created : 15 Jan 2011 by < >
%%%-------------------------------------------------------------------
-module(cb_user_auth).
-behaviour(gen_server).
%% A... | null | https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/whistle_apps/apps/crossbar/src/modules/cb_user_auth.erl | erlang | -------------------------------------------------------------------
@doc
User auth module
@end
-------------------------------------------------------------------
API
gen_server callbacks
===================================================================
API
====================================================... | @author < >
( C ) 2011 , VoIP , INC
Created : 15 Jan 2011 by < >
-module(cb_user_auth).
-behaviour(gen_server).
-export([start_link/0]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2, code_change/3]).
-include("../../include/crossbar.hrl").
-include_lib("webmachine/include... |
2ac2d23f79a7e67344a594b1dcced38f308e902be10e616f7103fed6c08fcbd0 | lispnik/cl-http | html-4-0-frameset.lisp | -*- Syntax : Ansi - Common - Lisp ; Package : CL - USER ; Base : 10 ; Mode : lisp -*-
;;; File: html-4-0-frameset.lisp
Last edited by smishra on We d Sep 2 16:33:38 1998
( c ) Copyright 1996 - 97 , ( )
;;; All Rights Reserved
(in-package :html-parser)
;;; This file contains a lispified transcription ... | null | https://raw.githubusercontent.com/lispnik/cl-http/84391892d88c505aed705762a153eb65befb6409/html-parser/v9/html-4-0-frameset.lisp | lisp | Package : CL - USER ; Base : 10 ; Mode : lisp -*-
File: html-4-0-frameset.lisp
All Rights Reserved
This file contains a lispified transcription of the
-html40-19980424/loose.dtd
:sequence all of these are required, in the given order
:and all of these are required, in any order
All entity definitions... |
Last edited by smishra on We d Sep 2 16:33:38 1998
( c ) Copyright 1996 - 97 , ( )
(in-package :html-parser)
HTML 4.0 Transitional DTD . It does not do frames .
Based on the at
All entities beginning with a % are special SGML declarations
: set one or more of these is allowed , in any orde... |
ffa34f2b351be047e05e1b095211bb649556f4aae0b1ed8aeea1d43496ec991d | marick/Midje | metadata.clj | (ns ^{:doc "Parsing metadata as found in facts, around-facts, and tables"}
midje.parsing.1-to-explicit-form.metadata
(:require [midje.parsing.util.recognizing :as recognize]
[midje.util.exceptions :refer [user-error]]
[such.random :as random]))
(def ^{:dynamic true} metadata-for-fact-group ... | null | https://raw.githubusercontent.com/marick/Midje/2b9bcb117442d3bd2d16446b47540888d683c717/src/midje/parsing/1_to_explicit_form/metadata.clj | clojure | Storing actual namespaces in these
maps causes bizarre errors in
seemingly unrelated code.
names and descriptions influence each other
Add guid unless it was passed in. | (ns ^{:doc "Parsing metadata as found in facts, around-facts, and tables"}
midje.parsing.1-to-explicit-form.metadata
(:require [midje.parsing.util.recognizing :as recognize]
[midje.util.exceptions :refer [user-error]]
[such.random :as random]))
(def ^{:dynamic true} metadata-for-fact-group ... |
bf87bb91355847f30ea3b23f8496be12b6a2cf806b64554ab8bc36e199799954 | appleshan/cl-http | cl-http-70-133.lisp | -*- Mode : LISP ; Syntax : Common - Lisp ; Package : USER ; Base : 10 ; Patch - File : t -*-
Patch file for CL - HTTP version 70.133
;;; Reason: Function HTTP::CLOSE-CONNECTION-P: unknown error force close of connection.
Written by JCMa , 5/11/01 23:03:21
while running on FUJI - VLM from FUJI:/usr / lib / symb... | null | https://raw.githubusercontent.com/appleshan/cl-http/a7ec6bf51e260e9bb69d8e180a103daf49aa0ac2/lispm/server/patch/cl-http-70/cl-http-70-133.lisp | lisp | Syntax : Common - Lisp ; Package : USER ; Base : 10 ; Patch - File : t -*-
Reason: Function HTTP::CLOSE-CONNECTION-P: unknown error force close of connection.
DOMAIN - FIXES.LISP.33 ) ,
MAILBOX - FORMAT.LISP.24 ) ,
MAILER - FIXES.LISP.15 ) ,
Patch TCP hang on close when client drops connection. (from HTTP:LISPM;SER... | Patch file for CL - HTTP version 70.133
Written by JCMa , 5/11/01 23:03:21
while running on FUJI - VLM from FUJI:/usr / lib / symbolics / ComLink-39 - 8 - F - MIT-8 - 5.vlod
with Open Genera 2.0 , Genera 8.5 , Lock Simple 437.0 , Version Control 405.0 ,
Compare Merge 404.0 , VC Documentation 401.0 ,
Logical... |
1460e0ab0db9a8cfa9524a12d1e91898439ee69b17b86444d932a3be0d83f93f | xapix-io/axel-f | compiler.cljc | (ns axel-f.compiler
(:refer-clojure :exclude [compile])
(:require [axel-f.parser :as parser]
[axel-f.lexer :as lexer]
[clojure.string :as string]))
(declare compile)
(defn switch-type [p]
(cond
(string? p) (keyword p)
(keyword? p) (string/join "/" (filter identity ((juxt namespac... | null | https://raw.githubusercontent.com/xapix-io/axel-f/03233464af6d0963989e95f75a1859f5edff75bd/src/axel_f/compiler.cljc | clojure | (ns axel-f.compiler
(:refer-clojure :exclude [compile])
(:require [axel-f.parser :as parser]
[axel-f.lexer :as lexer]
[clojure.string :as string]))
(declare compile)
(defn switch-type [p]
(cond
(string? p) (keyword p)
(keyword? p) (string/join "/" (filter identity ((juxt namespac... | |
041a840760fd43517db37bdaa9fdc3c34076546a03dbe95bd9be8f663e249141 | nunchaku-inria/nunchaku | Builtin.mli |
(* This file is free software, part of nunchaku. See file "license" for more details. *)
* { 1 Builtins }
A builtin is a special construct of Nunchaku
A builtin is a special construct of Nunchaku *)
type id = ID.t
type 'a guard = {
asserting : 'a list;
}
val empty_guard : 'a guard
val map_guard : ('... | null | https://raw.githubusercontent.com/nunchaku-inria/nunchaku/16f33db3f5e92beecfb679a13329063b194f753d/src/core/Builtin.mli | ocaml | This file is free software, part of nunchaku. See file "license" for more details.
card of type >= int |
* { 1 Builtins }
A builtin is a special construct of Nunchaku
A builtin is a special construct of Nunchaku *)
type id = ID.t
type 'a guard = {
asserting : 'a list;
}
val empty_guard : 'a guard
val map_guard : ('a -> 'b) -> 'a guard -> 'b guard
val merge_guard : 'a guard -> 'a guard -> 'a guard
val... |
9f8ceecb95266a19c37b2ac99bbba54039b23a27ac6c613fd9640096e0ce5c9e | haskell-opengl/OpenGLRaw | VertexArrayObject.hs | # LANGUAGE PatternSynonyms #
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.APPLE.VertexArrayObject
Copyright : ( c ) 2019
-- License : BSD3
--
Maintainer : < >
-- Stability : stable
-- Portability : portable
--
------------... | null | https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/APPLE/VertexArrayObject.hs | haskell | ------------------------------------------------------------------------------
|
Module : Graphics.GL.APPLE.VertexArrayObject
License : BSD3
Stability : stable
Portability : portable
------------------------------------------------------------------------------
* Extension Support
* Enums
* Fun... | # LANGUAGE PatternSynonyms #
Copyright : ( c ) 2019
Maintainer : < >
module Graphics.GL.APPLE.VertexArrayObject (
glGetAPPLEVertexArrayObject,
gl_APPLE_vertex_array_object,
pattern GL_VERTEX_ARRAY_BINDING_APPLE,
glBindVertexArrayAPPLE,
glDeleteVertexArraysAPPLE,
glGenVertexArraysAPPLE,
... |
74391a985a7f82f5badfcf5b17f726ba7110a7633c0efdf0834aa6cf31d9ab15 | digital-asset/ghc | tcrun025.hs | # LANGUAGE ImplicitParams #
-- Like tcrun024, but cross module
module Main where
import TcRun025_B
just = [Just "fred",Just "bill"]
main = do { putStrLn (let ?p = "ok1" in fc1);
putStrLn (let ?p = "ok2" in fc2);
putStrLn (show (fd1 just)) ;
... | null | https://raw.githubusercontent.com/digital-asset/ghc/323dc6fcb127f77c08423873efc0a088c071440a/testsuite/tests/typecheck/should_run/tcrun025.hs | haskell | Like tcrun024, but cross module | # LANGUAGE ImplicitParams #
module Main where
import TcRun025_B
just = [Just "fred",Just "bill"]
main = do { putStrLn (let ?p = "ok1" in fc1);
putStrLn (let ?p = "ok2" in fc2);
putStrLn (show (fd1 just)) ;
putStrLn (show (fd2 just))... |
c43728b9f4afe4cdb274d7c999a302e12d7e1e7529e351273de28bfd3c663dc8 | racket/htdp | info.rkt | #lang info
(define scribblings '(("teachpack.scrbl" (multi-page) (teaching -13))))
| null | https://raw.githubusercontent.com/racket/htdp/aa78794fa1788358d6abd11dad54b3c9f4f5a80b/htdp-doc/teachpack/info.rkt | racket | #lang info
(define scribblings '(("teachpack.scrbl" (multi-page) (teaching -13))))
| |
f3b4c351195b15efc6972bb778ecf826a5e146033ad565240a1f8d4cd3a0d691 | bos/suffixtree | UniqueMatch.hs | -- This module solves, more or less, the maximal unique match (MUM)
problem for two input lists , using a generalised suffix tree .
--
-- Unfortunately, we can't check for left maximality because we're
using lists instead of indices into arrays . It 's easy to look one
element to the left in an array , but you ... | null | https://raw.githubusercontent.com/bos/suffixtree/adf9dd03d299a5b5ee1907fe2a63c9459a6f9a73/examples/UniqueMatch.hs | haskell | This module solves, more or less, the maximal unique match (MUM)
Unfortunately, we can't check for left maximality because we're
left of the head of a list.
We construct a generalised suffix tree, with elements annotated to
tell us whether they come from the left or right list. Each list
is terminated with a st... | problem for two input lists , using a generalised suffix tree .
using lists instead of indices into arrays . It 's easy to look one
element to the left in an array , but you ca n't look one element
module UniqueMatch (Sym(..), mkGenTree, maxUniqueMatches) where
import Data.SuffixTree (STree(..), construct, pr... |
ef448cd936f13f574045ab9b262fe9099fc823ef6b8e518d302369cda1a1183a | bzg/woof | db.clj | Copyright ( c ) 2022 - 2023 Bastien Guerry < >
SPDX - License - Identifier : EPL-2.0
;; License-Filename: LICENSES/EPL-2.0.txt
(ns bzg.db
(:require [datalevin.core :as d]
[bzg.config :as config]
[aero.core :refer (read-config)]))
;; Set up configuration
(def config (merge config/default... | null | https://raw.githubusercontent.com/bzg/woof/d0cb841d62391122ab232fd4c241c138726120c9/src/bzg/db.clj | clojure | License-Filename: LICENSES/EPL-2.0.txt
Set up configuration
Set up the database
TODO: We store references but don't use them (yet) | Copyright ( c ) 2022 - 2023 Bastien Guerry < >
SPDX - License - Identifier : EPL-2.0
(ns bzg.db
(:require [datalevin.core :as d]
[bzg.config :as config]
[aero.core :refer (read-config)]))
(def config (merge config/defaults (read-config "config.edn")))
(def schema
{:defaults {:db/valu... |
e15dca882250397a3dbe08367e197750b1cbb223d8b1740d754947cf5c0c9276 | xebia/VisualReview | baseline.clj | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Copyright 2015 Xebia B.V.
;
Licensed under the Apache License , Version 2.0 ( the " License " )
; you may not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
; -2.0
;
; Unless requir... | null | https://raw.githubusercontent.com/xebia/VisualReview/c74c18ff73cbf11ece23203cb7a7768e626a03e2/src/main/clojure/com/xebia/visualreview/resource/baseline.clj | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing per... | Copyright 2015 Xebia B.V.
Licensed under the Apache License , Version 2.0 ( the " License " )
distributed under the License is distributed on an " AS IS " BASIS ,
(ns com.xebia.visualreview.resource.baseline
(:require [liberator.core :refer [resource]]
[com.xebia.visualreview.resource.util :refer :... |
254945743e9a3d74fb3a85e946b99cc714a3a97f40a9e75066ed9815af6b14f5 | jwiegley/notes | WithIORef.hs | module WithIORef where
import Control.Monad.State
import Data.IORef
import Data.Tuple
withIORef :: IORef a -> State a b -> IO b
withIORef ref action = atomicModifyIORef ref (swap . runState action)
| null | https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/haskell/WithIORef.hs | haskell | module WithIORef where
import Control.Monad.State
import Data.IORef
import Data.Tuple
withIORef :: IORef a -> State a b -> IO b
withIORef ref action = atomicModifyIORef ref (swap . runState action)
| |
7810136737c3d39f41ea4cfdd01a5d53f741ea65437e0568aa213bc79c1c9b25 | sklassen/erlang-linalg-native | linalg_cholesky_tests.erl | -module(linalg_cholesky_tests).
-import(linalg, [cholesky/1]).
-include_lib("eunit/include/eunit.hrl").
cholesky_1x1_test() ->
?assertEqual([[5.0]], cholesky([[25]])).
cholesky_2x2_test() ->
?assertEqual([[5.0, 0], [3.0, 3.0]], cholesky([[25, 15], [15, 18]])).
cholesky_3x3_test() ->
?assertEqual(
... | null | https://raw.githubusercontent.com/sklassen/erlang-linalg-native/b31eef532b9fe2be7ecbff52a060ccdc833b4dca/test/linalg_cholesky_tests.erl | erlang | -module(linalg_cholesky_tests).
-import(linalg, [cholesky/1]).
-include_lib("eunit/include/eunit.hrl").
cholesky_1x1_test() ->
?assertEqual([[5.0]], cholesky([[25]])).
cholesky_2x2_test() ->
?assertEqual([[5.0, 0], [3.0, 3.0]], cholesky([[25, 15], [15, 18]])).
cholesky_3x3_test() ->
?assertEqual(
... | |
359519e3689148a7e58c733d0329380fae445f0a63776893d2dd9011773dcd0b | xh4/web-toolkit | md5-lispworks-int32.lisp | ;;;; -*- mode: lisp; indent-tabs-mode: nil -*-
;;;;
MD5 - LISPWORKS - INT32 - MD5 implementation using SYS : INT32 in
;;;;
;;;; This file implements The MD5 Message-Digest Algorithm, as defined in
RFC 1321 by , published April 1992 .
;;;;
It was written by , with copious input from the
cmucl - help maili... | null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/vendor/ironclad-v0.47/src/digests/md5-lispworks-int32.lisp | lisp | -*- mode: lisp; indent-tabs-mode: nil -*-
This file implements The MD5 Message-Digest Algorithm, as defined in
has been placed into the public domain.
This software is "as is", and has no warranty of any kind. The
authors assume no responsibility for the consequences of any use
of this software.
Subsequen... | MD5 - LISPWORKS - INT32 - MD5 implementation using SYS : INT32 in
RFC 1321 by , published April 1992 .
It was written by , with copious input from the
cmucl - help mailing - list hosted at cons.org , in November 2001 and
- LispWorks 4.4 sys : int32 port by .
- Ironclad integration by < >
#+ironc... |
36efc5a4f7140c1dbec45706681d66de6d7eeab2cf5190b21fa6ed08156527c4 | eudoxia0/astro-eog581 | dijkstra.lisp | ;;;;
An implementation of Dijkstra 's algorithm in Common Lisp . While this
;;;; implementation is generic (i.e. works for any graph), the purpose is to
feed it a graph where the nodes are stars , and two nodes ` ( A , B ) ` are linked
;;;; by an edge if `d(A,B) < C`, where `C` is an arbitrary cutoff distance. The
... | null | https://raw.githubusercontent.com/eudoxia0/astro-eog581/cf3abd163d63592a5fe48cca0efb2c43e20cf82e/dijkstra.lisp | lisp |
implementation is generic (i.e. works for any graph), the purpose is to
by an edge if `d(A,B) < C`, where `C` is an arbitrary cutoff distance. The
cost of each edge is the distance.
Check edges are not degenerate.
Check cost is non-negative.
table of seen IDs
vertex accumulator
Number of stars.
edge accumula... | An implementation of Dijkstra 's algorithm in Common Lisp . While this
feed it a graph where the nodes are stars , and two nodes ` ( A , B ) ` are linked
(defclass edge ()
((start :reader edge-start
:initarg :start
:type integer
:documentation "The ID of the start node.")
(end :r... |
eaebc2ad8ae68cb1f657c8ee055df13d12a1c70859d858aae876e0f8f6ba61e6 | yawaramin/bs-hyperapp | index_Quote.ml | external responseOfJson :
Js.Json.t ->
< contents : < quotes : < quote : string > Js.t array > Js.t > Js.t =
"%identity"
let get () =
let open Bs_fetch in
let module Promise = Js.Promise in
fetch ""
|> Promise.then_ Response.json
|> Promise.then_ (fun json ->
let quote =
try Some ((r... | null | https://raw.githubusercontent.com/yawaramin/bs-hyperapp/83cdba88fcd262dc31ad171c843b53f1be0dc758/src/index_Quote.ml | ocaml | external responseOfJson :
Js.Json.t ->
< contents : < quotes : < quote : string > Js.t array > Js.t > Js.t =
"%identity"
let get () =
let open Bs_fetch in
let module Promise = Js.Promise in
fetch ""
|> Promise.then_ Response.json
|> Promise.then_ (fun json ->
let quote =
try Some ((r... | |
9f0aa374fb03f0d011dfdf15ffce785053b7c6394a894131d280284aa109eaec | inconvergent/weir | obj.lisp |
(in-package :obj)
(defstruct obj
(verts nil :type vector :read-only t)
(faces nil :type vector :read-only t)
(lines nil :type vector :read-only t)
(num-verts 0 :type fixnum :read-only nil)
(num-lines 0 :type fixnum :read-only nil)
(num-faces 0 :type fixnum :read-only nil))
(defun make ()
(make-obj :v... | null | https://raw.githubusercontent.com/inconvergent/weir/3c364e3a0e15526f0d6985f08a57b312b5c35f7d/src/auxiliary/obj.lisp | lisp |
(in-package :obj)
(defstruct obj
(verts nil :type vector :read-only t)
(faces nil :type vector :read-only t)
(lines nil :type vector :read-only t)
(num-verts 0 :type fixnum :read-only nil)
(num-lines 0 :type fixnum :read-only nil)
(num-faces 0 :type fixnum :read-only nil))
(defun make ()
(make-obj :v... | |
b21ece45b4f81de4a85e2c13756e2f0b9504d57a4ced329a1fb1075c0bab2aa6 | facebook/pyre-check | abstractDomainCore.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/pyre-check/b3dac11271a7ef60f38f6405811f92cc5a4ba5f8/source/domains/abstractDomainCore.ml | ocaml | Constructors of this type are used to select parts of composed abstract domains. E.g., a Set
domain will add an Element: element constructor for the element type of the set, thereby allowing
folding, partitioning, and transforming the abstract domains by Elements. Similarly, a Map domain
will add a constructo... |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... |
78a1423357b47522fc16c85d718a41c8e0d7f4589a960f5081d65a36750e10dd | ragkousism/Guix-on-Hurd | terminals.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2015 , 2016 < >
Copyright © 2016 < >
Copyright © 2016 < >
Copyright © 2016 < >
Copyright © 2016 < >
Copyright © 2016 , 2017 < >
Copyright © 2017 < >
Copyright © 2017 < >
;;;
;;; This file is part of GNU Guix.
... | null | https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/gnu/packages/terminals.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2015 , 2016 < >
Copyright © 2016 < >
Copyright © 2016 < >
Copyright © 2016 < >
Copyright © 2016 < >
Copyright © 2016 , 2017 < >
Copyright © 2017 < >
Copyright © 2017 < >
under the terms of the GNU General Public License as published by
You should have received... |
626fcae247d4ccf8d140571e71408aaf16cce6eb8578ba3011705b44e7ff276d | haskell-works/hw-xml | Succinct.hs | module HaskellWorks.Data.Xml.Succinct
( module X
) where
import HaskellWorks.Data.Xml.Succinct.Cursor as X
| null | https://raw.githubusercontent.com/haskell-works/hw-xml/e30a4cd8e6dc7451263a3d45c1ae28b3f35d0079/src/HaskellWorks/Data/Xml/Succinct.hs | haskell | module HaskellWorks.Data.Xml.Succinct
( module X
) where
import HaskellWorks.Data.Xml.Succinct.Cursor as X
| |
85f34b6069a37f1d4c2a5434402d813d60a8383b563a957824cbab49d4932149 | input-output-hk/cardano-ledger | DPState.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInst... | null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger/49a84725c4c2ecabc80f6dac215881bc23920962/libs/cardano-ledger-core/src/Cardano/Ledger/DPState.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE OverloadedStrings #
======================================
| InstantaneousRewards captures the pending changes to the ledger
the rewards which will be paid out from the reserves and the rewards
which will be paid out from the treasury. It also consists of
NOTE that the follo... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE NamedFieldPuns #
# LANGUAGE PatternSynonyms #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
module Cardano.Ledger.DPState (
DPState (..),
DState (.... |
c103144c23d5814e62acb84428a238a37e35f162b9af39401d420c32ee4908fb | craigl64/clim-ccl | formatted-output-defs.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Package : CLIM - INTERNALS ; Base : 10 ; Lowercase : Yes -*-
;; See the file LICENSE for the full license governing this code.
;;
(in-package :clim-internals)
" Copyright ( c ) 1990 , 1991 , 1992 Symbolics , Inc. All rights reserved .
Portions copyright ( c ) 19... | null | https://raw.githubusercontent.com/craigl64/clim-ccl/301efbd770745b429f2b00b4e8ca6624de9d9ea9/clim/formatted-output-defs.lisp | lisp | Syntax : ANSI - Common - Lisp ; Package : CLIM - INTERNALS ; Base : 10 ; Lowercase : Yes -*-
See the file LICENSE for the full license governing this code.
FORMATTING-TABLE macro is in FORMATTED-OUTPUT-DEFS
spr34508: It's possible that when making
a table within updating-output the user
can switch the table orie... |
(in-package :clim-internals)
" Copyright ( c ) 1990 , 1991 , 1992 Symbolics , Inc. All rights reserved .
Portions copyright ( c ) 1989 , 1990 International Lisp Associates . "
(defun invoke-formatting-table (stream continuation
&rest initargs
&key x... |
17aa4fd92a8c7b6ec6ba39f5a3358f1f6d4fe853b2c69ff6a8e50e79ee72c809 | reborg/clojure-essential-reference | 1.clj | < 1 >
[ # object[clojure.core$_PLUS " clojure.core$_PLUS " ] 1 2 ]
< 2 >
3 | null | https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/OtherFunctions/Evaluation/eval/1.clj | clojure | < 1 >
[ # object[clojure.core$_PLUS " clojure.core$_PLUS " ] 1 2 ]
< 2 >
3 | |
565b9071e39e8b5f786de9211c276db13087a29309d1d67db88a3b1434e05679 | erlio/vmq_diversity | vmq_diversity_http.erl | Copyright 2016 Erlio GmbH Basel Switzerland ( )
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing, sof... | null | https://raw.githubusercontent.com/erlio/vmq_diversity/cdfb41c684971c617da55da43cd518c926839027/src/vmq_diversity_http.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright 2016 Erlio GmbH Basel Switzerland ( )
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(vmq_diversity_http).
-export([install/1]).
-import(luerl_lib, [badarg_error/3]).
install(St) ->
luerl_emul:all... |
2ca82c1c726b058b6d743c9ba2ce32eb46efe333077434ccc92d13e2288b2b2a | sanette/ocaml-tutorial | process_standalone.ml | Post - processing the HTML of the OCaml Manual . This file is part of
-tutorial
* Processed parts : [ " tutorials " ; " " ; " commands " ; " library " ]
* TODO : Appendix
* TODO : General index for all parts ( currently , only part 1 ' Tutorials ' is
accessible via the index . )
* T... | null | https://raw.githubusercontent.com/sanette/ocaml-tutorial/34d26b5c54c3c0f58abea9c3dbd483d9968e3f2a/src/process_standalone.ml | ocaml | Set this to the directory where to find the html sources of all versions:
Set this to the destination directory:
Alternative formats for the manual:
Where to get the original html files
Where to save the modified html files
API pages
*** utilities ***
*** html processing ***
Return next html element.
Sca... | Post - processing the HTML of the OCaml Manual . This file is part of
-tutorial
* Processed parts : [ " tutorials " ; " " ; " commands " ; " library " ]
* TODO : Appendix
* TODO : General index for all parts ( currently , only part 1 ' Tutorials ' is
accessible via the index . )
* T... |
eece007b8db66569c3f8fd127ea3df380528591736ee4bdf983677f4aef9ba09 | clojure-emacs/sayid | workspace.clj | (ns com.billpiel.sayid.workspace
(:require [com.billpiel.sayid.trace :as trace]
[com.billpiel.sayid.util.other :as util]
[com.billpiel.sayid.shelf :as shelf]))
(def default-traced {:ns #{}
:fn #{}
:inner-fn #{}})
(defn default-workspace
[]
(-... | null | https://raw.githubusercontent.com/clojure-emacs/sayid/27f35778de9509067716a7bed14306787334a589/src/com/billpiel/sayid/workspace.clj | clojure | func may have been disabled or out of sync | (ns com.billpiel.sayid.workspace
(:require [com.billpiel.sayid.trace :as trace]
[com.billpiel.sayid.util.other :as util]
[com.billpiel.sayid.shelf :as shelf]))
(def default-traced {:ns #{}
:fn #{}
:inner-fn #{}})
(defn default-workspace
[]
(-... |
2ba205fb7c7381723fdd514013d7fc5e7405ac421d96d156813b9af5f689dba8 | sru-systems/protobuf-simple | SFixed32OptMsg.hs | -- Generated by protobuf-simple. DO NOT EDIT!
module Types.SFixed32OptMsg where
import Control.Applicative ((<$>))
import Prelude ()
import qualified Data.ProtoBufInt as PB
newtype SFixed32OptMsg = SFixed32OptMsg
{ value :: PB.Maybe PB.Int32
} deriving (PB.Show, PB.Eq, PB.Ord)
instance PB.Default SFixed32OptMsg ... | null | https://raw.githubusercontent.com/sru-systems/protobuf-simple/ee0f26b6a8588ed9f105bc9ee72c38943133ed4d/test/Types/SFixed32OptMsg.hs | haskell | Generated by protobuf-simple. DO NOT EDIT! | module Types.SFixed32OptMsg where
import Control.Applicative ((<$>))
import Prelude ()
import qualified Data.ProtoBufInt as PB
newtype SFixed32OptMsg = SFixed32OptMsg
{ value :: PB.Maybe PB.Int32
} deriving (PB.Show, PB.Eq, PB.Ord)
instance PB.Default SFixed32OptMsg where
defaultVal = SFixed32OptMsg
{ valu... |
7c4d1c8129d158d3cef38c6a8b096714e48f220a9f66e42dcea2e70a713b80e1 | gjord/gwern.net | conjugate-present.hs | import System.Environment (getArgs)
import Data.List ((\\))
^ basic French pronoun eg . " Je "
String, -- ^ the translation of previous; eg. "I"
String) -- ^ the selected verb's conjugation, eg. for avoir "ai"
main :: IO ()
main = do vs <- getArgs
case vs of
... | null | https://raw.githubusercontent.com/gjord/gwern.net/ea0bfea955d8e4c0c805728df7a2a48fb967ce3d/haskell/conjugate-present.hs | haskell | ^ the translation of previous; eg. "I"
^ the selected verb's conjugation, eg. for avoir "ai"
fallback if the input isn't *exactly* right
> getPrefix ["fooi", "foobar", "fooqux"] ~> "foo"
Print out a question/answer, and then answer/question - good for definitions
abstract out repetition like
> viceversa ("Je " +... | import System.Environment (getArgs)
import Data.List ((\\))
^ basic French pronoun eg . " Je "
main :: IO ()
main = do vs <- getArgs
case vs of
(inf:pronunc:meaning:je:tu:il:nous:vous:ils:[]) -> do
let prefix = getPrefix $ drop 2 vs
let allpron = zip3 ["Je", "Tu", "... |
94eab936f0eece934b3ed3efeb8a7f5c8f1a672744671b42622347da01128841 | patrikja/AFPcourse | Properties.hs | module Compiler.Properties where
import Compiler.Syntax (Command(..), Expr(..), Name)
import Compiler.Value (Value(..), Op1(..), Op2(..))
import Compiler.Interpreter (interp)
import Compiler.Compiler (compile)
import Compiler.Machine (exec, Instruction)
import Compiler.Behaviour (Trace(..), cut, cra... | null | https://raw.githubusercontent.com/patrikja/AFPcourse/1a079ae80ba2dbb36f3f79f0fc96a502c0f670b6/L10/src/Compiler/Properties.hs | haskell | helper functions
properties
A "no shrinking" version:
no shrinking
shrinking
--------------------------------------------------------------
--------------
no shrink
no shrink | module Compiler.Properties where
import Compiler.Syntax (Command(..), Expr(..), Name)
import Compiler.Value (Value(..), Op1(..), Op2(..))
import Compiler.Interpreter (interp)
import Compiler.Compiler (compile)
import Compiler.Machine (exec, Instruction)
import Compiler.Behaviour (Trace(..), cut, cra... |
2b8da8629266271f31a949eafe32e2021a51e018fabb6ea424eccb60950cf478 | relevance/labrepl | automaton.clj | (ns solutions.automaton
(import [javax.swing JFrame JPanel]
[java.awt Color Graphics]
[java.awt.image BufferedImage]))
(def dim-board [ 90 90])
(def dim-screen [600 600])
(def dim-scale (vec (map / dim-screen dim-board)))
(defn new-board
"Create a new board with about half the cells se... | null | https://raw.githubusercontent.com/relevance/labrepl/51909dcb3eeb9f148eeae109316f7d73cc81512a/src/solutions/automaton.clj | clojure | (ns solutions.automaton
(import [javax.swing JFrame JPanel]
[java.awt Color Graphics]
[java.awt.image BufferedImage]))
(def dim-board [ 90 90])
(def dim-screen [600 600])
(def dim-scale (vec (map / dim-screen dim-board)))
(defn new-board
"Create a new board with about half the cells se... | |
cef1b2ee7ffb19da960728f7bc4550b87f573290beac99657477b46a4656b7fb | informatimago/lisp | string-input.lisp | -*- mode : lisp;coding : utf-8 -*-
;;;;**************************************************************************
FILE : string-input.lisp
;;;;LANGUAGE: Common-Lisp
;;;;SYSTEM: Common-Lisp
USER - INTERFACE :
;;;;DESCRIPTION
;;;;
;;;; This file defines the string input ope... | null | https://raw.githubusercontent.com/informatimago/lisp/571af24c06ba466e01b4c9483f8bb7690bc46d03/future/vfs/string-input.lisp | lisp | coding : utf-8 -*-
**************************************************************************
LANGUAGE: Common-Lisp
SYSTEM: Common-Lisp
DESCRIPTION
This file defines the string input operators.
LEGAL
GPL
This program is free software; you can redistribute it and/or
either version
... | FILE : string-input.lisp
USER - INTERFACE :
< PJB > < >
MODIFICATIONS
2012 - 01 - 14 < PJB > Extracted from ' virtual-fs.lisp ' .
Copyright 2012 - 2016
modify it under the terms of the GNU General Public License
2 of the License , or ( at your option ) any later ve... |
a5a51d3759025007c59222c27bddfd607d942107f055211171fa059b8e548963 | tisnik/clojure-examples | core_test.clj | (ns git-test8.core-test
(:require [clojure.test :refer :all]
[git-test8.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| null | https://raw.githubusercontent.com/tisnik/clojure-examples/984af4a3e20d994b4f4989678ee1330e409fdae3/git-test8/test/git_test8/core_test.clj | clojure | (ns git-test8.core-test
(:require [clojure.test :refer :all]
[git-test8.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| |
2fdd2f0c341ab45831a7facd8c24e8cc74bd60ac0aaded73ee8ebd4d2467eadc | CryptoKami/cryptokami-core | Mode.hs | # LANGUAGE DataKinds #
| Constraints for LRC ; a restricted version of ` WorkMode ` .
module Pos.Lrc.Mode
( LrcMode
) where
import Universum
import Mockable (Async, Concurrently, Delay, Mockables)
import System.Wlog (WithLogger)
import Pos.Core (HasConfigurat... | null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/lrc/Pos/Lrc/Mode.hs | haskell | # LANGUAGE DataKinds #
| Constraints for LRC ; a restricted version of ` WorkMode ` .
module Pos.Lrc.Mode
( LrcMode
) where
import Universum
import Mockable (Async, Concurrently, Delay, Mockables)
import System.Wlog (WithLogger)
import Pos.Core (HasConfigurat... | |
d9aeedfbb7e9a3186c8320ff4cc3570c7be12d9f5b8e82397817749e57536052 | scalaris-team/scalaris | yaws_log.erl | %%----------------------------------------------------------------------
%%% File : yaws_log.erl
Author : < >
%%% Purpose :
Created : 26 Jan 2002 by < >
%%%----------------------------------------------------------------------
-module(yaws_log).
-author('').
-include_lib("kernel/include/file.hrl").
-inc... | null | https://raw.githubusercontent.com/scalaris-team/scalaris/feb894d54e642bb3530e709e730156b0ecc1635f/contrib/yaws/src/yaws_log.erl | erlang | ----------------------------------------------------------------------
File : yaws_log.erl
Purpose :
----------------------------------------------------------------------
External exports
gen_server callbacks
API
----------------------------------------------------------------------
API
----------------------... | Author : < >
Created : 26 Jan 2002 by < >
-module(yaws_log).
-author('').
-include_lib("kernel/include/file.hrl").
-include_lib("kernel/include/inet.hrl").
-behaviour(gen_server).
-export([start_link/0, reopen_logs/0]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2,
... |
e1c08001f192b16dabfbc188fa26263f8dc4ac2e50e96cb997366f275a7fdc96 | ruricolist/serapeum | packages.lisp | (in-package :serapeum)
(defun package-exports (&optional (package *package*))
"Return a list of the symbols exported by PACKAGE."
(loop for symbol being the external-symbols of package
collect symbol))
(defun package-names (package)
"Return a list of all the names of PACKAGE: its name and its nicknames.... | null | https://raw.githubusercontent.com/ruricolist/serapeum/d98b4863d7cdcb8a1ed8478cc44ab41bdad5635b/packages.lisp | lisp | (in-package :serapeum)
(defun package-exports (&optional (package *package*))
"Return a list of the symbols exported by PACKAGE."
(loop for symbol being the external-symbols of package
collect symbol))
(defun package-names (package)
"Return a list of all the names of PACKAGE: its name and its nicknames.... | |
fb0ce84897dae001bb211de09a5b5613e9c7f8cfce2ca025c05212b2b5e719db | fakedata-haskell/fakedata | UmphreysMcgee.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
module Faker.Provider.UmphreysMcgee where
import Config
import Control.Monad.Catch
import Control.Monad.IO.Class
import Data.Map.Strict (Map)
import Data.Monoid ((<>))
import Data.Text (Text)
import Data.Vector (Vector)
import Data.Yaml
import Faker
impo... | null | https://raw.githubusercontent.com/fakedata-haskell/fakedata/7b0875067386e9bb844c8b985c901c91a58842ff/src/Faker/Provider/UmphreysMcgee.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE TemplateHaskell #
module Faker.Provider.UmphreysMcgee where
import Config
import Control.Monad.Catch
import Control.Monad.IO.Class
import Data.Map.Strict (Map)
import Data.Monoid ((<>))
import Data.Text (Text)
import Data.Vector (Vector)
import Data.Yaml
import Faker
import Faker.Internal
import Faker.Prov... |
ed459217d63199025ed8b5324d0ec80de876b9f09ddadb3094caf5050404d4f4 | amnh/PCG | DirectOptimization.hs | -----------------------------------------------------------------------------
-- |
Module : Analysis . . Dynamic . DirectOptimization
Copyright : ( c ) 2015 - 2021 Ward Wheeler
-- License : BSD-style
--
-- Maintainer :
-- Stability : provisional
-- Portability : portable
--
Sankoff chara... | null | https://raw.githubusercontent.com/amnh/PCG/9341efe0ec2053302c22b4466157d0a24ed18154/lib/core/analysis/src/Analysis/Parsimony/Dynamic/DirectOptimization.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-style
Maintainer :
Stability : provisional
Portability : portable
character will be received at a time.
Assumes binary trees.
---------------------------------------------------------------------------
... | Module : Analysis . . Dynamic . DirectOptimization
Copyright : ( c ) 2015 - 2021 Ward Wheeler
Sankoff character analysis ( cost and median )
This only works on static characters , and due to the traversal , only one
# LANGUAGE FlexibleContexts #
module Analysis.Parsimony.Dynamic.DirectOptimizati... |
576abf7a70de83be4bfdd27331f4976679e666b73555a3241597dc94cfa3dfd2 | inhabitedtype/ocaml-aws | modifyDBProxy.mli | open Types
type input = ModifyDBProxyRequest.t
type output = ModifyDBProxyResponse.t
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type error := error
| null | https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/b6d5554c5d201202b5de8d0b0253871f7b66dab6/libraries/rds/lib/modifyDBProxy.mli | ocaml | open Types
type input = ModifyDBProxyRequest.t
type output = ModifyDBProxyResponse.t
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type error := error
| |
c871498d152652f562c90c9d84dfa2a7ed3215ea96260f66a1ed849ce0aaeb8d | shirok/Gauche | win-noconsole-threads.scm | ;;
;; This manually test AllocConsole() opeartion of gosh-noconsole.exe
;; on MinGW. This can't be automated easily, so it's not run by
;; make check.
;;
;; How to test:
;; Run this script with gosh-noconsole, compiled with --enable-threads=win32.
A few seconds after startup , the console should pop up ,
... | null | https://raw.githubusercontent.com/shirok/Gauche/ecaf82f72e2e946f62d99ed8febe0df8960d20c4/test/win-noconsole-threads.scm | scheme |
This manually test AllocConsole() opeartion of gosh-noconsole.exe
on MinGW. This can't be automated easily, so it's not run by
make check.
How to test:
Run this script with gosh-noconsole, compiled with --enable-threads=win32.
|
A few seconds after startup , the console should pop up ,
containing messages from 10 individual threads .
(cond-expand
[(not gauche.sys.wthreads)
(exit 1 "This script needs to be run on MinGW version of gosh-noconsole compiled with --enable-threads=win32.")]
[else])
(use gauche.threads)
(use d... |
55627e65619b252873821ea8f71ace571b3c4bee439721dcbcb5bac5f19c872c | reborg/parallel | bminmax.clj | (ns bminmax)
(require '[criterium.core :refer [bench]])
(require '[parallel.core :as p] :reload)
(def v10k (conj (shuffle (range 10000)) -9))
(def v100k (conj (shuffle (range 100000)) -9))
(def v1m (conj (shuffle (range 1000000)) -9))
;; core reduce
98.237074 µs
1.139608 ms
9.963971 ms
;; core apply (sl... | null | https://raw.githubusercontent.com/reborg/parallel/7fde6e48e49455f213c435239c35d31c60e08948/benchmarks/bminmax.clj | clojure | core reduce
core apply (slower than reduce)
parallel
665.367802 µs
parallel xforms
experiments... | (ns bminmax)
(require '[criterium.core :refer [bench]])
(require '[parallel.core :as p] :reload)
(def v10k (conj (shuffle (range 10000)) -9))
(def v100k (conj (shuffle (range 100000)) -9))
(def v1m (conj (shuffle (range 1000000)) -9))
98.237074 µs
1.139608 ms
9.963971 ms
105.267586 µs
8.764973 ms
... |
623c438ce53c58a55e5d14827de588e7bf77145f32b2011da2e12a52c420db5a | debug-ito/greskell | MockServer.hs | {-# LANGUAGE OverloadedStrings #-}
module TestUtil.MockServer
( wsServer
, parseRequest
, receiveRequest
, simpleRawResponse
, waitForServer
) where
import Control.Concurrent (threadDelay)
import Control.Exception.Safe (throwString)
import qualifi... | null | https://raw.githubusercontent.com/debug-ito/greskell/ff21b8297a158cb4b5bafcbb85094cef462c5390/greskell-websocket/test/TestUtil/MockServer.hs | haskell | # LANGUAGE OverloadedStrings #
^ port number | module TestUtil.MockServer
( wsServer
, parseRequest
, receiveRequest
, simpleRawResponse
, waitForServer
) where
import Control.Concurrent (threadDelay)
import Control.Exception.Safe (throwString)
import qualified Data.Aeson ... |
e313f45e8f96c0844dadf9368800b490d532d285d8591c66f2b5e8b6be3a3281 | aharisu/Gauche-SDL | ttf_type.scm | ;;;
;;; ttf_type.scm
;;;
MIT License
Copyright 2011 - 2012 aharisu
;;; All rights reserved.
;;;
;;; Permission is hereby granted, free of charge, to any person obtaining a copy
;;; of this software and associated documentation files (the "Software"), to deal
in the Software without restriction , including without... | null | https://raw.githubusercontent.com/aharisu/Gauche-SDL/29e997dacdb7c6b89e99843f0f0c52266abfee66/src/ttf/ttf_type.scm | scheme |
ttf_type.scm
All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
furnished to do so, subject to the following con... | MIT License
Copyright 2011 - 2012 aharisu
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit persons to whom the Software is
copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , ... |
ca7346ce6bc181558bbe128d98ca6bb88cf90200ac3d42dee7fcc5a19ace5c8e | gsakkas/rite | 0127.ml | CaseG (AppG [EmptyG]) [(LitPatG,Nothing,ConAppG Nothing),(LitPatG,Nothing,ConAppG Nothing)]
match rand (1 , 2) with
| 1 -> VarX
| 2 -> VarY
| null | https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/data/sp14_min/clusters/0127.ml | ocaml | CaseG (AppG [EmptyG]) [(LitPatG,Nothing,ConAppG Nothing),(LitPatG,Nothing,ConAppG Nothing)]
match rand (1 , 2) with
| 1 -> VarX
| 2 -> VarY
| |
13b1430c95a1f2ca6e277dd70905d02c89a1f40ce5e4d45ea516a017c2349168 | evrim/core-server | mop.lisp | Core Server : Web Application Server
Copyright ( C ) 2006 - 2008 , Aycan iRiCAN
;; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
;; (at your opti... | null | https://raw.githubusercontent.com/evrim/core-server/200ea8151d2f8d81b593d605b183a9cddae1e82d/src/util/mop.lisp | lisp | This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public L... | Core Server : Web Application Server
Copyright ( C ) 2006 - 2008 , Aycan iRiCAN
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
(in-package :core... |
5b4bd9b6427746c65a253077eab3340339994da65268841d7d789de0c39fadc4 | haroldcarr/learn-haskell-coq-ml-etc | Lib.hs | {-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FunctionalDependencies #
# LANGUAGE MonoLocalBinds #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Lib where
import Control.Lens
impo... | null | https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/topic/lens/hc-usage/src/Lib.hs | haskell | # LANGUAGE FlexibleContexts #
# LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskell # | # LANGUAGE FunctionalDependencies #
# LANGUAGE MonoLocalBinds #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NoImplicitPrelude #
module Lib where
import Control.Lens
import Control.Monad.Trans.RWS.Strict
import qualified Prelude
import Protolude hiding (get, gets)
# AN... |
3c3e0f6df608aa0648ada2d3591fd43f722f436b7e282d299bd03182e24993f2 | juspay/atlas | ParkingLocation.hs | # LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE QuasiQuotes #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -Wno - orphans #
|
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you m... | null | https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/parking-bap/src/Storage/Tabular/ParkingLocation.hs | haskell | # LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE QuasiQuotes #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -Wno - orphans #
|
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you m... | |
f0a992dae86b8713f168ebfe0360d850d33d6ee307dea42e5e8192adfa5e6702 | ytomino/headmaster | c_lexical.ml | open C_literals;;
open C_version;;
open struct
let snd_of_fst_table list = (
let table = Hashtbl.create (List.length list) in
List.iter (fun (s, w) -> Hashtbl.add table s w) list;
table
);;
let fst_of_snd_table list = (
let table = Hashtbl.create (List.length list) in
List.iter (fun (s, w) -> Hashtbl.ad... | null | https://raw.githubusercontent.com/ytomino/headmaster/11571992e480aa9fbc5821fe1be1b62edf5f924f/source/c_lexical.ml | ocaml | c
c++
objective-c
objective-c++
extended (currently, gcc only)
string_of/of_string for reserved word
preprocessor keywords
preprocessor directives
extended
unsupported
@"..."
[ or <:
] or :>
{ or <%
} or %>
->
++
--
<<
>>
<=
>=
==
!=
&&
||
...
=
*=
/=
%=
+=... | open C_literals;;
open C_version;;
open struct
let snd_of_fst_table list = (
let table = Hashtbl.create (List.length list) in
List.iter (fun (s, w) -> Hashtbl.add table s w) list;
table
);;
let fst_of_snd_table list = (
let table = Hashtbl.create (List.length list) in
List.iter (fun (s, w) -> Hashtbl.ad... |
967f0420bc4f7fc173adb12d1cb2158281912492468727e58d950be699d01e80 | swarmpit/swarmpit | create.cljs | (ns swarmpit.component.stack.create
(:require [material.icon :as icon]
[material.components :as comp]
[material.component.form :as form]
[material.component.composite :as composite]
[swarmpit.component.editor :as editor]
[swarmpit.component.state :as state]
... | null | https://raw.githubusercontent.com/swarmpit/swarmpit/38ffbe08e717d8620bf433c99f2e85a9e5984c32/src/cljs/swarmpit/component/stack/create.cljs | clojure | (ns swarmpit.component.stack.create
(:require [material.icon :as icon]
[material.components :as comp]
[material.component.form :as form]
[material.component.composite :as composite]
[swarmpit.component.editor :as editor]
[swarmpit.component.state :as state]
... | |
429b61a7a5f8ca35d67951852e1a11490481862385b718fbaa6a67514f55774b | diku-dk/futhark | Syntax.hs | {-# LANGUAGE Strict #-}
# LANGUAGE TypeFamilies #
| = Definition of the core language IR
--
For actually /constructing/ ASTs , see " . Construct " .
--
-- == Types and values
--
-- The core language type system is much more restricted than the core
-- language. This is a theme that repeats often. The only type... | null | https://raw.githubusercontent.com/diku-dk/futhark/06a2e6dacd5bddfa002c3543f3384c87e3c776f4/src/Futhark/IR/Syntax.hs | haskell | # LANGUAGE Strict #
== Types and values
The core language type system is much more restricted than the core
language. This is a theme that repeats often. The only types that
are supported in the core language are various primitive types
t'PrimType' which can be combined in arrays (ignore v'Mem' and
v'Acc' fo... | # LANGUAGE TypeFamilies #
| = Definition of the core language IR
For actually /constructing/ ASTs , see " . Construct " .
commonly used , uses t'Shape ' and t'NoUniqueness ' .
arrays . This is implemented in " . Internalise " , but the
conceptually return tuples instead return
" Language . . Prim... |
94d9fb6b6849451ca105b16b4c0e4fa2a5b9704e7fb8c7ce13e30b8a2242f488 | DanielG/ghc-mod | Caching.hs | ghc - mod : Happy Haskell Hacking
Copyright ( C ) 2015 < dxld ÄT darkboxed DOT org >
--
-- This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 of the License , or
-- (... | null | https://raw.githubusercontent.com/DanielG/ghc-mod/391e187a5dfef4421aab2508fa6ff7875cc8259d/core/GhcMod/Caching.hs | haskell |
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General... | ghc - mod : Happy Haskell Hacking
Copyright ( C ) 2015 < dxld ÄT darkboxed DOT org >
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU Affero General Public License
# LA... |
28c0f3060f0263d9782dc144f66eaae8cb3710f5483385d5d96e0456324505c6 | cbaggers/cepl | cffi-helpers.lisp | (in-package :cepl.types)
(defgeneric get-typed-from-foreign (type-name))
(defgeneric get-typed-to-foreign (type-name))
(defmethod get-typed-from-foreign ((type-name t))
(format t "~%No optimized from-foreign found for ~a~%" type-name)
(lambda (ptr) (mem-ref ptr type-name)))
(defmethod get-typed-to-foreign ((type... | null | https://raw.githubusercontent.com/cbaggers/cepl/d1a10b6c8f4cedc07493bf06aef3a56c7b6f8d5b/core/types/cffi-helpers.lisp | lisp | ----------------------------------------------------------------
----------------------------------------------------------------
handle types with longhand names
---------------------------------------------------------------- | (in-package :cepl.types)
(defgeneric get-typed-from-foreign (type-name))
(defgeneric get-typed-to-foreign (type-name))
(defmethod get-typed-from-foreign ((type-name t))
(format t "~%No optimized from-foreign found for ~a~%" type-name)
(lambda (ptr) (mem-ref ptr type-name)))
(defmethod get-typed-to-foreign ((type... |
1f39ef195cf82eac71d6ff9730ee9c88249943c51e433d90d7ce2f50bdafd086 | xvw/preface | arrow_apply.ml | open QCheck2
module Suite
(R : Model.PROFUNCTORIAL)
(P : Preface_specs.ARROW_APPLY with type ('a, 'b) t = ('a, 'b) R.t)
(A : Model.T0)
(B : Model.T0)
(C : Model.T0)
(D : Model.T0) =
struct
module Arrow = Arrow.Suite (R) (P) (A) (B) (C) (D)
module Laws = Preface_laws.Arrow_apply.For (P)
l... | null | https://raw.githubusercontent.com/xvw/preface/84a297e1ee2967ad4341dca875da8d2dc6d7638c/lib/preface_qcheck/arrow_apply.ml | ocaml | open QCheck2
module Suite
(R : Model.PROFUNCTORIAL)
(P : Preface_specs.ARROW_APPLY with type ('a, 'b) t = ('a, 'b) R.t)
(A : Model.T0)
(B : Model.T0)
(C : Model.T0)
(D : Model.T0) =
struct
module Arrow = Arrow.Suite (R) (P) (A) (B) (C) (D)
module Laws = Preface_laws.Arrow_apply.For (P)
l... | |
34c65ad9abc88121d582bca2f788f3cbd6d6ad83dccb6f98769da6c87baf1bf2 | verement/lmdb-simple | Harness.hs |
module Harness
( setup
) where
import Database.LMDB.Simple
setup :: IO (Environment ReadWrite, Database Int String)
setup = do
env <- openEnvironment "test/env" defaultLimits
{ mapSize = 1024 * 1024 * 1024
, maxDatabases = 4
}
db <- transaction env $ do
db <- getDatabase N... | null | https://raw.githubusercontent.com/verement/lmdb-simple/d857a421076e4403b02bae35707fc2d1b14d49a9/test/Harness.hs | haskell |
module Harness
( setup
) where
import Database.LMDB.Simple
setup :: IO (Environment ReadWrite, Database Int String)
setup = do
env <- openEnvironment "test/env" defaultLimits
{ mapSize = 1024 * 1024 * 1024
, maxDatabases = 4
}
db <- transaction env $ do
db <- getDatabase N... | |
09eea46b88b12a941d3864794f5f5669990e0e45e8bd0f02f9615e83ea192933 | roswell/roswell | install-clisp.lisp | (roswell:include '("util-install-quicklisp"
"install+ffcall"
"install+sigsegv"))
(defpackage :roswell.install.clisp
(:use :cl :roswell.install :roswell.util :roswell.locations
:roswell.install.ffcall+
:roswell.install.sigsegv+))
(in-package :roswell.install.clisp)... | null | https://raw.githubusercontent.com/roswell/roswell/dae5e63c7bd926af26d8d7a984449d501c55bf96/lisp/install-clisp.lisp | lisp | Prevent user-defined multiprocessing etc. via MAKEFLAGS, | (roswell:include '("util-install-quicklisp"
"install+ffcall"
"install+sigsegv"))
(defpackage :roswell.install.clisp
(:use :cl :roswell.install :roswell.util :roswell.locations
:roswell.install.ffcall+
:roswell.install.sigsegv+))
(in-package :roswell.install.clisp)... |
4ecb115ae8084a7c198505277c239cf20be907e96ad9bbc101422eca6102b6a0 | dimitri/AdventOfCode | d13.lisp | (in-package :advent/2018)
(defparameter *d13/input*
(uiop:read-file-lines
(asdf:system-relative-pathname :advent "2018/d13.input")))
(defparameter *d13/test*
(with-input-from-string (s "
/->-\\
| | /----\\
| /-+--+-\\ |
| | | | v |
\\-+-/ \\-+--/
\\-----/
")
(rest (uiop:slurp-stream-lines s))))
(... | null | https://raw.githubusercontent.com/dimitri/AdventOfCode/fcb9f5e9d7e75c82efffc4069c0c54c5cce2d180/2018/d13.lisp | lisp | (in-package :advent/2018)
(defparameter *d13/input*
(uiop:read-file-lines
(asdf:system-relative-pathname :advent "2018/d13.input")))
(defparameter *d13/test*
(with-input-from-string (s "
/->-\\
| | /----\\
| /-+--+-\\ |
| | | | v |
\\-+-/ \\-+--/
\\-----/
")
(rest (uiop:slurp-stream-lines s))))
(... | |
71c8a292c003ba91953da7f97429d69582adda1ec088606a956a41831247b648 | pink-gorilla/goldly | runner.clj | (ns goldly.runner
"runs goldly systems"
(:require
[clojure.string]
[taoensso.timbre :as log :refer [info]]
[goldly.component.type.system :refer [add-system]]))
(defrecord GoldlySystem [id])
(defn system-start!
[system]
(let [id (:id system)]
(info "starting system " id)
(add-system system)
... | null | https://raw.githubusercontent.com/pink-gorilla/goldly/a942f29378e51da5725989ba017bac5a61e7fe54/src-unused/system/goldly/runner.clj | clojure | (ns goldly.runner
"runs goldly systems"
(:require
[clojure.string]
[taoensso.timbre :as log :refer [info]]
[goldly.component.type.system :refer [add-system]]))
(defrecord GoldlySystem [id])
(defn system-start!
[system]
(let [id (:id system)]
(info "starting system " id)
(add-system system)
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.