_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 |
|---|---|---|---|---|---|---|---|---|
84634ddf586e67008b2905ae0545ef697b6ec196c0a246c4e9002f8d09fd7446 | binsec/binsec | dba_visitor.mli | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2022
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/binsec/22ee39aad58219e8837b6ba15f150ba04a498b63/src/dba/dba_visitor.mli | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2022
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
6bb5605d4be41d0e6a1b2b50576704124ce6e4eafbed1800b588b0c34e05bf20 | sifbiri/project-resources-operations | projects.cljs | (ns app.ui.projects
(:require
;[com.fulcrologic.semantic-ui.elements.input :as ui-input]
[app.ui.users :as users]
[app.ui.workplans :as workplans]
[com.fluxym.model.account :as account]
[app.model.project :as project]
[com.fulcrologic.semantic-ui... | null | https://raw.githubusercontent.com/sifbiri/project-resources-operations/b08adb09ef03f123ca7ad19ec1c2bdc070a66291/src/main/app/ui/projects.cljs | clojure | [com.fulcrologic.semantic-ui.elements.input :as ui-input]
["react-country-flags" :as Flag]
["react-flags" :as Flag]
["react-collapsing-table" :as ReactCollapsingTable]
["react-calendar-timeline" :as TimeLine]
semantic comoponents
[com.fulcrologic.semantic-ui.button.ui-button :refer [ui-button]]
[com.fulcrologic.semant... | (ns app.ui.projects
(:require
[app.ui.users :as users]
[app.ui.workplans :as workplans]
[com.fluxym.model.account :as account]
[app.model.project :as project]
[com.fulcrologic.semantic-ui.elements.input.ui-input :refer [ui-input]]
[com.fulcrologic.semantic-ui.elements.icon.ui-ic... |
b748c28af419a67489c423e0b5fc7f2734a70238803d625c1e8b983932a7bc3c | yigitozkavci/parquet-hs | Enums.hs | module Parquet.Types.Enums
( -- * Type definitions
ColumnCryptoMetaData (..),
ColumnOrder (..),
CompressionCodec (..),
ConvertedType (..),
Encoding (..),
EncryptionAlgorithm (..),
FieldRepetitionType (..),
LogicalType (..),
PageType (..),
Type (..),
)
where
-----------------... | null | https://raw.githubusercontent.com/yigitozkavci/parquet-hs/eb5904c066092966a8a291dcdbd06088fe329586/src/Parquet/Types/Enums.hs | haskell | * Type definitions
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
---------------------------------------------------------------------... | module Parquet.Types.Enums
ColumnCryptoMetaData (..),
ColumnOrder (..),
CompressionCodec (..),
ConvertedType (..),
Encoding (..),
EncryptionAlgorithm (..),
FieldRepetitionType (..),
LogicalType (..),
PageType (..),
Type (..),
)
where
import Parquet.Prelude
import Parquet.Type... |
41ecabb703acdc9bb792520b52411a8e05e613f163e3d5ece54ecd2ec33305ad | unnohideyuki/bunny | NameMangle.hs | module NameMangle where
import Symbol
{- modname: extracts Module name part from a varname -}
modname :: Id -> Id
modname = takeWhile (/= '.') -- todo: deeper module name
{- basename: extracts basename (= strip module name) from a varname -}
basename :: Id -> Id
basename s = drop (length (modname s) + 1) s... | null | https://raw.githubusercontent.com/unnohideyuki/bunny/501856ff48f14b252b674585f25a2bf3801cb185/compiler/src/NameMangle.hs | haskell | modname: extracts Module name part from a varname
todo: deeper module name
basename: extracts basename (= strip module name) from a varname
mangler function
basenameM: mangling version of basename
cls2dictNameM: generates dictionary name from a class name | module NameMangle where
import Symbol
modname :: Id -> Id
basename :: Id -> Id
basename s = drop (length (modname s) + 1) s
mangle :: Id -> Id
mangle = escapeId
modnameM : mangling version of modname
modnameM :: Id -> Id
modnameM = mangle . modname
basenameM :: Id -> Id
basenameM = mangle . basename
... |
2cea41380d5a2a3b540a4a9a5fb42cfccc4e9f4274819c6636ac2da7a187a473 | aspiwack/porcupine | LocationTree.hs | {-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveFoldable #-}
# LANGUAGE DeriveFunctor #
# LANGUAGE DeriveGeneric #
{-# LANGUAGE DeriveTraversable #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes ... | null | https://raw.githubusercontent.com/aspiwack/porcupine/23dcba1523626af0fdf6085f4107987d4bf718d7/porcupine-core/src/Data/Locations/LocationTree.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveFoldable #
# LANGUAGE DeriveTraversable #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeSynonymInstances #
# LANGUAGE DataKinds #
| Abstraction layer around the filesystem, so t... | # LANGUAGE DeriveFunctor #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE TupleSections #
# LANGUAGE TypeOperators #
# OPTIONS_GHC -Wall #
# OPTIONS_GHC -fno - warn - type - defaults #
module Data.Locations.LocationTree
(
... |
d9182dc537df902d987eb8171b9baeb7eb15a3ad43aca37c6c93eb560714f855 | stuartsierra/mapgraph | project.clj | (defproject com.stuartsierra/mapgraph "0.2.1"
:description "Basic in-memory graph database of maps with links"
:url ""
:license {:name "The MIT License"
:url ""}
:dependencies [[org.clojure/clojure "1.7.0"]]
:profiles
{:dev {:dependencies
[[com.datomic/datomic-free "0.9.5372"]
... | null | https://raw.githubusercontent.com/stuartsierra/mapgraph/15886ad6f2f5b1c49df0970c9cccc9e72f2afe6e/project.clj | clojure | (defproject com.stuartsierra/mapgraph "0.2.1"
:description "Basic in-memory graph database of maps with links"
:url ""
:license {:name "The MIT License"
:url ""}
:dependencies [[org.clojure/clojure "1.7.0"]]
:profiles
{:dev {:dependencies
[[com.datomic/datomic-free "0.9.5372"]
... | |
26851bfe8f25030622027905b2297e1ef1efb321c7ca2da9ddd8875283773cf9 | noinia/hgeometry | EarClipSpec.hs | {-# LANGUAGE OverloadedStrings #-}
module Algorithms.Geometry.PolygonTriangulation.EarClipSpec (spec) where
import Algorithms.Geometry.PolygonTriangulation.EarClip
import Control.Lens
import Geometry
import Geometry.PolygonSpec ()
import qualified Geometry.Triangle as Tria... | null | https://raw.githubusercontent.com/noinia/hgeometry/89cd3d3109ec68f877bf8e34dc34b6df337a4ec1/hgeometry/test/src/Algorithms/Geometry/PolygonTriangulation/EarClipSpec.hs | haskell | # LANGUAGE OverloadedStrings #
spec :: Spec
spec = do
it "sum (map area (earClip polygon)) == area polygon" $ do
property $ \(poly :: SimplePolygon () R) ->
let g = earClip poly
trigs = map (polygonTrig poly) g
in sum (map Triangle.area trigs) === area poly
it "sum (map area (earClip... | module Algorithms.Geometry.PolygonTriangulation.EarClipSpec (spec) where
import Algorithms.Geometry.PolygonTriangulation.EarClip
import Control.Lens
import Geometry
import Geometry.PolygonSpec ()
import qualified Geometry.Triangle as Triangle
import qualified Data.Vector ... |
8c5992f6be52e466fbcf09be6e5458b8280f604cdffdb5247f911cc70ec8e224 | tolysz/ghcjs-stack | System.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.System
Copyright : 2007 - 2008
--
-- Maintainer :
-- Portability : portable
--
Cabal often needs to do slightly different thing... | null | https://raw.githubusercontent.com/tolysz/ghcjs-stack/83d5be83e87286d984e89635d5926702c55b9f29/special/cabal-next/Cabal/Distribution/System.hs | haskell | # LANGUAGE DeriveDataTypeable #
---------------------------------------------------------------------------
|
Module : Distribution.System
Maintainer :
Portability : portable
probably know about the 'System.Info.os' however using that is very
do not agree on using the same strings for the same platfor... | # LANGUAGE DeriveGeneric #
Copyright : 2007 - 2008
Cabal often needs to do slightly different things on specific platforms . You
inconvenient because it is a string and different implementations
particular see the controversy over \"windows\ " vs \"mingw32\ " ) . So to make it
module Distribution.Syste... |
73561215ce9585e9997dc1232fa5fb884e24e2e9ec7d5e2a70f196790f0daf59 | vlstill/hsExprTest | simple-1.ok.hs | f = (2^2)^2
| null | https://raw.githubusercontent.com/vlstill/hsExprTest/391fc823c1684ec248ac8f76412fefeffb791865/test/simple-1.ok.hs | haskell | f = (2^2)^2
| |
ef9d4352a7731721bcfd9775ee82cd19160bbf0a0213b20c2db60bdf6a5f4248 | facebookarchive/pfff | flag_parsing_clang.ml |
let verbose_lexing = ref false
let exn_when_lexical_error = ref true
let debug_lexer = ref false
| null | https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/lang_clang/parsing/flag_parsing_clang.ml | ocaml |
let verbose_lexing = ref false
let exn_when_lexical_error = ref true
let debug_lexer = ref false
| |
5c7575121612538750e5f3e10c2d56873a4255ee99c857585c17ba346b05e163 | clojure-garden/clojure-garden | translates_test.cljs | (ns platform.ui.i18n.translates-test
(:require
[cljs.test :refer [deftest testing is]]
[clojure.set :as set]
[platform.ui.i18n.translates :as sut]
[platform.ui.utils.string :refer [format]]))
(deftest dictionaries-test
(testing "all keys should be present in all dictionaries"
(let [dictionarie... | null | https://raw.githubusercontent.com/clojure-garden/clojure-garden/9c58ce33f91aeab5f7bd0d16647ecc450ba8967f/modules/frontend/test/src/platform/ui/i18n/translates_test.cljs | clojure | (ns platform.ui.i18n.translates-test
(:require
[cljs.test :refer [deftest testing is]]
[clojure.set :as set]
[platform.ui.i18n.translates :as sut]
[platform.ui.utils.string :refer [format]]))
(deftest dictionaries-test
(testing "all keys should be present in all dictionaries"
(let [dictionarie... | |
42eace4ad1abffcc444c54c9b40418c5e24345ed77b5e408189c542530812d48 | marcoheisig/Petalisp | coloring.lisp | © 2016 - 2023 - license : GNU AGPLv3 -*- coding : utf-8 -*-
(in-package #:petalisp.ir)
(defun compute-program-buffer-coloring (program)
"Returns a partitioning of all non-leaf buffers in PROGRAM into a list of
lists of buffers. Each list of buffers has the same color, meaning that
they can share the s... | null | https://raw.githubusercontent.com/marcoheisig/Petalisp/a1c85cf71da445ef9c7913cd9ddb5149373211a7/code/ir/coloring.lisp | lisp | currently don't care about this buffer in terms of liveness and
store the liveness of buffers at each task.
If there is just a single buffer of that shape and ntype, there
is no need to perform graph coloring. We simply mark it for
allocation.
coloring.
Mark the buffers of the current buffer group as being acti... | © 2016 - 2023 - license : GNU AGPLv3 -*- coding : utf-8 -*-
(in-package #:petalisp.ir)
(defun compute-program-buffer-coloring (program)
"Returns a partitioning of all non-leaf buffers in PROGRAM into a list of
lists of buffers. Each list of buffers has the same color, meaning that
they can share the s... |
b420d5a4fb3acc669918177764c240854452addfad1156ab192bc0f502a9dedd | footprintanalytics/footprint-web | dispatch_test.clj | (ns metabase.models.dispatch-test
(:require
[clojure.test :refer :all]
[metabase.mbql.util :as mbql.u]
[metabase.models.dispatch :as models.dispatch]
[metabase.models.interface :as mi]
[metabase.models.user :as user :refer [User]]
[metabase.test :as mt]
[toucan.db :as db]))
(defn- a-user []
(d... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/test/metabase/models/dispatch_test.clj | clojure | (ns metabase.models.dispatch-test
(:require
[clojure.test :refer :all]
[metabase.mbql.util :as mbql.u]
[metabase.models.dispatch :as models.dispatch]
[metabase.models.interface :as mi]
[metabase.models.user :as user :refer [User]]
[metabase.test :as mt]
[toucan.db :as db]))
(defn- a-user []
(d... | |
6fb28305335fd65645f09cea3ac1c4e326d0b2591514608695463fa0bdb65f9c | takikawa/racket-ppa | info.rkt | (module info setup/infotab (#%module-begin (define collection (quote multi)) (define build-deps (quote ("pict-snip-lib" "gui-doc" "pict-doc" "pict-lib" "racket-doc" "scribble-lib" "snip-lib"))) (define deps (quote ("base"))) (define update-implies (quote ("pict-snip-lib"))) (define pkg-desc "documentation part of \"pic... | null | https://raw.githubusercontent.com/takikawa/racket-ppa/26d6ae74a1b19258c9789b7c14c074d867a4b56b/share/pkgs/pict-snip-doc/info.rkt | racket | (module info setup/infotab (#%module-begin (define collection (quote multi)) (define build-deps (quote ("pict-snip-lib" "gui-doc" "pict-doc" "pict-lib" "racket-doc" "scribble-lib" "snip-lib"))) (define deps (quote ("base"))) (define update-implies (quote ("pict-snip-lib"))) (define pkg-desc "documentation part of \"pic... | |
40a5a1b89dcfb31f56864c00f7ab9c5b918460aec0bb25905be9453606bc11df | atlas-engineer/nyxt | stem.lisp | (in-package :analysis)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; The software is completely free for any purpose, unless notes at
;; the head of the program text indicates otherwise (which is
;; rare). In any case, the notes about licensing are never more
restrictive than the BSD License .
;
... | null | https://raw.githubusercontent.com/atlas-engineer/nyxt/39429c7f6b61b1d1723b998e831c173a4c3ddb9b/libraries/analysis/stem.lisp | lisp |
The software is completely free for any purpose, unless notes at
the head of the program text indicates otherwise (which is
rare). In any case, the notes about licensing are never more
Porter), this licensing arrangement has been endorsed by the
contributor, and it is therefore unnecessary to ask the contributor... | (in-package :analysis)
restrictive than the BSD License .
In every case where the software is not written by me (
The Porter Stemming Algorithm , somewhat mechanically hand translated to Common Lisp by
Feb 2002 . Most of the inline comments refer to the
original C code . At the time of this translat... |
c773381aa18b100620a534feeb8d4243c8a3aa1a1e5ca05b68772fc3a8015d86 | ocamllabs/opam-doc | opam_doc_config.mli | val index_file_path : unit -> string
val default_index_name : unit -> string
val filter_pervasives : unit -> bool
val clear_index : unit -> bool
val always_proceed : unit -> bool
val package_descr : unit -> string
val current_package : unit -> string
val base_uri : unit -> string
val summary : unit -> string option
val... | null | https://raw.githubusercontent.com/ocamllabs/opam-doc/4f5a332750177e3016b82d5923a681510335af4c/src/opam-doc-index/opam_doc_config.mli | ocaml | val index_file_path : unit -> string
val default_index_name : unit -> string
val filter_pervasives : unit -> bool
val clear_index : unit -> bool
val always_proceed : unit -> bool
val package_descr : unit -> string
val current_package : unit -> string
val base_uri : unit -> string
val summary : unit -> string option
val... | |
127a3f87480912ecbd9681094f4bf579edfa2399f8b3d2263f6fe6527f8f4026 | jeffshrager/biobike | match-tests.lisp | ;;; -*- mode: Lisp; Syntax: Common-Lisp; Package: user; -*-
;;; Author: JP Massar.
(in-package :cl-user)
(defmacro emtest (n pattern text result-list &optional (just-first? nil))
`(deftest ,(intern (format nil "EXACT-MATCH-~D" n))
(exact-matches ,pattern ,text ,just-first?) ,result-list
:c... | null | https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/Testing/match-tests.lisp | lisp | -*- mode: Lisp; Syntax: Common-Lisp; Package: user; -*-
Author: JP Massar.
JUST-FIRST? = T tests. |
(in-package :cl-user)
(defmacro emtest (n pattern text result-list &optional (just-first? nil))
`(deftest ,(intern (format nil "EXACT-MATCH-~D" n))
(exact-matches ,pattern ,text ,just-first?) ,result-list
:comparison #'equal :chapter :match))
(emtest 1 "" "whatever" nil)
(emtest 2 "" "what... |
4542f177f61a240a0123c2d2a170fb75fe78a31385dd72800b77965f9ec066af | xapi-project/xen-api | xapi_pool.mli |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... | null | https://raw.githubusercontent.com/xapi-project/xen-api/2abc3f4e0187c28901f8c9e03f7895af974a1893/ocaml/xapi/xapi_pool.mli | ocaml | * Module that defines API functions for Pool objects
* @group XenAPI functions
* Enable redo log, independently from HA
* Disable HA-independent redo log |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... |
7905b85a6cadd68b75c4304bdde89ef9f98a28aaacabc1c811f5c4604c5f5641 | mhwombat/som | housePricesSGM2.hs | {-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
This program builds a Self - generating Map ( SGM ) based on some ( fake )
housing prices . As the SGM learns the data , it builds a map of the
data . The set contains... | null | https://raw.githubusercontent.com/mhwombat/som/2480776b3000ed9ea5f5e395b50771e2c7f8aaa1/unused-examples/housePricesSGM2.hs | haskell | # LANGUAGE FlexibleContexts #
learning rate function
Here's the data.
It includes:
The numbers have been shuffled. | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
This program builds a Self - generating Map ( SGM ) based on some ( fake )
housing prices . As the SGM learns the data , it builds a map of the
data . The set contains up to 10 models , so it divides the pr... |
2da15d2a781858d84e7e35df7f7ea8762a0ccd9b95da1156bd9a77ab9bc03332 | SixtantIO/dydx-starkware | starkware_ecdsa.clj | (ns io.sixtant.dydx-starkware.starkware-ecdsa
"Starkware's variation on classic ECDSA, transcribed from reference impl[1].
They use a variant on RFC 6979 to generate a deterministic 'k' constant,
which I implemented separately[2] since it might be of general interest/use.
[1] -v3-python/blob/35bc6800d44d9f2d0... | null | https://raw.githubusercontent.com/SixtantIO/dydx-starkware/b78cf11c62f59c441acc18c5c4e8c438bdc5993d/src/io/sixtant/dydx_starkware/starkware_ecdsa.clj | clojure | elliptic.js library
nb called div-mod in dydx reference code
See invalid-signature? and sign -- this is the maximum value for both parts
of the signature, as well as for the message hash to sign.
These constraints are custom to their curve, I believe. I copied these
failure conditions directly from the reference ... | (ns io.sixtant.dydx-starkware.starkware-ecdsa
"Starkware's variation on classic ECDSA, transcribed from reference impl[1].
They use a variant on RFC 6979 to generate a deterministic 'k' constant,
which I implemented separately[2] since it might be of general interest/use.
[1] -v3-python/blob/35bc6800d44d9f2d0... |
00196da33ceb564c73627412f5b90386f49b5619d4737bba2b73789892d5eb70 | alanb2718/wallingford | integral-preprocessor-tests.rkt | #lang s-exp rosette
;; unit tests for integration preprocessor
(require rackunit rackunit/text-ui rosette/lib/roseunit)
(require "../reactive/integral-preprocessor.rkt")
(provide integral-preprocessor-tests)
; The only tests with various different expressions to integrate are integral-in-always and integral-with-exp... | null | https://raw.githubusercontent.com/alanb2718/wallingford/9dd436c29f737d210c5b87dc1b86b2924c0c5970/tests/integral-preprocessor-tests.rkt | racket | unit tests for integration preprocessor
The only tests with various different expressions to integrate are integral-in-always and integral-with-explict-variable-of-integration.
The other tests just use a constant (because arguably the other functionality being tested is independent of the symbolic integration functi... | #lang s-exp rosette
(require rackunit rackunit/text-ui rosette/lib/roseunit)
(require "../reactive/integral-preprocessor.rkt")
(provide integral-preprocessor-tests)
(define (atomic-expression-tests)
(test-case
"simple cases for symbolic integration -- expression is atomic"
(check equal? (symbolic-integral 2... |
f7486142cc03285acb89190bdd92cd81e87aae4911a3d321852cd381069a5ae8 | gtk2hs/gtk2hs | CairoSDL.hs | import qualified Graphics.UI.SDL as SDL
import Graphics.Rendering.Cairo
import Foreign.Ptr ( castPtr )
demo1 :: Render ()
demo1 = do
setSourceRGB 0 0 0
moveTo 100 100
lineTo 500 500
stroke
demo2 :: Render ()
demo2 = do
setSourceRGB 0 0 0
moveTo 500 100
lineTo 100 500
stroke
main = SDL.withInit [ SDL.... | null | https://raw.githubusercontent.com/gtk2hs/gtk2hs/0f90caa1dae319a0f4bbab76ed1a84f17c730adf/cairo/demo/gtk2/CairoSDL.hs | haskell | import qualified Graphics.UI.SDL as SDL
import Graphics.Rendering.Cairo
import Foreign.Ptr ( castPtr )
demo1 :: Render ()
demo1 = do
setSourceRGB 0 0 0
moveTo 100 100
lineTo 500 500
stroke
demo2 :: Render ()
demo2 = do
setSourceRGB 0 0 0
moveTo 500 100
lineTo 100 500
stroke
main = SDL.withInit [ SDL.... | |
6d9410dca174a4f069bad95b60e4b0227291a96549fe08cd2ffece9cb3eac2b1 | mattjbray/ocaml-decoders | main.ml | open OUnit2
type tree =
| Leaf of int
| Node of tree * tree
let jsonaf_decode_suite =
let open Decoders_jsonaf.Decode in
let decoder_test ~decoder ~input ~expected ?printer _test_ctxt =
match decode_string decoder input with
| Ok value ->
assert_equal value expected ?printer
| Error error ... | null | https://raw.githubusercontent.com/mattjbray/ocaml-decoders/37c7ff6ce4b89f64aae2fc427090959df1b6f992/test-jsonaf/main.ml | ocaml | open OUnit2
type tree =
| Leaf of int
| Node of tree * tree
let jsonaf_decode_suite =
let open Decoders_jsonaf.Decode in
let decoder_test ~decoder ~input ~expected ?printer _test_ctxt =
match decode_string decoder input with
| Ok value ->
assert_equal value expected ?printer
| Error error ... | |
8fe8b9a4479969db62f82b574dde0174b5dda968c5ebe7a3f1419d156a695421 | nh2/aesonbson | Instances.hs | {-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
# OPTIONS_GHC -fno - warn - orphans #
| Provides @ToJSON@ instances for BSON @Value@s and .
module Data.AesonBson.Instances where
import Data.Bson as BSON
import Data.Aeson.Types as AESON
import Data.AesonBson
instance ToJSON... | null | https://raw.githubusercontent.com/nh2/aesonbson/4f9f86b7efe49acc45fdb7d6905039c6b96c08fd/Data/AesonBson/Instances.hs | haskell | # LANGUAGE TypeSynonymInstances, FlexibleInstances # | # OPTIONS_GHC -fno - warn - orphans #
| Provides @ToJSON@ instances for BSON @Value@s and .
module Data.AesonBson.Instances where
import Data.Bson as BSON
import Data.Aeson.Types as AESON
import Data.AesonBson
instance ToJSON BSON.Value where
toJSON = aesonifyValue
|
74235a70d851b51d78c71880e32e3e61767af11a697e75de18875bac46042f14 | atlas-engineer/nyxt | history.lisp | SPDX - FileCopyrightText : Atlas Engineer LLC
SPDX - License - Identifier : BSD-3 - Clause
(in-package :nyxt)
(define-class history-file (files:data-file nyxt-lisp-file)
((files:base-path #p"history/default")
(files:name "history"))
(:export-class-name-p t)
(:accessor-name-transformer (class*:make-name-t... | null | https://raw.githubusercontent.com/atlas-engineer/nyxt/8d71ac1917d45da4d8ab500e5bdc2d1df4d5e68e/source/history.lisp | lisp | TODO: Export?
TODO: Remove with Nyxt 2.0?
TODO: For now we never increment the explicit-visits count. Maybe we
could use a new buffer slot to signal that the last load came from an
explicit request?
TODO: Or use current buffer last access? Or both?
WARNING: `htree:data-last-access' is slow, which is why we tak... | SPDX - FileCopyrightText : Atlas Engineer LLC
SPDX - License - Identifier : BSD-3 - Clause
(in-package :nyxt)
(define-class history-file (files:data-file nyxt-lisp-file)
((files:base-path #p"history/default")
(files:name "history"))
(:export-class-name-p t)
(:accessor-name-transformer (class*:make-name-t... |
5b0e002b2463f4196ce9f3ef8f82d9b53180190ce96760aa0cd3dd3ead832abe | mput/sicp-solutions | 3_17.rkt | #lang racket
Solution for exercise 3_17 .
(require compatibility/mlist)
(provide count-pairs)
(define (element-of-set? elm set)
(cond ((null? set) false)
((eq? elm (car set)) true)
(else (element-of-set? elm (cdr set)))))
(define (adjoin-set elm set)
(if (element-of-set? elm set)
set
(... | null | https://raw.githubusercontent.com/mput/sicp-solutions/fe12ad2b6f17c99978c8fe04b2495005986b8496/solutions/3_17.rkt | racket | #lang racket
Solution for exercise 3_17 .
(require compatibility/mlist)
(provide count-pairs)
(define (element-of-set? elm set)
(cond ((null? set) false)
((eq? elm (car set)) true)
(else (element-of-set? elm (cdr set)))))
(define (adjoin-set elm set)
(if (element-of-set? elm set)
set
(... | |
173e5ccba31f98da560a863a5dd7b1d2bbe2c2e185ec59c94615400c01664e84 | vyorkin/tiger | env.mli | module T = Type
module L = Location
module S = Symbol
module ST = Symbol_table
type access
type ventry =
| VarEntry of T.t
| FunEntry of
T.t list * (** types of the formal parameters *)
T.t (** type of the result returned by the function (or unit) **)
[@@deriving show]
type venv = ventry ST.t
type te... | null | https://raw.githubusercontent.com/vyorkin/tiger/54dd179c1cd291df42f7894abce3ee9064e18def/chapter5/lib/env.mli | ocaml | * types of the formal parameters
* type of the result returned by the function (or unit) *
* Type-level environemnt
* Term-level (value) environment
* AST traversal path
* "Inside a loop" marker *
* Create a new environment
* Push the given expression to the [t.path] stack
* Set the "inside a loop" marker
* Cont... | module T = Type
module L = Location
module S = Symbol
module ST = Symbol_table
type access
type ventry =
| VarEntry of T.t
| FunEntry of
[@@deriving show]
type venv = ventry ST.t
type tenv = T.t ST.t
type t = {
tenv : tenv;
venv : venv;
path : (Syntax.expr L.t) list;
loop : S.t option;
}
val mk : unit ... |
09754402d1570d0b872d9cfe061e291abbe98c29250bf22c5660cd1258e7e9a7 | mirage/mirage | mirage_impl_random.ml | open Functoria
open Mirage_impl_mclock
open Mirage_impl_time
type random = RANDOM
let random = Type.v RANDOM
let rng ?(time = default_time) ?(mclock = default_monotonic_clock) () =
let packages =
[
package ~min:"0.8.0" ~max:"0.12.0" "mirage-crypto-rng-mirage";
package ~min:"3.0.0" ~max:"4.0.0" "mir... | null | https://raw.githubusercontent.com/mirage/mirage/2a110ddf29cea34f93681e95702935ab4eeb0b69/lib/mirage/impl/mirage_impl_random.ml | ocaml | open Functoria
open Mirage_impl_mclock
open Mirage_impl_time
type random = RANDOM
let random = Type.v RANDOM
let rng ?(time = default_time) ?(mclock = default_monotonic_clock) () =
let packages =
[
package ~min:"0.8.0" ~max:"0.12.0" "mirage-crypto-rng-mirage";
package ~min:"3.0.0" ~max:"4.0.0" "mir... | |
f5bc61598dd3af90a2944a6e6f115f9e4057d62a9c1b29d4ea5667914d95751a | cacay/regexp | Helpers.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE UndecidableInstances #
-- | Helper functions for testing.
module Helpers where
import GHC.Generics
import Test.QuickCheck.Arbitrary
import Test.QuickCheck.Gen
import Test.SmallCheck... | null | https://raw.githubusercontent.com/cacay/regexp/25fd123edb00ce0dbd8b6fd6732a7aeca37e4a47/test/Helpers.hs | haskell | | Helper functions for testing. | # LANGUAGE DeriveGeneric #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE UndecidableInstances #
module Helpers where
import GHC.Generics
import Test.QuickCheck.Arbitrary
import Test.QuickCheck.Gen
import Test.SmallCheck.Series
| A finite data type wi... |
c552c7fac77f14a7908d0fe94213e6e32d9deeb227469f7d01cdaae5b69ac57c | binsec/binsec | lreader.ml | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2022
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/binsec/8ed9991d36451a3ae7487b966c4b38acca21a5b3/src/disasm/lreader.ml | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2022
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
c8b037680f888b8d9a0bcef239a4a3b1004bbf8ecdd487244ade340c7f282d74 | couchbase/chronicle | chronicle_config_rsm.erl | @author Couchbase < >
2021 Couchbase , 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, sof... | null | https://raw.githubusercontent.com/couchbase/chronicle/9cbda4a8629c2325941209a9f2972950e669c49f/src/chronicle_config_rsm.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing per... | @author Couchbase < >
2021 Couchbase , Inc.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(chronicle_config_rsm).
-include("chronicle.hrl").
-export([get_config/1, get_cluster_info/1, get_peers/1, check_quoru... |
48cfec085bcf01974df671b5ac63bbcf91e536e5e2c74e9558fd76806f25ef5b | slepher/lenses | make_lenses.erl | %%%-------------------------------------------------------------------
@author < >
( C ) 2017 ,
%%% @doc
%%%
%%% @end
Created : 4 Dec 2017 by < >
%%%-------------------------------------------------------------------
-module(make_lenses).
%% API
-export([parse_transform/2]).
%%%======================... | null | https://raw.githubusercontent.com/slepher/lenses/3f979746e2c570d4808cce7106ac8b2110eed5c1/src/make_lenses.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API
===================================================================
API
===================================================================
-------------------------... | @author < >
( C ) 2017 ,
Created : 4 Dec 2017 by < >
-module(make_lenses).
-export([parse_transform/2]).
parse_transform(Forms, Opts) ->
LensLineRecs =
lists:foldl(
fun({attribute, Pos, make_lenses, LensesWithOpts}, Acc) ->
[{Pos, LensesWithOpts}|Acc];
... |
f7db504eb1a4e71722d9a9c3739bdc0b4805b7116ca4146f42976e06af890160 | chaoxu/fancy-walks | C.hs | {-# OPTIONS_GHC -O2 #-}
import Data.List
import Data.Maybe
import Data.Char
import Data.Array
import Data.Int
import Data.Ratio
import Data.Bits
import Data.Function
import Data.Ord
import Control.Monad.State
import Control.Monad
import Control.Applicative
import Data.ByteString.Char8 (ByteString)
import qualified Dat... | null | https://raw.githubusercontent.com/chaoxu/fancy-walks/952fcc345883181144131f839aa61e36f488998d/code.google.com/codejam/Google%20Code%20Jam%202010/Round%203/C.hs | haskell | # OPTIONS_GHC -O2 #
sum $ map (^2)[f..t] - e^2 |
import Data.List
import Data.Maybe
import Data.Char
import Data.Array
import Data.Int
import Data.Ratio
import Data.Bits
import Data.Function
import Data.Ord
import Control.Monad.State
import Control.Monad
import Control.Applicative
import Data.ByteString.Char8 (ByteString)
import qualified Data.ByteString.Char8 as BS... |
198365d7f81264b76b43b54ef01ea2cbf9b5edda5dcfc63278c4c0d7ed29988e | chyanju/Picus | r1cs-z3-simple-optimizer.rkt | #lang rosette
; this contains a list of simple and basic optimization steps
- add p related definition and replace p
- remove * 1 in mul
; - remove +0 in add
; - remove -0 in sub
; - rewrite *x as x
; - rewrite -x as -x
; - rewrite +x as x
- replace with 1
; - rewrite 0 = -x mod p to 0 = x mod ... | null | https://raw.githubusercontent.com/chyanju/Picus/b88dc3e0092f50879d73de1efd49f3c37ad94405/picus/optimizers/r1cs-z3-simple-optimizer.rkt | racket | this contains a list of simple and basic optimization steps
- remove +0 in add
- remove -0 in sub
- rewrite *x as x
- rewrite -x as -x
- rewrite +x as x
- rewrite 0 = -x mod p to 0 = x mod p (also -x = 0)
- partial evaluation: compute concrete results, e.g., 0*0 => 0
command level
(note) don't o... | #lang rosette
- add p related definition and replace p
- remove * 1 in mul
- replace with 1
- ( fixme ) current only modify 0* ... *x to 0
(require
(prefix-in tokamak: "../tokamak.rkt")
(prefix-in utils: "../utils.rkt")
(prefix-in config: "../config.rkt")
(prefix-in r1cs: "../r1cs-gra... |
2d2cd17b8e4f01bcefa61ca8be49385c3fb4dfce69e2a19e30b4caabb675017a | starbelly/erl_ex | erl_ex.erl | -module(erl_ex).
-export([add/2, from_json/1, to_json/1]).
add(FloatBin1, FloatBin2) ->
D1 = 'Elixir.Decimal':new(FloatBin1),
D2 = 'Elixir.Decimal':new(FloatBin2),
D3 = 'Elixir.Decimal':add(D1, D2),
'Elixir.Decimal':to_string(D3).
to_json(Map) ->
'Elixir.Jason':encode(Map).
from_json(Json) ->
... | null | https://raw.githubusercontent.com/starbelly/erl_ex/43b8a824bc25b0af763386ce0428d864924edb8a/src/erl_ex.erl | erlang | -module(erl_ex).
-export([add/2, from_json/1, to_json/1]).
add(FloatBin1, FloatBin2) ->
D1 = 'Elixir.Decimal':new(FloatBin1),
D2 = 'Elixir.Decimal':new(FloatBin2),
D3 = 'Elixir.Decimal':add(D1, D2),
'Elixir.Decimal':to_string(D3).
to_json(Map) ->
'Elixir.Jason':encode(Map).
from_json(Json) ->
... | |
f559c6f21d4594dc6ed832867d2afacbfd3ad08de563d847a88d4070304c9c2d | IanConnolly/distributed-process-aws | ScaleEcho.hs | # LANGUAGE TemplateHaskell #
import System.IO (hFlush, stdout)
import System.Environment (getArgs)
import Control.Monad (unless, forever)
import Control.Monad.IO.Class (liftIO)
import Control.Distributed.Process (Process, expect)
import Control.Distributed.Process.Closure (remotable, mkClosure)
import Control.Distribu... | null | https://raw.githubusercontent.com/IanConnolly/distributed-process-aws/60eb2b68de410e1511845943d44aecafca83a713/demos/ScaleEcho.hs | haskell | Pass execution to 'onVmMain' if we are running on the VM
Find the specified virtual machine
Run the echo client proper | # LANGUAGE TemplateHaskell #
import System.IO (hFlush, stdout)
import System.Environment (getArgs)
import Control.Monad (unless, forever)
import Control.Monad.IO.Class (liftIO)
import Control.Distributed.Process (Process, expect)
import Control.Distributed.Process.Closure (remotable, mkClosure)
import Control.Distribu... |
1d7f05f9e7e5047c7dfbe8bb8860edd306b725fe19647b5ff84ae2cdae056f18 | Dexterminator/imperimetric | system_conversions.clj | (ns imperimetric.convert.system-conversions
(:require [imperimetric.convert.precision :refer [significant-digits default-precision]]
[imperimetric.convert.convert-str :refer [convert-str convert-units]]))
(def english-systems #{:us :imperial})
(def english-units #{:mile :yard :foot :inch :pound :oz :sqmi... | null | https://raw.githubusercontent.com/Dexterminator/imperimetric/57e975c470490724f69cc43c2f5d0fa2359745d0/src/clj/imperimetric/convert/system_conversions.clj | clojure | Metric | (ns imperimetric.convert.system-conversions
(:require [imperimetric.convert.precision :refer [significant-digits default-precision]]
[imperimetric.convert.convert-str :refer [convert-str convert-units]]))
(def english-systems #{:us :imperial})
(def english-units #{:mile :yard :foot :inch :pound :oz :sqmi... |
7e29a0c17151b4005579f4cb92ecfdfbcd4a3ace451677881aaac09f716fe8af | janestreet/merlin-jst | location_aux.mli | { { { COPYING * (
This file is part of Merlin , an helper for ocaml editors
Copyright ( C ) 2013 - 2015 < frederic.bour(_)lakaban.net >
refis.thomas(_)gmail.com >
< simon.castellan(_)iuwt.fr >
Permission is hereby granted , free... | null | https://raw.githubusercontent.com/janestreet/merlin-jst/0152b4e8ef1b7cd0ddee2873aa1860a971585391/src/ocaml/parsing/location_aux.mli | ocaml | * [compare l1 l2] compares start positions, if equal compares end positions
* Return the smallest location covered by both arguments,
ghost if both are ghosts
* Filter valid errors, log invalid ones
* {1 Dump} | { { { COPYING * (
This file is part of Merlin , an helper for ocaml editors
Copyright ( C ) 2013 - 2015 < frederic.bour(_)lakaban.net >
refis.thomas(_)gmail.com >
< simon.castellan(_)iuwt.fr >
Permission is hereby granted , free... |
9557860f59a1882f6489fad7b3961bec0efa8f221bad7f827d744031ad8f77af | lilactown/punk | deps.cljs | {:npm-deps
{:ws "^6.1.2"}}
| null | https://raw.githubusercontent.com/lilactown/punk/0c6e529429837c00958d41e09fd672f49778dedf/adapter-node/src/deps.cljs | clojure | {:npm-deps
{:ws "^6.1.2"}}
| |
009001018a7820cce4ab4b36582509e4f433a03cfde697e22c5e0d10579501ff | BoeingX/haskell-programming-from-first-principles | IdentityExerciseSpec.hs | module Applicative.ApplicativeInUse.IdentityExerciseSpec where
import Test.Hspec
import Applicative.ApplicativeInUse.IdentityExercise
spec :: Spec
spec = do
describe "Test Identity" $ do
it "const <$> Identity [1, 2, 3] <*> Identity [9, 9, 9]" $ do
const <$> Identity [1, 2, 3] <*> Identity [9,... | null | https://raw.githubusercontent.com/BoeingX/haskell-programming-from-first-principles/ffb637f536597f552a4e4567fee848ed27f3ba74/test/Applicative/ApplicativeInUse/IdentityExerciseSpec.hs | haskell | module Applicative.ApplicativeInUse.IdentityExerciseSpec where
import Test.Hspec
import Applicative.ApplicativeInUse.IdentityExercise
spec :: Spec
spec = do
describe "Test Identity" $ do
it "const <$> Identity [1, 2, 3] <*> Identity [9, 9, 9]" $ do
const <$> Identity [1, 2, 3] <*> Identity [9,... | |
a7bd5f0873fb0258a5fd2f812827817315bf819e58cd55f0036ebb172fb7db1b | ocaml-multicore/parafuzz | pingpong.ml | (* TEST
* hasunix
include unix
** bytecode
** native
*)
let r = ref (Some 0)
let () = Gc.minor ()
let rec even lim put =
match !r with
| Some n when n = lim -> ()
| (Some n) when n mod 2 == 0 ->
let next = Some (n + 1) in
put next;
even lim put
| _ -> let _ = [!r] in even lim put
let rec odd... | null | https://raw.githubusercontent.com/ocaml-multicore/parafuzz/6a92906f1ba03287ffcb433063bded831a644fd5/testsuite/tests/parallel/pingpong.ml | ocaml | TEST
* hasunix
include unix
** bytecode
** native
|
let r = ref (Some 0)
let () = Gc.minor ()
let rec even lim put =
match !r with
| Some n when n = lim -> ()
| (Some n) when n mod 2 == 0 ->
let next = Some (n + 1) in
put next;
even lim put
| _ -> let _ = [!r] in even lim put
let rec odd lim put =
match !r with
| Some n when n = lim -> ()... |
8b25fce31708bb5ca1f77ec6abfbab0cd1735479b8f58197b06cabb3ecd6f04f | crategus/cl-cffi-gtk | gtk.im-context-simple.lisp | ;;; ----------------------------------------------------------------------------
;;; gtk.im-context-simple.lisp
;;;
The documentation of this file is taken from the GTK+ 3 Reference Manual
Version 3.24 and modified to document the Lisp binding to the GTK library .
;;; See <>. The API documentation of the Lisp bindi... | null | https://raw.githubusercontent.com/crategus/cl-cffi-gtk/3e4abbef7b5fcad36f64f79b6ce1b67c90f75ce3/gtk/gtk.im-context-simple.lisp | lisp | ----------------------------------------------------------------------------
gtk.im-context-simple.lisp
See <>. The API documentation of the Lisp binding is
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License for Lisp
License, or (at ... | The documentation of this file is taken from the GTK+ 3 Reference Manual
Version 3.24 and modified to document the Lisp binding to the GTK library .
available from < -cffi-gtk/ > .
Copyright ( C ) 2011 - 2019
as published by the Free Software Foundation , either version 3 of the
the GNU Lesser General Pub... |
c28987df9d9b62d6eea0e1ca50b52740e74986e0e2650c6d0a529b5f745c8dc9 | lemmih/lhc | Where.hs | module Basic1 where
x = y
where y = x
fn1 0 = y
where
y = 10
fn2 n = y where y = fn2 n
fn3 n = even
where
even = 0 : odd
odd = 1 : even
| null | https://raw.githubusercontent.com/lemmih/lhc/53bfa57b9b7275b7737dcf9dd620533d0261be66/haskell-crux/tests/Where.hs | haskell | module Basic1 where
x = y
where y = x
fn1 0 = y
where
y = 10
fn2 n = y where y = fn2 n
fn3 n = even
where
even = 0 : odd
odd = 1 : even
| |
eabbade2432b84a3c29efcaa3e804ba3f2f258df28540fff204fd3c4f86faf97 | haskell-mafia/mismi | Data.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
module Mismi.Kernel.Data (
MismiRegion (..)
, renderMismiRegion
, parseMismiRegion
) where
import P
| Mismi 's view of available AWS regions .
data MismiRegion =
^ Europe / eu - west-1
^ Europe / eu - central-1
^ Asia Pacif... | null | https://raw.githubusercontent.com/haskell-mafia/mismi/f6df07a52c6c8b1cf195b58d20ef109e390be014/mismi-kernel/src/Mismi/Kernel/Data.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE NoImplicitPrelude #
module Mismi.Kernel.Data (
MismiRegion (..)
, renderMismiRegion
, parseMismiRegion
) where
import P
| Mismi 's view of available AWS regions .
data MismiRegion =
^ Europe / eu - west-1
^ Europe / eu - central-1
^ Asia Pacific / ap - northeast-1
^ Asia Paci... |
80c2936682e87d8d66d90b44af9cccbcaab07c8714e1d0386fc7d1d39a7f6aaa | chef/chef-server | data_collector_test_utils.erl | -module(data_collector_test_utils).
-include_lib("eunit/include/eunit.hrl").
-export([setup/1,
setup_chef_secrets/0,
cleanup/1,
run_tests/2
]).
run_tests(MockedModules, Tests) ->
{foreach,
fun() -> data_collector_test_utils:setup(MockedModules) end,
fun(_) -> data_col... | null | https://raw.githubusercontent.com/chef/chef-server/6d31841ecd73d984d819244add7ad6ebac284323/src/oc_erchef/apps/data_collector/test/data_collector_test_utils.erl | erlang | -module(data_collector_test_utils).
-include_lib("eunit/include/eunit.hrl").
-export([setup/1,
setup_chef_secrets/0,
cleanup/1,
run_tests/2
]).
run_tests(MockedModules, Tests) ->
{foreach,
fun() -> data_collector_test_utils:setup(MockedModules) end,
fun(_) -> data_col... | |
12fed174bf67c5d827b313bdefa447097dbf54eeeabd43edbf18307c65392a99 | herbelin/coq-hh | modops.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/herbelin/coq-hh/296d03d5049fea661e8bdbaf305ed4bf6d2001d2/kernel/modops.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
This file provides with various ope... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Created by , Aug 2002 as ... |
b0ed207831f7920d7213ed1c8d677a1ac60a2ea1d322299d15be0614f9004de1 | amnh/PCG | Forest.hs | -----------------------------------------------------------------------------
-- |
-- Module : Bio.Graph.Forest
Copyright : ( c ) 2015 - 2021 Ward Wheeler
-- License : BSD-style
--
-- Maintainer :
-- Stability : provisional
-- Portability : portable
--
The Phylogentic Graph types .
--
-------... | null | https://raw.githubusercontent.com/amnh/PCG/9341efe0ec2053302c22b4466157d0a24ed18154/lib/core/data-structures/src/Bio/Graph/Forest.hs | haskell | ---------------------------------------------------------------------------
|
Module : Bio.Graph.Forest
License : BSD-style
Maintainer :
Stability : provisional
Portability : portable
---------------------------------------------------------------------------
# LANGUAGE DeriveAnyClass ... | Copyright : ( c ) 2015 - 2021 Ward Wheeler
The Phylogentic Graph types .
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies ... |
a658475ac824d40662dbfdb523f1e0a2ffb39439035dfdff7eec1faa0f8cb7e4 | jdan/ocaml-data-structures | ord.ml | module type S = sig
type t
val compare : t -> t -> int
val show : t -> string
end
| null | https://raw.githubusercontent.com/jdan/ocaml-data-structures/b27e0c4fd8997900b5852a110a971f00ce3e922c/src/ord.ml | ocaml | module type S = sig
type t
val compare : t -> t -> int
val show : t -> string
end
| |
198a7f2b973ad4e67a6ce8c25c6929c210fd4f71f0e8d72b6cc08e152a7a8ba7 | abdulapopoola/SICPBook | Ex2.61.scm | #lang planet neil/sicp
(define (element-of-set? x set)
(cond ((null? set) false)
((= x (car set)) true)
((< x (car set)) false)
(else (element-of-set? x (cdr set)))))
(define (adjoin-set x set)
(if (element-of-set? x set)
set
(cons x set)))
(define (adjoin-set2 x set)
(cond ... | null | https://raw.githubusercontent.com/abdulapopoola/SICPBook/c8a0228ebf66d9c1ddc5ef1fcc1d05d8684f090a/Chapter%202/2.3/Ex2.61.scm | scheme | #lang planet neil/sicp
(define (element-of-set? x set)
(cond ((null? set) false)
((= x (car set)) true)
((< x (car set)) false)
(else (element-of-set? x (cdr set)))))
(define (adjoin-set x set)
(if (element-of-set? x set)
set
(cons x set)))
(define (adjoin-set2 x set)
(cond ... | |
d8d84c5db9848275ff1566d990526e0c2c9ce91fe56e891a81113741d049697c | sph-mn/sph-lib | alist.scm | (define-test-module (test module sph alist) (import (sph alist))
(test-execute-procedures-lambda
(list->alist
((#f #t #t #f #f #f)) ((#f . #t) (#t . #f) (#f . #f))
((1 2 3)) ((1 . 2) (3))
((1 2 3 4)) ((1 . 2) (3 . 4)))
(alist-merge
(((1 . 2) (3 . 4)) ((5 . 6) (3 . 7))) ((1 . 2) (5 . 6)... | null | https://raw.githubusercontent.com/sph-mn/sph-lib/c7daf74f42d6bd1304f49c2fef89dcd6dd94fdc9/modules/test/module/sph/alist.scm | scheme | (define-test-module (test module sph alist) (import (sph alist))
(test-execute-procedures-lambda
(list->alist
((#f #t #t #f #f #f)) ((#f . #t) (#t . #f) (#f . #f))
((1 2 3)) ((1 . 2) (3))
((1 2 3 4)) ((1 . 2) (3 . 4)))
(alist-merge
(((1 . 2) (3 . 4)) ((5 . 6) (3 . 7))) ((1 . 2) (5 . 6)... | |
3d78fbdbf95d45b3cfaa1783db7899f5db8cc935889cb61a889aab9d89ae6335 | yutopp/rill | generic_counter.ml |
* Copyright yutopp 2016 - .
*
* Distributed under the Boost Software License , Version 1.0 .
* ( See accompanying file LICENSE_1_0.txt or copy at
* )
* Copyright yutopp 2016 - .
*
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* )... | null | https://raw.githubusercontent.com/yutopp/rill/375b67c03ab2087d0a2a833bd9e80f3e51e2694f/rillc/_migrating/generic_counter.ml | ocaml |
* Copyright yutopp 2016 - .
*
* Distributed under the Boost Software License , Version 1.0 .
* ( See accompanying file LICENSE_1_0.txt or copy at
* )
* Copyright yutopp 2016 - .
*
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* )... | |
8e59d9100874cbf9b92045d8dd80e6ed56683f02f7e2f4ff4c01f62671c6c2ad | anmonteiro/gluten | gluten_mirage.ml | ----------------------------------------------------------------------------
* Copyright ( c ) 2019 - 2020
*
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are met :
*
... | null | https://raw.githubusercontent.com/anmonteiro/gluten/4d54494281775cd1a026eb76765f5590a8086029/mirage/gluten_mirage.ml | ocaml | ----------------------------------------------------------------------------
* Copyright ( c ) 2019 - 2020
*
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are met :
*
... | |
7c2c7841456f5fef93084c6ef2c41c4f6b7827dd1e400c168db7b2ccff7d8036 | OCamlPro/ocplib-resto | ezResto.ml | (**************************************************************************)
(* ocplib-resto *)
Copyright ( C ) 2016 , OCamlPro .
(* *)
(* All r... | null | https://raw.githubusercontent.com/OCamlPro/ocplib-resto/9c84b7432cee499a2057e372c4d619daeb0b9d6a/src/ezResto.ml | ocaml | ************************************************************************
ocplib-resto
All rights reserved. This file is distributed under the terms
special exception on lin... | Copyright ( C ) 2016 , OCamlPro .
of the GNU Lesser General Public License version 2.1 , with the
open Resto
type json = Json_repr.Ezjsonm.value
module Arg = Arg
module Path = struct
type 'params path = (unit, 'params) Path.path
let root = Path.root
let add... |
e6d791ebfa673546a2df60314773e0dbae7c2545e70836a4e7b8cd819f630c90 | lachenmayer/arrowsmith | Declaration.hs | # OPTIONS_GHC -Wall #
module AST.Declaration where
import Data.Binary
import qualified AST.Expression.General as General
import qualified AST.Expression.Source as Source
import qualified AST.Expression.Valid as Valid
import qualified AST.Expression.Canonical as Canonical
import qualified AST.Type as T
import qualified... | null | https://raw.githubusercontent.com/lachenmayer/arrowsmith/34b6bdeddddb2d8b9c6f41002e87ec65ce8a701a/elm-compiler/src/AST/Declaration.hs | haskell | DECLARATIONS
DECLARATION PHASES
BINARY CONVERSION
PRETTY STRINGS | # OPTIONS_GHC -Wall #
module AST.Declaration where
import Data.Binary
import qualified AST.Expression.General as General
import qualified AST.Expression.Source as Source
import qualified AST.Expression.Valid as Valid
import qualified AST.Expression.Canonical as Canonical
import qualified AST.Type as T
import qualified... |
120e81a26730c16d046a6edb8ff88ab46d54609e819877eb1b30b0998c92276c | Vetd-Inc/vetd-app | hasura_meta.clj | (ns com.vetd.app.hasura-meta
(:require [com.vetd.app.common :as com]
[com.vetd.app.util :as ut]
[com.vetd.app.migragen :as mig]))
(def hasura-meta-cfg
{:remote_schemas []
:query_templates []
:inherits {[:vetd :prompts_by_form] [[:vetd :prompts]]
[:vetd :prompts_by_templa... | null | https://raw.githubusercontent.com/Vetd-Inc/vetd-app/9b33b1443b9d84d39305a63fc58119f8e014cf11/src/clj/com/vetd/app/hasura_meta.clj | clojure | dummy to make ha/sync-query work for links table | (ns com.vetd.app.hasura-meta
(:require [com.vetd.app.common :as com]
[com.vetd.app.util :as ut]
[com.vetd.app.migragen :as mig]))
(def hasura-meta-cfg
{:remote_schemas []
:query_templates []
:inherits {[:vetd :prompts_by_form] [[:vetd :prompts]]
[:vetd :prompts_by_templa... |
2cb17cfa6dbc9c08b52d31df45f29aaac3d5b0a435cbdc417c0f87c7c028aaf7 | csabahruska/jhc-grin | Info.hs | # LANGUAGE RankNTypes , GeneralizedNewtypeDeriving , ScopedTypeVariables #
module Info.Info(
T,
Info(..),
Entry(..),
HasInfo(..),
Info.Info.lookup,
Info.Info.lookupTyp,
insertWith,
insert,
limit,
maybeInsert,
singleton,
member,
delete,
fetch,
extend,
empty... | null | https://raw.githubusercontent.com/csabahruska/jhc-grin/30210f659167e357c1ccc52284cf719cfa90d306/src/Info/Info.hs | haskell | extensible type indexed product | # LANGUAGE RankNTypes , GeneralizedNewtypeDeriving , ScopedTypeVariables #
module Info.Info(
T,
Info(..),
Entry(..),
HasInfo(..),
Info.Info.lookup,
Info.Info.lookupTyp,
insertWith,
insert,
limit,
maybeInsert,
singleton,
member,
delete,
fetch,
extend,
empty... |
5f9fdb525ba7cfaaef071c3634ea02ce78902d5adbdbec4acce1b291a6f6953b | erszcz/learning | somefsm.erl | -module(somefsm).
-behaviour(gen_fsm).
%% API
-export([start_link/0]).
%% gen_fsm callbacks
-export([init/1,
state_name/2,
state_name/3,
handle_event/3,
handle_sync_event/4,
handle_info/3,
terminate/3,
code_change/4]).
%%%===============================... | null | https://raw.githubusercontent.com/erszcz/learning/b21c58a09598e2aa5fa8a6909a80c81dc6be1601/erlang-wrangler/somefsm.erl | erlang | API
gen_fsm callbacks
===================================================================
API
===================================================================
--------------------------------------------------------------------
@doc
Creates a gen_fsm process which calls Module:init/1 to
initialize. To ensure a... | -module(somefsm).
-behaviour(gen_fsm).
-export([start_link/0]).
-export([init/1,
state_name/2,
state_name/3,
handle_event/3,
handle_sync_event/4,
handle_info/3,
terminate/3,
code_change/4]).
( ) - > { ok , Pid } | ignore | { error , Error }
start_l... |
e0b1831c6b30e0f2253806fb88241d446d3daab03c1ddf57db5bfaf5bd966905 | klangner/timeseries | Spec.hs |
import Prelude
import Test.Hspec
import qualified Data.TimeSeriesSpec
import qualified Data.TimeSeries.SessionsSpec
import qualified Data.TimeSeries.StatsSpec
import qualified Data.TimeSeries.TimeSpec
import qualified Data.TimeSeries.IO.CSVSpec
main :: IO ()
main = hspec $ do
describe "TimeSeries" Data.TimeSeriesS... | null | https://raw.githubusercontent.com/klangner/timeseries/7fae74b8b42074f2b7c6e714111f954b9f4253d0/test-src/Spec.hs | haskell |
import Prelude
import Test.Hspec
import qualified Data.TimeSeriesSpec
import qualified Data.TimeSeries.SessionsSpec
import qualified Data.TimeSeries.StatsSpec
import qualified Data.TimeSeries.TimeSpec
import qualified Data.TimeSeries.IO.CSVSpec
main :: IO ()
main = hspec $ do
describe "TimeSeries" Data.TimeSeriesS... | |
09a4aa2095b8288f1383b8c6563bcd623fb4cdca0795c820b1e4326e75696d76 | clojusc/meson | messages.clj | (ns meson.records.base.messages
"This namespace defines the Mesos message records derived from the Mesos
source at the following location:
* ")
(defrecord StatusUpdate [
;; Required
framework-id
status
timestamp
Optionsl
executor-id
slave-id
uuid
latest-state
])
(defrecord StatusUpdateRecord... | null | https://raw.githubusercontent.com/clojusc/meson/a690135bf64c967a70fd45e88bdfed1e7b847317/src/meson/records/base/messages.clj | clojure | Required
Required
Optional
required if type is ` UPDATE `
required if type is `ACK`
Required
Required
Required
Optional
required when the framework has previously registered
Required
an instance of the `FrameworkID` record
Required
an instance of the `FrameworkID` record
Required
an instance of the `Fra... | (ns meson.records.base.messages
"This namespace defines the Mesos message records derived from the Mesos
source at the following location:
* ")
(defrecord StatusUpdate [
framework-id
status
timestamp
Optionsl
executor-id
slave-id
uuid
latest-state
])
(defrecord StatusUpdateRecord [
an enum t... |
f48e3e165e8e9f5278aba5930a75a57f0ed4d51742655ba50b5ccc4d31275f23 | chetmurthy/ensemble | credit.ml | (**************************************************************)
CREDIT.ML : credit based flow control
Author : , 2/96
(**************************************************************)
open Event
open Util
open Layer
open Trans
open View
(**************************************************************)
let name = ... | null | https://raw.githubusercontent.com/chetmurthy/ensemble/8266a89e68be24a4aaa5d594662e211eeaa6dc89/ensemble/server/layers/flow/credit.ml | ocaml | ************************************************************
************************************************************
************************************************************
************************************************************
credit related variables
total resource
unallocated resources
# credi... | CREDIT.ML : credit based flow control
Author : , 2/96
open Event
open Util
open Layer
open Trans
open View
let name = Trace.filel "CREDIT"
type 'a state = {
give more credit when this # credit remaning
piggyback more credit when this # credit remaning
msgs yet to be casted
# msgs in buffer
sweep ... |
63e5e4352a7e24c7840fba2c3ace5744ba0ed333ffc03089fd404c7e89c3a753 | alanz/ghc-exactprint | Linear6.hs | {-# LANGUAGE LinearTypes #-}
# LANGUAGE UnicodeSyntax #
module Linear6 where
correctEqn :: Bool ⊸ Int ⊸ Int
correctEqn True n = n
correctEqn False n = n
| null | https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc90/Linear6.hs | haskell | # LANGUAGE LinearTypes # | # LANGUAGE UnicodeSyntax #
module Linear6 where
correctEqn :: Bool ⊸ Int ⊸ Int
correctEqn True n = n
correctEqn False n = n
|
bcb75d8e726960f3f28f6c69ca2b24a12ca5526182d9bc8749a94d04262f42f2 | yansh/MoanaML | tests.ml | * Copyright ( c ) 2015 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 AUTHOR D... | null | https://raw.githubusercontent.com/yansh/MoanaML/c9843c10a0624e1c06e185e3dd1e7d877270d0d7/tests.ml | ocaml | 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
TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY
AND FITNESS. IN NO EVEN... | * Copyright ( c ) 2015 to use , copy ,
PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD
DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER
RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN * ACTION OF
open Config
open Helper
open OUnit
o... |
e855f3ec1d6f60877163e46588222b3a61fa6e0d5b149bd4bd4eb801f9f0e36b | BranchTaken/Hemlock | test_conversion.ml | open! Basis.Rudiments
open! Basis
open Codepoint
let pp_uns_x u formatter =
formatter |> Uns.fmt ~alt:true ~zpad:true ~width:16L ~radix:Radix.Hex u
let pp_x cp formatter =
formatter |> pp_uns_x (extend_to_uns cp)
let test () =
let rec fn xs formatter =
match xs with
| [] -> ()
| x :: xs' -> begin
... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/a07e362d66319108c1478a4cbebab765c1808b1a/bootstrap/test/basis/codepoint/test_conversion.ml | ocaml | open! Basis.Rudiments
open! Basis
open Codepoint
let pp_uns_x u formatter =
formatter |> Uns.fmt ~alt:true ~zpad:true ~width:16L ~radix:Radix.Hex u
let pp_x cp formatter =
formatter |> pp_uns_x (extend_to_uns cp)
let test () =
let rec fn xs formatter =
match xs with
| [] -> ()
| x :: xs' -> begin
... | |
c7d5dd43cef0ae67c7f45016bf461241c3dc509bf7ec58b12a85c31fc9075537 | HunterYIboHu/htdp2-solution | 3.1-data-definition-f2c.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname data-definition-f2c) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib... | null | https://raw.githubusercontent.com/HunterYIboHu/htdp2-solution/6182b4c2ef650ac7059f3c143f639d09cd708516/Chapter1/Section3/3.1-data-definition-f2c.rkt | racket | about the language level of this file in a form that our tools can easily process.
Temperature is a Number
interpretation degrees Celsius
Number String Image -> Image
given:
"hello" for s, and
expected:
Number -> Number
computes the area of a square whose side is len | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname data-definition-f2c) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t write repeating-decimal #f ... |
ad8f0ec5006ba0e1bf4c09b0c9de68fffd1555e3c57c6753fb2318afbf1e48c6 | monadius/ocaml_simple_interval | t_interval_tmp.ml | open Num
open Test
open Interval_tmp
module T = Test_interval
(* let () = Random.self_init () *)
let samples = 1000
let intervals_of_pair =
let intervals (a, b) =
if is_nan a || is_nan b || (a = infinity && b = neg_infinity) ||
(a = infinity && b = infinity) || (a = neg_infinity && b = neg_infi... | null | https://raw.githubusercontent.com/monadius/ocaml_simple_interval/d1081e969e7f4907bc60c1e7d2af95fdf1f34310/tests/t_interval_tmp.ml | ocaml | let () = Random.self_init ()
fsucc tests
fpred tests
mid tests
neg tests
abs tests
add tests
sub tests
mul tests
div tests
inv tests
sqrt tests
pown tests | open Num
open Test
open Interval_tmp
module T = Test_interval
let samples = 1000
let intervals_of_pair =
let intervals (a, b) =
if is_nan a || is_nan b || (a = infinity && b = neg_infinity) ||
(a = infinity && b = infinity) || (a = neg_infinity && b = neg_infinity) then
empty_interval, T.... |
a6b22dbce018f08fdec212a2fac0462a20ca59363eec285dd30899c0d3cd1de1 | CDSoft/abp | Setup.hs |
This file is part of ABP .
ABP is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
( at your option ) any later version .
ABP is distributed... | null | https://raw.githubusercontent.com/CDSoft/abp/98e042066869aa5b898096c31b51d2b6dc316456/Setup.hs | haskell |
This file is part of ABP .
ABP is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
( at your option ) any later version .
ABP is distributed... | |
790dee4353f5846f57af5d49406cff0f45dbb0052437f8ed85deeff886d083ef | aeternity/aeternity | aehttp_sup.erl | %%%-------------------------------------------------------------------
%% @doc aehttp top level supervisor.
%% @end
%%%-------------------------------------------------------------------
-module(aehttp_sup).
-behaviour(supervisor).
%% API
-export([start_link/0]).
%% Supervisor callbacks
-export([init/1]).
-define(... | null | https://raw.githubusercontent.com/aeternity/aeternity/b7ce6ae15dab7fa22287c2da3d4405c29bb4edd7/apps/aehttp/src/aehttp_sup.erl | erlang | -------------------------------------------------------------------
@doc aehttp top level supervisor.
@end
-------------------------------------------------------------------
API
Supervisor callbacks
====================================================================
API functions
================================... |
-module(aehttp_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(SERVER, ?MODULE).
start_link() ->
supervisor:start_link({local, ?SERVER}, ?MODULE, []).
Child : : { Id , StartFunc , Restart , Shutdown , Type , Modules }
init([]) ->
{ok, { {one_for_one, 5, 10}, []} }.
... |
f5b3dd7ed4bc666eddb7d5303a8f2a62177d235c180cfca6db34ebd4b548909e | finnishtransportagency/harja | ilmoitus_sanomat.clj | (ns harja.palvelin.integraatiot.api.sanomat.ilmoitus-sanomat
(:require [harja.geo :as geo]
[harja.tyokalut.spec-apurit :as apurit]))
(defn rakenna-tierekisteriosoite [ilmoitus tierekisteriosoite]
(if (and (:numero tierekisteriosoite)
(:alkuetaisyys tierekisteriosoite)
(:alkuosa ti... | null | https://raw.githubusercontent.com/finnishtransportagency/harja/945293c0a0ee0035b07defc594924d914660983f/src/clj/harja/palvelin/integraatiot/api/sanomat/ilmoitus_sanomat.clj | clojure | (ns harja.palvelin.integraatiot.api.sanomat.ilmoitus-sanomat
(:require [harja.geo :as geo]
[harja.tyokalut.spec-apurit :as apurit]))
(defn rakenna-tierekisteriosoite [ilmoitus tierekisteriosoite]
(if (and (:numero tierekisteriosoite)
(:alkuetaisyys tierekisteriosoite)
(:alkuosa ti... | |
a9b66cac74414f0b996e015248b6468255593c37e63df4fe9aa634edaee42d11 | chenyukang/eopl | 40.scm | (load-relative "../libs/init.scm")
(load-relative "./base/typed-oo/lang.scm")
(load-relative "./base/typed-oo/test.scm")
(load-relative "./base/typed-oo/store.scm")
(load-relative "./base/typed-oo/interp.scm")
(load-relative "./base/typed-oo/checker.scm")
(load-relative "./base/typed-oo/environments.scm")
(load-relativ... | null | https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/ch9/40.scm | scheme | see new stuff
Modify the design of the language so that every field declaration
contains an expression that is used to initialize the field.
Such a design has the advantage that a checked program will never refer
to an uninitialized value.
grammatical specification ;;;;;;;;;;;;;;;;
non-empty lists for typechecke... | (load-relative "../libs/init.scm")
(load-relative "./base/typed-oo/lang.scm")
(load-relative "./base/typed-oo/test.scm")
(load-relative "./base/typed-oo/store.scm")
(load-relative "./base/typed-oo/interp.scm")
(load-relative "./base/typed-oo/checker.scm")
(load-relative "./base/typed-oo/environments.scm")
(load-relativ... |
2c0d8bb87e51dbebb61d09945555e7bfd1a66c5da95a6aa801aeada239a1ce16 | huangz1990/SICP-answers | 33-filtered-accumulate.scm | 33-filtered-accumulate.scm
(define (filtered-accumulate combine null-value term a next b valid?)
(if (> a b)
null-value
(let ((rest-terms (filtered-accumulate combine
null-value
term
... | null | https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp1/code/33-filtered-accumulate.scm | scheme | 33-filtered-accumulate.scm
(define (filtered-accumulate combine null-value term a next b valid?)
(if (> a b)
null-value
(let ((rest-terms (filtered-accumulate combine
null-value
term
... | |
6a442c422730ee77bf38ea41d0cc40c6edf8098e350742ece6e012f7dcd84370 | VERIMAG-Polyhedra/VPL | Poly.mli | (** Type of polynomials. *)
open Poly_type
(** Exception raised when trying to divide a polynomial by a non-constant value *)
exception Div_by_non_constant
(** Interface of polynomials. *)
module type Type = Type
(** Functor to build a polynomial type from a type of vectors.
The type of vector coefficients is u... | null | https://raw.githubusercontent.com/VERIMAG-Polyhedra/VPL/cd78d6e7d120508fd5a694bdb01300477e5646f8/ocaml/lin/poly/Poly.mli | ocaml | * Type of polynomials.
* Exception raised when trying to divide a polynomial by a non-constant value
* Interface of polynomials.
* Functor to build a polynomial type from a type of vectors.
The type of vector coefficients is used for polynomial coefficients.
The type of vectors is used to build polynomials f... |
open Poly_type
exception Div_by_non_constant
module type Type = Type
module Make : functor (Vec : Vector.Type) -> Type with module Vec = Vec
|
80b403275fc83cfac071208b6e9c07c650d203b72ab48e33f675f25e5a6f1760 | macielti/alura-credit-card-ii | db.clj | (ns alura-credit-card-ii.db
(:use [clojure pprint])
(:require [datomic.api :as d]
[java-time :as jt])
(:import java.util.Calendar))
(def database-uri "datomic:dev:4334/credit")
(defn open-connection!
[database-uri]
(d/create-database database-uri)
(d/connect database-uri))
(defn delete-databa... | null | https://raw.githubusercontent.com/macielti/alura-credit-card-ii/1fbb7ba9a1e3a81fee4729395378a775fab050c8/src/alura_credit_card_ii/db.clj | clojure | [instant]
(doto calendar
(.setTime instant)
(.get Calendar/MONTH))))
[purchases, date]
(let [purchase-month (.getMonth date)
purchases-in-the-same-month))
[db cpf date]
(let [all-purchases (query-all-purchases-by-cpf db cpf)
purchases])) | (ns alura-credit-card-ii.db
(:use [clojure pprint])
(:require [datomic.api :as d]
[java-time :as jt])
(:import java.util.Calendar))
(def database-uri "datomic:dev:4334/credit")
(defn open-connection!
[database-uri]
(d/create-database database-uri)
(d/connect database-uri))
(defn delete-databa... |
2667c41eaeaf15b3eac8a9fe49370f618d42c154ca8dc4c93c08252c87d201a4 | janestreet/krb | debug_log_config.mli | open! Core
open Env_config
type t = Log_output.t list [@@deriving sexp_of]
val examples : t list
module Stable : sig
module V1 : sig
type nonrec t = t [@@deriving sexp]
end
end
| null | https://raw.githubusercontent.com/janestreet/krb/1105ba1e8b836f80f09e663bc1b4233cf2607e7b/internal/debug_log_config.mli | ocaml | open! Core
open Env_config
type t = Log_output.t list [@@deriving sexp_of]
val examples : t list
module Stable : sig
module V1 : sig
type nonrec t = t [@@deriving sexp]
end
end
| |
d2fe55179bef2c730eaaa9b52157d6110b92c9e61527b961c55b28c5e0b5f96a | unisonweb/unison | PrintError.hs | # LANGUAGE RecordWildCards #
module Unison.PrintError where
import Control.Lens ((%~))
import Control.Lens.Tuple (_1, _2, _3)
import Data.List (find, intersperse)
import Data.List.Extra (nubOrd)
import qualified Data.List.NonEmpty as Nel
import qualified Data.Map as Map
import Data.Proxy
import Data.Sequence (Seq (..... | null | https://raw.githubusercontent.com/unisonweb/unison/61b65bfe5b16df10d2ba9ba05afecfaffc016d0b/parser-typechecker/src/Unison/PrintError.hs | haskell | Various links used in error messages, collected here for a quick overview
Render an informational typechecking note
Render a type error
"recursive subtypes" situations
, "\n expectedLoc: ", annotatedToEnglish expectedLoc
these are overwriting the colored ranges for some reason?
,
++ showTypeWithProvenan... | # LANGUAGE RecordWildCards #
module Unison.PrintError where
import Control.Lens ((%~))
import Control.Lens.Tuple (_1, _2, _3)
import Data.List (find, intersperse)
import Data.List.Extra (nubOrd)
import qualified Data.List.NonEmpty as Nel
import qualified Data.Map as Map
import Data.Proxy
import Data.Sequence (Seq (..... |
8e5295fd86fa1d19283920922b2e7b246e42de6ce50758347df3bc824bd79adf | malyn/mondrian | plot.cljs | (ns mondrian.plot
(:use [monet.canvas :only [fill-style circle]]))
(defn parametric-equation
"Plots the parametric equation whose points are generated by calling
fx and fy on each value (in radians) to be plotted. fcolor also takes
a value in radians and is called to generate a color value for each
point. ... | null | https://raw.githubusercontent.com/malyn/mondrian/4ba922d7c4190fbfef92348dfd1c9b8873c27a13/src/cljs/mondrian/plot.cljs | clojure | each point will be spaced evenly around the unit circle. | (ns mondrian.plot
(:use [monet.canvas :only [fill-style circle]]))
(defn parametric-equation
"Plots the parametric equation whose points are generated by calling
fx and fy on each value (in radians) to be plotted. fcolor also takes
a value in radians and is called to generate a color value for each
point. ... |
41e36dd06fbea02bff20d10dc948c6adc1b8742b79bd4981d1dd4e1cd7296b7c | dmjio/miso | Main.hs | # LANGUAGE ScopedTypeVariables #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE RecordWildCards #-}
# LANGUAGE TypeFamilies #
# LANGUAGE CPP #
module Main where
import Data.Proxy
import Servant.API
#if MIN_VERSION... | null | https://raw.githubusercontent.com/dmjio/miso/0be227bca6e0aec16a69a1c09f9a90624af070c1/examples/router/Main.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE TypeOperators #
# LANGUAGE DataKinds #
# LANGUAGE RecordWildCards #
| Model
| Action
| Main entry point
| Update your model
| View function, with routing
| Type-level routes
| Type-safe links used in `onClick` event handlers to route the application | # LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE CPP #
module Main where
import Data.Proxy
import Servant.API
#if MIN_VERSION_servant(0,14,1)
import Servant.Links
#elif MIN_VERSION_servant(0,10,0)
import Servant.Utils.Links
#endif
import Miso
#ifdef IOS
import Language.J... |
0ace23305f745fc51b4bf99b42db154b262ce14c5b482a9d88148ea561926b0a | conal/lambda-ccc | Standardize.hs | # LANGUAGE ViewPatterns , PatternGuards #
# LANGUAGE FlexibleContexts , ConstraintKinds #
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
# OPTIONS_GHC -Wall #
{ - # OPTIONS_GHC -fno - warn - unused - imports # - } -- TEMP
{ - # OPTIONS_GHC -fno - warn - unused - binds # - } -- TEMP
------------------... | null | https://raw.githubusercontent.com/conal/lambda-ccc/141a713456d447d27dbe440fa27a9372cd44dc7f/src/LambdaCCC/Unused/Standardize.hs | haskell | # LANGUAGE TypeSynonymInstances, FlexibleInstances #
TEMP
TEMP
--------------------------------------------------------------------
|
Module : LambdaCCC.Standardize
Maintainer :
Stability : experimental
Transform away all non-standard types
--------------------------------------------------------... | # LANGUAGE ViewPatterns , PatternGuards #
# LANGUAGE FlexibleContexts , ConstraintKinds #
# OPTIONS_GHC -Wall #
Copyright : ( c ) 2014 Tabula , Inc.
module LambdaCCC.Standardize (Standardizable(..), standardizeR) where
import Prelude hiding ( i d , ( . ) )
import Data.Functor ((<$>))
import Control.Applic... |
490e3017bd5aba4fc88eea95cb2f8a1d3404a0d70dace2d3acf17f0c5ea3868d | babashka/sci | destructure.cljc | (ns sci.impl.destructure
"Destructure function, adapted from Clojure and ClojureScript."
{:no-doc true}
(:refer-clojure :exclude [destructure]))
(defn destructure* [bindings]
(let [bents (partition 2 bindings)
pb (fn pb [bvec b v]
(let [pvec
(fn [bvec b val]
... | null | https://raw.githubusercontent.com/babashka/sci/019a7754b78447f31e0726656cb71bb513bad3b0/src/sci/impl/destructure.cljc | clojure | (ident? bb) | (ns sci.impl.destructure
"Destructure function, adapted from Clojure and ClojureScript."
{:no-doc true}
(:refer-clojure :exclude [destructure]))
(defn destructure* [bindings]
(let [bents (partition 2 bindings)
pb (fn pb [bvec b v]
(let [pvec
(fn [bvec b val]
... |
1a6da1fa995f2dd24964c5e7c9640d7331a1f1b4456ec6d4515f70fa14a2e9be | soulomoon/SICP | Exercise 2.52.scm | Exercise 2.52 : Make changes to the square limit of wave shown in Figure 2.9 by working at each of the levels described above . In particular :
Add some segments to the primitive wave painter of Exercise 2.49 ( to add a smile , for example ) .
Change the pattern constructed by corner - split ( for example , by u... | null | https://raw.githubusercontent.com/soulomoon/SICP/1c6cbf5ecf6397eaeb990738a938d48c193af1bb/Chapter2/Exercise%202.52.scm | scheme | leg triangle
new origin
new end of edge1
new end of edge2
new origin
new end of edge1
new end of edge2
new origin
new end of edge1
new end of edge2
new origin
new end of edge1
new end of edge2 | Exercise 2.52 : Make changes to the square limit of wave shown in Figure 2.9 by working at each of the levels described above . In particular :
Add some segments to the primitive wave painter of Exercise 2.49 ( to add a smile , for example ) .
Change the pattern constructed by corner - split ( for example , by u... |
13f81a1ece5e559dc9f36780a5b1e9aadf58a4916420231d0396cf9639be81be | CDPcode/a-code-of-ice-and-fire | AST.hs | module Westeros.SouthOfTheWall.AST (
Program (..)
, Id
, Main
, Global
, FunctionDeclaration
, FunctionDeclarations
, Expression (..)
, Expr (..)
, BinOp (..)
, UnOp (..)
, Instruction (..)
, IfInst (..)
, Case (..)
, isValidLValue
, isFunctionCall
, pre... | null | https://raw.githubusercontent.com/CDPcode/a-code-of-ice-and-fire/a52f925d55e955ff9252090ce3b8cb211214b9b8/src/Westeros/SouthOfTheWall/AST.hs | haskell | module Westeros.SouthOfTheWall.AST (
Program (..)
, Id
, Main
, Global
, FunctionDeclaration
, FunctionDeclarations
, Expression (..)
, Expr (..)
, BinOp (..)
, UnOp (..)
, Instruction (..)
, IfInst (..)
, Case (..)
, isValidLValue
, isFunctionCall
, pre... | |
4ad32b7de64310e5c3eaa2e20b0fe1f3baa4e8f59bca4261533a042beb626afb | LdBeth/star-lisp | bitblt.lisp | ;; -*- Mode:Lisp; Syntax:Common-Lisp; Package: (*SIM-I COMMON-LISP-GLOBAL); Muser: Yes -*-
(in-package :*sim-i)
;;;> *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
;;;>
;;;> The Thinking Machines *Lisp Simulator is in the public domain.
;;;> You are free to do whatever you l... | null | https://raw.githubusercontent.com/LdBeth/star-lisp/034fb97fe8780d6e9fbff7c1d8c4a6b8c331797b/source/bitblt.lisp | lisp | -*- Mode:Lisp; Syntax:Common-Lisp; Package: (*SIM-I COMMON-LISP-GLOBAL); Muser: Yes -*-
> *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
>
> The Thinking Machines *Lisp Simulator is in the public domain.
> You are free to do whatever you like with it, including but
> not limi... |
(in-package :*sim-i)
(defun parse-cube-arguments (source-pvar dest-array array-offset cube-address-start cube-address-end)
(assert (or (null source-pvar) (pvarp source-pvar)) () "The pvar argument is neither unspecified nor a pvar.")
(assert (or (null dest-array) (vectorp dest-array)) () "The array argum... |
9d46f61860550eac9e8a4859d89dce3d4d134efa84ef942e97f1d78a4f5b8b91 | input-output-hk/project-icarus-importer | Lib.hs | # LANGUAGE DeriveGeneric #
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE GADTs #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE ViewPatterns #
module Lib where
import Universum
import Data.Aeson (F... | null | https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/tools/src/dbgen/Lib.hs | haskell | # LANGUAGE FlexibleContexts #
# LANGUAGE RankNTypes #
Types
| A simple example of how the configuration looks like.
^ How many wallets to create
^ The specification for each wallet.
^ How many accounts to generate
^ How specification for each account.
^ Configuration for the generation of the fake ... | # LANGUAGE DeriveGeneric #
# LANGUAGE GADTs #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE ViewPatterns #
module Lib where
import Universum
import Data.Aeson (FromJSON (..), ToJSON, eitherDecodeStrict, withObject, (.:))
import qualifi... |
f3c16429b8b3b7ef812b15c4c87a67ff16027ab7a6ab9046c388ef5f37e58e94 | sarabander/p2pu-sicp | 2.40.scm |
(define (unique-pairs n)
(flatmap (λ (i)
(map (λ (j)
(list i j))
(enumerate-interval 1 (- i 1))))
(enumerate-interval 1 n)))
(unique-pairs 5)
(define (prime-sum-pairs n)
(map make-pair-sum
(filter prime-sum?
(unique-pairs n))))
;; Helper procedures
(define (flatmap proc s... | null | https://raw.githubusercontent.com/sarabander/p2pu-sicp/fbc49b67dac717da1487629fb2d7a7d86dfdbe32/2.2/2.40.scm | scheme | Helper procedures |
(define (unique-pairs n)
(flatmap (λ (i)
(map (λ (j)
(list i j))
(enumerate-interval 1 (- i 1))))
(enumerate-interval 1 n)))
(unique-pairs 5)
(define (prime-sum-pairs n)
(map make-pair-sum
(filter prime-sum?
(unique-pairs n))))
(define (flatmap proc seq)
(accumulate app... |
59703ab94f1814145bfa5e7339950cd7f25112b2a2c7a6e476797ed00817e651 | mput/sicp-solutions | 2_29.rkt | #lang racket
Solution for exercise 2_29 .
(require rackunit "../solutions/utils.rkt")
(provide make-mobile make-branch total-weight balanced?)
(define (make-mobile left-branch right-branch)
(cons left-branch right-branch))
(define (make-branch len structure)
(cons len structure))
(define (mobile? structure) (... | null | https://raw.githubusercontent.com/mput/sicp-solutions/fe12ad2b6f17c99978c8fe04b2495005986b8496/solutions/2_29.rkt | racket | #lang racket
Solution for exercise 2_29 .
(require rackunit "../solutions/utils.rkt")
(provide make-mobile make-branch total-weight balanced?)
(define (make-mobile left-branch right-branch)
(cons left-branch right-branch))
(define (make-branch len structure)
(cons len structure))
(define (mobile? structure) (... | |
3b83894af1655a62ec7a6268fbed6f285a07ad3582b9d76b321dab37f44d3b7c | tari3x/csec-modex | pitypes.mli | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Cryptographic protocol verifier *
* *
... | null | https://raw.githubusercontent.com/tari3x/csec-modex/5ab2aa18ef308b4d18ac479e5ab14476328a6a50/deps/proverif1.84/src/pitypes.mli | ocaml | Types module declares types of the abstract syntax
tree and of sets of messages.
There are recursive dependencies between these types,
that is why they are included in the same module
The type of processes has been moved to the module types.mli
because it is needed in the environment values for letf... | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Cryptographic protocol verifier *
* *
... |
4a905e56c39310f5e930880af92892a885de877726fc5a2dced662bd3f168648 | defaultxr/thundersnow | wave-editor.lisp | ;;;; wave-editor - sound buffer visualizer and editor
Notes :
;;; * prior art:
;;; - cl-wav-synth; -lisp.net/project/cl-wav-synth/
(in-package #:thundersnow/wave-editor)
(defvar *tmp* nil
"Temporary variable for convenience during development.")
;;; gui stuff
(defclass wave-editor-pane (application-pane)
((so... | null | https://raw.githubusercontent.com/defaultxr/thundersnow/63c482019e0f289e4e046cf32e07d8489ea13591/src/wave-editor.lisp | lisp | wave-editor - sound buffer visualizer and editor
* prior art:
- cl-wav-synth; -lisp.net/project/cl-wav-synth/
gui stuff
:default-view +graphical-view+
visible frames only (fastest)
selection rectangle background
line drawn at the end for the right margin
frames
border rectangle
selection box border
:keystro... | Notes :
(in-package #:thundersnow/wave-editor)
(defvar *tmp* nil
"Temporary variable for convenience during development.")
(defclass wave-editor-pane (application-pane)
((sound :initarg :sound :initform nil :type (or null bdef) :documentation "The sound instance as a `bdef'.")
(point :initarg :point :initf... |
cdc23ad6f5c9f1b61b928715299db830a032f49732f9f14d9bf5e9b222857573 | Ayanda-D/rabbitmq-queue-master-balancer | rabbit_queue_master_balancer_sync.erl | The contents of this file are subject to the Mozilla Public License
%% Version 1.1 (the "License"); you may not use this file except in
%% compliance with the License. You may obtain a copy of the License
%% at /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITHOUT WARRANTY OF ... | null | https://raw.githubusercontent.com/Ayanda-D/rabbitmq-queue-master-balancer/20c0d5747b92f0217598a387ae283de972bb9d25/src/rabbit_queue_master_balancer_sync.erl | erlang | Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License
at /
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 Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is RabbitMQ Queue Master Balancer .
The Developer of this component is Erlang Solutions , Ltd.
Copyright ( c ) 2017 - 2018 Erlang Solutions , Ltd. All r... |
735c822730366c6558a13a3fbe866634aa48007bc0a6eea55f0f4a1628341848 | josefs/Gradualizer | lc_not_list.erl | -module(lc_not_list).
-export([bar/0, baz/0]).
-spec foo(integer()) -> integer().
foo(N) -> N.
bar() -> foo([ X || X <- [1, 2]]).
baz() -> foo(<< <<X>> || X <- [1, 2] >>).
| null | https://raw.githubusercontent.com/josefs/Gradualizer/208f5816b0157f282212fc036ba7560f0822f9fc/test/should_fail/lc_not_list.erl | erlang | -module(lc_not_list).
-export([bar/0, baz/0]).
-spec foo(integer()) -> integer().
foo(N) -> N.
bar() -> foo([ X || X <- [1, 2]]).
baz() -> foo(<< <<X>> || X <- [1, 2] >>).
| |
d93d9b8a20b924a25bf88d2aa7a51fb5d197a6b8cc4dedd2a98647b08a075039 | awkay/om-tutorial | project.clj | (defproject om-tutorial "0.1.0-SNAPSHOT"
:description "A Tutorial for Om 1.0.0 (next)"
:dependencies [[org.clojure/clojure "1.7.0" :scope "provided"]
[org.clojure/clojurescript "1.7.170" :scope "provided"]
[devcards "0.2.1-2" :exclusions [org.omcljs/om cljsjs/react-dom org.clojure/... | null | https://raw.githubusercontent.com/awkay/om-tutorial/83ca10d91380ba62458b98ccaa80fd11b9c8321d/project.clj | clojure | (defproject om-tutorial "0.1.0-SNAPSHOT"
:description "A Tutorial for Om 1.0.0 (next)"
:dependencies [[org.clojure/clojure "1.7.0" :scope "provided"]
[org.clojure/clojurescript "1.7.170" :scope "provided"]
[devcards "0.2.1-2" :exclusions [org.omcljs/om cljsjs/react-dom org.clojure/... | |
2b599e4ae7fa091f03bc7a28b14bbb58558e65ed3662fd993273404f2b70ad06 | spurious/snd-mirror | libm.scm | ;;; libm.scm
;;;
;;; tie the math library into the *libm* environment
(require cload.scm)
(provide 'libm.scm)
;; if loading from a different directory, pass that info to C
(let ((directory (let ((current-file (port-filename)))
(and (memv (current-file 0) '(#\/ #\~))
(substring current-file 0 (- (length curren... | null | https://raw.githubusercontent.com/spurious/snd-mirror/ede989ad75981d2801aa3c8cae48ca94a319b76e/libm.scm | scheme | libm.scm
tie the math library into the *libm* environment
if loading from a different directory, pass that info to C
C2x: double getpayload(const double *x), int setpayload(double *x, double payload)
exporting these will overwrite the built-in versions
these have arg by reference, return list in s7
... |
(require cload.scm)
(provide 'libm.scm)
(let ((directory (let ((current-file (port-filename)))
(and (memv (current-file 0) '(#\/ #\~))
(substring current-file 0 (- (length current-file) 9))))))
(when (and directory (not (member directory *load-path*)))
(set! *load-path* (cons directory *load-path*)))
... |
866fc095ace8b0ce709a09267fd3e2e7cf4815fb5e71c121bcd52aedf6b93b8b | maximedenes/native-coq | subtyping.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/checker/subtyping.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
i
i | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Univ
open Term
open Decl... |
9d64cbc54e78bc14b66347dfec9fd8f35cc1ede5e50e5ac2efe3f06d61175647 | jyh/metaprl | m_doc_x86_asm.mli |
* Explains CPS conversion .
*
* ----------------------------------------------------------------
*
* @begin[license ]
* Copyright ( C ) 2003 , Caltech
*
* This program is free software ; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as pub... | null | https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/experimental/compile/m_doc_x86_asm.mli | ocaml |
* Display the var with a lambda.
* Operands.
* Condition codes.
* Instructions.
* Various forms of tailcalls.
* The tailcall takes the arguments in a list.
* For conditional jumps, pretend that it is a real
* conditional. The printer will have to insert a label.
* Reserve some words.
* The... |
* Explains CPS conversion .
*
* ----------------------------------------------------------------
*
* @begin[license ]
* Copyright ( C ) 2003 , Caltech
*
* This program is free software ; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as pub... |
5391df3d7c6c5f8fae441ef73a1ca0d1e3e44ac494e41cedb601ecf32b2c0b47 | ssor/erlangDemos | ti_app.erl | %%%----------------------------------------------------------------
@author < >
%%% @doc
%%%
%%% @end
2008
%%%----------------------------------------------------------------,
-module(ti_app).
-behaviour(application).
%% Application callbacks
-export([start/2, stop/1]).
-define(DEFAULT_PORT, 1055).
%%%===... | null | https://raw.githubusercontent.com/ssor/erlangDemos/632cd905be2c4f275f1c1ae15238e711d7bb9147/erlware-Erlang-and-OTP-in-Action-Source/chapter_11/old/tcp_interface/src/ti_app.erl | erlang | ----------------------------------------------------------------
@doc
@end
----------------------------------------------------------------,
Application callbacks
===================================================================
Application callbacks
==============================================================... | @author < >
2008
-module(ti_app).
-behaviour(application).
-export([start/2, stop/1]).
-define(DEFAULT_PORT, 1055).
@private
application : start/[1,2 ] , and should start the processes of the
@spec start(StartType , ) - > { ok , Pid } |
{ ok , Pid , State } |... |
3a5a11e85bffa1505d610e0bd7c361e709223980ebe3379c21517781eda62c9b | lachenmayer/arrowsmith | Module.hs | module AST.Module
( Interfaces
, Types, Aliases, ADTs
, AdtInfo, CanonicalAdt
, SourceModule, ValidModule, CanonicalModule
, Module(..), CanonicalBody(..)
, HeaderAndImports(..)
, Name, nameToString, nameIsNative
, Interface(..), toInterface
, ImportMethod(..)
) where
import Dat... | null | https://raw.githubusercontent.com/lachenmayer/arrowsmith/34b6bdeddddb2d8b9c6f41002e87ec65ce8a701a/elm-compiler/src/AST/Module.hs | haskell | HELPFUL TYPE ALIASES
MODULES
HEADERS
| Basic info needed to identify modules and determine dependencies.
must be non-empty
INTERFACES
IMPORT METHOD
PRETTY PRINTING | module AST.Module
( Interfaces
, Types, Aliases, ADTs
, AdtInfo, CanonicalAdt
, SourceModule, ValidModule, CanonicalModule
, Module(..), CanonicalBody(..)
, HeaderAndImports(..)
, Name, nameToString, nameIsNative
, Interface(..), toInterface
, ImportMethod(..)
) where
import Dat... |
2864a12a90fac0e8c0a1d3102536883f6100218084895afd3a76395c36174ad2 | kupl/VeriSmart-public | path.ml | open Lang
open MakeCfg
type t = fkey * Node.t list
and path = t
let dummy_path = (("","",[]), [])
let get_fkey : path -> fkey
= fun (k,_) -> k
let get_bp : path -> Node.t list
= fun (_,bp) -> bp
let to_string : path -> string
= fun (k,bp) ->
to_string_fkey k ^ " : " ^ to_string_path bp
if len(lst ) = 2 , ret... | null | https://raw.githubusercontent.com/kupl/VeriSmart-public/99be7ba88b61994f1ed4c0d3a8e6a6db0f790431/src/pre/path.ml | ocaml | *************************
*************************
* Basic Path Generation *
*************************
*************************
returns (processed path set, processing path set, visited root nodes)
'root node' here means cutpoint.
whenever this function is called,
"processed" and "visited_roots" are accumul... | open Lang
open MakeCfg
type t = fkey * Node.t list
and path = t
let dummy_path = (("","",[]), [])
let get_fkey : path -> fkey
= fun (k,_) -> k
let get_bp : path -> Node.t list
= fun (_,bp) -> bp
let to_string : path -> string
= fun (k,bp) ->
to_string_fkey k ^ " : " ^ to_string_path bp
if len(lst ) = 2 , ret... |
e900aede0a4649b7765fdd167c62bb5b95948532fcb59fb0646b48daeb5a1660 | hoplon/demos | rpc.cljs | (ns app.rpc
(:require-macros
[javelin.core :refer [defc defc=]])
(:require
[javelin.core]
[castra.core :refer [mkremote]]))
(defc state {:random nil})
(defc error nil)
(defc loading [])
(defc= random-number (get state :random))
(def get-state
(mkremote 'app.api/get-state state error loading))
(defn ... | null | https://raw.githubusercontent.com/hoplon/demos/50d613892db0624a4f0326c1427d82f5b8e2390f/castra-simple/src/app/rpc.cljs | clojure | (ns app.rpc
(:require-macros
[javelin.core :refer [defc defc=]])
(:require
[javelin.core]
[castra.core :refer [mkremote]]))
(defc state {:random nil})
(defc error nil)
(defc loading [])
(defc= random-number (get state :random))
(def get-state
(mkremote 'app.api/get-state state error loading))
(defn ... | |
b21d67b5aa361f7c247c0d004b3a473314f4fee406c434b7ec8be9e8b1060c48 | tomhanika/conexp-clj | contexts_test.clj | ;; Copyright ⓒ the conexp-clj developers; all rights reserved.
;; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( -1.0.php )
;; which can be found in the file LICENSE at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bou... | null | https://raw.githubusercontent.com/tomhanika/conexp-clj/5e4c15697f06446f925f53d1d143528155d7dd3a/src/test/clojure/conexp/fca/contexts_test.clj | clojure | Copyright ⓒ the conexp-clj developers; all rights reserved.
The use and distribution terms for this software are covered by the
which can be found in the file LICENSE at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not re... | Eclipse Public License 1.0 ( -1.0.php )
(ns conexp.fca.contexts-test
(:use conexp.base
conexp.fca.contexts)
(:use clojure.test))
(deftest test-make-context
(is (make-context #{1 2 3} #{1 2 3} #{[1 1] [2 2] [3 3]}))
(is (make-context #{1 2 3} #{1 2 3} =))
(is (make-context #{1 2 3} #{1 2 3} <))
... |
74618e740143853890d92c487bc65adee674670e81ccd561a6170879d6c0ed5e | slepher/astranaut | sample_1.erl | %%%-------------------------------------------------------------------
@author < >
( C ) 2020 ,
%%% @doc
%%%
%%% @end
Created : 9 Jul 2020 by < >
%%%-------------------------------------------------------------------
-module(sample_1).
-compile({parse_transform, sample_transformer_1}).
%% API
-export... | null | https://raw.githubusercontent.com/slepher/astranaut/95445ee8de492ead2cd9d9671095e251e902986b/test/astranaut_SUITE_data/sample_1.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API
===================================================================
API
===================================================================
-------------------------... | @author < >
( C ) 2020 ,
Created : 9 Jul 2020 by < >
-module(sample_1).
-compile({parse_transform, sample_transformer_1}).
-export([warning_0/0, error_0/0]).
-baseline(mark_base).
-mark(mark_error_0).
-mark(mark_0).
-baseline(function_base).
error_0() ->
mark_error_1.
warning_0() ->
mark_1.... |
e5a0086e45d7074ec84f84da2511cb4b3f087f9e8cac5f22303eb56f564cb034 | avsm/mirage-duniverse | handshake_crypto.ml | open Nocrypto.Uncommon
open Nocrypto.Hash
open Core
open State
let (<+>) = Utils.Cs.(<+>)
let halve secret =
let size = Cstruct.len secret in
let half = size - size / 2 in
Cstruct.(sub secret 0 half, sub secret (size - half) half)
let p_hash (hmac, hmac_n) key seed len =
let rec expand a to_go =
let res... | null | https://raw.githubusercontent.com/avsm/mirage-duniverse/983e115ff5a9fb37e3176c373e227e9379f0d777/ocaml_modules/tls/lib/handshake_crypto.ml | ocaml | open Nocrypto.Uncommon
open Nocrypto.Hash
open Core
open State
let (<+>) = Utils.Cs.(<+>)
let halve secret =
let size = Cstruct.len secret in
let half = size - size / 2 in
Cstruct.(sub secret 0 half, sub secret (size - half) half)
let p_hash (hmac, hmac_n) key seed len =
let rec expand a to_go =
let res... | |
0b11c8e698e2c09e0099fac389177c0abb5460250d39e13a078c7e5fa978d059 | HaskellZhangSong/Introduction_to_Haskell_2ed_source | ContinuationFRPTest.hs | {-# LANGUAGE Arrows #-}
import BouncingBall
import ContinuationFRP
import Control.Arrow
fallingBall :: Ball -> SF a Ball
fallingBall (h0,v0) = proc _ -> do
v <- integral v0 -< -g
h <- integral h0 -< v
returnA -< (h,v)
detectBounce :: SF... | null | https://raw.githubusercontent.com/HaskellZhangSong/Introduction_to_Haskell_2ed_source/140c50fdccfe608fe499ecf2d8a3732f531173f5/C24/ContinuationFRPTest.hs | haskell | # LANGUAGE Arrows # |
import BouncingBall
import ContinuationFRP
import Control.Arrow
fallingBall :: Ball -> SF a Ball
fallingBall (h0,v0) = proc _ -> do
v <- integral v0 -< -g
h <- integral h0 -< v
returnA -< (h,v)
detectBounce :: SF Ball (Event Ball)
detec... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.