_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 |
|---|---|---|---|---|---|---|---|---|
e084df6edd308e936d2f0a388be840f8aa4232e274cb5a11637b106cd1f155b4 | wdebeaum/step | vicinity.lisp | ;;;;
;;;; W::vicinity
;;;;
(define-words :pos W::n :templ COUNT-PRED-TEMPL
:words (
(W::vicinity
(SENSES
((LF-PARENT ONT::loc-as-area)
(meta-data :origin cardiac :entry-date 20080509 :change-date nil :comments LM-vocab)
)
)
)
))
| null | https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/vicinity.lisp | lisp |
W::vicinity
|
(define-words :pos W::n :templ COUNT-PRED-TEMPL
:words (
(W::vicinity
(SENSES
((LF-PARENT ONT::loc-as-area)
(meta-data :origin cardiac :entry-date 20080509 :change-date nil :comments LM-vocab)
)
)
)
))
|
aeccc53793a3cca92cfed0839f7ab28d59c953891b1346133584dd23c0444097 | singpolyma/cheogram | StanzaRec.hs | module StanzaRec (StanzaRec(..), mkStanzaRec, ensureId) where
import Prelude ()
import BasicPrelude
import qualified Data.UUID as UUID (toText)
import qualified Data.UUID.V1 as UUID (nextUUID)
import qualified Data.XML.Types as XML
import qualified Network.Protocol.XMPP as XMPP
import Network.Protocol.XMPP.Internal (S... | null | https://raw.githubusercontent.com/singpolyma/cheogram/84d39a42227da069d6a4f0b442301eaa9b59d455/StanzaRec.hs | haskell | module StanzaRec (StanzaRec(..), mkStanzaRec, ensureId) where
import Prelude ()
import BasicPrelude
import qualified Data.UUID as UUID (toText)
import qualified Data.UUID.V1 as UUID (nextUUID)
import qualified Data.XML.Types as XML
import qualified Network.Protocol.XMPP as XMPP
import Network.Protocol.XMPP.Internal (S... | |
376fc15b312bf35776971af66bcebf25fbbef617e6f8afc14a82a7e5bf1eb528 | haskell/stm | cloneTChan001.hs | import Control.Concurrent.STM
main = do
c <- newTChanIO
atomically $ writeTChan c 'a'
c1 <- atomically $ cloneTChan c
atomically (readTChan c) >>= print
atomically (readTChan c1) >>= print
atomically (writeTChan c 'b')
atomically (readTChan c) >>= print
atomically (readTChan c1) >>= print
| null | https://raw.githubusercontent.com/haskell/stm/319e380ab2ddfb99ab499b6783e22f2b4faaee38/tests/cloneTChan001.hs | haskell | import Control.Concurrent.STM
main = do
c <- newTChanIO
atomically $ writeTChan c 'a'
c1 <- atomically $ cloneTChan c
atomically (readTChan c) >>= print
atomically (readTChan c1) >>= print
atomically (writeTChan c 'b')
atomically (readTChan c) >>= print
atomically (readTChan c1) >>= print
| |
a13f5d0e822a01df03fba85707811ad331015038be02f3f48d41d0e65f1eda5f | Mathieu-Desrochers/Schemings | sql-intern.scm | (import srfi-1)
(import (chicken condition))
(import (chicken format))
(declare (unit sql-intern))
(declare (uses date-time))
(declare (uses exceptions))
(declare (uses sqlite3))
binds a parameter of a sqlite3 - stmt *
(: sql-bind-parameter (pointer fixnum * -> noreturn))
(define (sql-bind-parameter sqlite3-stmt*... | null | https://raw.githubusercontent.com/Mathieu-Desrochers/Schemings/a7c322ee37bf9f43b696c52fc290488aa2dcc238/sources/units/sql-intern.scm | scheme | reads all the rows from a sql-stmt*
raises a deadlock exception
returns whether an exception was caused by a deadlock
downgrades a value to a database supported format
upgrades a value from a database supported format | (import srfi-1)
(import (chicken condition))
(import (chicken format))
(declare (unit sql-intern))
(declare (uses date-time))
(declare (uses exceptions))
(declare (uses sqlite3))
binds a parameter of a sqlite3 - stmt *
(: sql-bind-parameter (pointer fixnum * -> noreturn))
(define (sql-bind-parameter sqlite3-stmt*... |
0d404892b39f379635fb6833bdebe2710666e1fc37310bdfbd29b374b218c22e | S8A/htdp-exercises | ex393.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex393) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-... | null | https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex393.rkt | racket | about the language level of this file in a form that our tools can easily process.
A Son.R is one of:
– empty
Constraint If s is a Son.R,
no number occurs twice in s
Son
Number Son -> Boolean
is x in s
Son Son -> Son
Son Son -> Son | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex393) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
– ( cons Number Son . R )
(define es '())
(define ... |
e2ca36b7b14c678193c5620faec9a7b9ea44b210bc74c09a287f4f447f70f07d | SoftwareFoundationGroupAtKyotoU/SystemFg | pp.ml | open Format
open Syntax
open Eval
let pr = fprintf
(* generic functions to generate parens depending on precedence *)
let with_paren gt ppf_e e_up ppf e =
let (>) = gt in
if e_up > e then pr ppf "(%a)" ppf_e e else pr ppf "%a" ppf_e e
(* if t is the left/only operand of t_up, do you need parentheses for t? *)
le... | null | https://raw.githubusercontent.com/SoftwareFoundationGroupAtKyotoU/SystemFg/b703ed6b7648e081f9476348787a476ded856141/pp.ml | ocaml | generic functions to generate parens depending on precedence
if t is the left/only operand of t_up, do you need parentheses for t?
-> is right associative;
forall extends to the right as far as possible
T list is left associative and binds tighter than ->:
if t is the right operand of t_up, do ... | open Format
open Syntax
open Eval
let pr = fprintf
let with_paren gt ppf_e e_up ppf e =
let (>) = gt in
if e_up > e then pr ppf "(%a)" ppf_e e else pr ppf "%a" ppf_e e
let (<) t t_up = match t, t_up with
| (Arr(_,_) | Forall(_,_)), (Arr(_,_) | List _) -> true
| _ -> false
let (>) t_up t = false
let rec pri... |
2668ca985df66bd71c5661d1b43e33bf79c275289c52efde037f2d57d74615fd | vbmithr/breakbot | jsonrpc_utils.ml |
* Copyright ( c ) 2012 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | null | https://raw.githubusercontent.com/vbmithr/breakbot/eb82e36174d0bec97a4af197d518afcd323536b6/lib/jsonrpc_utils.ml | ocaml |
* Copyright ( c ) 2012 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | |
02fcee9d57817d111c5d052f048c1d34be6b99d525996b9e39d310da68ec15d0 | atolab/zenoh | channel.ml |
* Copyright ( c ) 2017 , 2020 ADLINK Technology Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* -2.0 , or the Apache License , Version 2.0
* which is available at -2.0 .
*
* SPDX - License - Ident... | null | https://raw.githubusercontent.com/atolab/zenoh/32e311aae6be93c001fd725b4d918b2fb4e9713d/src/zenoh-proto/channel.ml | ocaml | * NOTE: The current channel implementation uses only the default conduit,
this should be extended to support arbitrary number of conduits. |
* Copyright ( c ) 2017 , 2020 ADLINK Technology Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* -2.0 , or the Apache License , Version 2.0
* which is available at -2.0 .
*
* SPDX - License - Ident... |
1a8c1f38740d422adfb32dc85b8595a9a47030ac3d3b140b0df83721da046972 | qmuli/qmuli | Lang.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns... | null | https://raw.githubusercontent.com/qmuli/qmuli/6ca147f94642b81ab3978d502397efb60a50215b/library/Qi/Program/CF/Lang.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE GADTs #
# LANGUAGE RankNTypes #
# LANGUAGE TypeOperators #
S3Object | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
module Qi.Program.CF.Lang (
StackName(StackName)
, CfEff (..)
, createStack
, describeStacks
, updateSt... |
f35539c768e150ea1d042456877f0bfb36584a2ea6bff33f13cc0b75ed5799d4 | rowangithub/DOrder | cgr1.ml | let rec loop x y =
if (x < 100) then
loop (x+2) (y+2)
else assert (x <> 4 || y <> 0)
let main x y =
if (0 <= x && x <= 2 && 0 <= y && y <= 2) then
loop x y
else ()
let _ = main (-1) (-1) | null | https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/tests/icfp/cgr1.ml | ocaml | let rec loop x y =
if (x < 100) then
loop (x+2) (y+2)
else assert (x <> 4 || y <> 0)
let main x y =
if (0 <= x && x <= 2 && 0 <= y && y <= 2) then
loop x y
else ()
let _ = main (-1) (-1) | |
5ffd8ecf25f20e686de15f73f862cc1c830f24e5374f7b6d394bae982c6805d3 | rmculpepper/crypto | factory.rkt | Copyright 2018
;;
;; This library is free software: you can redistribute it and/or modify
;; it under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation , either version 3 of the License , or
;; (at your option) any later version.
;;
;; This library is distributed in... | null | https://raw.githubusercontent.com/rmculpepper/crypto/fec745e8af7e3f4d5eaf83407dde2817de4c2eb0/crypto-lib/private/decaf/factory.rkt | racket |
This library is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
(at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCH... | Copyright 2018
by the Free Software Foundation , either version 3 of the License , or
GNU Lesser General Public License for more details .
You should have received a copy of the GNU Lesser General Public License
#lang racket/base
(require racket/class
"../common/interfaces.rkt"
"../common/c... |
24891037a7e2d8c664e20f6086933bba56ca42d9db0420e27d96c793063c795c | sim642/odep | depgraph.ml | module Dune_describe_graph = Dune_describe_graph
module Findlib_graph = Findlib_graph
module Opam_installed_graph = Opam_installed_graph
type output_type =
| Dot
| Mermaid
module Dot = Ocamlgraph_extra.Graphviz.Dot (Dot_graph.G)
module Mermaid = Ocamlgraph_extra.Mermaid.Make (Dot_graph.G)
let output t g =
mat... | null | https://raw.githubusercontent.com/sim642/odep/5c936790cfeb8e18182a54a88ca970f8b9c5f5b6/src/depgraph/depgraph.ml | ocaml | module Dune_describe_graph = Dune_describe_graph
module Findlib_graph = Findlib_graph
module Opam_installed_graph = Opam_installed_graph
type output_type =
| Dot
| Mermaid
module Dot = Ocamlgraph_extra.Graphviz.Dot (Dot_graph.G)
module Mermaid = Ocamlgraph_extra.Mermaid.Make (Dot_graph.G)
let output t g =
mat... | |
8c71b9dfdd1b542ba7e0d832ba06c26b2343234b3e286e515a0a7f133d6b42fc | pauek/arc-sbcl | ac.lisp |
(in-package :arc/test)
(deftest t-literals
(chkev "1" 1)
(chkev "#\\a" #\a)
(chkev "\"a\"" "a")
(chkev "1.45" 1.45)
(chkev "nil" nil)
(chkev "t" t)
(chkev "(quote a)" 'a)
(chkev "(quote (1 2 3))" '(1 2 3)))
(deftest t-funcalls
(chkev "((fn () -1))" -1)
... | null | https://raw.githubusercontent.com/pauek/arc-sbcl/c1a5be2a55b9b3e1327409f71d9bc985577198d6/test/ac.lisp | lisp |
(in-package :arc/test)
(deftest t-literals
(chkev "1" 1)
(chkev "#\\a" #\a)
(chkev "\"a\"" "a")
(chkev "1.45" 1.45)
(chkev "nil" nil)
(chkev "t" t)
(chkev "(quote a)" 'a)
(chkev "(quote (1 2 3))" '(1 2 3)))
(deftest t-funcalls
(chkev "((fn () -1))" -1)
... | |
a40fe98cff0b5a771a48307ceb20b717f9dd113672976f745499ecddd3cfe627 | schemedoc/implementation-metadata | ypsilon.scm | (title "Ypsilon")
(long-title "Ypsilon Scheme System")
(homepage-url "")
(wikipedia en "Ypsilon (Scheme implementation)")
(issue-tracker-url "")
(repology "ypsilon")
(person "Yoshikatsu Fujita")
(company "LittleWing Co. Ltd.")
(github "fujita-y/ypsilon")
(documentation
(title "Assorted documents on Google Code")
... | null | https://raw.githubusercontent.com/schemedoc/implementation-metadata/6280d9c4c73833dc5bd1c9bef9b45be6ea5beb68/schemes/ypsilon.scm | scheme | (title "Ypsilon")
(long-title "Ypsilon Scheme System")
(homepage-url "")
(wikipedia en "Ypsilon (Scheme implementation)")
(issue-tracker-url "")
(repology "ypsilon")
(person "Yoshikatsu Fujita")
(company "LittleWing Co. Ltd.")
(github "fujita-y/ypsilon")
(documentation
(title "Assorted documents on Google Code")
... | |
7e46fb9aab79cd0e389a8069b2bc3e3fd4c6e1d70da4ab6b7dc55c5ac5a37065 | k-qy/knotation | knot.hs | This code draws the raw knots and links up to n crossings , using the ` diagrams ` library , and gives their notation . It does n't filter out links or equivalent knots / links .
Top - level approach : the code draws crossings , puts crossings next to each other to form twists , flips and adds twists / tangles t... | null | https://raw.githubusercontent.com/k-qy/knotation/2730ec0b02df97077bede8f17b96d89a854554ee/knot.hs | haskell | Needed for `diagrams` library
To compile and generate image:
alias chrome '/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --kiosk'
make knot.hs ; ./knot -o knot.svg -h 500 ; chrome knot.svg
-h controls the height. You can also use -w.
--------
includes duplicates and undrawable notations; ignores... | This code draws the raw knots and links up to n crossings , using the ` diagrams ` library , and gives their notation . It does n't filter out links or equivalent knots / links .
Top - level approach : the code draws crossings , puts crossings next to each other to form twists , flips and adds twists / tangles t... |
7e884176be70442c56379b69d38c8e0a89acb6a20ae6474db66f80e195676a12 | mcorbin/meuse | git.clj | (ns meuse.git
"Interacts with a git repository"
(:require [meuse.config :as config]
[meuse.log :as log]
[meuse.metric :as metric]
[exoscale.cloak :as cloak]
[exoscale.ex :as ex]
[mount.core :refer [defstate]]
[clojure.java.io :as io]
... | null | https://raw.githubusercontent.com/mcorbin/meuse/d2b74543fce37c8cde770ae6f6097cabb509a804/src/meuse/git.clj | clojure | (ns meuse.git
"Interacts with a git repository"
(:require [meuse.config :as config]
[meuse.log :as log]
[meuse.metric :as metric]
[exoscale.cloak :as cloak]
[exoscale.ex :as ex]
[mount.core :refer [defstate]]
[clojure.java.io :as io]
... | |
622795464abb7bf4af5ff761577b9b299fb306d93c7e8593a9406921b40294e7 | cldwalker/nbb-clis | test_runner.cljs | (ns test-runner
(:require [clojure.test :as t]
[nbb.core :as nbb]
[logseq-roundtrip-test]
[logseq-block-move-test]))
(defn init []
(t/run-tests 'logseq-roundtrip-test
'logseq-block-move-test))
(when (= nbb/*file* (:file (meta #'init)))
(init))
| null | https://raw.githubusercontent.com/cldwalker/nbb-clis/3b4e346aaee6e9cdb7cae4a7a7fcdb900c54ee96/test/test_runner.cljs | clojure | (ns test-runner
(:require [clojure.test :as t]
[nbb.core :as nbb]
[logseq-roundtrip-test]
[logseq-block-move-test]))
(defn init []
(t/run-tests 'logseq-roundtrip-test
'logseq-block-move-test))
(when (= nbb/*file* (:file (meta #'init)))
(init))
| |
a7120b14bc386edb60caae2d1af0a8423be9fcc1f4504e42667b5f69ecc97662 | LeventErkok/sbv | GCD.hs | -----------------------------------------------------------------------------
-- |
Module : Documentation . SBV.Examples . CodeGeneration . GCD
Copyright : ( c )
-- License : BSD3
-- Maintainer:
-- Stability : experimental
--
Computing GCD symbolically , and generating C code for it . This example
-- ill... | null | https://raw.githubusercontent.com/LeventErkok/sbv/0d791d9f4d1de6bd915b6d7d3f9a550385cb27a5/Documentation/SBV/Examples/CodeGeneration/GCD.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD3
Maintainer:
Stability : experimental
illustrates symbolic termination related issues when programming with
on the value of a symbolic variable. The technique we use is to statically
enforce termination by using a rec... | Module : Documentation . SBV.Examples . CodeGeneration . GCD
Copyright : ( c )
Computing GCD symbolically , and generating C code for it . This example
SBV , when the termination of a recursive algorithm crucially depends
module Documentation.SBV.Examples.CodeGeneration.GCD where
import Data.SBV
import... |
41676da41fb24bd00c6daf6b6c22eeba4447f8533008c216cbd6a6b36316089e | manuel-serrano/hop | tyflow.scm | ;*=====================================================================*/
* serrano / prgm / project / hop / hop / js2scheme / tyflow.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation ... | null | https://raw.githubusercontent.com/manuel-serrano/hop/0ba67faea16481d8a09b997c5b6ad919cd7babb9/js2scheme/tyflow.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* js2scheme type inference */
* -----------------------... | * serrano / prgm / project / hop / hop / js2scheme / tyflow.scm * /
* Author : * /
* Creation : Sun Oct 16 06:12:13 2016 * /
* Last change : Sun Mar 6 16:55:10 2022 ( serrano ) * /
* Cop... |
8ae2a3f8a277651e72c0dc5f755b9157d6d899878b60ede6af5445fc1acfb984 | rabbitmq/rabbitmq-amqp1.0-client | amqp10_client_frame_reader.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(amqp10_client_frame_reader).
-behaviour(g... | null | https://raw.githubusercontent.com/rabbitmq/rabbitmq-amqp1.0-client/010830f12ea967aa34bdadc79bddebfd35387406/src/amqp10_client_frame_reader.erl | erlang |
API
gen_statem callbacks
===================================================================
API
===================================================================
@doc
Passes the connection process PID to the reader process.
This function is called when a connection supervision tree is
started.
============... | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
-module(amqp10_client_frame_reader).
-behaviour(gen_sta... |
b15966dccdfdef4ae55b0cc50ed519f8dc43ab146a8555b203e5a5ef916baecd | frasertweedale/hs-tax-ato | Common.hs | -- This file is part of hs-tax-ato
Copyright ( C ) 2018 Fraser Tweedale
--
-- hs-tax-ato is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 of the License , or
-- (at your option) any... | null | https://raw.githubusercontent.com/frasertweedale/hs-tax-ato/bddb0b14e4754d22eed301f4639c99bf43eccd52/src/Data/Tax/ATO/Common.hs | haskell | This file is part of hs-tax-ato
hs-tax-ato is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOS... | Copyright ( C ) 2018 Fraser Tweedale
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU Affero General Public License
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTy... |
7025ddf6ca6e21775c50b0866a8656c645d59c2758729d1a62236ef9b8d82663 | metabase/metabase | bookmark_test.clj | (ns metabase.api.bookmark-test
"Tests for /api/bookmark endpoints."
(:require
[clojure.test :refer :all]
[metabase.models.bookmark
:refer [BookmarkOrdering CardBookmark CollectionBookmark DashboardBookmark]]
[metabase.models.card :refer [Card]]
[metabase.models.collection :refer [Collection]]
[me... | null | https://raw.githubusercontent.com/metabase/metabase/3b8f0d881c19c96bfdff95a275440db97b1e0173/test/metabase/api/bookmark_test.clj | clojure | (ns metabase.api.bookmark-test
"Tests for /api/bookmark endpoints."
(:require
[clojure.test :refer :all]
[metabase.models.bookmark
:refer [BookmarkOrdering CardBookmark CollectionBookmark DashboardBookmark]]
[metabase.models.card :refer [Card]]
[metabase.models.collection :refer [Collection]]
[me... | |
14517165cedbbd55f019f248d52920f53ee95532db77bb0e18acb79c217f95a8 | composewell/streamly | Type.hs | -- |
Module : Streamly . Internal . Data . Unfold . Type
Copyright : ( c ) 2019 Composewell Technologies
-- License : BSD3
-- Maintainer :
-- Stability : experimental
Portability : GHC
--
-- To run the examples in this module:
--
> > > import qualified Streamly . Data . Stream as Stream
> > >... | null | https://raw.githubusercontent.com/composewell/streamly/1f9dbb8d8abd706d7f4058ccd67472ba86938b0c/core/src/Streamly/Internal/Data/Unfold/Type.hs | haskell | |
License : BSD3
Maintainer :
Stability : experimental
To run the examples in this module:
* Basic Constructors
* From Values
* From Containers
* Transformations
* Trimming
* Nesting
, manyInterleave2
Applicative
$setup
----------------------------------------------------------------------------... | Module : Streamly . Internal . Data . Unfold . Type
Copyright : ( c ) 2019 Composewell Technologies
Portability : GHC
> > > import qualified Streamly . Data . Stream as Stream
> > > import qualified Streamly . Data . Fold as Fold
> > > import qualified Streamly . Internal . Data . Unfold as Unfold
... |
cfc995ae4ee97efc7b49a07b2b0e6a185b3b210454de6b5ff82ce580d60e1315 | aleator/Simple-SVM | PlotOneClass.hs | # LANGUAGE ForeignFunctionInterface , BangPatterns , ScopedTypeVariables , TupleSections ,
RecordWildCards , NoMonomorphismRestriction #
RecordWildCards, NoMonomorphismRestriction #-}
module Main where
import AI.SVM.Simple
import qualified Data.Vector.Storable as V
import Diagrams.Prelude
i... | null | https://raw.githubusercontent.com/aleator/Simple-SVM/591b86e645e04ac8e7b73246e9a6b573840fb251/Examples/PlotOneClass.hs | haskell | # LANGUAGE ForeignFunctionInterface , BangPatterns , ScopedTypeVariables , TupleSections ,
RecordWildCards , NoMonomorphismRestriction #
RecordWildCards, NoMonomorphismRestriction #-}
module Main where
import AI.SVM.Simple
import qualified Data.Vector.Storable as V
import Diagrams.Prelude
i... | |
2192bdfa1cf209e6955d2d5c20e6c6c85fb5c7b6f67c52b41efac6f621c49edf | OlafChitil/hat | DirectoryBuiltinTypes.hs | module Hat.DirectoryBuiltinTypes
(Permissions(..), greadable, hreadable, gwritable,
hwritable, gexecutable, hexecutable, gsearchable,
hsearchable, aPermissions, aexecutable, areadable,
asearchable, awritable)
where
import qualified Prelude
import qualified Hat.Hat as T
import quali... | null | https://raw.githubusercontent.com/OlafChitil/hat/8840a480c076f9f01e58ce24b346850169498be2/Hat/DirectoryBuiltinTypes.hs | haskell | module Hat.DirectoryBuiltinTypes
(Permissions(..), greadable, hreadable, gwritable,
hwritable, gexecutable, hexecutable, gsearchable,
hsearchable, aPermissions, aexecutable, areadable,
asearchable, awritable)
where
import qualified Prelude
import qualified Hat.Hat as T
import quali... | |
638bc6771b9c333ab727d12672c1b98ca901592fbbb3bde2a90f69e0c9c638dd | weblocks-framework/weblocks | widget.lisp | (in-package :weblocks)
(export '(widget-presentation get-widget-form-value-from-request))
(defclass widget-presentation (form-presentation)
((widget-init :initarg :widget-init :accessor widget-presentation-widget)
(widget-set-value :initform nil :initarg :set-value)
(current-widget :initform nil)))
(defmetho... | null | https://raw.githubusercontent.com/weblocks-framework/weblocks/fe96152458c8eb54d74751b3201db42dafe1708b/src/views/types/presentations/widget.lisp | lisp | (in-package :weblocks)
(export '(widget-presentation get-widget-form-value-from-request))
(defclass widget-presentation (form-presentation)
((widget-init :initarg :widget-init :accessor widget-presentation-widget)
(widget-set-value :initform nil :initarg :set-value)
(current-widget :initform nil)))
(defmetho... | |
4095c64a1176cc644db004d9da2edb000194e8b3768319e0c65afc8809eec4d1 | taffybar/taffybar | Battery.hs | {-# LANGUAGE OverloadedStrings #-}
-----------------------------------------------------------------------------
-- |
Module : System . . Information . Battery
Copyright : ( c )
-- License : BSD3-style (see LICENSE)
--
Maintainer :
-- Stability : unstable
-- Portability : unportable
--
-- ... | null | https://raw.githubusercontent.com/taffybar/taffybar/9e18037d1f707291de1301929209053472170b60/src/System/Taffybar/Information/Battery.hs | haskell | # LANGUAGE OverloadedStrings #
---------------------------------------------------------------------------
|
License : BSD3-style (see LICENSE)
Stability : unstable
Portability : unportable
This module provides functions for querying battery information using the
-------------------------------------------... | Module : System . . Information . Battery
Copyright : ( c )
Maintainer :
UPower dbus , as well as a " BroadcastChan " system for allowing multiple
readers to receive ' BatteryState ' updates without duplicating requests .
module System.Taffybar.Information.Battery
( BatteryInfo(..)
, Bat... |
0043268e428281c148caecc9784ef98b7b7f45f1ac2347aaee046e893c31ee62 | francescoc/erlangprogramming | dist.erl | %% Code from
%% Erlang Programming
and
O'Reilly , 2008
%% /
/
( c ) and
-module(dist).
-export([t/1]).
t(From) -> From ! node().
| null | https://raw.githubusercontent.com/francescoc/erlangprogramming/b4c39cbebe6599f23eb9d1a052316baf75e40a47/chapter11/dist.erl | erlang | Code from
Erlang Programming
/ | and
O'Reilly , 2008
/
( c ) and
-module(dist).
-export([t/1]).
t(From) -> From ! node().
|
6ffe5ddf996a63fb5c3f8569d65bc9efc2774889e1015fd3a9bd7a0c02fbab5e | timbod7/haskell-chart | example1.hs | import Graphics.Rendering.Chart
import Data.Colour
import Data.Colour.Names
import Data.Default.Class
import Graphics.Rendering.Chart.Backend.Cairo
import Control.Lens
setLinesBlue :: PlotLines a b -> PlotLines a b
setLinesBlue = plot_lines_style . line_color .~ opaque blue
chart = toRenderable layout
where
am... | null | https://raw.githubusercontent.com/timbod7/haskell-chart/8c5a823652ea1b4ec2adbced4a92a8161065ead6/wiki-examples/example1.hs | haskell | import Graphics.Rendering.Chart
import Data.Colour
import Data.Colour.Names
import Data.Default.Class
import Graphics.Rendering.Chart.Backend.Cairo
import Control.Lens
setLinesBlue :: PlotLines a b -> PlotLines a b
setLinesBlue = plot_lines_style . line_color .~ opaque blue
chart = toRenderable layout
where
am... | |
a81b39a877187f17baef1df3f3d16ae6b21cfc2f70c17bae755e74daaea8250c | valmirjunior0088/curios | Module.hs | module WebAssembly.Syntax.Module
( magic
, version
, CustomSec (..)
, customSecId
, TypeSec (..)
, typeSecId
, ImportDesc (..)
, Import (..)
, ImportSec (..)
, importSecId
, FuncSec (..)
, funcSecId
, Table (..)
, TableSec (..)
, tableSecId
, Mem (..)
, MemSec (..)
, memSecId
, Glo... | null | https://raw.githubusercontent.com/valmirjunior0088/curios/391bebe67d5e7a4c3d51c758da9ba96b38c11705/src/WebAssembly/Syntax/Module.hs | haskell | module WebAssembly.Syntax.Module
( magic
, version
, CustomSec (..)
, customSecId
, TypeSec (..)
, typeSecId
, ImportDesc (..)
, Import (..)
, ImportSec (..)
, importSecId
, FuncSec (..)
, funcSecId
, Table (..)
, TableSec (..)
, tableSecId
, Mem (..)
, MemSec (..)
, memSecId
, Glo... | |
ebb741407200f95f0045b8a93c06b8e42900971afaf396fd7fa373db93770d17 | antono/guix-debian | mc.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2014 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU 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 Lice... | null | https://raw.githubusercontent.com/antono/guix-debian/85ef443788f0788a62010a942973d4f7714d10b4/gnu/packages/mc.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2014 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu packages mc)
#:use-module (guix packages)
#:use-module (guix licenses)
#:use-module (gui... |
b1d168a06a98bc7b8748c416282b729f8f60d5ff8fbf836745a40fb3856f64e3 | cartazio/tlaps | m_flatten.mli |
* Copyright ( C ) 2011 INRIA and Microsoft Corporation
* Copyright (C) 2011 INRIA and Microsoft Corporation
*)
open M_t;;
val flatten :
modctx -> mule -> Util.Coll.Ss.t -> (mule_ Property.wrapped * Util.Coll.Ss.t)
;;
| null | https://raw.githubusercontent.com/cartazio/tlaps/562a34c066b636da7b921ae30fc5eacf83608280/src/module/m_flatten.mli | ocaml |
* Copyright ( C ) 2011 INRIA and Microsoft Corporation
* Copyright (C) 2011 INRIA and Microsoft Corporation
*)
open M_t;;
val flatten :
modctx -> mule -> Util.Coll.Ss.t -> (mule_ Property.wrapped * Util.Coll.Ss.t)
;;
| |
eddefacdf8d4f5bb4b85288484680d301445f458a8b5c3b31babd10e2a6996b7 | exercism/common-lisp | example.lisp | (defpackage :space-age
(:use :common-lisp))
(in-package :space-age)
(defvar +earth-period+ 31557600)
(defvar +planets-and-periods+
`((:mercury ,(* 0.2408467 +earth-period+))
(:venus ,(* 0.61519726 +earth-period+))
(:earth ,(* 1 +earth-period+))
(:mars ,(* 1.8808158 +earth-period+))
(:jupiter ,(* ... | null | https://raw.githubusercontent.com/exercism/common-lisp/0bb38d1b126f7dc90d86f04c41479d4eaf35df74/exercises/practice/space-age/.meta/example.lisp | lisp | (defpackage :space-age
(:use :common-lisp))
(in-package :space-age)
(defvar +earth-period+ 31557600)
(defvar +planets-and-periods+
`((:mercury ,(* 0.2408467 +earth-period+))
(:venus ,(* 0.61519726 +earth-period+))
(:earth ,(* 1 +earth-period+))
(:mars ,(* 1.8808158 +earth-period+))
(:jupiter ,(* ... | |
8a501a606f8621853918fce924cdccb2406e72daf218aa15e57026cd455a30ea | racket/gui | info.rkt | #lang info
(define version '(400))
(define install-collection "installer.rkt")
(define copy-man-pages '("mred.1"))
(define release-note-files
'(("GRacket and racket/gui" "HISTORY.txt"
0
(("Porting from v5.0.x to v5.1" "Draw_and_GUI_5_1.txt")
("Porting to v1xxx" "MrEd_100.txt")
("Porting to v1x... | null | https://raw.githubusercontent.com/racket/gui/d1fef7a43a482c0fdd5672be9a6e713f16d8be5c/gui-lib/mred/info.rkt | racket | #lang info
(define version '(400))
(define install-collection "installer.rkt")
(define copy-man-pages '("mred.1"))
(define release-note-files
'(("GRacket and racket/gui" "HISTORY.txt"
0
(("Porting from v5.0.x to v5.1" "Draw_and_GUI_5_1.txt")
("Porting to v1xxx" "MrEd_100.txt")
("Porting to v1x... | |
6d0f13e4da2cf84f2602bde29189ae242cd379afc6a5dea3a074654977a6e50f | facebook/duckling | Rules.hs | Copyright ( c ) 2016 - present , Facebook , Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
{-# LANGUAGE GADTs #-}
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
module Duckling.AmountOfM... | null | https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/AmountOfMoney/EN/Rules.hs | haskell | All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
TODO: complete | Copyright ( c ) 2016 - present , Facebook , Inc.
# LANGUAGE LambdaCase #
module Duckling.AmountOfMoney.EN.Rules
( rules
) where
import Data.Maybe
import Data.String
import Prelude
import qualified Data.Text as Text
import Duckling.AmountOfMoney.Helpers
import Duckling.AmountOfMoney.Types (Currency(..), Amoun... |
663036ab155e1583b35fa1ff5bc61272b44ac9ca06744fbcb440980aa6257a94 | finkel-lang/finkel | bind-pat.hs | Just x = lookup k vs -- Haskell
| null | https://raw.githubusercontent.com/finkel-lang/finkel/c3c7729d5228bd7e0cf76e8ff05fe2f79a0ec0a2/doc/include/language-syntax/decl/bind-pat.hs | haskell | Haskell | |
37c0342c49b431d217cbbc31cfcb38c489a8dead591d44c5868a93a3dad09789 | ocaml-flambda/flambda-backend | to_cmm_expr.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-flambda/flambda-backend/527c173ab2d4943c372256b769e17bee98ccfc62/middle_end/flambda2/to_cmm/to_cmm_expr.ml | ocaml | ************************************************************************
OCaml
... | , OCamlPro
the GNU Lesser General Public License version 2.1 , with the
[@@@ocaml.warning "+a-30-40-41-42"]
open! Flambda.Import
module Env = To_cmm_env
module Ece = Effects_and_coeffects
module K = Flambda_kind
module C = struct
include Cmm_helpers
... |
732ac725a3505d137b622ad27971411de4b0be443aabb22b0872ebb7d2faead3 | ygmpkk/house | Unicode.hs | {-# OPTIONS -optc-DSTANDALONE #-}
{-# OPTIONS -#include "config.h" #-}
# LINE 1 " Unicode.hsc " #
{-# OPTIONS -fno-implicit-prelude #-}
# LINE 2 " Unicode.hsc " #
-----------------------------------------------------------------------------
-- |
Module :
Copyright : ( c ) The University of Glasgow , 2... | null | https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/libraries/base/GHC/Unicode.hs | haskell | # OPTIONS -optc-DSTANDALONE #
# OPTIONS -#include "config.h" #
# OPTIONS -fno-implicit-prelude #
---------------------------------------------------------------------------
|
License : see libraries/base/LICENSE
Maintainer :
Stability : internal
Implementations for the character predicates (isLower, ... | # LINE 1 " Unicode.hsc " #
# LINE 2 " Unicode.hsc " #
Module :
Copyright : ( c ) The University of Glasgow , 2003
Portability : non - portable ( GHC extensions )
module GHC.Unicode (
isAscii, isLatin1, isControl,
isAsciiUpper, isAsciiLower,
isPrint, isSpace, isUpper,
isLower, isA... |
97fb2f9e716803f15624e6e7ad4021ecccc2b683d63179ece03e637e53a04e61 | onedata/op-worker | file_popularity_test_SUITE.erl | %%%-------------------------------------------------------------------
@author
( C ) 2018 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%%--------------------------------------------------------------------
%%% @doc
%%% This module contains tests of file_popular... | null | https://raw.githubusercontent.com/onedata/op-worker/b0e4045090b180f28c79d40b9b334d7411ec3ca5/test_distributed/file_popularity_test_SUITE.erl | erlang | -------------------------------------------------------------------
--------------------------------------------------------------------
@doc
This module contains tests of file_popularity_view.
The view is queried using view_traverse mechanism.
@end
------------------------------------------------------------------... | @author
( C ) 2018 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
-module(file_popularity_test_SUITE).
-author("Jakub Kudzia").
-behaviour(view_traverse).
-include("global_definitions.hrl").
-include("lfm_test_utils.hrl").
-include("modules/fslogic/acl.hrl").
-i... |
2f6d9d08e9ed2beceda8642150d0b973573c0851c8a0b2bc1def6406b6d49236 | mstksg/uncertain | Hople.hs | {-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveTraversable #-}
# LANGUAGE NoImplicitPrelude #
{-# OPTIONS_HADDOCK hide #-}
{-# OPTIONS_HADDOCK prune #-}
-- |
-- Module : Data.Hople
Copyright : ( c ) 2016
-- License : BSD3
--
Maintainer :
-- Stab... | null | https://raw.githubusercontent.com/mstksg/uncertain/d68fc14bbe311f4a50df75a7e878343de6170bf0/src/Data/Hople.hs | haskell | # LANGUAGE DeriveFoldable #
# LANGUAGE DeriveFunctor #
# LANGUAGE DeriveTraversable #
# OPTIONS_HADDOCK hide #
# OPTIONS_HADDOCK prune #
|
Module : Data.Hople
License : BSD3
Stability : experimental
Portability : non-portable
Homogeneous strict tuples used for implementing 'liftU2',... | # LANGUAGE NoImplicitPrelude #
Copyright : ( c ) 2016
Maintainer :
module Data.Hople
( H1(..)
, H2(..)
, H3(..)
, H4(..)
, H5(..)
, curryH1, curryH2, curryH3, curryH4, curryH5
, uncurryH1, uncurryH2, uncurryH3, uncurryH4, uncurryH5
)
where
import Prelude.Compat
data H1 a = H1 !a
der... |
58f1a6189531cde4ecbc9778d5e7c31ace0a933272a10acfed1f9973889e97e5 | ntestoc3/burp-clj | proxy.clj | (ns burp-clj.proxy
(:require [burp-clj.helper :as helper])
(:import [burp IProxyListener]))
(defn make-proxy-proc [proc-fn]
(reify IProxyListener
(processProxyMessage [this is-req msg]
(proc-fn is-req msg))))
| null | https://raw.githubusercontent.com/ntestoc3/burp-clj/436802d34fb77e183cf513ba767e3310d96f6946/src/burp_clj/proxy.clj | clojure | (ns burp-clj.proxy
(:require [burp-clj.helper :as helper])
(:import [burp IProxyListener]))
(defn make-proxy-proc [proc-fn]
(reify IProxyListener
(processProxyMessage [this is-req msg]
(proc-fn is-req msg))))
| |
c3867561180c8a5a1c31f789ac04123856c41779ec950f1b4dd002ef925881e9 | piotr-yuxuan/closeable-map | project.clj | (defproject piotr-yuxuan/closeable-map (-> "./resources/closeable-map.version" slurp .trim)
:description "Application state management made simple: a Clojure map that implements java.io.Closeable."
:url "-yuxuan/closeable-map"
:license {:name "European Union Public License 1.2 or later"
:url "-text-eu... | null | https://raw.githubusercontent.com/piotr-yuxuan/closeable-map/ee7e2f04b36ed73c25864d854b2c771ef3157c52/project.clj | clojure | (defproject piotr-yuxuan/closeable-map (-> "./resources/closeable-map.version" slurp .trim)
:description "Application state management made simple: a Clojure map that implements java.io.Closeable."
:url "-yuxuan/closeable-map"
:license {:name "European Union Public License 1.2 or later"
:url "-text-eu... | |
dfd8ecf7e818af4a544ffc5ece30c6a439b0602d881b4016c8df29e4f22d3ee3 | multimodalrouting/osm-fulcro | components.cljs | (ns app.ui.framework7.components
(:require
[app.ui.framework7.factory-helpers :as h]
["framework7-react/components/accordion-content" :default AccordionContent]
["framework7-react/components/accordion-item" :default AccordionItem]
["framework7-react/components/accordion-toggle" :default AccordionToggl... | null | https://raw.githubusercontent.com/multimodalrouting/osm-fulcro/dedbf40686a18238349603021687694e5a4c31b6/src/main/app/ui/framework7/components.cljs | clojure | (ns app.ui.framework7.components
(:require
[app.ui.framework7.factory-helpers :as h]
["framework7-react/components/accordion-content" :default AccordionContent]
["framework7-react/components/accordion-item" :default AccordionItem]
["framework7-react/components/accordion-toggle" :default AccordionToggl... | |
e64ee978bdf87b030ac1f0aa26cc99cc2309d6a5c40f5a081aa7ed618d1091d7 | ProjectMAC/propagators | core-test.scm | ;;; ----------------------------------------------------------------------
Copyright 2009 - 2010 .
;;; ----------------------------------------------------------------------
This file is part of Propagator Network Prototype .
;;;
Propagator Network Prototype is free software ; you can
;;; redistribute it and/o... | null | https://raw.githubusercontent.com/ProjectMAC/propagators/add671f009e62441e77735a88980b6b21fad7a79/core/test/core-test.scm | scheme | ----------------------------------------------------------------------
----------------------------------------------------------------------
you can
redistribute it and/or modify it under the terms of the GNU
any later version.
will be useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of M... | Copyright 2009 - 2010 .
This file is part of Propagator Network Prototype .
General Public License as published by the Free Software
Foundation , either version 3 of the License , or ( at your option )
Propagator Network Prototype is distributed in the hope that it
You should have received a copy of the G... |
3a4154dcc456877ba11afab62981ece47875f1155d5375a906149e804835928d | kepler16/next.cljs | build.clj | (ns build
(:require [clojure.tools.build.api :as b]
[org.corfield.build :as bb]))
(def global-opts
{:repository "github-kepler"
:lib 'kepler16/next.cljs})
(defn release-prepare [opts]
(->> opts
(merge global-opts)
(bb/clean)
(bb/jar)))
(defn release-publish [opts]
(->> opts... | null | https://raw.githubusercontent.com/kepler16/next.cljs/99b2c934c8c8b66f7f6085e64be45f616f4ba779/build.clj | clojure | (ns build
(:require [clojure.tools.build.api :as b]
[org.corfield.build :as bb]))
(def global-opts
{:repository "github-kepler"
:lib 'kepler16/next.cljs})
(defn release-prepare [opts]
(->> opts
(merge global-opts)
(bb/clean)
(bb/jar)))
(defn release-publish [opts]
(->> opts... | |
04e4f3d6e3430a710dde4ef6f312717d713cc60df0df60563acacd1e48a51334 | nitrogen/nitrogen | action.erl | %% -*- mode: nitrogen -*-
%% vim: ts=4 sw=4 et
-module (action_[[[NAME]]]).
-include_lib ("nitrogen_core/include/wf.hrl").
-include("records.hrl").
-export([
render_action/1
]).
%% move the following record definition to site/include/records.hrl
-record([[[NAME]]], {?ACTION_BASE(action_[[[NAME]]]),
attr1 :... | null | https://raw.githubusercontent.com/nitrogen/nitrogen/7b39d2976c2b77e1b92bc026e14068d1e1017c73/rel/overlay/common/site/.prototypes/action.erl | erlang | -*- mode: nitrogen -*-
vim: ts=4 sw=4 et
move the following record definition to site/include/records.hrl | -module (action_[[[NAME]]]).
-include_lib ("nitrogen_core/include/wf.hrl").
-include("records.hrl").
-export([
render_action/1
]).
-record([[[NAME]]], {?ACTION_BASE(action_[[[NAME]]]),
attr1 :: any(),
attr2 :: any()
}).
-spec render_action(#[[[NAME]]]{}) -> actions().
render_action(_Record = #... |
86842f5612583f30565d75ba9e711990599f55825e1259b4c2124d6f9f6ac5e2 | waymonad/waymonad | Box.hs |
waymonad A wayland compositor in the spirit of xmonad
Copyright ( C ) 2017
This library is free software ; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
version 2.1 of the License , or ( at your op... | null | https://raw.githubusercontent.com/waymonad/waymonad/18ab493710dd54c330fb4d122ed35bc3a59585df/src/Config/Box.hs | haskell | # LANGUAGE OverloadedStrings, ApplicativeDo # |
waymonad A wayland compositor in the spirit of xmonad
Copyright ( C ) 2017
This library is free software ; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
version 2.1 of the License , or ( at your op... |
dfaba0188c51f484874e40cfb760269d0e8ba5809db0a1d0f86246af2117d623 | facebook/flow | operator_precedence_test.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/flow/741104e69c43057ebd32804dd6bcc1b5e97548ea/src/parser_utils/output/__tests__/js_layout_generator/operator_precedence_test.ml | ocaml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | |
c74b145898fbebfe4c3b13a334ad4433fccfbb268ff3e812c65336b14b7935bc | ultralisp/ultralisp | metadata.lisp | (defpackage #:ultralisp/metadata
(:use #:cl)
(:import-from #:alexandria
#:make-keyword)
(:import-from #:arrows
#:->)
(:import-from #:dexador)
(:import-from #:jonathan)
(:import-from #:function-cache
#:defcached)
(:export
#:read-metadata
#:metadata
#... | null | https://raw.githubusercontent.com/ultralisp/ultralisp/37bd5d92b2cf751cd03ced69bac785bf4bcb6c15/src/metadata.lisp | lisp | (defpackage #:ultralisp/metadata
(:use #:cl)
(:import-from #:alexandria
#:make-keyword)
(:import-from #:arrows
#:->)
(:import-from #:dexador)
(:import-from #:jonathan)
(:import-from #:function-cache
#:defcached)
(:export
#:read-metadata
#:metadata
#... | |
adc0218aefb565987618a7dca9f0c104268d151d6d594871c29b6267d2989f75 | ocaml-ppx/ppx | poly_env.mli | type env
val create : vars:string list -> args:Astlib.Grammar.targ list -> env
val uninstantiated : string list -> env
val empty_env : env
val env_is_empty : env -> bool
val args : env -> Astlib.Grammar.targ list
val subst_ty : Astlib.Grammar.ty -> env:env -> Astlib.Grammar.ty
val subst_decl : Astlib.Grammar.decl ... | null | https://raw.githubusercontent.com/ocaml-ppx/ppx/40e5a35a4386d969effaf428078c900bd03b78ec/ast/cinaps/poly_env.mli | ocaml | type env
val create : vars:string list -> args:Astlib.Grammar.targ list -> env
val uninstantiated : string list -> env
val empty_env : env
val env_is_empty : env -> bool
val args : env -> Astlib.Grammar.targ list
val subst_ty : Astlib.Grammar.ty -> env:env -> Astlib.Grammar.ty
val subst_decl : Astlib.Grammar.decl ... | |
8207ac9d00ea65cc3b40875826799028a12dcf667f502284c0e68d0dcee44b32 | godfat/sandbox | hash.hs | output 2
module TestHash where
import GHC.Int
import Data.HashTable as HashTable
import Data.Maybe as Maybe
hash :: IO (HashTable Int32 Int32)
hash = new (==) id
main = do
h <- hash
insert h 1 2
v <- HashTable.lookup h 1
putStrLn $ show $ Maybe.fromJust v
| null | https://raw.githubusercontent.com/godfat/sandbox/eb6294238f92543339adfdfb4ba88586ba0e82b8/haskell/hash.hs | haskell | output 2
module TestHash where
import GHC.Int
import Data.HashTable as HashTable
import Data.Maybe as Maybe
hash :: IO (HashTable Int32 Int32)
hash = new (==) id
main = do
h <- hash
insert h 1 2
v <- HashTable.lookup h 1
putStrLn $ show $ Maybe.fromJust v
| |
ac81a1e8c27398db3fae892ec1e98c42f5d8d31d7870275609fb72efab12662c | berke/aurochs | peg.ml | (* Peg *)
open Pffpsf
(*** types *)
type char_set =
| One of char
| Many of char list
| Range of char * char
type match_options =
| Exact
| Case_insensitive
type 'a pe =
| Epsilon
| Position
| Tokenize of 'a pe
| Ascribe of string * 'a pe
| Constant of string
| A of string (* Atom *)
| Ax of... | null | https://raw.githubusercontent.com/berke/aurochs/637bdc0d4682772837f9e44112212e7f20ab96ff/peg/peg.ml | ocaml | Peg
** types
Atom
Sequence
Ordered alternative
Option
Node (name, attributes_list, children
Node (name, attributes_list, children
**
** rec
**
**
** map_over_n
**
** iter_over_builds
**
** iter_over_attributes
**
** rec
Compute produceability graph
x may generate y
Compute reachability
... |
open Pffpsf
type char_set =
| One of char
| Many of char list
| Range of char * char
type match_options =
| Exact
| Case_insensitive
type 'a pe =
| Epsilon
| Position
| Tokenize of 'a pe
| Ascribe of string * 'a pe
| Constant of string
| Ax of string * match_options
| C of char_set Boolean.t... |
e117be27ad98a1b27903144606d284c02236ce1447cb3653b6cbf0a6a66964d9 | Risto-Stevcev/bastet | ArrayF.ml | open Interface
module type IMPL = sig
val length : 'a array -> int
val make : int -> 'a -> 'a array
val append : 'a array -> 'a array -> 'a array
val map : ('a -> 'b) -> 'a array -> 'b array
val mapi : ('a -> int -> 'b) -> 'a array -> 'b array
val fold_left : ('a -> 'b -> 'a) -> 'a -> 'b array -> 'a
... | null | https://raw.githubusercontent.com/Risto-Stevcev/bastet/030db286f57d2e316897f0600d40b34777eabba6/bastet/src/ArrayF.ml | ocaml | open Interface
module type IMPL = sig
val length : 'a array -> int
val make : int -> 'a -> 'a array
val append : 'a array -> 'a array -> 'a array
val map : ('a -> 'b) -> 'a array -> 'b array
val mapi : ('a -> int -> 'b) -> 'a array -> 'b array
val fold_left : ('a -> 'b -> 'a) -> 'a -> 'b array -> 'a
... | |
c162d3718a31a117b52e01a9bb0408e3ee3e06fd8742f1e2b3f7afdf0ada0edf | facebookarchive/duckling_old | measure.clj | (
;; Distance
; latent distance
"number as distance"
(dim :number)
{:dim :distance
:latent true
:value (:value %1)}
"<latent dist> km"
[(dim :distance) #"(?i)k(ilo)?m?(eter)?s?"]
(-> %1
(dissoc :latent)
(merge {:unit "kilometre"
:normalized {:value (* 1000 (-> %1 :value))
:uni... | null | https://raw.githubusercontent.com/facebookarchive/duckling_old/bf5bb9758c36313b56e136a28ba401696eeff10b/resources/languages/nl/rules/measure.clj | clojure | Distance
latent distance
volume
latent volume
Quantity
a pound
an apple | (
"number as distance"
(dim :number)
{:dim :distance
:latent true
:value (:value %1)}
"<latent dist> km"
[(dim :distance) #"(?i)k(ilo)?m?(eter)?s?"]
(-> %1
(dissoc :latent)
(merge {:unit "kilometre"
:normalized {:value (* 1000 (-> %1 :value))
:unit "metre"}}))
"<dist> meters"
... |
7c4c7801a5312864d3f7c5b6286c59d6cfba8239993f562277c9643629a031dd | GaloisInc/mistral | OptParser.hs | module OptParser where
import Data.Monoid ( Monoid(..) )
import System.Console.GetOpt ( OptDescr, usageInfo )
data Parser opt = Success (opt -> opt)
| Err [String]
instance Monoid (Parser opt) where
mempty = Success id
Success f `mappend` Success g = Success (f . g)
Er... | null | https://raw.githubusercontent.com/GaloisInc/mistral/3464ab332d73c608e64512e822fe2b8a619ec8f3/mistral/OptParser.hs | haskell | module OptParser where
import Data.Monoid ( Monoid(..) )
import System.Console.GetOpt ( OptDescr, usageInfo )
data Parser opt = Success (opt -> opt)
| Err [String]
instance Monoid (Parser opt) where
mempty = Success id
Success f `mappend` Success g = Success (f . g)
Er... | |
df58bda1ec8e4d7a426298d96725b290bb32ed3d8f82a431cad1a8dbc98ebfd1 | erlang/sourcer | erlang_ls_sup.erl | %%%-------------------------------------------------------------------
@doc erlang_ls top level supervisor .
%% @end
%%%-------------------------------------------------------------------
-module(erlang_ls_sup).
-behaviour(supervisor).
%% API
-export([start_link/0]).
%% Supervisor callbacks
-export([init/1]).
-d... | null | https://raw.githubusercontent.com/erlang/sourcer/27ea9c63998b9e694eb7b654dd05b831b989e69e/apps/erlang_ls/src/erlang_ls_sup.erl | erlang | -------------------------------------------------------------------
@end
-------------------------------------------------------------------
API
Supervisor callbacks
====================================================================
API functions
===================================================================... | @doc erlang_ls top level supervisor .
-module(erlang_ls_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([]) -... |
e598dba35f8438c13c4bbdf59dd0d77bc3f2b22d3a2836fd5e7923ee41352b57 | gerritjvv/kafka-fast | project.clj | (defproject kafka-clj "4.0.3"
:description "fast kafka library implemented in clojure"
:url "-fast"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:javac-options ["-target" "1.8" "-source" "1.8" "-Xlint:-options"]
:global-vars {*warn-on-reflection* true
*assert* true}
... | null | https://raw.githubusercontent.com/gerritjvv/kafka-fast/fd149d8744c8100b2a8f4d09f1a251812e7baf6a/kafka-clj/project.clj | clojure | "-Dsun.security.krb5.debug=true"
"-Djava.security.krb5.conf=/vagrant/vagrant/config/krb5.conf"
"-Dcom.sun.management.jmxremote.port=8855" | (defproject kafka-clj "4.0.3"
:description "fast kafka library implemented in clojure"
:url "-fast"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:javac-options ["-target" "1.8" "-source" "1.8" "-Xlint:-options"]
:global-vars {*warn-on-reflection* true
*assert* true}
... |
5ce313b2904831a5f3a507814be485a79e0bab83c34b78b6d981caf40ca98fc3 | CryptoKami/cryptokami-core | Launcher.hs | -- | High-level code capable of running various scenarios in various modes.
# OPTIONS_GHC -F -pgmF autoexporter #
| null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/lib/src/Pos/Launcher.hs | haskell | | High-level code capable of running various scenarios in various modes. |
# OPTIONS_GHC -F -pgmF autoexporter #
|
e1cd89cbf33130dabca04a179bda41c866c543ba84dfed7c9311d3ff36d3f7ff | stchang/macrotypes | dep-ind-cur2-nat+datum-tests.rkt | #lang s-exp turnstile/examples/dep/dep-ind-cur2
(require turnstile/examples/dep/dep-ind-cur2+nat+datum
turnstile/examples/dep/dep-ind-cur2+eq2
turnstile/examples/dep/dep-ind-cur2+sugar)
(require "../rackunit-typechecking.rkt")
Π → λ ∀ ≻
same as dep - ind - cur2 - nat tests , except uses new #... | null | https://raw.githubusercontent.com/stchang/macrotypes/05ec31f2e1fe0ddd653211e041e06c6c8071ffa6/turnstile-test/tests/turnstile/dep/dep-ind-cur2-nat%2Bdatum-tests.rkt | racket | Peano nums -----------------------------------------------------------------
TODO: make this err?
(→ C) same as C
nat-rec with no annotations
(λ zc) same as zc
basic identity example, to test eval
this example will err if eval tries to tycheck again
plus with less parens
plus, no annotations, no auto curry
pl... | #lang s-exp turnstile/examples/dep/dep-ind-cur2
(require turnstile/examples/dep/dep-ind-cur2+nat+datum
turnstile/examples/dep/dep-ind-cur2+eq2
turnstile/examples/dep/dep-ind-cur2+sugar)
(require "../rackunit-typechecking.rkt")
Π → λ ∀ ≻
same as dep - ind - cur2 - nat tests , except uses new #... |
db0c87f28484faa63aa5a89c4e9a323ee9f1ea4e542a59a596c9c3ae57633721 | mzp/coq-ruby | gmap.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/mzp/coq-ruby/99b9f87c4397f705d1210702416176b13f8769c1/lib/gmap.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
Additions with respect to ocaml sta... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
i $ I d : gmap.mli 10250 20... |
e5145319b2f2b697dd7ab00cef597cba707fcbdc4e355a20c0129373d18b97cd | albertoruiz/easyVision | pipeline.hs | time ./pipeline ' video.avi -benchmark -loop 1 -frames 100 ' + RTS -N2
time ./pipeline ' video.avi -benchmark -loop 1 -frames 100 ' ' --levels=(1,20 ) ' + RTS -N2
import EasyVision
import Util.Options
compose = foldr (.) id
expensive k = compose (replicate k f) where
f im = resize (size im) . block . gaussS 1... | null | https://raw.githubusercontent.com/albertoruiz/easyVision/26bb2efaa676c902cecb12047560a09377a969f2/projects/old/tutorial/pipeline.hs | haskell | levels=(1,20 ) ' + RTS -N2 | time ./pipeline ' video.avi -benchmark -loop 1 -frames 100 ' + RTS -N2
import EasyVision
import Util.Options
compose = foldr (.) id
expensive k = compose (replicate k f) where
f im = resize (size im) . block . gaussS 10 $ im
block im = blockImage [[im,im],[im,im]]
balance f = compose . map (pipeline . f)
... |
ee4c0a87adcab9444cd0c808bec4114d3e2576b9fcd837de9b5249a12ea6d12a | ocaml/ocamlbuild | ocamlbuild_unix_plugin.ml | (***********************************************************************)
(* *)
(* ocamlbuild *)
(* *)
, , projet Galliu... | null | https://raw.githubusercontent.com/ocaml/ocamlbuild/88784c87c014c535efec0b9ae7c1ac88b28132da/plugin-lib/ocamlbuild_unix_plugin.ml | ocaml | *********************************************************************
ocamlbuild
... | , , projet Gallium , INRIA Rocquencourt
Copyright 2007 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
Original author :
open Format
open Ocamlbuild_pac... |
b93988e7ef89ab223d284497f97240b3ef77eaa45cb9eb945c5d7a586e0fecc1 | yesodweb/yesod | th.hs | # LANGUAGE TemplateHaskell , QuasiQuotes , OverloadedStrings , TupleSections , ViewPatterns #
import Yesod.Routes.TH
import Yesod.Routes.Parse
import THHelper
import Language.Haskell.TH.Syntax
import Criterion.Main
import Data.Text (words)
import Prelude hiding (words)
import Control.DeepSeq
import Yesod.Routes.TH.Simp... | null | https://raw.githubusercontent.com/yesodweb/yesod/c59993ff287b880abbf768f1e3f56ae9b19df51e/yesod-core/bench/th.hs | haskell | # LANGUAGE TemplateHaskell , QuasiQuotes , OverloadedStrings , TupleSections , ViewPatterns #
import Yesod.Routes.TH
import Yesod.Routes.Parse
import THHelper
import Language.Haskell.TH.Syntax
import Criterion.Main
import Data.Text (words)
import Prelude hiding (words)
import Control.DeepSeq
import Yesod.Routes.TH.Simp... | |
863865a6d9b0f9783dfa52c2bb51236aee2143c7daf72b5b09b2e7358319d5d2 | ananthakumaran/eopl | 33.clj | ;; write a procedure mark-leaves-with-red-depth that takes a bintree
;; and produces a bintree of the same shape as the original, except
;; that in the new, each leaf contains the integer of nodes between it
;; and the root that contain the symbol red
(ns eopl.chap-1.33
(:use clojure.test)
(:use eopl.chap-1.31))
... | null | https://raw.githubusercontent.com/ananthakumaran/eopl/876d6c2e44865e2c89a05a683d99a289c71f1487/src/eopl/chap_1/33.clj | clojure | write a procedure mark-leaves-with-red-depth that takes a bintree
and produces a bintree of the same shape as the original, except
that in the new, each leaf contains the integer of nodes between it
and the root that contain the symbol red |
(ns eopl.chap-1.33
(:use clojure.test)
(:use eopl.chap-1.31))
(defn mark-leaves-with-red-depth
([bintree] (mark-leaves-with-red-depth bintree 0))
([bintree count]
(if (leaf? bintree)
(leaf count)
(let [count (if (= 'red (content-of bintree)) (inc count) count)]
(interior-node (cont... |
7519a806258f99802a0308f28fb8939ebc8055226845680ccc399f5b128e01e7 | LexiFi/menhir | item.mli | (******************************************************************************)
(* *)
(* *)
... | null | https://raw.githubusercontent.com/LexiFi/menhir/794e64e7997d4d3f91d36dd49aaecc942ea858b7/src/item.mli | ocaml | ****************************************************************************
file LICEN... |
, Paris
, PPS , Université Paris Diderot
. All rights reserved . This file is distributed under the
terms of the GNU General Public License version 2 , as... |
3807c0ce1b5bbe541f456a94c4f5f40c0382dd67cdedc0cb78bb66e14ac241ea | bvaugon/ocapic | cosolilet.ml | (*************************************************************************)
(* *)
(* OCaPIC *)
(* *)
... | null | https://raw.githubusercontent.com/bvaugon/ocapic/a14cd9ec3f5022aeb5fe2264d595d7e8f1ddf58a/tests/osolilet/cosolilet.ml | ocaml | ***********************************************************************
OCaPIC
... |
This file is distributed under the terms of the CeCILL license .
type peg = Out | Empty | Peg ;;
print_endline "board" ;;
let print_peg =
function
| Out ->
print_string "."
| Empty ->
print_string " "
| Peg ->
print... |
037a44d8dedb745ebfbf8dbd9ed63d69b13412ce2efdbd5fa92f3298a681d84e | immoh/nsorg | core.clj | (ns nsorg.core
(:require [nsorg.zip :as nzip]
[rewrite-clj.zip :as zip]))
(defn map-option?
"Returns true if given zipper node is a map value of given keyword option.
Parameters:
kw - option keyword
zloc - zipper node"
[kw zloc]
(and (map? (nzip/sexpr zloc))
(= kw (nzip/sexpr (z... | null | https://raw.githubusercontent.com/immoh/nsorg/12b32504d65ad4c2c3cd82a0ada4b3695e1dfb95/src/nsorg/core.clj | clojure | (ns nsorg.core
(:require [nsorg.zip :as nzip]
[rewrite-clj.zip :as zip]))
(defn map-option?
"Returns true if given zipper node is a map value of given keyword option.
Parameters:
kw - option keyword
zloc - zipper node"
[kw zloc]
(and (map? (nzip/sexpr zloc))
(= kw (nzip/sexpr (z... | |
038611ada8f92e84d3d23b6249843e5426a81da019186472c0fbb96ac89ab1a5 | synduce/Synduce | contains_bool_2.ml | * @synduce -s 2 -NB --no - lifting
type 'a tree =
| Leaf of 'a
| Node of 'a * 'a tree * 'a tree
let rec tree_min = function
| Leaf x -> x
| Node (a, l, r) -> min a (min (tree_min l) (tree_min r))
;;
let rec tree_max = function
| Leaf x -> x
| Node (a, l, r) -> max a (max (tree_max l) (tree_max r))
;;
le... | null | https://raw.githubusercontent.com/synduce/Synduce/42d970faa863365f10531b19945cbb5cfb70f134/benchmarks/incomplete/bst/contains_bool_2.ml | ocaml | * @synduce -s 2 -NB --no - lifting
type 'a tree =
| Leaf of 'a
| Node of 'a * 'a tree * 'a tree
let rec tree_min = function
| Leaf x -> x
| Node (a, l, r) -> min a (min (tree_min l) (tree_min r))
;;
let rec tree_max = function
| Leaf x -> x
| Node (a, l, r) -> max a (max (tree_max l) (tree_max r))
;;
le... | |
028f82a516b60ac23ac3fda7bdffc32564dd124a3b33b2807f99149a0a79b004 | janestreet/bonsai | import.mli | open! Core
module Effect : sig
type 'a t = 'a Ui_effect.t
val sequence : unit t list -> unit t
val no_op : unit t
val external_ : string -> unit t
end
module Incr = Ui_incr
include module type of struct
include Expect_test_helpers_core
end
val dummy_source_code_position : Source_code_position.t
val opaqu... | null | https://raw.githubusercontent.com/janestreet/bonsai/4baeedc75bf73a0915e04dc02d8a49b78779e9b0/test/import.mli | ocaml | open! Core
module Effect : sig
type 'a t = 'a Ui_effect.t
val sequence : unit t list -> unit t
val no_op : unit t
val external_ : string -> unit t
end
module Incr = Ui_incr
include module type of struct
include Expect_test_helpers_core
end
val dummy_source_code_position : Source_code_position.t
val opaqu... | |
f4fb319a7baed0a8114fdc3d885279d6338b5a393ff2bc54820b2f07637e89e8 | pouyakary/Nota | Main.hs |
module REPL.Main where
-- ─── IMPORTS ────────────────────────────────────────────────────────────────────
import REPL.Terminal
import Control.Exception
import Data.List
import Data.List
import Data.Set
import Debug.Trace
import Infrastructure.Text.Layout
import Infrastructure.Text.Shapes.Boxes
import Infrastructure... | null | https://raw.githubusercontent.com/pouyakary/Nota/d5e29eca7ea34d72835a9708977fa33c030393d1/source/REPL/Main.hs | haskell | ─── IMPORTS ────────────────────────────────────────────────────────────────────
─── TYPES ──────────────────────────────────────────────────────────────────────
─── GETTERS ────────────────────────────────────────────────────────────────────
─── RUN REPL ────────────────────────────────────────────────────────────... |
module REPL.Main where
import REPL.Terminal
import Control.Exception
import Data.List
import Data.List
import Data.Set
import Debug.Trace
import Infrastructure.Text.Layout
import Infrastructure.Text.Shapes.Boxes
import Infrastructure.Text.Shapes.Brackets
import Infrastructure.Text.Shapes.Presets
import Infrastructur... |
173c45057341273e875bc884067a35451de55ce3334a436905d007a20ac5c66a | fpco/ide-backend | List.hs | # LANGUAGE DeriveFunctor , , DeriveTraversable #
-- | Strict lists
module IdeSession.Strict.List (
nil
, cons
, singleton
, map
, all
, any
, reverse
, (++)
, elem
, (\\)
) where
import Prelude hiding (map, all, any, reverse, (++), elem)
import qualified Data.List as List
import IdeSession.St... | null | https://raw.githubusercontent.com/fpco/ide-backend/860636f2d0e872e9481569236bce690637e0016e/ide-backend-common/IdeSession/Strict/List.hs | haskell | | Strict lists | # LANGUAGE DeriveFunctor , , DeriveTraversable #
module IdeSession.Strict.List (
nil
, cons
, singleton
, map
, all
, any
, reverse
, (++)
, elem
, (\\)
) where
import Prelude hiding (map, all, any, reverse, (++), elem)
import qualified Data.List as List
import IdeSession.Strict.Container
ni... |
f8d6ba16a4162ebea20f3c48654c8046218ec14d5c35e44bd650ea4cab2e5d6d | aantron/luv | poll.ml | This file is part of Luv , released under the MIT license . See LICENSE.md for
details , or visit .
details, or visit . *)
open Test_helpers
let test_fd =
if Sys.win32 then
Luv.Process.stderr
else begin
On Linux in , trying to create a poll handle for STDERR results in
EPERM , so we c... | null | https://raw.githubusercontent.com/aantron/luv/4b49d3edad2179c76d685500edf1b44f61ec4be8/test/poll.ml | ocaml | This is a compilation test. If the type constraints in handle.mli are
wrong, there will be a type error in this test. | This file is part of Luv , released under the MIT license . See LICENSE.md for
details , or visit .
details, or visit . *)
open Test_helpers
let test_fd =
if Sys.win32 then
Luv.Process.stderr
else begin
On Linux in , trying to create a poll handle for STDERR results in
EPERM , so we c... |
ec0be04ee820ff2dc5bfb7a16e0beda572e7a69bed7095847010b5b2b7207d4c | grin-compiler/ghc-grin | sieve.hs | module Main(main) where
import RTS
main = print_int (sum (sieve (upto 2 50000)))
upto :: Int -> Int -> [Int]
upto m n = if m > n then [] else m : upto (m+1) n
xfilter :: Int -> [Int] -> [Int]
xfilter y l = case l of
[] -> []
(x:xs) -> if x `rem` y == 0
t... | null | https://raw.githubusercontent.com/grin-compiler/ghc-grin/ebc4dca2e1f5b3581d4b84726730564ce909d786/ghc-grin-benchmark/boq-custom/sieve.hs | haskell | module Main(main) where
import RTS
main = print_int (sum (sieve (upto 2 50000)))
upto :: Int -> Int -> [Int]
upto m n = if m > n then [] else m : upto (m+1) n
xfilter :: Int -> [Int] -> [Int]
xfilter y l = case l of
[] -> []
(x:xs) -> if x `rem` y == 0
t... | |
f211e49b7015b7aaa4173c62ccc26a133ef1f784a80f56fd3e999ff554df3f95 | racket/racket7 | integer-set.rkt | #lang racket/base
;; a library for integer interval sets
(require racket/contract/base
racket/match
racket/stream
racket/struct)
(provide well-formed-set?
(contract-out
(struct integer-set ((contents well-formed-set?)))
[make-range
(->i () ((i exact-... | null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/collects/data/integer-set.rkt | racket | a library for integer interval sets
test macro, now updated to use submodules
Each cons represents a range of integers, and the entire
set is the union of the ranges. The ranges must be disjoint and
increasing. Further, adjacent ranges must have at least
the contract lets us assume non-null
well-formed-set? : ... | #lang racket/base
(require racket/contract/base
racket/match
racket/stream
racket/struct)
(provide well-formed-set?
(contract-out
(struct integer-set ((contents well-formed-set?)))
[make-range
(->i () ((i exact-integer?) (j (i) (and/c exact-integer? ... |
d6cce2b42c390c9964a6cb67d5622072922d7633c7b810e94069f5f267b7cc11 | typelead/intellij-eta | PsiElement.hs | module FFI.Com.IntelliJ.Psi.PsiElement where
import P
data {-# CLASS "com.intellij.psi.PsiElement" #-}
PsiElement = PsiElement (Object# PsiElement)
deriving Class
| null | https://raw.githubusercontent.com/typelead/intellij-eta/ee66d621aa0bfdf56d7d287279a9a54e89802cf9/plugin/src/main/eta/FFI/Com/IntelliJ/Psi/PsiElement.hs | haskell | # CLASS "com.intellij.psi.PsiElement" # | module FFI.Com.IntelliJ.Psi.PsiElement where
import P
PsiElement = PsiElement (Object# PsiElement)
deriving Class
|
cf243806592683dd0a165d6a36882e809dda261127c6833a22cbac4e0177ebc5 | wireless-net/erlang-nommu | wxPrinter.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2013 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Publi... | null | https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/wx/src/gen/wxPrinter.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitatio... | Copyright Ericsson AB 2008 - 2013 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(wxPrinter).
-include("wxe.hrl").
... |
4fb9b53f8bb87f4dd2eb7f16ef1d8d8e772def9c6cf0feffaaf17ca35502d05b | esl/MongooseIM | ct_markdown_errors_hook.erl | %%% @doc Writes a markdown file with error information
-module(ct_markdown_errors_hook).
%% @doc Add the following line in your *.spec file to enable this:
%% {ct_hooks, [ct_markdown_errors_hook]}.
%% Callbacks
-export([id/1]).
-export([init/2]).
-export([post_init_per_suite/4,
post_init_per_group/4,
... | null | https://raw.githubusercontent.com/esl/MongooseIM/8b8c294b1b01dc178eed1b3b28ca0fbbd73f382c/big_tests/src/ct_markdown_errors_hook.erl | erlang | @doc Writes a markdown file with error information
@doc Add the following line in your *.spec file to enable this:
{ct_hooks, [ct_markdown_errors_hook]}.
Callbacks
@doc Return a unique id for this CTH.
@doc Always called before any other callback function. Use this to initiate
any common state.
@doc Called afte... | -module(ct_markdown_errors_hook).
-export([id/1]).
-export([init/2]).
-export([post_init_per_suite/4,
post_init_per_group/4,
post_init_per_testcase/4]).
-export([post_end_per_suite/4,
post_end_per_group/4,
post_end_per_testcase/4]).
-record(state, { file, summary_file, truncated_co... |
e8f8c22117865de4a18049f7e1fe974baf794f5e65213e12b50ae8289d882a54 | TyOverby/mono | rain.ml |
open Notty
open Notty.Infix
let () = Random.self_init ()
let rec (--) a b = if a > b then [] else a :: succ a -- b
let uchar x = I.uchar (Uchar.of_int x)
let nsym = 4096
let glitch = nsym / 20
let symbols = Array.(concat [
init 58 (fun x -> uchar (0xff66 + x) 1 1);
init 10 (fun x -> uchar (0x30 + x) 1 1);
in... | null | https://raw.githubusercontent.com/TyOverby/mono/94225736a93457d5c9aeed399c4ae1a08b239fd5/vendor/pqwy-notty/examples/rain.ml | ocaml |
open Notty
open Notty.Infix
let () = Random.self_init ()
let rec (--) a b = if a > b then [] else a :: succ a -- b
let uchar x = I.uchar (Uchar.of_int x)
let nsym = 4096
let glitch = nsym / 20
let symbols = Array.(concat [
init 58 (fun x -> uchar (0xff66 + x) 1 1);
init 10 (fun x -> uchar (0x30 + x) 1 1);
in... | |
91e1c1e4e23c0fc9f71d21623536bee5fb5eea25f1e79db53dccc866083534eb | awslabs/s2n-bignum | bignum_montmul_p256_alt.ml |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
(* =================================================================... | null | https://raw.githubusercontent.com/awslabs/s2n-bignum/824c15f908d7a343af1b2f378cfedd36e880bdde/x86/proofs/bignum_montmul_p256_alt.ml | ocaml | =========================================================================
=========================================================================
*** print_literal_from_elf "x86/p256/bignum_montmul_p256_alt.o";;
***
PUSH (% rbx)
PUSH (% r12)
PUSH (% r13)
PUSH (% r14)
PUSH (% r15)
XOR (% r10d) (% r10d)... |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
Montgomery multiplication modulo p_256 using using traditional x86... |
1c4099244255e11ad1c9eac152b79b4a695f7909d4e0168064093513491ee8cd | gvolpe/haskell-book-exercises | intermission.hs | --- Lamda expressions
addOneIfOdd n = case odd n of
True -> f n
False -> n
where f = \n -> n + 1
addFive = \x -> \y -> (if x > y then y else x) + 5
mflip f x y = f y x
-- Pattern matching
f :: (a, b, c) -> (d, e, f) -> ((a, d), (c, f))
f (a, _, c) (d, _, f) = ((a, d), (c, f))
-- Case Expressions
functionC x y... | null | https://raw.githubusercontent.com/gvolpe/haskell-book-exercises/5c1b9d8dc729ee5a90c8709b9c889cbacb30a2cb/chapter7/intermission.hs | haskell | - Lamda expressions
Pattern matching
Case Expressions | addOneIfOdd n = case odd n of
True -> f n
False -> n
where f = \n -> n + 1
addFive = \x -> \y -> (if x > y then y else x) + 5
mflip f x y = f y x
f :: (a, b, c) -> (d, e, f) -> ((a, d), (c, f))
f (a, _, c) (d, _, f) = ((a, d), (c, f))
functionC x y = case x > y of
True -> x
False -> y
ifEvenAdd2 n = c... |
a1980f1db91b7866fe5e328c415e85dd39ef89fcdf3cab28246b2e18f5474a78 | repl-electric/cassiopeia | buffers.clj | (ns cassiopeia.engine.buffers
(:use
[overtone.live]
[overtone.helpers audio-file lib file doc]))
(defn buffer-mix-to-mono [b]
(ensure-buffer-active! b)
(let [n-chans (:n-channels b)
rate (:rate b)]
(cond
(= 1 n-chans) b
:else
(let [data (buffer-data b)
part... | null | https://raw.githubusercontent.com/repl-electric/cassiopeia/a42c01752fc8dd04ea5db95c8037f393c29cdb75/src/cassiopeia/engine/buffers.clj | clojure | (ns cassiopeia.engine.buffers
(:use
[overtone.live]
[overtone.helpers audio-file lib file doc]))
(defn buffer-mix-to-mono [b]
(ensure-buffer-active! b)
(let [n-chans (:n-channels b)
rate (:rate b)]
(cond
(= 1 n-chans) b
:else
(let [data (buffer-data b)
part... | |
52e8e13106d7ced56c4d4071e09f6af9ccc7ba921fb452fb4ef09839bf91ef6b | jwiegley/notes | schroedinger3.hs | import System.Random
flipCoin :: StdGen -> Bool
flipCoin gen = fst $ random gen
data Cat = Cat String deriving Show
data Probable a = Live a | Dead deriving Show
flipCat :: StdGen -> a -> Probable a
flipCat gen cat = if flipCoin gen
then Live cat
else Dead
data Schroedinger a
... | null | https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/haskell/schroedinger3.hs | haskell | The cat's fate is undecided | import System.Random
flipCoin :: StdGen -> Bool
flipCoin gen = fst $ random gen
data Cat = Cat String deriving Show
data Probable a = Live a | Dead deriving Show
flipCat :: StdGen -> a -> Probable a
flipCat gen cat = if flipCoin gen
then Live cat
else Dead
data Schroedinger a
... |
38b0bae9c50cbddf506921eb638b04b0d14ed27ea854e1fd34f09daac7a0426c | tomsmalley/semantic-reflex | Rail.hs | # LANGUAGE TemplateHaskell #
-- | Semantic UI rails.
-- -ui.com/elements/rail.html
module Reflex.Dom.SemanticUI.Rail
(
-- * Rail
rail, rail'
, RailConfig (..)
, RailSide (..)
, railConfig_dividing
, railConfig_internal
, railConfig_attached
, railConfig_close
, railConfig_size
, railConfig_elC... | null | https://raw.githubusercontent.com/tomsmalley/semantic-reflex/5a973390fae1facbc4351b75ea59210d6756b8e5/semantic-reflex/src/Reflex/Dom/SemanticUI/Rail.hs | haskell | | Semantic UI rails.
-ui.com/elements/rail.html
* Rail
| Make the rail div classes from the configuration
| Rail UI Element.
| Rail UI Element. | # LANGUAGE TemplateHaskell #
module Reflex.Dom.SemanticUI.Rail
(
rail, rail'
, RailConfig (..)
, RailSide (..)
, railConfig_dividing
, railConfig_internal
, railConfig_attached
, railConfig_close
, railConfig_size
, railConfig_elConfig
) where
import Control.Lens.TH (makeLensesWith, lensRule... |
d5a260408500afde58af4cab4c589daef0d5a94f2aba7e2c07d96b6c684690e0 | opencensus-beam/opencensus-prometheus | oc_stat_exporter_prometheus.erl | -module(oc_stat_exporter_prometheus).
-export([collect_mf/2,
deregister_cleanup/1]).
-behaviour(prometheus_collector).
collect_mf(_Registry, Callback) ->
ViewDatas = oc_stat:export(),
[Callback(view_data_to_mf(ViewData)) || ViewData <- ViewDatas],
ok.
deregister_cleanup(_Registry) ->
ok.
-spec vie... | null | https://raw.githubusercontent.com/opencensus-beam/opencensus-prometheus/1909783ab63fd8a14c347a8dcd83f541782c98de/src/oc_stat_exporter_prometheus.erl | erlang | replace all non-alphanumeric characters with underscores | -module(oc_stat_exporter_prometheus).
-export([collect_mf/2,
deregister_cleanup/1]).
-behaviour(prometheus_collector).
collect_mf(_Registry, Callback) ->
ViewDatas = oc_stat:export(),
[Callback(view_data_to_mf(ViewData)) || ViewData <- ViewDatas],
ok.
deregister_cleanup(_Registry) ->
ok.
-spec vie... |
504241b2b714844034ec196bc2d203da0a0467f4cdd31fca533ae237af90eb2f | finnishtransportagency/harja | turvallisuuspoikkeaman_kirjaus_test.clj | (ns harja.palvelin.integraatiot.api.turvallisuuspoikkeaman-kirjaus-test
(:require [clojure.test :refer [deftest is use-fixtures]]
[harja.testi :refer :all]
[harja.palvelin.komponentit.liitteet :as liitteet]
[com.stuartsierra.component :as component]
[harja.palvelin.inte... | null | https://raw.githubusercontent.com/finnishtransportagency/harja/c57d742beaff2bef7b30318819f07d4a13423404/test/clj/harja/palvelin/integraatiot/api/turvallisuuspoikkeaman_kirjaus_test.clj | clojure | Vahinkoluokittelu -> set
Tyyppi -> set
"))
")
")
") | (ns harja.palvelin.integraatiot.api.turvallisuuspoikkeaman-kirjaus-test
(:require [clojure.test :refer [deftest is use-fixtures]]
[harja.testi :refer :all]
[harja.palvelin.komponentit.liitteet :as liitteet]
[com.stuartsierra.component :as component]
[harja.palvelin.inte... |
77ebef64d0c7a16015233cb1d2b43707b9876d77e984e172d01c76e8cd71e3fb | linyinfeng/myml | Subst.hs | # LANGUAGE LambdaCase #
module Myml.Subst
( substTerm,
TypeSubst (..),
compositeTypeSubst,
compositeTermSubst,
)
where
import Control.Monad.Except
import Control.Monad.Reader
import qualified Data.Map as Map
import Data.Maybe (fromMaybe)
import qualified Data.Set as Set
import Myml.Syntax
import Prett... | null | https://raw.githubusercontent.com/linyinfeng/myml/1220a1474784eebce9ff95f46a3ff0a5f756e9a7/src/Myml/Subst.hs | haskell | # LANGUAGE LambdaCase #
module Myml.Subst
( substTerm,
TypeSubst (..),
compositeTypeSubst,
compositeTermSubst,
)
where
import Control.Monad.Except
import Control.Monad.Reader
import qualified Data.Map as Map
import Data.Maybe (fromMaybe)
import qualified Data.Set as Set
import Myml.Syntax
import Prett... | |
7cf22d9c9bdd17a183506abdfd8d8d8a6f54ace25aa42649989b06ce255f9ee9 | Frozenlock/wacnet | objects.cljs | (ns wacnet.explorer.objects
(:require [reagent.core :as r]
[re-com.core :as re]
[goog.string :as gstring]
[ajax.core :refer [GET POST DELETE]]
[clojure.string :as s]
[wacnet.templates.common :as tp]
[wacnet.routes :as routes]
[wacnet.... | null | https://raw.githubusercontent.com/Frozenlock/wacnet/69947dc02c91ae160c759a0abe97d4f472e9a876/src/cljs/wacnet/explorer/objects.cljs | clojure | "Convert a short id to the extended identifier.
[id]
types (into {} (for [[k v] object-types]
[v k]))]
[(get types (js/parseInt type))
(js/parseInt instance)]))
analog input
analog output
analog value
binary input
binary output
binary value
device
file
loop
... | (ns wacnet.explorer.objects
(:require [reagent.core :as r]
[re-com.core :as re]
[goog.string :as gstring]
[ajax.core :refer [GET POST DELETE]]
[clojure.string :as s]
[wacnet.templates.common :as tp]
[wacnet.routes :as routes]
[wacnet.... |
16d4a7bd2254ff38d1c054a056861a499291238b3756c68ad6b92cf5fcc80b71 | jafingerhut/dolly | dir.clj | Copyright ( c ) , 2012 . 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 epl-v10.html at the root of this
;; distribution. By using this software in any fashion, you are
;; agreeing to be bound by ... | null | https://raw.githubusercontent.com/jafingerhut/dolly/6dfe7f3bcd58d81fba7793d214230792b6140ffd/src/dolly/copieddeps/tns/clojure/tools/namespace/dir.clj | clojure | Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this
distribution. By using this software in any fashion, you are
agreeing to be bound by the terms of this license. You must not
remove this notice, or any other, from this software.
update the dependency tracker with | Copyright ( c ) , 2012 . All rights reserved . The use and
distribution terms for this software are covered by the Eclipse
(ns ^{:author "Stuart Sierra"
:doc "Track namespace dependencies and changes by monitoring
file-modification timestamps"}
dolly.copieddeps.tns.clojure.tools.namespace.dir
(:requi... |
dce137e1afc3d0f4de17a0ca0092a51223db72e885f68346248769c67ace24e1 | chicken-mobile/chicken-sdl2-android-builder | controller-device-event.scm | ;;
chicken - sdl2 : CHICKEN Scheme bindings to Simple DirectMedia Layer 2
;;
Copyright © 2013 , 2015 - 2016 .
;; All rights reserved.
;;
;; Redistribution and use in source and binary forms, with or without
;; modification, are permitted provided that the following conditions
;; are met:
;;
;; - Redistributions... | null | https://raw.githubusercontent.com/chicken-mobile/chicken-sdl2-android-builder/90ef1f0ff667737736f1932e204d29ae615a00c4/eggs/sdl2/lib/sdl2-internals/accessors/events/controller-device-event.scm | scheme |
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributio... | chicken - sdl2 : CHICKEN Scheme bindings to Simple DirectMedia Layer 2
Copyright © 2013 , 2015 - 2016 .
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
COPYRIGHT HOLDER OR FOR ANY DIRECT ,
INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES
( INCLUDING , BUT N... |
dc9d80895370e643b34daa6eebea6821f86c8bb3ff1fbc3c618eaa33470adeca | EFanZh/EOPL-Exercises | exercise-7.6.rkt | #lang eopl
Exercise 7.6 [ ★ ] Extend the checker to handle assignments ( section 4.3 ) .
;; Grammar.
(define the-lexical-spec
'([whitespace (whitespace) skip]
[comment ("%" (arbno (not #\newline))) skip]
[identifier (letter (arbno (or letter digit "_" "-" "?"))) symbol]
[number (digit (arbno digit)) ... | null | https://raw.githubusercontent.com/EFanZh/EOPL-Exercises/11667f1e84a1a3e300c2182630b56db3e3d9246a/solutions/exercise-7.6.rkt | racket | Grammar.
Data structures - expressed values.
Data structures - environment.
Data structures - type environment.
Data structures - store.
Interpreter. | #lang eopl
Exercise 7.6 [ ★ ] Extend the checker to handle assignments ( section 4.3 ) .
(define the-lexical-spec
'([whitespace (whitespace) skip]
[comment ("%" (arbno (not #\newline))) skip]
[identifier (letter (arbno (or letter digit "_" "-" "?"))) symbol]
[number (digit (arbno digit)) number]
... |
068b0c7367d1d4491127bd7c82410f5df4e5139d673eb2c7b00868fc23ae5391 | manuel-serrano/bigloo | engine.scm | ;*=====================================================================*/
* serrano / prgm / project / bigloo / cigloo / Engine / engine.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation ... | null | https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/cigloo/Engine/engine.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* We have read the argument line. We start the real compilation */
* process. ... | * serrano / prgm / project / bigloo / cigloo / Engine / engine.scm * /
* Author : * /
* Creation : We d Jul 12 15:53:47 1995 * /
* Last change : Thu Nov 4 08:05:19 1999 ( serrano ) * /
(module... |
728be3a44514f3b2e5294bfa829163fbb3952bda15e773a9cb98b488ea9246f3 | cj1128/sicp-review | 3.7.scm | Exercise 3.7
;; Define a procedure make-joint that accomplishes to make joint accounts
(define (make-account balance password)
(define (withdraw amount)
(if (>= balance amount)
(begin
(set! balance (- balance amount))
balance)
"Insufficient funds!"))
(define (deposit amoun... | null | https://raw.githubusercontent.com/cj1128/sicp-review/efaa2f863b7f03c51641c22d701bac97e398a050/chapter-3/3.1/3.7.scm | scheme | Define a procedure make-joint that accomplishes to make joint accounts | Exercise 3.7
(define (make-account balance password)
(define (withdraw amount)
(if (>= balance amount)
(begin
(set! balance (- balance amount))
balance)
"Insufficient funds!"))
(define (deposit amount)
(begin
(set! balance (+ balance amount))
balance))
(d... |
aabaec61c62b60b32b9849cdd7ecd301678ba8c73120e00e0bb4e795648c6294 | dbuenzli/trel | trel.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2017 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
% % NAME%% % % ---------------------------------------------------------------------------
Copyright (c) ... | null | https://raw.githubusercontent.com/dbuenzli/trel/8ccfb136733b4597fb5b6a0c88d15ee2f147cdad/src/trel.ml | ocaml | Lazy sequences of values.
Type identifiers
See #1
Domains
FIXME try to be more clever about domains for structural types,
we are generative which is annoying. Give structure to
tid + hash-consing ?
Predefined domains
Variables
Terms
N.B. We type function applications rather than pure values ... | ---------------------------------------------------------------------------
Copyright ( c ) 2017 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
% % NAME%% % % ---------------------------------------------------------------------------
Copyright (c) ... |
08422fa72e8d672c0d82c6efee56986214a783d30713a864e51a9fe750db1742 | ghcjs/jsaddle-dom | VoidCallback.hs | # LANGUAGE PatternSynonyms #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.VoidCallback
(newVoidCallback, newVoidCallbackSync, newVoidCallbackAsync,
VoidCallback)
where
import... | null | https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/VoidCallback.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | # LANGUAGE PatternSynonyms #
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.VoidCallback
(newVoidCallback, newVoidCallbackSync, newVoidCallbackAsync,
VoidCallback)
where
import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fromIntegral, r... |
1d3947c59f339eb3ed29a19a3c9739527b284aed162e2b7fbdccacbb8830fd13 | camlp5/camlp5 | extfun.mli | (* camlp5r *)
(* extfun.mli,v *)
Copyright ( c ) INRIA 2007 - 2017
* Extensible functions .
This module implements pattern matching extensible functions .
To extend , use syntax [ pa_extfun.cmo ] :
[ extfun e with [ pattern_matching ] ]
This module implements pattern matching extensible funct... | null | https://raw.githubusercontent.com/camlp5/camlp5/15e03f56f55b2856dafe7dd3ca232799069f5dda/ocaml_src/lib/extfun.mli | ocaml | camlp5r
extfun.mli,v
* The type of the extensible functions of type ['a -> 'b]
* Empty extensible function
* Apply an extensible function
* Match failure while applying an extensible function
* Print patterns in the order they are recorded
*/* | Copyright ( c ) INRIA 2007 - 2017
* Extensible functions .
This module implements pattern matching extensible functions .
To extend , use syntax [ pa_extfun.cmo ] :
[ extfun e with [ pattern_matching ] ]
This module implements pattern matching extensible functions.
To extend, use syntax [p... |
90679f25f9bdd2e34cb422594a0d124c8d9d7ba15c9a8e73616a6eb325c16bd3 | inria-parkas/sundialsml | sundials_ROArray.ml | (***********************************************************************)
(* *)
(* OCaml interface to Sundials *)
(* *)
, , an... | null | https://raw.githubusercontent.com/inria-parkas/sundialsml/b1e07d7ef6184a441faf925841bf9a04d7cf94ea/src/sundials/sundials_ROArray.ml | ocaml | *********************************************************************
OCaml interface to Sundials
... | , , and
( / ENS ) ( / ENS ) ( UPMC / ENS / Inria )
Copyright 2021 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
include Array
type 'a t = 'a array
let from_array = A... |
feaf932d29f456abd89a0df592bfc07e9188b7855f6e7f989fb4011916919ca0 | input-output-hk/ouroboros-network | Translation.hs | {-# LANGUAGE DataKinds #-}
# LANGUAGE DerivingVia #
module Ouroboros.Consensus.HardFork.Combinator.Translation (
-- * Translate from one era to the next
EraTranslation (..)
, trivialEraTranslation
) where
import NoThunks.Class (NoThunks, OnlyCheckWhnfNamed (..))
import Ouroboros.Con... | null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/c82309f403e99d916a76bb4d96d6812fb0a9db81/ouroboros-consensus/src/Ouroboros/Consensus/HardFork/Combinator/Translation.hs | haskell | # LANGUAGE DataKinds #
* Translate from one era to the next
----------------------------------------------------------------------------
----------------------------------------------------------------------------
-----------------------------------------------------------------------------} | # LANGUAGE DerivingVia #
module Ouroboros.Consensus.HardFork.Combinator.Translation (
EraTranslation (..)
, trivialEraTranslation
) where
import NoThunks.Class (NoThunks, OnlyCheckWhnfNamed (..))
import Ouroboros.Consensus.Ledger.Abstract
import Ouroboros.Consensus.TypeFamilyWra... |
85458cbdff0badff4f38a389cff96125016c1df9970af3c58d09503a9fd124f4 | tommaisey/aeon | bool.syntax.scm | ( & & ) : : Bool - > Bool
(define-syntax and2
(syntax-rules ()
((_ p q) (if p q #f))))
(define-syntax and3
(syntax-rules ()
((_ p q r) (and2 p (and2 q r)))))
( || ) : : Bool - > Bool
(define-syntax or2
(syntax-rules ()
((_ p q) (if p p q))))
(define-syntax or3
(syntax-rules ()
((_ p... | null | https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rhs/src/data/bool.syntax.scm | scheme | ( & & ) : : Bool - > Bool
(define-syntax and2
(syntax-rules ()
((_ p q) (if p q #f))))
(define-syntax and3
(syntax-rules ()
((_ p q r) (and2 p (and2 q r)))))
( || ) : : Bool - > Bool
(define-syntax or2
(syntax-rules ()
((_ p q) (if p p q))))
(define-syntax or3
(syntax-rules ()
((_ p... | |
60b7edaf52f511bcc50148a22655132ef4971ff95b1a629f0ca40968dd69b880 | tommaisey/aeon | index.help.scm | (import (sosc) (rsc3))
Allocate and set values at buffer 10 .
(with-sc3
(lambda (fd)
(async fd (b-alloc 10 6 1))
(send fd (b-setn1 10 0 (list 50 100 200 400 800 1600)))))
;; Index into the above buffer for frequency values.
(let ((f (mul (index 10 (mul (lf-saw kr 2 3) 4)) (mce2 1 9))))
(audition (out 0 (mu... | null | https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/oscillators/index.help.scm | scheme | Index into the above buffer for frequency values.
Free buffer | (import (sosc) (rsc3))
Allocate and set values at buffer 10 .
(with-sc3
(lambda (fd)
(async fd (b-alloc 10 6 1))
(send fd (b-setn1 10 0 (list 50 100 200 400 800 1600)))))
(let ((f (mul (index 10 (mul (lf-saw kr 2 3) 4)) (mce2 1 9))))
(audition (out 0 (mul (sin-osc ar f 0) 0.1))))
(with-sc3
(lambda (fd)
... |
f596a2bcfd2fd4c8a13221d101b06f5c1b719698afa1fd5b81faccdb5af19168 | sellout/Kilns | patterns.lisp | (in-package #:kell-calculus)
(defclass pattern-language ()
(grammar :initarg :grammar))
(defvar *current-pattern-language* nil
"This is the currently active pattern language.")
;;; A pattern ξ is an element of a pattern language L. A pattern ξ acts as a
;;; binder in the calculus. A pattern can bind name variabl... | null | https://raw.githubusercontent.com/sellout/Kilns/467ba599f457812daea41a7c56f74a1ec1cdc9b2/src/kell-calculus/patterns.lisp | lisp | A pattern ξ is an element of a pattern language L. A pattern ξ acts as a
binder in the calculus. A pattern can bind name variables, of the form (a),
where a ∈ N, and process variables. All name and process variables appearing
in a pattern ξ are bound by the pattern. Name variables can only match
names. Process var... | (in-package #:kell-calculus)
(defclass pattern-language ()
(grammar :initarg :grammar))
(defvar *current-pattern-language* nil
"This is the currently active pattern language.")
– A pattern language L is a set of patterns that are multisets of single
• ξm is taken from the set Ξm and is a local message patt... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.