_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 |
|---|---|---|---|---|---|---|---|---|
4b1fdf91fdd70b52eba27f29804ff9c1cb7113aaf17748fbc305cdba00df6224 | cedlemo/OCaml-GI-ctypes-bindings-generator | Numerable_icon.ml | open Ctypes
open Foreign
type t = unit ptr
let t_typ : t typ = ptr void
(*Not implemented gtk_numerable_icon_new type interface not implemented*)
(*Not implemented gtk_numerable_icon_new_with_style_context type interface not implemented*)
Not implemented gtk_numerable_icon_get_background_gicon return type interface n... | null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Numerable_icon.ml | ocaml | Not implemented gtk_numerable_icon_new type interface not implemented
Not implemented gtk_numerable_icon_new_with_style_context type interface not implemented
Not implemented gtk_numerable_icon_set_background_gicon type interface not implemented | open Ctypes
open Foreign
type t = unit ptr
let t_typ : t typ = ptr void
Not implemented gtk_numerable_icon_get_background_gicon return type interface not handled
let get_background_icon_name =
foreign "gtk_numerable_icon_get_background_icon_name" (t_typ @-> returning (string_opt))
let get_count =
foreign "gtk_num... |
db329fb2764440bad4c44451bc5d74b027a0c42ef9bf2f1a22e74a1b28c0fde2 | isavita/category-theory-for-programmers-with-erlang | ch5.erl | -module(ch5).
-export([number_or_string/1, m/1]).
5.1 . Show that the terminal object is unique up to unique isomorphism .
Let 's assume that there two terminal object A and B.
By definition of terminal object we know that two functions let 's call them for clarity f and
are going from A -f- > B and B -g- > A... | null | https://raw.githubusercontent.com/isavita/category-theory-for-programmers-with-erlang/4ffa11dd9ffc77e6a909ccf36e19bdfd5af117ce/ch5.erl | erlang | The product, if it exists, is the greatest lower bound.
The coproduct, if it exists, is the least upper bound.
int i(int n) { return n; }
Hint: Define a function
The reason is the when we map to int instead of Either we are losing information.
Therefore we do not have way to invert the injection due to the fact t... | -module(ch5).
-export([number_or_string/1, m/1]).
5.1 . Show that the terminal object is unique up to unique isomorphism .
Let 's assume that there two terminal object A and B.
By definition of terminal object we know that two functions let 's call them for clarity f and
are going from A -f- > B and B -g- > A... |
e3280d1c94763991eed07a0b22c039fdcf900b83542c3a135c4b3268a0788f64 | soegaard/metapict | geometry.rkt | #lang racket/base
(provide (all-defined-out))
;;;
LINES , RAYS , AND SEGMENTS
;;;
;; This module provides functions work with lines, rays and segments
;; as well as conics (parabolas, ellipses and hyperbolas) as geometrical objects.
;; The structure definitions are in "structs.rkt".
;; The structures have the prop... | null | https://raw.githubusercontent.com/soegaard/metapict/dabba626c30e5110f7045301a380aae363d08a0a/metapict/geometry.rkt | racket |
This module provides functions work with lines, rays and segments
as well as conics (parabolas, ellipses and hyperbolas) as geometrical objects.
The structure definitions are in "structs.rkt".
The structures have the prop:drawable property, which means that draw
can draw them using the convert function stored in... | #lang racket/base
(provide (all-defined-out))
LINES , RAYS , AND SEGMENTS
objects using Euclidean geometry ( coordinate free ) .
( line : p q # t # t ) represents a line through points and q
( line : p q # f # f ) represents a line segment from p to q
( line : p q # f # t ) represents a ray from p th... |
decaad238751f6db5b95ff3ba4ed1d4864cf5b56c7ac570094e086e9a5b20fc1 | webyrd/untitled-relational-interpreter-book | plt-slatex-src.scm | (scmxlate-insert
"(module slatex mzscheme
(provide slatex::process-main-tex-file)
" ;)
)
(scmxlate-include "make-qualified-names.scm")
(define-syntax setf
(lambda (so)
(datum->syntax-object so
(let ((so-d (syntax-object->datum so)))
(let ((l (cadr so-d))
(r (caddr so-d)))
... | null | https://raw.githubusercontent.com/webyrd/untitled-relational-interpreter-book/247e29afd224586c39c1983e042524c7cc9fe17b/latex/slatex/dialects/plt-slatex-src.scm | scheme | )
( | (scmxlate-insert
"(module slatex mzscheme
(provide slatex::process-main-tex-file)
)
(scmxlate-include "make-qualified-names.scm")
(define-syntax setf
(lambda (so)
(datum->syntax-object so
(let ((so-d (syntax-object->datum so)))
(let ((l (cadr so-d))
(r (caddr so-d)))
(i... |
6b7a5827ac7f1555b45fc77ea04363ee030b7d05c3ea70f44deb8cf35da58802 | xh4/web-toolkit | x86-vm.lisp | x86-vm.lisp -- VOP definitions for SBCL
#+sbcl
(cl:in-package :sb-vm)
#+(and sbcl x86) (progn
(define-vop (%check-bound)
(:translate nibbles::%check-bound)
(:policy :fast-safe)
(:args (array :scs (descriptor-reg))
(bound :scs (any-reg))
(index :scs (any-reg)))
(:arg-types simple-array-uns... | null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/vendor/nibbles-20180831-git/sbcl-opt/x86-vm.lisp | lisp | We want to check the conditions:
0 <= INDEX
0 <= INDEX + OFFSET
(INDEX + OFFSET) < BOUND
INDEX <_u BOUND
INDEX + OFFSET <_u BOUND
If INDEX + OFFSET <_u BOUND, though, INDEX must be less than
already been assured by higher-level machinery.
hack so that it looks used | x86-vm.lisp -- VOP definitions for SBCL
#+sbcl
(cl:in-package :sb-vm)
#+(and sbcl x86) (progn
(define-vop (%check-bound)
(:translate nibbles::%check-bound)
(:policy :fast-safe)
(:args (array :scs (descriptor-reg))
(bound :scs (any-reg))
(index :scs (any-reg)))
(:arg-types simple-array-uns... |
ed9656ba2dcd61daeb2f056f43540ef603afd38b8b3d0f075a98de72b62e2c6a | vincenthz/hs-asn1 | BitArray.hs | -- |
-- Module : Data.ASN1.BitArray
-- License : BSD-style
Maintainer : < >
-- Stability : experimental
-- Portability : unknown
--
{-# LANGUAGE DeriveDataTypeable #-}
module Data.ASN1.BitArray
( BitArray(..)
, BitArrayOutOfBound(..)
, bitArrayLength
, bitArrayGetBit
, bitArraySetB... | null | https://raw.githubusercontent.com/vincenthz/hs-asn1/c017c03b0f71a3b45165468a1d1028a0ed7502c0/data/Data/ASN1/BitArray.hs | haskell | |
Module : Data.ASN1.BitArray
License : BSD-style
Stability : experimental
Portability : unknown
# LANGUAGE DeriveDataTypeable #
| throwed in case of out of bounds in the bitarray.
| represent a bitarray / bitmap
| returns the length of bits in this bitarray
| get the nth bits
| set the nth bit to... | Maintainer : < >
module Data.ASN1.BitArray
( BitArray(..)
, BitArrayOutOfBound(..)
, bitArrayLength
, bitArrayGetBit
, bitArraySetBitValue
, bitArraySetBit
, bitArrayClearBit
, bitArrayGetData
, toBitArray
) where
import Data.Bits
import Data.Word
import Data.Maybe
import... |
f54bc57e5b6f331f819ffed06473e17ef90261257d34130a5e05e033efc9b072 | yuriy-chumak/ol | seven.scm | ; the standard trurl tests
(print (+ 2 2))
| null | https://raw.githubusercontent.com/yuriy-chumak/ol/83dd03d311339763682eab02cbe0c1321daa25bc/tests/seven.scm | scheme | the standard trurl tests | (print (+ 2 2))
|
eb55fca7d9b6d276b22a85681608b5ab9b59df1f16431c7dc50a3b80416a7c7f | gelisam/giggles-is-you | Interact.hs |
-- | Display mode is for drawing a static picture.
module Graphics.Gloss.Interface.IO.Interact
( module Graphics.Gloss.Data.Display
, module Graphics.Gloss.Data.Picture
, module Graphics.Gloss.Data.Color
, interactIO
, Controller (..)
, Event(..), Key(..), SpecialKey(... | null | https://raw.githubusercontent.com/gelisam/giggles-is-you/6487120b219bad80ff87a43f1d7d9fb97d17dfb5/gloss/Graphics/Gloss/Interface/IO/Interact.hs | haskell | | Display mode is for drawing a static picture.
| Open a new window and interact with an infrequently updated picture.
Similar to `displayIO`, except that you manage your own events.
^ Display mode.
^ Background color.
^ Initial world state.
^ A function to produce the current picture.
^ A function to handl... |
module Graphics.Gloss.Interface.IO.Interact
( module Graphics.Gloss.Data.Display
, module Graphics.Gloss.Data.Picture
, module Graphics.Gloss.Data.Color
, interactIO
, Controller (..)
, Event(..), Key(..), SpecialKey(..), MouseButton(..), KeyState(..), Modifiers(..))
... |
9d86c36e0ccd02a566b080e11fd6af151f83513c01f0317472f8c9cddaf61631 | bmeurer/ocaml-arm | complex.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/bmeurer/ocaml-arm/43f7689c76a349febe3d06ae7a4fc1d52984fd8b/stdlib/complex.mli | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 2002 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
$ Id$
type t = { re: float; im: flo... |
d3eaba72e4d65c0e386401f2a8148cba217c2da2aa716227ef9b40eed2284d6b | emillon/ocaml-zeit | test_all.ml | open OUnit2
let suite = "zeit" >::: [Test_deployment.suite; Test_client.suite]
let () = run_test_tt_main suite
| null | https://raw.githubusercontent.com/emillon/ocaml-zeit/cdcdd0b155d406d1b8c8947e3c620527c3c9ecf7/test/test_all.ml | ocaml | open OUnit2
let suite = "zeit" >::: [Test_deployment.suite; Test_client.suite]
let () = run_test_tt_main suite
| |
dae8f311401d778a505fee3ccb6a933eda426a74ab82ed83ea26349068dc7d10 | scymtym/architecture.builder-protocol | json.lisp | ;;;; json.lisp --- Tests for the JSON serialization functionality.
;;;;
Copyright ( C ) 2015 , 2016 Jan Moringen
;;;;
Author : < >
(cl:in-package #:architecture.builder-protocol.json.test)
(in-suite :architecture.builder-protocol.json)
(defun serialize-test-cases (cases)
(flet ((test-case (spec)
... | null | https://raw.githubusercontent.com/scymtym/architecture.builder-protocol/a48abddff7f6e0779b89666f46ab87ef918488f0/test/json/json.lisp | lisp | json.lisp --- Tests for the JSON serialization functionality.
Relation with explicit cardinality * is same as generic.
Relation with cardinality ?.
Relation with cardinality :map.
Relation with cardinality :map.
Normal behavior.
Suppressing nodes.
Replacing nodes with something else.
Replacing nodes with tru... | Copyright ( C ) 2015 , 2016 Jan Moringen
Author : < >
(cl:in-package #:architecture.builder-protocol.json.test)
(in-suite :architecture.builder-protocol.json)
(defun serialize-test-cases (cases)
(flet ((test-case (spec)
(destructuring-bind (tree args expected) spec
(with-unbuilder (b... |
a288b86bbe1aa74aaf8fcf8c17fa43f01cac2be19f3320e6c1e409ce6185f1a4 | dpiponi/Moodler | audio_id.hs | do
plane <- currentPlane
(x, y) <- fmap (quantise2 quantum) mouse
panel <- container' "panel_3x1.png" (x, y) plane
lab <- label' "audio_id" (x-25.0, y+75.0) plane
parent panel lab
name <- new' "audio_id"
inp <- plugin' (name ++ ".signal") (x-21, y) plane
setColour inp "#sample"
paren... | null | https://raw.githubusercontent.com/dpiponi/Moodler/a0c984c36abae52668d00f25eb3749e97e8936d3/Moodler/scripts/audio_id.hs | haskell | do
plane <- currentPlane
(x, y) <- fmap (quantise2 quantum) mouse
panel <- container' "panel_3x1.png" (x, y) plane
lab <- label' "audio_id" (x-25.0, y+75.0) plane
parent panel lab
name <- new' "audio_id"
inp <- plugin' (name ++ ".signal") (x-21, y) plane
setColour inp "#sample"
paren... | |
c812123c15b3dfe16ed72b78c37f33efe259cdd441e10846e1e346b3d6b5ce49 | scheme/edwin48 | input-event.scm | -*- mode : scheme ; scheme48 - package : : input - event -*-
(define-record-type input-event
(really-make-input-event type operator operands)
input-event?
(type input-event/type)
(operator input-event/operator)
(operands input-event/operands))
(define (make-input-event type operator . operands)
(re... | null | https://raw.githubusercontent.com/scheme/edwin48/fbe3c7ca14f1418eafddebd35f78ad12e42ea851/edwin48/input-event.scm | scheme | scheme48 - package : : input - event -*- |
(define-record-type input-event
(really-make-input-event type operator operands)
input-event?
(type input-event/type)
(operator input-event/operator)
(operands input-event/operands))
(define (make-input-event type operator . operands)
(really-make-input-event type operator operands))
(define (apply-i... |
0a35ceeb9c1808c7b49c3297307391710c0a15bfb3a9cb268f92266fcbe0235a | ocaml-ppx/ocamlformat | fun_function.ml | let s =
List.fold x ~f:(fun y -> function
| Aconstructor avalue -> afunction avalue
| Bconstructor bvalue -> bfunction bvalue )
| null | https://raw.githubusercontent.com/ocaml-ppx/ocamlformat/3d1c992240f7d30bcb8151285274f44619dae197/test/passing/tests/fun_function.ml | ocaml | let s =
List.fold x ~f:(fun y -> function
| Aconstructor avalue -> afunction avalue
| Bconstructor bvalue -> bfunction bvalue )
| |
57070841d2302d6561d29c0181231119e9bfb36eb7e7ed3e78d58f7801a604db | nvim-treesitter/nvim-treesitter-angular | injections.scm | ; [state]="myState$ | async"
(attribute
((attribute_name) @_name
(#lua-match? @_name "%[.*%]"))
(quoted_attribute_value
(attribute_value) @angular))
; (myEvent)="handle($event)"
(attribute
((attribute_name) @_name
(#lua-match? @_name "%(.*%)"))
(quoted_attribute_value
((attribute_value) @angular)... | null | https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter-angular/53d55ba0473c3ac58e25ce3d016a0409481c645c/queries/html/injections.scm | scheme | [state]="myState$ | async"
(myEvent)="handle($event)"
*ngIf="blorgy"
{{ someBinding }} | (attribute
((attribute_name) @_name
(#lua-match? @_name "%[.*%]"))
(quoted_attribute_value
(attribute_value) @angular))
(attribute
((attribute_name) @_name
(#lua-match? @_name "%(.*%)"))
(quoted_attribute_value
((attribute_value) @angular)))
(attribute
((attribute_name) @_name
(#lua-match? ... |
3fcd10d731bfd2a2d2066ea0e6aa4345d5a0c19849d81aa5661dcb001051ad28 | evturn/haskellbook | 24.07-parsing-configuration-files.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
module Data.Ini where
import Control.Applicative
import Data.ByteString (ByteString)
import Data.Char (isAlpha)
import Data.Map (Map)
import qualified Data.Map as M
import ... | null | https://raw.githubusercontent.com/evturn/haskellbook/3d310d0ddd4221ffc5b9fd7ec6476b2a0731274a/24/24.07-parsing-configuration-files.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE QuasiQuotes # |
module Data.Ini where
import Control.Applicative
import Data.ByteString (ByteString)
import Data.Char (isAlpha)
import Data.Map (Map)
import qualified Data.Map as M
import Data.Text (Text)
import qualified Data.Text.IO ... |
c9aac8b9bd24817005644ff6326df82151a658455e15753656edf3a0c0b4bc9b | jyh/metaprl | unity_source.mli | doc <:doc<
@begin[spelling]
@end[spelling]
@module[UNITY]
This module defines a set of abstract language primitives.
By customizing this module, you can provide the translation
to another target language.
----------------------------------------------------------------
@begin[license]
Copy... | null | https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/experimental/unity/unity_source.mli | ocaml | doc <:doc<
@begin[spelling]
@end[spelling]
@module[UNITY]
This module defines a set of abstract language primitives.
By customizing this module, you can provide the translation
to another target language.
----------------------------------------------------------------
@begin[license]
Copy... | |
c28078139ac27911842ee5ee35916c5de64ee34e1b64f198e8f9336648623ed0 | alexdong/ansi-common-lisp-exercises | acl-ch6.lisp | Chapter 6 , Functions
1 . Define a version of tokens that takes : test and : start arguments defaulting
;;; to #'constituent and 0 respectively.
(defun tokens (str &key (test #'constituent) (start 0))
(let ((p1 (position-if test str :start start)))
(if p1
(let ((p2 (position-if #'(lambda (c)
(not (f... | null | https://raw.githubusercontent.com/alexdong/ansi-common-lisp-exercises/03b05a23027d62e8724177b2c56dd58065c1f18f/acl-ch6.lisp | lisp | to #'constituent and 0 respectively.
arguments passed to it.
args passed to it
it has seen so far.
is greater than the argument the last time the function was called. Returns nil
result of of a time consuming computation. Define frugal which returns the same
answer but only calls expensive when given an argum... | Chapter 6 , Functions
1 . Define a version of tokens that takes : test and : start arguments defaulting
(defun tokens (str &key (test #'constituent) (start 0))
(let ((p1 (position-if test str :start start)))
(if p1
(let ((p2 (position-if #'(lambda (c)
(not (funcall test c)))
str :start p1)... |
84527465a751b1e070b6e603e576727b55c2b584144538250b5996c1d1803402 | soulomoon/SICP | Exercise4.33.scm | Exercise 4.33 : tests the lazy list implementation given above by evaluating the expression
; (car '(a b c))
; To his surprise, this produces an error. After some thought, he realizes that the “lists” obtained by reading in quoted expressions are different from the lists manipulated by the new definitions of cons,... | null | https://raw.githubusercontent.com/soulomoon/SICP/1c6cbf5ecf6397eaeb990738a938d48c193af1bb/Chapter4/Exercise4.33.scm | scheme | (car '(a b c))
To his surprise, this produces an error. After some thought, he realizes that the “lists” obtained by reading in quoted expressions are different from the lists manipulated by the new definitions of cons, car, and cdr. Modify the evaluator’s treatment of quoted expressions so that quoted lists typed at... | Exercise 4.33 : tests the lazy list implementation given above by evaluating the expression
(load "/Users/soulomoon/git/SICP/Chapter4/lazyeval.scm")
(interpret
'(begin
(define (cons x y) (lambda (m) (m x y)))
(define (car z) (z (lambda (p q) p)))
(define (cdr z) (z (lambda (p q) q)))
(define (list-ref items n)... |
ec93f855917c212a8bb53ddd239f2ff89a53a48f272b4a7558c3f8dcb60fa7ad | farr/mcmc-ocaml | nested_test.ml | nested_test.ml : Test suite for the nested module .
Copyright ( C ) 2011 Will < >
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 ... | null | https://raw.githubusercontent.com/farr/mcmc-ocaml/56e46b8539cb8d6fada2cb09810363adf18f4c60/test/nested_test.ml | ocaml | nested_test.ml : Test suite for the nested module .
Copyright ( C ) 2011 Will < >
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 ... | |
d3afffddedd3f7ed71121c7fa37fe1a7a0db0540d4eb7db3c4685c019ac35707 | thizanne/tiger | types.mli | type t =
| Int
| String
| Record of (Symbol.t * t) list * Unique.t
| Array of t * Unique.t
| Nil
| Unit
| Name of Symbol.t * t option ref
val actual : t -> t
val to_string : t -> string
| null | https://raw.githubusercontent.com/thizanne/tiger/14e4c9a6005d1455122f366a965e487434219f47/src/types.mli | ocaml | type t =
| Int
| String
| Record of (Symbol.t * t) list * Unique.t
| Array of t * Unique.t
| Nil
| Unit
| Name of Symbol.t * t option ref
val actual : t -> t
val to_string : t -> string
| |
f91379e12701bbc92946ead649396aa1e476401932f69fc8ba039c3a27205cad | umber-lang/umber | btree.ml | open Import
type ('node, 'leaf) t =
| Node of 'node * ('node, 'leaf) t * ('node, 'leaf) t
| Leaf of 'leaf
[@@deriving equal, compare, hash]
let rec sexp_of_t sexp_of_node sexp_of_leaf = function
| Leaf data -> Sexp.List [ sexp_of_leaf data ]
| Node (data, left_child, right_child) ->
let sexp_of = sexp_of_... | null | https://raw.githubusercontent.com/umber-lang/umber/d2cbadc8caf630e4c9add40e3c6ad559aa21f595/src/btree.ml | ocaml | open Import
type ('node, 'leaf) t =
| Node of 'node * ('node, 'leaf) t * ('node, 'leaf) t
| Leaf of 'leaf
[@@deriving equal, compare, hash]
let rec sexp_of_t sexp_of_node sexp_of_leaf = function
| Leaf data -> Sexp.List [ sexp_of_leaf data ]
| Node (data, left_child, right_child) ->
let sexp_of = sexp_of_... | |
c309a58644281587d67590ac62852668da487c4e82e7ccd16c4188caaabaa608 | jmingtan/clonings | scalars2.clj | scalars2.clj
;; Fill in the rest of the line that has code missing!
;; No hints, there's no tricks, just get used to typing these :)
(ns scalars.scalars2)
(defn -main []
;; Characters
(let [my-first-initial \C]
(if (char? my-first-initial)
(println "Alphabetical!"))
(if (number? my-first-initial)
... | null | https://raw.githubusercontent.com/jmingtan/clonings/ca64b031ab26a1924bed91f5c9c98b6dd69fc129/exercises/scalars/scalars2.clj | clojure | Fill in the rest of the line that has code missing!
No hints, there's no tricks, just get used to typing these :)
Characters
Finish this line like the example! What's your favorite character?
Try a letter, try a number, try a special character, try a character
from a different language than your own, try an emoji... | scalars2.clj
(ns scalars.scalars2)
(defn -main []
(let [my-first-initial \C]
(if (char? my-first-initial)
(println "Alphabetical!"))
(if (number? my-first-initial)
(println "Numerical!"))
(if (not (or (char? my-first-initial)
(number? my-first-initial)))
(println "Ne... |
3d377ade2aa1c9709d18a6721c97725c83166351d7e5c7944d75b7afd8c3bebe | HumbleUI/HumbleUI | canvas.clj | (ns examples.canvas
(:require
[io.github.humbleui.canvas :as canvas]
[io.github.humbleui.core :as core]
[io.github.humbleui.paint :as paint]
[io.github.humbleui.ui :as ui])
(:import
[io.github.humbleui.types IPoint]
[io.github.humbleui.skija Canvas]))
;;
;; -demo/blob/main/notebooks/logo.c... | null | https://raw.githubusercontent.com/HumbleUI/HumbleUI/0e93d9a6172caff3bf58eb00f5fbef4e30a977cb/dev/examples/canvas.clj | clojure |
-demo/blob/main/notebooks/logo.clj
bg
event | (ns examples.canvas
(:require
[io.github.humbleui.canvas :as canvas]
[io.github.humbleui.core :as core]
[io.github.humbleui.paint :as paint]
[io.github.humbleui.ui :as ui])
(:import
[io.github.humbleui.types IPoint]
[io.github.humbleui.skija Canvas]))
(defn hilbert-curve-impl
([x-size y-s... |
b974887c0dfa88053bb5aca29fa68b7c763eebabd8db86ef48e2806a6e99eda4 | EcsoKit/ecso | ecso.ml | open Ast
open EvalValue
open Type
open Printf
open Printer
open Globals
open AnalyzerTexpr
open EcsoTypes
open EcsoAnalyzer
class plugin =
object (self)
method init () =
let ectx = EvalContext.get_ctx() in
ectx.curapi.after_typing (self#run false);
let com = ectx.curapi.get_com() in
begin match com.get... | null | https://raw.githubusercontent.com/EcsoKit/ecso/0ac7a1dae6bc33f07f515eee0a755eaf967ff792/ml/ecso.ml | ocaml |
Prepare the analyzer graph.
Resolve every created archetype and every mutations.
Commit every graph changes.
Deprecated.
*
Register our plugin API.
This code is executed upon `eval.vm.Context.loadPlugin` call.
| open Ast
open EvalValue
open Type
open Printf
open Printer
open Globals
open AnalyzerTexpr
open EcsoTypes
open EcsoAnalyzer
class plugin =
object (self)
method init () =
let ectx = EvalContext.get_ctx() in
ectx.curapi.after_typing (self#run false);
let com = ectx.curapi.get_com() in
begin match com.get... |
703d70face05ebb1380043595a2f391a46257b1723ba62fd28d3233f05edde7c | facebookincubator/hsthrift | EventBase.hs | Copyright ( c ) Facebook , Inc. and its affiliates .
module Util.EventBase
( CppIOExecutor
, EventBase(..)
, EventBaseDataplane(..)
, EventBaseProvider(..)
, EventBaseDataplaneProvider(..)
, withEventBaseDataplane
, initExecutor
, destroyExecutor
) where
import Control.Exception
import Foreign.Ptr... | null | https://raw.githubusercontent.com/facebookincubator/hsthrift/d3ff75d487e9d0c2904d18327373b603456e7a01/common/util/Util/EventBase.hs | haskell |
export
event bases are executors
io executors are executors
foreign
| Copyright ( c ) Facebook , Inc. and its affiliates .
module Util.EventBase
( CppIOExecutor
, EventBase(..)
, EventBaseDataplane(..)
, EventBaseProvider(..)
, EventBaseDataplaneProvider(..)
, withEventBaseDataplane
, initExecutor
, destroyExecutor
) where
import Control.Exception
import Foreign.Ptr... |
c6f227ea8a2678a56603d61dd34a2f1a34add20fde5e1d5439e3d1883b874419 | instedd/planwise | api.cljs | (ns planwise.client.projects2.api)
;; ----------------------------------------------------------------------------
;; API methods
(defn- create-project!
[defaults]
{:method :post
:section :index
:params {:project defaults}
:uri "/api/projects2"})
(defn- list-projects
[]
{:method :ge... | null | https://raw.githubusercontent.com/instedd/planwise/1bc2a5742ae3dc377dddf1f9e9bb60f0d2f59084/client/src/planwise/client/projects2/api.cljs | clojure | ----------------------------------------------------------------------------
API methods | (ns planwise.client.projects2.api)
(defn- create-project!
[defaults]
{:method :post
:section :index
:params {:project defaults}
:uri "/api/projects2"})
(defn- list-projects
[]
{:method :get
:section :index
:uri (str "/api/projects2")})
(defn- list-templates
[]
{:m... |
aef57d155ce09547a3a5c6daa1168a4c3e6f5752e110f0d82749ac729293a96f | Zulu-Inuoe/seq | seqio.lisp | (in-package #:com.inuoe.seqio)
(defgeneric aggregate (col aggregator)
(:documentation
"Applies a `aggregator' on `col'.
`aggregator' is a function of two arguments: The accumulated value, and the next element.
It should return the new accumulated value.
Note: The first accumulated value is the first element of ... | null | https://raw.githubusercontent.com/Zulu-Inuoe/seq/9b1f52fbd8bb424387ef65a103aa1e9f1b02e452/src/seqio/seqio.lisp | lisp | (in-package #:com.inuoe.seqio)
(defgeneric aggregate (col aggregator)
(:documentation
"Applies a `aggregator' on `col'.
`aggregator' is a function of two arguments: The accumulated value, and the next element.
It should return the new accumulated value.
Note: The first accumulated value is the first element of ... | |
ac3959f658513b48da30c43fbfdb41473971180d5298a11fa7e885226e9990ca | videlalvaro/claude | rabbitmq.clj | (ns claude.rabbitmq
(:use claude.core)
(:refer-clojure :exclude [name]))
(expose-service "rabbitmq-2.4"
["name" "hostname" "host" "port" "vhost"
"username" "user" "password" "pass" "url"]) | null | https://raw.githubusercontent.com/videlalvaro/claude/ae39a605740e16eb47053637420a80f63270681b/src/claude/rabbitmq.clj | clojure | (ns claude.rabbitmq
(:use claude.core)
(:refer-clojure :exclude [name]))
(expose-service "rabbitmq-2.4"
["name" "hostname" "host" "port" "vhost"
"username" "user" "password" "pass" "url"]) | |
6257eec70417052436e9ff39ed5755214a05d2aa702b086388373448c442222c | ocaml/ocamlbuild | plugin.mli | (***********************************************************************)
(* *)
(* ocamlbuild *)
(* *)
, , projet Galliu... | null | https://raw.githubusercontent.com/ocaml/ocamlbuild/792b7c8abdbc712c98ed7e69469ed354b87e125b/src/plugin.mli | ocaml | *********************************************************************
ocamlbuild
... | , , projet Gallium , INRIA Rocquencourt
Copyright 2007 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
Original author :
val execute_plugin_if_needed :... |
4bb9b6d67be0610b7b070676edb7642b288849ca963538e1ba602c29cdb4ade8 | thizanne/cormoran | param.ml | open Batteries
open Cmdliner
let enum_doc enum doc =
Printf.sprintf "%s. $(docv) must be %s."
doc (Arg.doc_alts_enum enum)
let cmdliner_converter_of_conv conv = Arg.conv_parser conv, Arg.conv_printer conv
type non_dir_file = string
let non_dir_file_cmdliner_converter =
cmdliner_converter_of_conv Arg.non_dir_... | null | https://raw.githubusercontent.com/thizanne/cormoran/46d13330ebd1c8224a0603fd473d8e6bed48bf53/src/param.ml | ocaml | * The program to analyse.
* Graph output file name.
* Print the full result of the analysis.
* Use litmus syntax.
* For modular analysis, analyse each thread with the same global
interference set at each pass. Interferences are only updated
between passes. | open Batteries
open Cmdliner
let enum_doc enum doc =
Printf.sprintf "%s. $(docv) must be %s."
doc (Arg.doc_alts_enum enum)
let cmdliner_converter_of_conv conv = Arg.conv_parser conv, Arg.conv_printer conv
type non_dir_file = string
let non_dir_file_cmdliner_converter =
cmdliner_converter_of_conv Arg.non_dir_... |
8013f0154bfd5912a8cb4e92b2b42823c6f24a5551d6987465b8be1c0fb8adbd | mfikes/advent-of-code | day_07.cljc | (ns advent-2018.day-07
(:require
#?(:cljs [planck.core :refer [slurp]])
[#?(:clj clojure.java.io :cljs planck.io) :as io]
[clojure.string :as string]))
(def input (-> "advent_2018/day_07/input" io/resource slurp))
(defn parse-line [s]
[(nth s 36) (nth s 5)])
(defn input->dep-map [input]
(->> (string/s... | null | https://raw.githubusercontent.com/mfikes/advent-of-code/72a015ac8fd9b1097efea69a0bb8acc26462665e/src/advent_2018/day_07.cljc | clojure | (ns advent-2018.day-07
(:require
#?(:cljs [planck.core :refer [slurp]])
[#?(:clj clojure.java.io :cljs planck.io) :as io]
[clojure.string :as string]))
(def input (-> "advent_2018/day_07/input" io/resource slurp))
(defn parse-line [s]
[(nth s 36) (nth s 5)])
(defn input->dep-map [input]
(->> (string/s... | |
aca703d2704ec3b3108dcfd866376391d25d6a311cd607e72fae84b2290a4fde | google/lisp-koans | let.lisp | Copyright 2013 Google Inc.
;;;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;;; you may not use this file except in compliance with the License.
;;; You may obtain a copy of the License at
;;;
;;; -2.0
;;;
;;; Unless required by applicable law or agreed to in writing, software
distrib... | null | https://raw.githubusercontent.com/google/lisp-koans/df5e58dc88429ef0ff202d0b45c21ce572144ba8/koans/let.lisp | lisp |
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 2013 Google Inc.
distributed under the License is distributed on an " AS IS " BASIS ,
(define-test let
(let ((x 10)
(y 20))
(assert-equal ____ (+ x y))
(let ((y 30))
(assert-equal ____ (+ x y)))
(assert-equal ____ (+ x y)))
Variables bound by LET have a default value of NIL ... |
233ccd70c9973230ad0495f91c16e2ace7807ee29c46b0ce96bb2fd2d160ba5b | haskell/haskell-language-server | Session.hs | {-# LANGUAGE CPP #-}
# LANGUAGE ExistentialQuantification #
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeFamilies #-}
{-|
The logic for setting up a ghcide session by tapping into hie-bios.
-}
module Development.IDE.Session
(SessionLoadingOptions(..)
,CacheDirs(..)... | null | https://raw.githubusercontent.com/haskell/haskell-language-server/5d56aa70a84807d7659e72eacd4d91fee08dbdbb/ghcide/session-loader/Development/IDE/Session.hs | haskell | # LANGUAGE CPP #
# LANGUAGE RankNTypes #
# LANGUAGE TypeFamilies #
|
The logic for setting up a ghcide session by tapping into hie-bios.
| Load the cradle with an optional 'hie.yaml' location.
If a 'hie.yaml' is given, use it to load the cradle.
Otherwise, use the p... | # LANGUAGE ExistentialQuantification #
module Development.IDE.Session
(SessionLoadingOptions(..)
,CacheDirs(..)
,loadSession
,loadSessionWithOptions
,setInitialDynFlags
,getHieDbLoc
,runWithDb
,retryOnSqliteBusy
,retryOnException
,Log(..)
) where
Unfortunately , we can not use loadSession with... |
7718d52f77aeaea5a1d50ef730a902be8a33860088b460317953a2ec70274a3d | bmeurer/ocamljit2 | outputbis.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
projet ... | null | https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/lex/outputbis.mli | ocaml | *********************************************************************
Objective Caml
... | projet
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ Id$
val output_lexdef :
string ->
in_channel ->
out_cha... |
0dcb896121f79c64c99d0e073e1bf563d62a795ef3b801a36abf9d0b80225291 | jafingerhut/cljol | ubergraph_test.clj | (ns cljol.ubergraph-test
(:import (java.io File))
(:require [clojure.test :refer :all]
[clojure.java.shell :as sh]
[clojure.java.io :as io]
[clojure.pprint :as pp]
[criterium.core :as crit]
[medley.core :as med]
[ubergraph.core :as uber]
... | null | https://raw.githubusercontent.com/jafingerhut/cljol/2b0eb2b6ec3197434ede3adbd0a13d4b53c06dd0/test/cljol/ubergraph_test.clj | clojure | ensure that the directory exists, creating it if not
{:pass true}
:error :topo-order-too-long
:error :topo-order-contains-non-node
:error :topo-order-contains-duplicates
:error :graph-contains-edge-violating-topo-order
{:pass true}
{:pass true]
:error :graph-contains-edge-violating-topo-order
graphs where cyc... | (ns cljol.ubergraph-test
(:import (java.io File))
(:require [clojure.test :refer :all]
[clojure.java.shell :as sh]
[clojure.java.io :as io]
[clojure.pprint :as pp]
[criterium.core :as crit]
[medley.core :as med]
[ubergraph.core :as uber]
... |
a7ade1f483ee147cf0af2be253e6c9bc0aac68748fdb32a81c325c8aa8e1d5a1 | YoshikuniJujo/test_haskell | GtkField.hs | # , LambdaCase , TupleSections #
{-# LANGUAGE PatternSynonyms, ViewPatterns #-}
{-# LANGUAGE DataKinds, TypeOperators #-}
# OPTIONS_GHC -Wall -fno - warn - tabs #
module Control.Moffy.Run.GtkField (
-- * Gui Event
GuiEv,
-- * Run Gtk Main
GtkDrawer, GtkDrawer', runGtkMain) where
import Prelude hiding (repeat, b... | null | https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/f13d25be0fc7be3dba0ca30e2088f9c2aa74ea01/themes/mfrp/try-moffy/src/Control/Moffy/Run/GtkField.hs | haskell | # LANGUAGE PatternSynonyms, ViewPatterns #
# LANGUAGE DataKinds, TypeOperators #
* Gui Event
* Run Gtk Main
RUN GTK MAIN
Just w -> putStrLn "not destroy"
gSignalConnect w Destroy gtkMainQuit,
gSignalConnect w' DeleteEvent \_ _ _ -> deleteEvent wid c,
DRAW
HELPER FUNCTION | # , LambdaCase , TupleSections #
# OPTIONS_GHC -Wall -fno - warn - tabs #
module Control.Moffy.Run.GtkField (
GuiEv,
GtkDrawer, GtkDrawer', runGtkMain) where
import Prelude hiding (repeat, break)
import Foreign.Ptr
import Control.Monad
import Control.Moffy
import Control.Moffy.Event.Gui
import Control.Moffy.Eve... |
7fe6c1c1d72941be826e1a86bd040cd1fe876fc92c6343a8a29fa3198b62ded1 | unnohideyuki/Tiger-in-Haskell | Semant.hs | module Semant where
import qualified Data.List as List
import qualified Absyn as A
import qualified Env as E
import qualified Symbol as S
import qualified Types as T
type VEnv = S.Table E.EnvEntry
type TEnv = S.Table T.Ty
type Unique = T.Unique
data ExpTy = ExpTy { ty :: T.Ty } -- Translate.Exp has not been prepare... | null | https://raw.githubusercontent.com/unnohideyuki/Tiger-in-Haskell/69fc976e64bfe7abfa842d7179e06eae740d36b9/chap5/Semant.hs | haskell | Translate.Exp has not been prepared yet.
translate to let/while expresion
dirty hask: generate a unique number from the position.
must not reach here?
inserting headers | module Semant where
import qualified Data.List as List
import qualified Absyn as A
import qualified Env as E
import qualified Symbol as S
import qualified Types as T
type VEnv = S.Table E.EnvEntry
type TEnv = S.Table T.Ty
type Unique = T.Unique
deriving (Show)
data Optype = Arith | Comp | Eq
actua... |
e6f16d0e8115e215b4c4993f1bc3536147d89fd335a815921439e954edd84158 | ghollisjr/cl-ana | h5ex-t-floatatt.lisp | Copyright by The HDF Group .
;;;; All rights reserved.
;;;;
This file is part of hdf5 - cffi .
The full hdf5 - cffi copyright notice , including terms governing
;;;; use, modification, and redistribution, is contained in the file COPYING,
;;;; which can be found at th... | null | https://raw.githubusercontent.com/ghollisjr/cl-ana/5cb4c0b0c9c4957452ad2a769d6ff9e8d5df0b10/hdf-cffi/examples/datatypes/h5ex-t-floatatt.lisp | lisp | All rights reserved.
use, modification, and redistribution, is contained in the file COPYING,
which can be found at the root of the source code distribution tree.
If you do not have access to this file, you may request a copy from
.
This example shows how to read and write floating point
floating point numbers ... | Copyright by The HDF Group .
This file is part of hdf5 - cffi .
The full hdf5 - cffi copyright notice , including terms governing
datatypes to an attribute . The program first writes
DIM0xDIM1 , then closes the file . Next , it reopens the
-by-api/hdf5-exa... |
e5dc7b801f416001e3bdf683df9c392553029ff10e71dbb6a2f0d1c9d3a836a1 | geophf/1HaskellADay | Solution.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TupleSections #
module Y2020.M11.D17.Solution where
-
So .
Okay .
I was going to go all : map countries and their airbases to a KML - file , but
to do that , I need a lat - long of the country , and where best to do that ,
other than the country 's capita... | null | https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2020/M11/D17/Solution.hs | haskell | # LANGUAGE OverloadedStrings #
}
}
-
>>> readCapitals (capitalDir ++ capitalsJSON)
>>> let caps = it
-
How many country-infos thingies are there?
}
}
}
-----------------------------------------------------
}
("qid", qid wd)] we leave off qid here, because we're going to add it
to the graph (see below)
with `co... | # LANGUAGE TupleSections #
module Y2020.M11.D17.Solution where
-
So .
Okay .
I was going to go all : map countries and their airbases to a KML - file , but
to do that , I need a lat - long of the country , and where best to do that ,
other than the country 's capital . But we do n't have country capi... |
ebc72b15d3ca0740438fe67bcb61fb09008f83f718ef32074dcd1e3d0fd94a5f | qiao/sicp-solutions | 3.37.scm | (define (c- x y)
(let ((z (make-connector)))
(adder y z x)
z))
(define (c* x y)
(let ((z (make-connector)))
(multiplier x y z)
z))
(define (c/ x y)
(let ((z (make-connector)))
(multiplier y z x)
z))
(define (cv x)
(let ((z (make-connector)))
(constant x z)
z))
| null | https://raw.githubusercontent.com/qiao/sicp-solutions/a2fe069ba6909710a0867bdb705b2e58b2a281af/chapter3/3.37.scm | scheme | (define (c- x y)
(let ((z (make-connector)))
(adder y z x)
z))
(define (c* x y)
(let ((z (make-connector)))
(multiplier x y z)
z))
(define (c/ x y)
(let ((z (make-connector)))
(multiplier y z x)
z))
(define (cv x)
(let ((z (make-connector)))
(constant x z)
z))
| |
e13679df09f4bf06f107c8a4a232c807f465a1763ab62aab355e95554ab45c22 | chshersh/sauron | Client.hs | # LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
|
Copyright : ( c ) 2022
SPDX - License - Identifier : MPL-2.0
Maintainer : < >
Functions for querying Twitter API .
_ _ Auth : _ _
@
Authorization : Bearer $ TWITTER_TOKEN
@
Copyright: (c) 2022 Dmitrii Kovanikov
SPDX-License-Identifier... | null | https://raw.githubusercontent.com/chshersh/sauron/c9d600984c7104cdab971f64d88e9470df1b7eb7/src/Sauron/Top/Client.hs | haskell | * User
* Tweets
* Internals
| URL for acessing Twitter API v2
| API type for the following URL:
@
/:username
@
| API type for the following URL:
@
,public_metrics&end_time=2022-09-01T13%3A52%3A14Z
@
extra fields to return | # LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
|
Copyright : ( c ) 2022
SPDX - License - Identifier : MPL-2.0
Maintainer : < >
Functions for querying Twitter API .
_ _ Auth : _ _
@
Authorization : Bearer $ TWITTER_TOKEN
@
Copyright: (c) 2022 Dmitrii Kovanikov
SPDX-License-Identifier... |
6190d57658b153d44814a23212a141a818c5520970031857d73b2dfc0f224f8a | JunSuzukiJapan/cl-reex | subject.lisp | (in-package :cl-user)
(defpackage cl-reex.subject.subject
(:use :cl)
(:import-from :cl-reex.observer
:on-next
:on-error
:on-completed
:make-observer
:observer)
(:import-from :cl-reex.observable
:observable
:observable-object
:is-active
:set-e... | null | https://raw.githubusercontent.com/JunSuzukiJapan/cl-reex/94928c7949c235b41902138d9e4a5654b92d67eb/src/subject/subject.lisp | lisp |
Dispose
Subscribe
as-observable
| (in-package :cl-user)
(defpackage cl-reex.subject.subject
(:use :cl)
(:import-from :cl-reex.observer
:on-next
:on-error
:on-completed
:make-observer
:observer)
(:import-from :cl-reex.observable
:observable
:observable-object
:is-active
:set-e... |
e8bdea0641033719ea0bdb032083b78e39c2e0c4c2bba90eaf73653a184ecd1e | INRIA/zelus | deps_tools.ml | (* Warning: *)
This file is based on the original version of ocamldep.ml
from the Objective Caml 3.12 distribution , INRIA
(***********************************************************************)
(* *)
(* Objec... | null | https://raw.githubusercontent.com/INRIA/zelus/8dca7e80a71c39ae5ff9e9ae640854e60a27aadd/compiler/global/deps_tools.ml | ocaml | Warning:
*********************************************************************
Objective Caml
... | This file is based on the original version of ocamldep.ml
from the Objective Caml 3.12 distribution , INRIA
, projet Cristal , INRIA Rocquencourt
Copyright 1999 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distr... |
6658f9a7d6939f5dccf82feb13fa9d16c9e3bdd009db3e93086c107bd91244a3 | clash-lang/clash-compiler | Split.hs | module Split where
import Clash.Prelude
topEntity :: Vec 7 Bit -> Vec 2 Bit
topEntity vs = snd (splitAtI vs)
| null | https://raw.githubusercontent.com/clash-lang/clash-compiler/8e461a910f2f37c900705a0847a9b533bce4d2ea/tests/shouldwork/Vector/Split.hs | haskell | module Split where
import Clash.Prelude
topEntity :: Vec 7 Bit -> Vec 2 Bit
topEntity vs = snd (splitAtI vs)
| |
c80a6eeb74c5e55728b0ae94c44e7a6070e889827b5c277020ca1d7d611441b8 | mfoemmel/erlang-otp | webtool.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2001 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/webtool/src/webtool.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 2001 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(webtool).
-behaviour(gen_server).
... |
2b3885b8703167180cc6ae55c3e04a43adf640a3f5ea6e311cafa97e37468e24 | metosin/pohjavirta | types.clj | Copied and modified from potemkin , v0.4.3 ( ) , MIT licnensed , Copyright
(ns ^:no-doc inline.potemkin.types
(:use
[clojure [set :only (union)]]
[inline.potemkin.macros :only (equivalent? normalize-gensyms safe-resolve unify-gensyms)])
(:require
[inline.riddley.walk :as r]
[clojure.set :as se... | null | https://raw.githubusercontent.com/metosin/pohjavirta/022a44eec9109a0baf93827843eeba15265adea7/src/inline/potemkin/types.clj | clojure |
all future implementations should be extended
all current implementations should be extended
already exists, just re-import it
define the interface
args
| Copied and modified from potemkin , v0.4.3 ( ) , MIT licnensed , Copyright
(ns ^:no-doc inline.potemkin.types
(:use
[clojure [set :only (union)]]
[inline.potemkin.macros :only (equivalent? normalize-gensyms safe-resolve unify-gensyms)])
(:require
[inline.riddley.walk :as r]
[clojure.set :as se... |
89561f5947ee3a2fecbd399efbbdb0816f719db256ffa155dfc8ffcd17e9a548 | emqx/emqx | emqx_tls_lib_tests.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2021 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
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 o... | null | https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/apps/emqx/test/emqx_tls_lib_tests.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 ... | Copyright ( c ) 2021 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(emqx_tls_lib_tests).
-include_lib("eunit/include/eunit.hrl").
one of the cipher suit... |
9db382113475822c1e68c08003996dc25785dd554e2518b3d383bcb3a43f1fda | cblp/notifaika | Notifaika.hs |
Notifaika reposts notifications
from different feeds to chats .
Copyright ( C ) 2015
This program is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the L... | null | https://raw.githubusercontent.com/cblp/notifaika/db8f9b69d3417db337bce7fb44b2da8e0337a466/src/Notifaika.hs | haskell |
Notifaika reposts notifications
from different feeds to chats .
Copyright ( C ) 2015
This program is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the L... | |
6074511f3a092a0248a60f87832f691c59fd2a6ed2316e8e240b15556a3cc2d7 | pmundkur/flowcaml | bound.ml | (**************************************************************************)
(* *)
(* *)
, Projet C... | null | https://raw.githubusercontent.com/pmundkur/flowcaml/ddfa8a37e1cb60f42650bed8030036ac313e048a/src-flowcaml/types/bound.ml | ocaml | ************************************************************************
et en Automatique. All ri... |
, Projet Cristal , INRIA Rocquencourt
Copyright 2002 , 2003 Institut National de Recherche en Informatique
under the terms of the Q Public License version 1.0 .
$ I d : bound.ml , v 1.2 2003/06/26 13:... |
6aeaeacc34d4f7b1c17e94dd94f926e84aa320dd0875076e4b10d44d2e564bd3 | danehuang/augurv2 | MemLow.hs |
- Copyright 2017 under the Apache License , Version 2.0 ( the " License " ) ;
- you may not use this file except in compliance with the License .
- You may obtain a copy of the License at
-
- -2.0
-
- Unless required by applicable law or agreed to in writing , software
- distributed... | null | https://raw.githubusercontent.com/danehuang/augurv2/480459bcc2eff898370a4e1b4f92b08ea3ab3f7b/compiler/augur/src/Low/MemLow.hs | haskell | --------------------------------------------------------------------
= MemLow Description
---------------------------------
== Types and operations
location that we are assigning or storing to
atmInc?
temporaries that we have already allocated to
---------------------------------
== Transformation
TODO: Refacto... |
- Copyright 2017 under the Apache License , Version 2.0 ( the " License " ) ;
- you may not use this file except in compliance with the License .
- You may obtain a copy of the License at
-
- -2.0
-
- Unless required by applicable law or agreed to in writing , software
- distributed... |
97759e7ade45f8dfe74243ac19fa3fb1fbdfe4b7b8fc8a139695936101107ccc | vaibhavsagar/experiments | Http.hs | --
Based on Mondrian example in DDJ , at least originally .
--
module Http where
import Dotnet
import IOExts ( unsafeInterleaveIO )
--
This version of the Http example uses the FFI to access
-- .NET; see HttpOld.hs for an alternate (and older) approach
-- to .NET interop.
--
--
-- 'http url' dumps out the respo... | null | https://raw.githubusercontent.com/vaibhavsagar/experiments/378d7ba97eabfc7bbeaa4116380369ea6612bfeb/hugs/dotnet/examples/basic/Http.hs | haskell |
.NET; see HttpOld.hs for an alternate (and older) approach
to .NET interop.
'http url' dumps out the response from issuing a HTTP GET
request to URL 'url'.
Define the types representing the objects we're accessing here.
not correct (TextEncoding is the parent), but precise enough.
Binding to the metho... | Based on Mondrian example in DDJ , at least originally .
module Http where
import Dotnet
import IOExts ( unsafeInterleaveIO )
This version of the Http example uses the FFI to access
http :: String -> IO ()
http url = do
req <- createURL url
if not (isNullObj req) then do
rsp <- req # getResponse
str... |
7d295b2b2876d1e17eb8a18d3e5012a215e3c3434f92c162704818e537d14229 | ocsigen/ocsimore | jquery.ml | Copyright ,
let dollar (elt : Dom_html.element Js.t) : 'a Js.t =
Js.Unsafe.fun_call (Js.Unsafe.variable "$") [|Js.Unsafe.inject elt|]
let toggle ?animate elt : unit =
match animate with
| None -> (dollar elt)##toggle()
| Some s -> (dollar elt)##toggle(s)
| null | https://raw.githubusercontent.com/ocsigen/ocsimore/8eeaf043ed6f1f167a96cbdc5f72a5225d9516d5/src/site/client/jquery.ml | ocaml | Copyright ,
let dollar (elt : Dom_html.element Js.t) : 'a Js.t =
Js.Unsafe.fun_call (Js.Unsafe.variable "$") [|Js.Unsafe.inject elt|]
let toggle ?animate elt : unit =
match animate with
| None -> (dollar elt)##toggle()
| Some s -> (dollar elt)##toggle(s)
| |
fa694b9d19fe99a0527845f274575dc68f8dd5ae07c95a97f4b70d1ab611232f | screenshotbot/screenshotbot-oss | commit-graph.lisp | ;;;; Copyright 2018-Present Modern Interpreters Inc.
;;;;
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(uiop:define-package :screenshotbot/model/commit-graph
(:use #:cl #:alexandria)
(... | null | https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/41d305151fe304f2c1601b87e7b4d9d6dda0dc62/src/screenshotbot/model/commit-graph.lisp | lisp | Copyright 2018-Present Modern Interpreters Inc.
| This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(uiop:define-package :screenshotbot/model/commit-graph
(:use #:cl #:alexandria)
(:import-from #:bknr.datastore
#:store-obje... |
c7f0ef6c6946c796cc2619c3615c6ee76abab5db1fc5abd412cd22a4abc0303c | jhidding/r6rs-monads | gen-id.scm | (library (monads gen-id)
(export gen-id)
(import (rnrs (6)))
Define a new symbol , code from TSPL Chapter 8 .
(define gen-id
(lambda (template-id . args)
(datum->syntax template-id
(string->symbol
(apply string-append
(map (lambda (x)
(if (string? x)
... | null | https://raw.githubusercontent.com/jhidding/r6rs-monads/76e857c54ee71203fc556420133414b145113b13/lib/monads/gen-id.scm | scheme | (library (monads gen-id)
(export gen-id)
(import (rnrs (6)))
Define a new symbol , code from TSPL Chapter 8 .
(define gen-id
(lambda (template-id . args)
(datum->syntax template-id
(string->symbol
(apply string-append
(map (lambda (x)
(if (string? x)
... | |
75a8341a8a0e6cb753e7fb3d62b32b9a16715f5184b366da10f663e2b499b396 | nada-attia/dama | gui.ml | open Graphics
open Graphic_image
open Png
open Constants
let display_image img_path x y =
let img = Png.load_as_rgb24 img_path [] in
let graphics_img = Graphic_image.of_image img in
Graphics.draw_image graphics_img x y
let display_piece sq x y =
let c, r = Board.get_piece_info sq in
if c = Board.Black && r ... | null | https://raw.githubusercontent.com/nada-attia/dama/a193052b9bf0b36037b60be027e2652e994776a0/src/gui.ml | ocaml | open Graphics
open Graphic_image
open Png
open Constants
let display_image img_path x y =
let img = Png.load_as_rgb24 img_path [] in
let graphics_img = Graphic_image.of_image img in
Graphics.draw_image graphics_img x y
let display_piece sq x y =
let c, r = Board.get_piece_info sq in
if c = Board.Black && r ... | |
0aa31c6325bca1cf2dbc02f01dbfb8cabc756415a38b8018302f00fb105aa775 | McCLIM/McCLIM | dialog.lisp | ;;; ---------------------------------------------------------------------------
;;; License: LGPL-2.1+ (See file 'Copyright' for details).
;;; ---------------------------------------------------------------------------
;;;
( c ) Copyright 2003 by < >
( c ) Copyright 2014 by < >
( c ) Copyright 2021 by ... | null | https://raw.githubusercontent.com/McCLIM/McCLIM/cfb3a193155f99dbe23eb10f9dccfea9152b50e0/Core/clim-core/dialogs/dialog.lisp | lisp | ---------------------------------------------------------------------------
License: LGPL-2.1+ (See file 'Copyright' for details).
---------------------------------------------------------------------------
---------------------------------------------------------------------------
An accepting-values stream ... | ( c ) Copyright 2003 by < >
( c ) Copyright 2014 by < >
( c ) Copyright 2021 by < daniel.turtlewareeu >
the value of a query field that does not need to be selected first for
selecting the gadget first .
COM - - QUERY -- deselects the currently selected query .
COM - QUERY - EXIT -- E... |
286e3cfb9c75dba7c95ce58a58fa3fc15c25540719dcbc29488e16665c54191c | mooreryan/ocaml_python_bindgen | hi.ml | open Lib
let () = Py.initialize ()
let () =
match Silly.__init__ ~x:"all good!" () with
| Some s -> print_endline @@ Silly.x s
| None -> prerr_endline "Couldn't make a Silly thing"
| null | https://raw.githubusercontent.com/mooreryan/ocaml_python_bindgen/b5d056a52daec5a56b1120fe7d5ff04c8951d4c9/test/of_pyo_option.t/hi.ml | ocaml | open Lib
let () = Py.initialize ()
let () =
match Silly.__init__ ~x:"all good!" () with
| Some s -> print_endline @@ Silly.x s
| None -> prerr_endline "Couldn't make a Silly thing"
| |
2ec374a2f32226f1b1be15114577f963e13c4a60bc3bd775ac34c7041eb681bf | onedata/op-worker | gs_group_logic_test_SUITE.erl | %%%--------------------------------------------------------------------
@author
( C ) 2017 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%--------------------------------------------------------------------
%%% @doc
%%% This module tests group logic AP... | null | https://raw.githubusercontent.com/onedata/op-worker/2d96b34dbdf5862b77388fac17d3bf6166b56919/test_distributed/suites/graph_sync/gs_group_logic_test_SUITE.erl | erlang | --------------------------------------------------------------------
@end
--------------------------------------------------------------------
@doc
This module tests group logic API using mocked gs_client module.
@end
--------------------------------------------------------------------
export for ct
==============... | @author
( C ) 2017 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
-module(gs_group_logic_test_SUITE).
-author("Lukasz Opiola").
-include("logic_tests_common.hrl").
-export([all/0, init_per_suite/1, init_per_testcase/2, end_per_testcase/2, end_per_suite/1]).
-ex... |
092e76a31b6211407351a8591296ccf7f192e45bb26238894354379a27d51f11 | jonase/eastwood | linters_test.clj | (ns eastwood.test.linters-test
(:require
[clojure.string :as str]
[clojure.test :refer [deftest is]]
[eastwood.lint]
[eastwood.reporting-callbacks :as reporting-callbacks]
[eastwood.util :as util]
[lambdaisland.deep-diff])
(:import
(java.io File)))
TBD : It would be cleaner to make 's error... | null | https://raw.githubusercontent.com/jonase/eastwood/959f91b165149394ebda37f18c5e876d40b7072b/test/eastwood/test/linters_test.clj | clojure | expedient thing and make a couple of tests expect different values
If an exception occurs during analyze, re-throw it. This will
cause any test written that calls lint-ns-noprint to fail, unless
it expects the exception.
TBD: I do not know why the i-am-inner-defonce-sym warning appears
twice in the result. Once w... | (ns eastwood.test.linters-test
(:require
[clojure.string :as str]
[clojure.test :refer [deftest is]]
[eastwood.lint]
[eastwood.reporting-callbacks :as reporting-callbacks]
[eastwood.util :as util]
[lambdaisland.deep-diff])
(:import
(java.io File)))
TBD : It would be cleaner to make 's error... |
a652ca31a33919edcd604e6f315dfda5fa66e9c80dc1b157a6945634c7570778 | tweag/asterius | ExportStatic.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
module Asterius.Foreign.ExportStatic
( genExportStaticObj,
encodeTys,
)
where
import Asterius.Foreign.SupportedTypes
import Asterius.Types
import qualified Asterius.Types.SymbolMap as SM
import Data.Bits
import Data.ByteString.Builder
import Data... | null | https://raw.githubusercontent.com/tweag/asterius/07e04d3c04a38db0785cd85a63604582fcad1a79/asterius/src/Asterius/Foreign/ExportStatic.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE RecordWildCards #
module Asterius.Foreign.ExportStatic
( genExportStaticObj,
encodeTys,
)
where
import Asterius.Foreign.SupportedTypes
import Asterius.Types
import qualified Asterius.Types.SymbolMap as SM
import Data.Bits
import Data.ByteString.Builder
import Data.Foldable
import Data.Int
import Da... |
b07dc8566d58b82c6c801fa68322c33ce77f98a3c828da2bba975f9bf921b3fc | PrecursorApp/precursor | history.cljs | (ns frontend.history
(:require [clojure.string :as string]
[frontend.utils :as utils]
[goog.events :as events]
[goog.history.Html5History :as html5-history]
[goog.window :as window]
[secretary.core :as sec])
(:import [goog.history Html5History]
... | null | https://raw.githubusercontent.com/PrecursorApp/precursor/30202e40365f6883c4767e423d6299f0d13dc528/src-cljs/frontend/history.cljs | clojure | see this.transformer_ at
note that there's no leading slash
get this history instance's version of window, might make for easier testing later
This might not be the best place for this--too much separation
between history and routing
need a history element, or goog will overwrite the entire dom
This will fire a... | (ns frontend.history
(:require [clojure.string :as string]
[frontend.utils :as utils]
[goog.events :as events]
[goog.history.Html5History :as html5-history]
[goog.window :as window]
[secretary.core :as sec])
(:import [goog.history Html5History]
... |
7ba39d9461d152eabd3760f6898e119c641f2c51de108d7991f1218ecdde45a7 | QDelta/fcomp | GM.hs | module Prim.GM where
import qualified Data.Map as M
import Common.Def
import GM.Def
import Prim.Name
primInt2Insts :: [(String, Instruction)]
primInt2Insts =
[ ("add", Add),
("sub", Sub),
("mul", Mul),
("div", Div),
("rem", Rem)
]
primBool2Insts :: [(String, Instruction)]
primBool2Insts =
[ ("... | null | https://raw.githubusercontent.com/QDelta/fcomp/eceb8e4ab9b10ece7f4671689b96e73ea7a8e8b3/app/Prim/GM.hs | haskell | and x y = case x of { False -> False; True -> y };
or x y = case x of { True -> True; False -> y }; | module Prim.GM where
import qualified Data.Map as M
import Common.Def
import GM.Def
import Prim.Name
primInt2Insts :: [(String, Instruction)]
primInt2Insts =
[ ("add", Add),
("sub", Sub),
("mul", Mul),
("div", Div),
("rem", Rem)
]
primBool2Insts :: [(String, Instruction)]
primBool2Insts =
[ ("... |
abedd365394f72688f834db4c3c8e94231544dc65cbc9c9ee3f50f40b5cb7cba | PacktWorkshops/The-Clojure-Workshop | repl.clj | (in-ns 'garden)
(def vegetables ["cucumber" "carrot"])
(def fruits ["orange" "apple" "melon"])
(in-ns 'shop)
(clojure.core/refer 'garden :only '(vegetables))
(clojure.core/refer 'clojure.test :only '(deftest is run-tests))
(clojure.core/refer 'clojure.core)
(deftest vegetables-test
(is (= vegetables
... | null | https://raw.githubusercontent.com/PacktWorkshops/The-Clojure-Workshop/3d309bb0e46a41ce2c93737870433b47ce0ba6a2/Chapter08/tests/Exercise8.04/repl.clj | clojure | (in-ns 'garden)
(def vegetables ["cucumber" "carrot"])
(def fruits ["orange" "apple" "melon"])
(in-ns 'shop)
(clojure.core/refer 'garden :only '(vegetables))
(clojure.core/refer 'clojure.test :only '(deftest is run-tests))
(clojure.core/refer 'clojure.core)
(deftest vegetables-test
(is (= vegetables
... | |
8c3b8806a2609d8ac1592e67914509bb151eb2d13af7c2e0ee884192774a7f8f | rowangithub/DOrder | pldi082_unbounded.ml | let rec loop x y n =
let y =
if (x <= n) then y + 1
else if (x >= n+1) then y - 1
else assert false in
if (y < 0) then
if n >= 0 then
if y = (-1) then assert (x < 2*n + 3)
else ()
else ()
else loop (x+1) y n
let main n =
let x = 0 in
let y = 0 in
if(n < 0) then ()
else
... | null | https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/tests/folprograms/beautifulinterpolants/pldi082_unbounded.ml | ocaml | let rec loop x y n =
let y =
if (x <= n) then y + 1
else if (x >= n+1) then y - 1
else assert false in
if (y < 0) then
if n >= 0 then
if y = (-1) then assert (x < 2*n + 3)
else ()
else ()
else loop (x+1) y n
let main n =
let x = 0 in
let y = 0 in
if(n < 0) then ()
else
... | |
751b55d60740b74f988809a777ac0d29f9147abcc5b907481129cfcf718e56c4 | witan-org/witan | nodes.mli | (*************************************************************************)
This file is part of Witan .
(* *)
Copyright ( C ) 2017
CEA ( Commi... | null | https://raw.githubusercontent.com/witan-org/witan/d26f9f810fc34bf44daccb91f71ad3258eb62037/src/core/structures/nodes.mli | ocaml | ***********************************************************************
alternatives)
Automatique)
... | This file is part of Witan .
Copyright ( C ) 2017
CEA ( Commissariat à l'énergie atomique et aux énergies
( Institut National de Recherche en Informatique et en
CNRS ( Centre nation... |
0d8637a70621ac852063c931bef122c3a029fd016aeeee555517ec3f12fa339f | 5outh/HaskellTalk | Functor.hs | module Functor where
import Tree
import Prelude hiding (Functor(..), Maybe(..))
-- data [] a = a : [a] | []
data Maybe a = Just a | Nothing deriving (Show, Eq)
class Functor f where
fmap :: (a -> b) -> f a -> f b
instance Functor [] where
fmap = map
instance Functor Maybe where
fmap f Nothing ... | null | https://raw.githubusercontent.com/5outh/HaskellTalk/c566ea68c80601417954c1cde9759e82d19eb8f3/Functor.hs | haskell | data [] a = a : [a] | []
Might break tree ordering properties, but still a valid functor
polymorphic function that works over all functors!
| module Functor where
import Tree
import Prelude hiding (Functor(..), Maybe(..))
data Maybe a = Just a | Nothing deriving (Show, Eq)
class Functor f where
fmap :: (a -> b) -> f a -> f b
instance Functor [] where
fmap = map
instance Functor Maybe where
fmap f Nothing = Nothing
fmap f (Just a)... |
38d52e923312aa8e92ae19ff29eefddea52bb3353585ab068b11e50a72a443c0 | mdunnio/coinbase-pro | Orders.hs | # LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE TemplateHaskell #-}
module CoinbasePro.Authenticated.Orders
( Status (..)
, Statuses (..)
, Order (..)
, STP (..)
, TimeInForce (..)
, PlaceOrderBody (..)
, StopLossSide (..)
, statuses
) where
import Data.Aeson (From... | null | https://raw.githubusercontent.com/mdunnio/coinbase-pro/8016dbd7413b43ea4597eb0cb36cc01f7a18c1b4/src/lib/CoinbasePro/Authenticated/Orders.hs | haskell | # LANGUAGE TemplateHaskell #
TODO: All is not a status
TODO: This might need to be split up into different order types. | # LANGUAGE GeneralizedNewtypeDeriving #
module CoinbasePro.Authenticated.Orders
( Status (..)
, Statuses (..)
, Order (..)
, STP (..)
, TimeInForce (..)
, PlaceOrderBody (..)
, StopLossSide (..)
, statuses
) where
import Data.Aeson (FromJSON, ToJSON, parseJSON, withText)
import ... |
fa178fe83975d467d9af90f085c9841e7cbea11e721bcb4328d3432ed20a890a | oetr/racket-opencv | main.rkt | #lang racket/base
(require "highgui.rkt")
(provide (all-from-out "highgui.rkt"))
| null | https://raw.githubusercontent.com/oetr/racket-opencv/8124eb6b620769137656547e83f9d9587ab37c23/opencv/main.rkt | racket | #lang racket/base
(require "highgui.rkt")
(provide (all-from-out "highgui.rkt"))
| |
20d5b3f7db1e71255d771031e74bd5228bdb3c92d9e7b5eb1a25cbb7b61393ec | myuon/quartz-hs | Fmt.hs | module Language.Quartz.Tools.Fmt where
import Control.Monad
import Control.Monad.ST
import qualified Data.Vector as V
import Data.Maybe (isJust, fromJust)
import Data.Vector.PushBack
import Data.Text.Prettyprint.Doc
import Language.Quartz.Tools.FmtLexer
data Code
= AToken Lexeme
| Sequence (V.Vector Code)
-- op... | null | https://raw.githubusercontent.com/myuon/quartz-hs/998edb502443d80cfe300730885de25bc7d15b08/src/Language/Quartz/Tools/Fmt.hs | haskell | open punctuation close
formatDoc :: String -> Either String (Doc a)
formatDoc = pretty . alexScanTokens | module Language.Quartz.Tools.Fmt where
import Control.Monad
import Control.Monad.ST
import qualified Data.Vector as V
import Data.Maybe (isJust, fromJust)
import Data.Vector.PushBack
import Data.Text.Prettyprint.Doc
import Language.Quartz.Tools.FmtLexer
data Code
= AToken Lexeme
| Sequence (V.Vector Code)
| Blo... |
903d6fffcf996cc26b72a301d6678aaa0a3c5bca2e4306304de6881e67286a35 | lambdabot/lambdabot | PrettyPrinter.hs | # LANGUAGE PatternGuards #
module Lambdabot.Plugin.Haskell.Pl.PrettyPrinter (Expr) where
Dummy export to make ghc -Wall happy
import Lambdabot.Plugin.Haskell.Pl.Common
instance Show Decl where
show (Define f e) = f ++ " = " ++ show e
showList ds = (++) $ concat $ intersperse "; " $ map show ds
instance Show T... | null | https://raw.githubusercontent.com/lambdabot/lambdabot/de01f362c7a8fc6f85c37e604168dcccb1283a0e/lambdabot-haskell-plugins/src/Lambdabot/Plugin/Haskell/Pl/PrettyPrinter.hs | haskell | | Expression with syntactic sugar
(x +)
(+ x)
This is a little bit awkward, but at least seems to produce no false
results anymore
doesn't matter | # LANGUAGE PatternGuards #
module Lambdabot.Plugin.Haskell.Pl.PrettyPrinter (Expr) where
Dummy export to make ghc -Wall happy
import Lambdabot.Plugin.Haskell.Pl.Common
instance Show Decl where
show (Define f e) = f ++ " = " ++ show e
showList ds = (++) $ concat $ intersperse "; " $ map show ds
instance Show T... |
d8b43e9f289714f26b8828f4a3420cb06e9e251084274d416199155f724e1a1b | ocaml-ppx/ppx | ordering.ml | type t =
| Lt
| Eq
| Gt
let of_int n =
if n < 0 then
Lt
else if n = 0 then
Eq
else
Gt
let to_int = function
| Lt -> -1
| Eq -> 0
| Gt -> 1
let to_string = function
| Lt -> "<"
| Eq -> "="
| Gt -> ">"
let neq = function
| Eq -> false
| Lt | Gt -> true
let is_eq = function
... | null | https://raw.githubusercontent.com/ocaml-ppx/ppx/40e5a35a4386d969effaf428078c900bd03b78ec/stdppx/ordering.ml | ocaml | type t =
| Lt
| Eq
| Gt
let of_int n =
if n < 0 then
Lt
else if n = 0 then
Eq
else
Gt
let to_int = function
| Lt -> -1
| Eq -> 0
| Gt -> 1
let to_string = function
| Lt -> "<"
| Eq -> "="
| Gt -> ">"
let neq = function
| Eq -> false
| Lt | Gt -> true
let is_eq = function
... | |
de55fe38075ded48663b7a5b438a0f3d1f276c95cb887e7baca6034862281070 | alanz/ghc-exactprint | qdorun005.hs | # LANGUAGE QualifiedDo #
# LANGUAGE RebindableSyntax #
import qualified Monad.Graded as Graded
import Vector
import Prelude (print, ($))
import qualified Prelude as P
xs >>= f = 'c' : P.concatMap f xs
(>>) = (P.>>)
main = do
print $ toList $ Graded.do
x <- VCons 'a' (VCons 'b' VNil)
Graded.return x
print ... | null | https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc90/qdorun005.hs | haskell | # LANGUAGE QualifiedDo #
# LANGUAGE RebindableSyntax #
import qualified Monad.Graded as Graded
import Vector
import Prelude (print, ($))
import qualified Prelude as P
xs >>= f = 'c' : P.concatMap f xs
(>>) = (P.>>)
main = do
print $ toList $ Graded.do
x <- VCons 'a' (VCons 'b' VNil)
Graded.return x
print ... | |
f18a89df6e832aab34686fff0f8d8de55af16672dcb7184d796d80fb49ebbd87 | GregorKiczales/spd | advanced.rkt | (module checker handin-server/checker
(require handin-server/private/reloadable)
(check: :language '(special advanced)
:require '(2htdp/image 2htdp/universe spd/tags)
:create-text? #t
:textualize? #t
:eval? #t
:coverage? #f
(let ([the-gradefn (auto-relo... | null | https://raw.githubusercontent.com/GregorKiczales/spd/1a4b226b2e1ae8d7f4906c2cd6bfed867fd55874/handin-checkers/advanced.rkt | racket | (module checker handin-server/checker
(require handin-server/private/reloadable)
(check: :language '(special advanced)
:require '(2htdp/image 2htdp/universe spd/tags)
:create-text? #t
:textualize? #t
:eval? #t
:coverage? #f
(let ([the-gradefn (auto-relo... | |
aae5794f56164e2d2383b12753dc213e324265f562e30d6b714238583c4ec966 | openvstorage/alba | nsm_host_client.ml |
Copyright ( C ) iNuron -
This file is part of Open vStorage . For license information , see < LICENSE.txt >
Copyright (C) iNuron -
This file is part of Open vStorage. For license information, see <LICENSE.txt>
*)
open! Prelude
open Lwt.Infix
open Nsm_host_protocol
open Protocol
class type basic_client... | null | https://raw.githubusercontent.com/openvstorage/alba/459bd459335138d6b282d332fcff53a1b4300c29/ocaml/src/nsm_host_client.ml | ocaml |
Copyright ( C ) iNuron -
This file is part of Open vStorage . For license information , see < LICENSE.txt >
Copyright (C) iNuron -
This file is part of Open vStorage. For license information, see <LICENSE.txt>
*)
open! Prelude
open Lwt.Infix
open Nsm_host_protocol
open Protocol
class type basic_client... | |
f9776e81e2908e9ab804eb92d38c83583a53b6706941948db03befa2aab7bcf3 | bugczw/Introduction-to-Functional-Programming-in-OCaml | eval.ml | type expr =
| Var of string
| Add of expr * expr;;
let rec eval = fun environment expr -> match expr with
| Var x -> List.assoc x environment
| Add(e1,e2) -> (eval environment e1)
+ (eval environment e2);;
eval [("x",2); ("y",5)]
(Add (Var "x", Add (Var "x", Var "y")));;
let rec eval =... | null | https://raw.githubusercontent.com/bugczw/Introduction-to-Functional-Programming-in-OCaml/13c4d1f92e7479f8eb10ea5d4c43a598b6676d0f/OCaml_MOOC_W4_ALL/eval.ml | ocaml | type expr =
| Var of string
| Add of expr * expr;;
let rec eval = fun environment expr -> match expr with
| Var x -> List.assoc x environment
| Add(e1,e2) -> (eval environment e1)
+ (eval environment e2);;
eval [("x",2); ("y",5)]
(Add (Var "x", Add (Var "x", Var "y")));;
let rec eval =... | |
f442b629d4daa205f37af4341e78fab7c94e5de33ddf4e9f8dd627323cc98f33 | ocurrent/clarke | metrics.ml | open Prometheus
let namespace = "Clarke"
let subsystem = "meter"
let watts =
let help = "Current power usage measured in watts" in
Gauge.v ~help ~namespace ~subsystem "watts"
| null | https://raw.githubusercontent.com/ocurrent/clarke/521ec17a6c5d9333b7495561a77505adf7e03a0a/src/lib/metrics.ml | ocaml | open Prometheus
let namespace = "Clarke"
let subsystem = "meter"
let watts =
let help = "Current power usage measured in watts" in
Gauge.v ~help ~namespace ~subsystem "watts"
| |
3f97d6aee8c0a904ee6b43d6627427fff959cc72a3247137b13c7bba6cc988b2 | plt-amy/ahc | driver.ml | module C = import "./compile.ml"
module A = import "./assemble.ml"
module T = import "./tc.ml"
open import "./parser.ml"
open import "prelude.ml"
open import "lua/io.ml"
module Stg = import "./stg/lower.ml"
module Out = import "./stg/output.ml"
external val dofile : string -> () = "dofile"
let printerror (e, { line,... | null | https://raw.githubusercontent.com/plt-amy/ahc/5595b4946a2cd17c31f1877d3914d77a97cafb1e/driver.ml | ocaml | module C = import "./compile.ml"
module A = import "./assemble.ml"
module T = import "./tc.ml"
open import "./parser.ml"
open import "prelude.ml"
open import "lua/io.ml"
module Stg = import "./stg/lower.ml"
module Out = import "./stg/output.ml"
external val dofile : string -> () = "dofile"
let printerror (e, { line,... | |
a286b7f8f0b6ef959bde20a8ac208029774fbe62bd6e33a69bdfdc1ce215296d | conscell/hugs-android | BinaryRandList.hs | Copyright ( c ) 1998 - 1999 .
-- See COPYRIGHT file for terms and conditions.
module BinaryRandList
{-# DEPRECATED "This module is unmaintained, and will disappear soon" #-}
(
-- type
instance of Sequence , Functor , Monad , MonadPlus
-- sequence operations
empty,single,cons,snoc,append,lview... | null | https://raw.githubusercontent.com/conscell/hugs-android/31e5861bc1a1dd9931e6b2471a9f45c14e3c6c7e/hugs/lib/hugs/oldlib/BinaryRandList.hs | haskell | See COPYRIGHT file for terms and conditions.
# DEPRECATED "This module is unmaintained, and will disappear soon" #
type
sequence operations
documentation
signatures for exported functions
Adapted from
not exported, rewrite as bit ops?
not exported
not exported
the remaining functions all use defaults
for zip... | Copyright ( c ) 1998 - 1999 .
module BinaryRandList
(
instance of Sequence , Functor , Monad , MonadPlus
empty,single,cons,snoc,append,lview,lhead,ltail,rview,rhead,rtail,
null,size,concat,reverse,reverseOnto,fromList,toList,
map,concatMap,foldr,foldl,foldr1,foldl1,reducer,reducel,reduce1,
... |
65535e5bac3e193ab212db7e5fe370876f474995cdf70c20e5a4bd63a304e80c | uzh/guardian | guardian.ml | type context = (string * string) list
module Uuid = Uuid
module type RoleSig = Role.Sig
module Util = struct
let decompose_variant_string s =
let open CCString in
let s = trim s in
let fmt = format_of_string "`%s (%s@)" in
try
Scanf.sscanf s fmt (fun name params ->
lowercase_ascii nam... | null | https://raw.githubusercontent.com/uzh/guardian/da81fd85c9c6537a6bde9a11eed0115e72437a87/lib/guardian.ml | ocaml | * [action, target] Denotes an effect a function may have on and therefore
which permissions an actor needs to invoke it.
* Convenience function to return a [can] function. Takes an optional
target specification (for error reporting purposes) and a list of
[guardian] rules of the form [actor, ac... | type context = (string * string) list
module Uuid = Uuid
module type RoleSig = Role.Sig
module Util = struct
let decompose_variant_string s =
let open CCString in
let s = trim s in
let fmt = format_of_string "`%s (%s@)" in
try
Scanf.sscanf s fmt (fun name params ->
lowercase_ascii nam... |
101139641570cfcff7c21ee6b525335ee3edf1096d0911f8a93226f2e6494621 | borkdude/bebo | main.cljs | (ns bebo.main
(:require
[babashka.cli :as cli]
[bebo.core :refer [run-script]]
[clojure.string :as str]))
(defn run-script* [{:keys [rest-cmds args]}]
(run-script (or (first rest-cmds) (first args))))
(defn print-help []
(println (str/trim "Usage: bebo <subcommand> <opts>
Evaluation:
run <file | url... | null | https://raw.githubusercontent.com/borkdude/bebo/c16d4ae3e7d5d7466597956625e4c384aeaf0335/src/bebo/main.cljs | clojure | (ns bebo.main
(:require
[babashka.cli :as cli]
[bebo.core :refer [run-script]]
[clojure.string :as str]))
(defn run-script* [{:keys [rest-cmds args]}]
(run-script (or (first rest-cmds) (first args))))
(defn print-help []
(println (str/trim "Usage: bebo <subcommand> <opts>
Evaluation:
run <file | url... | |
f5dc4e34a9a8514e07b02b51ed01f0822e9c65ea8369251c89edccff65686293 | f-o-a-m/kepler | Router.hs | # LANGUAGE UndecidableInstances #
module Tendermint.SDK.BaseApp.Query.Router
( HasQueryRouter(..)
, methodRouter
) where
import Control.Monad (join)
import Data.Kind (Type)
import Data.Proxy
import Data.String.Conversions ... | null | https://raw.githubusercontent.com/f-o-a-m/kepler/6c1ad7f37683f509c2f1660e3561062307d3056b/hs-abci-sdk/src/Tendermint/SDK/BaseApp/Query/Router.hs | haskell | ------------------------------------------------------------------------------
| This class is used to construct a router given a 'layout' type. The layout
| is constructed using the combinators that appear in the instances here, no other
| Servant combinators are recognized.
| A routeQ handler.
| Transform a rout... | # LANGUAGE UndecidableInstances #
module Tendermint.SDK.BaseApp.Query.Router
( HasQueryRouter(..)
, methodRouter
) where
import Control.Monad (join)
import Data.Kind (Type)
import Data.Proxy
import Data.String.Conversions ... |
13bf14c013ad6c1aa9bf6db25f056fff79612795cd75a77501064fc7d38b8275 | ConsumerDataStandardsAustralia/validation-prototype | Feature.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeOperators #-}
module Web.ConsumerData.Au.Api.Types.Banking.ProductAc... | null | https://raw.githubusercontent.com/ConsumerDataStandardsAustralia/validation-prototype/ff63338b77339ee49fa3e0be5bb9d7f74e50c28b/consumer-data-au-api-types/src/Web/ConsumerData/Au/Api/Types/Banking/ProductAccountComponents/Product/Feature.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE LambdaCase #
# LANGUAGE RankNTypes #
# LANGUAGE TypeOperators #
^ "ADDITIONAL_CARDS" Additional cards can be requested. Use of @additionalValue@ field: The maximum number of additional cards. If no maximum th... | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
module Web.ConsumerData.Au.Api.Types.Banking.ProductAccountComponents.Product.Feature
( module Web.ConsumerData.Au.Api.Types.Banking.ProductAccountComponents.Product.Feature
) where
import Control.Monad.Except (throwError)
impor... |
12aeaf0dd8604eb8d4bd9fd60a3020641a1615a37e9b790e4d704821d821fe71 | esl/erlang-web | e_error.erl | The contents of this file are subject to the Erlang Web Public License ,
Version 1.0 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
Erlang Web Public License along with this software . If not , it can be
%% retrieved via the world... | null | https://raw.githubusercontent.com/esl/erlang-web/2e5c2c9725465fc5b522250c305a9d553b3b8243/lib/eptic-1.4.1/src/e_error.erl | erlang | compliance with the License. You should have received a copy of the
retrieved via the world wide web at -consulting.com/.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
---------------------------------... | The contents of this file are subject to the Erlang Web Public License ,
Version 1.0 , ( the " License " ) ; you may not use this file except in
Erlang Web Public License along with this software . If not , it can be
Software distributed under the License is distributed on an " AS IS "
The Initial Developer o... |
cb0cf91d81e542f6a086ad4bb3b125769c6d6c5ccc4825819f1293fc4293db7c | MLstate/opalang | topologicSort.ml |
Copyright © 2011 , 2012 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be us... | null | https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/ocamllib/libbase/topologicSort.ml | ocaml | depends
Creation des environnements
se dire visité
visiter les voisins
StringMap.iter visite map_dep; : posait probleme
acceder aux listes des index not_referenced, et de l'association ordered, elt
since the order has been done, there are no loop
this shorcut gives a big speedup |
Copyright © 2011 , 2012 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be us... |
9d3eeb6806c62b966abca889e9d66bff246ad452a4807a339d22ab228d4b3e0b | mirage/ocaml-cow | atom.ml |
* Copyright ( c ) 2010 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | null | https://raw.githubusercontent.com/mirage/ocaml-cow/44cdd5bb66c7096ba94aeb311474cd3f3a3cf1fa/src/atom.ml | ocaml |
* Copyright ( c ) 2010 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | |
b07ed024ae02485477c24fa3fc801c38edfd62e84ce24292398142bf28b3a11c | hidaris/thinking-dumps | compile.rkt | #lang racket
(provide (all-defined-out))
;; Expr -> Asm
(define (compile e)
`(entry
,@(compile-e e)
ret))
;; Expr -> Asm
(define (compile-e e)
(match e
[(? integer? i) `((mov rax ,i))]
[`(add1 ,e0)
(let ((c0 (compile-e e0)))
`(,@c0
(add rax 1)))]
[`(sub1 ,e0)
(let ((c... | null | https://raw.githubusercontent.com/hidaris/thinking-dumps/3fceaf9e6195ab99c8315749814a7377ef8baf86/compiler/con/compile.rkt | racket | Expr -> Asm
Expr -> Asm | #lang racket
(provide (all-defined-out))
(define (compile e)
`(entry
,@(compile-e e)
ret))
(define (compile-e e)
(match e
[(? integer? i) `((mov rax ,i))]
[`(add1 ,e0)
(let ((c0 (compile-e e0)))
`(,@c0
(add rax 1)))]
[`(sub1 ,e0)
(let ((c0 (compile-e e0)))
`(,@... |
43b720dfbf5635fdb2d6fa1fa204d76e6a52e83107a9492f8b2199546245d1e0 | lgessler/glam | home.cljs | (ns glam.client.ui.home
(:require [com.fulcrologic.fulcro.components :as c :refer [defsc]]
[com.fulcrologic.fulcro.ui-state-machines :as sm]
[glam.models.session :as sn]
[glam.client.router :as r]
[glam.client.ui.login :refer [Login ui-login]]
[glam.client.u... | null | https://raw.githubusercontent.com/lgessler/glam/f2542f2b3e87e3c1b46765dab033bf2b68c14d11/src/main/glam/client/ui/home.cljs | clojure | (ns glam.client.ui.home
(:require [com.fulcrologic.fulcro.components :as c :refer [defsc]]
[com.fulcrologic.fulcro.ui-state-machines :as sm]
[glam.models.session :as sn]
[glam.client.router :as r]
[glam.client.ui.login :refer [Login ui-login]]
[glam.client.u... | |
50808585ac272215dddda066d44fa53ab29ef4b0bea7415b750f4356f445d49b | mbj/mhs | Test.hs | # LANGUAGE TemplateHaskell #
module Main (main) where
import System.IO (IO)
import qualified Devtools
main :: IO ()
main = Devtools.main $$(Devtools.readDependencies [Devtools.Target "db-migrations"])
| null | https://raw.githubusercontent.com/mbj/mhs/c061ae019087ce243279a017258ec859432bd4d6/db-migrations/test/Test.hs | haskell | # LANGUAGE TemplateHaskell #
module Main (main) where
import System.IO (IO)
import qualified Devtools
main :: IO ()
main = Devtools.main $$(Devtools.readDependencies [Devtools.Target "db-migrations"])
| |
cb9942db36b81ed92eb06ffed0148f6c37550f31f5bc94be562fe98eb996ddfd | dktr0/estuary | CodeWidgetOptions.hs | # LANGUAGE DeriveGeneric , OverloadedStrings #
module Estuary.Types.CodeWidgetOptions where
import GHC.Generics
import Data.Aeson
data CodeWidgetOptions =
Nomenu | -- "nomenu"
Noeval | -- "noeval"
Noerrors | -- "noerrors"
" fluxus "
CentreAlign | -- "centre" or "center"
RightAlign | -- "right"
" fonts... | null | https://raw.githubusercontent.com/dktr0/estuary/df89edf4b5b48a2a532152505201d39ff59ae51f/common/src/Estuary/Types/CodeWidgetOptions.hs | haskell | "nomenu"
"noeval"
"noerrors"
"centre" or "center"
"right" | # LANGUAGE DeriveGeneric , OverloadedStrings #
module Estuary.Types.CodeWidgetOptions where
import GHC.Generics
import Data.Aeson
data CodeWidgetOptions =
" fluxus "
" fontsize 2 "
deriving (Show, Eq, Generic)
instance ToJSON CodeWidgetOptions where
toEncoding = genericToEncoding defaultOptions
instance F... |
1e7efa4cf70377b816cc15fcdb29f417b26e2deff8b50de084f29ed35ba33f2d | yogthos/migratus | edn.clj | (ns migratus.test.migration.edn
(:require [clojure.java.io :as io]
[clojure.test :refer :all]
[migratus.core :as core]
[migratus.migration.edn :refer :all]
migratus.mock
[migratus.protocols :as proto]
[migratus.utils :as utils])
(:import java.i... | null | https://raw.githubusercontent.com/yogthos/migratus/4d05dad24982facca2e62bbdf2f77484f221150e/test/migratus/test/migration/edn.clj | clojure | `lein test` thinks it needs to test this namespace, so make sure
that it exists when we're done
unload the namespace before each test to ensure that it's loaded
appropriately by the edn-migration code. | (ns migratus.test.migration.edn
(:require [clojure.java.io :as io]
[clojure.test :refer :all]
[migratus.core :as core]
[migratus.migration.edn :refer :all]
migratus.mock
[migratus.protocols :as proto]
[migratus.utils :as utils])
(:import java.i... |
498b16ebf02dc7d78a7268f39a2dc412260bc2ab049b490170e01198df648572 | ghc/packages-base | Fix.hs | # LANGUAGE Trustworthy #
-----------------------------------------------------------------------------
-- |
Module : Control . . Fix
Copyright : ( c ) 2001 ,
( c ) Oregon Graduate Institute of Science and Technology , 2002
-- License : BSD-style (see the file libraries/base/LI... | null | https://raw.githubusercontent.com/ghc/packages-base/52c0b09036c36f1ed928663abb2f295fd36a88bb/Control/Monad/Fix.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : experimental
Portability : portable
---------------------------------------------------------------------------
| Monads having fixed poin... | # LANGUAGE Trustworthy #
Module : Control . . Fix
Copyright : ( c ) 2001 ,
( c ) Oregon Graduate Institute of Science and Technology , 2002
Monadic fixpoints .
For a detailed discussion , see thesis ,
/Value Recursion in Monadic Computations/ , Oregon Graduate Institute , ... |
ff3349d49e7e98c3c5ae5a04a35a34e59ae10d8d147921c56800798ead3112f1 | bsansouci/bsb-native | odoc_str.ml | (***********************************************************************)
(* *)
(* OCamldoc *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/bsansouci/bsb-native/9a89457783d6e80deb0fba9ca7372c10a768a9ea/vendor/ocaml/ocamldoc/odoc_str.ml | ocaml | *********************************************************************
OCamldoc
... | , projet Cristal , INRIA Rocquencourt
Copyright 2001 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
module Name = Odoc_name
let string_of_va... |
95257b296679a4874081ed87d097add16627cc6effc3541569f409c1070da1dd | aerosol/signerl | map_pm_sup.erl | $ I d : map_pm_sup.erl , v 1.1 2005/02/13 00:42:12 vances Exp $
%%%---------------------------------------------------------------------
2005 Motivity Telecom
@author < > [ ]
%%% @end
%%%
Copyright ( c ) 2005 , Motivity Telecom
%%%
%%% All rights reserved.
%%%
%%% Redistribution and use in source and bin... | null | https://raw.githubusercontent.com/aerosol/signerl/b85bdc8e2a740afd80c64006e777269496aaa5dc/MAP/src/map_pm_sup.erl | erlang | ---------------------------------------------------------------------
@end
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
- Redistributions of source code must retain the above copyright
... | $ I d : map_pm_sup.erl , v 1.1 2005/02/13 00:42:12 vances Exp $
2005 Motivity Telecom
@author < > [ ]
Copyright ( c ) 2005 , Motivity Telecom
- Neither the name of Motivity Telecom nor the names of its
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
OWNER OR ANY DIRECT , ... |
022823d770de4981b3931fa9d6be4ef748f33d8dfbb15e85391a37823b534297 | LambdaScientist/CLaSH-by-example | TestClks_n_regs_4.hs | # LANGUAGE NoImplicitPrelude #
# LANGUAGE RecordWildCards #
module ClocksAndRegisters.TestClks_n_regs_4 where
import CLaSH.Prelude
import SAFE.TestingTools
import SAFE.CommonClash
import ClocksAndRegisters.Models.Clks_n_regs_4
import Text.PrettyPrint.HughesPJClass
import GHC.Generics (Generic)
import Control.De... | null | https://raw.githubusercontent.com/LambdaScientist/CLaSH-by-example/e783cd2f2408e67baf7f36c10398c27036a78ef3/HaskellClashExamples/src/ClocksAndRegisters/TestClks_n_regs_4.hs | haskell | -TESTING
-------------------------------------- | # LANGUAGE NoImplicitPrelude #
# LANGUAGE RecordWildCards #
module ClocksAndRegisters.TestClks_n_regs_4 where
import CLaSH.Prelude
import SAFE.TestingTools
import SAFE.CommonClash
import ClocksAndRegisters.Models.Clks_n_regs_4
import Text.PrettyPrint.HughesPJClass
import GHC.Generics (Generic)
import Control.De... |
d77d57309b1f5bea3859685a365f84a7de69e33f47b029cd6fa364ecb788ca84 | bytekid/mkbtt | cPC.ml | Copyright 2010
* GNU Lesser General Public License
*
* This file is part of MKBtt .
*
* is free software : you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation , either version 3 of the License , or (... | null | https://raw.githubusercontent.com/bytekid/mkbtt/c2f8e0615389b52eabd12655fe48237aa0fe83fd/src/mkbtt/cpc/cPC.ml | ocaml | * Provides functions to switch between critical pair criteria
** SUBMODULES *********************************************************
** FUNCTIONS **********************************************************
filter_all | Copyright 2010
* GNU Lesser General Public License
*
* This file is part of MKBtt .
*
* is free software : you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation , either version 3 of the License , or (... |
99828ac985efd9bf13cfd309428e70a4c77073033b5354815d3fcbbc15fc8746 | rems-project/cerberus | solver.ml | module CF = Cerb_frontend
open IndexTerms
open BaseTypes
module SymMap=Map.Make(Sym)
module IT = IndexTerms
module LC = LogicalConstraints
open LogicalConstraints
open List
open Pp
open Global
open LogicalPredicates
module LCSet = Set.Make(LC)
module BT = BaseTypes
let random_seed = ref 1
let slow_smt_file =
let o... | null | https://raw.githubusercontent.com/rems-project/cerberus/965d4e46ae42e85141c2b32a647f11c6944493e3/backend/cn/solver.ml | ocaml | all our symbols are created with strings
rubbish hash function
for caching the translation
for translating back
lists are represented as uninterpreted sorts
ensure datatype added
something's funny with these recognizers. assume in same order as constructors
let q =
Z3.Quantifier.mk_forall_const cont... | module CF = Cerb_frontend
open IndexTerms
open BaseTypes
module SymMap=Map.Make(Sym)
module IT = IndexTerms
module LC = LogicalConstraints
open LogicalConstraints
open List
open Pp
open Global
open LogicalPredicates
module LCSet = Set.Make(LC)
module BT = BaseTypes
let random_seed = ref 1
let slow_smt_file =
let o... |
65b67d16da0bdaddb2a490042ba9fb6839b74c19f5dc9ee7b09926506b143a3a | gedge-platform/gedge-platform | rabbit_exchange_type_direct.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rabbit_exchange_type_direct).
-include_li... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbit/src/rabbit_exchange_type_direct.erl | erlang | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_exchange_type_direct).
-include_lib("rab... | |
e582d798bf5297c5ed4dda2924ca63df1348fbfa01f304de8b21765591f74282 | themattchan/advent-of-code | day6.hs | #! /usr/bin/env runhaskell -i../../
# LANGUAGE BangPatterns , PatternGuards #
import Utils
import qualified Data.Map.Strict as M
import qualified Data.Vector.Unboxed as V
import Debug.Trace
solve :: [Int] -> (Int, Int)
solve = findRepeat . iterate redistribute . V.fromList
findRepeat :: (Ord a) => [a] -> (Int, Int)
... | null | https://raw.githubusercontent.com/themattchan/advent-of-code/0b08a4fbadf7e713d40044523af3debb7d0cb6b9/2017/day6/day6.hs | haskell | ------------------------------------------------------------------------------
Lists only
BROKEN
TODO these numbers are wrong
newIdxOfZero = (oldIndexOfZero + (maxE - len)) `mod` len
order = uncurry (++) . swap . span ((/= 0) . fst) | #! /usr/bin/env runhaskell -i../../
# LANGUAGE BangPatterns , PatternGuards #
import Utils
import qualified Data.Map.Strict as M
import qualified Data.Vector.Unboxed as V
import Debug.Trace
solve :: [Int] -> (Int, Int)
solve = findRepeat . iterate redistribute . V.fromList
findRepeat :: (Ord a) => [a] -> (Int, Int)
... |
2f7d4822cf86717ddcb42fe703a0263f499b9eabfd1388d5c8895cd4fceba2c5 | digital-asset/ghc | tc205.hs | # LANGUAGE TypeOperators , GADTs , KindSignatures #
Tests infix type constructors in GADT declarations
module ShouldCompile where
import Data.Kind
infix 1 `DArrowX` -- (->) has precedence 0
data DArrowX :: Type -> Type -> Type where
First :: a `DArrowX` a' -> (a,b) `DArrowX` (a',b)
| null | https://raw.githubusercontent.com/digital-asset/ghc/323dc6fcb127f77c08423873efc0a088c071440a/testsuite/tests/typecheck/should_compile/tc205.hs | haskell | (->) has precedence 0 | # LANGUAGE TypeOperators , GADTs , KindSignatures #
Tests infix type constructors in GADT declarations
module ShouldCompile where
import Data.Kind
data DArrowX :: Type -> Type -> Type where
First :: a `DArrowX` a' -> (a,b) `DArrowX` (a',b)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.