_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 |
|---|---|---|---|---|---|---|---|---|
5ec935837ae1550b1b924c3447d82130d4746935876f5fde0bc8266019f8ed27 | chrisdone/ircbrowse | Main.hs | # LANGUAGE ViewPatterns #
-- | Main entry point.
module Main where
import Data.List
import Data.Maybe
import Ircbrowse.Config
import Ircbrowse.Import
import Ircbrowse.Model.Data
import Ircbrowse.Model.Migrations
import Ircbrowse.Server
import Ircbrowse.Types
import Snap.App
import Snap.App.Cache
import Snap.App.Migr... | null | https://raw.githubusercontent.com/chrisdone/ircbrowse/d956aaf185500792224b6b0c209eb67c179322a4/src/Main.hs | haskell | | Main entry point.
| Main entry point. | # LANGUAGE ViewPatterns #
module Main where
import Data.List
import Data.Maybe
import Ircbrowse.Config
import Ircbrowse.Import
import Ircbrowse.Model.Data
import Ircbrowse.Model.Migrations
import Ircbrowse.Server
import Ircbrowse.Types
import Snap.App
import Snap.App.Cache
import Snap.App.Migrate
import System.Envir... |
77d75438c4aade96c3ffdbffbc2b6793a8650938193753d61b2e55d1dd46fb4b | vikram/lisplibraries | query-actions.lisp |
(in-package :weblocks-test)
(export '(find-ui-actions find-ui-link find-ui-form))
;; Querying UI elements
(defun find-ui-actions (type &key name id class (test #'equalp))
"If called during an active unit test, looks for the action in the
unit test database and returns the action (if found), or nil. If no
activ... | null | https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/weblocks-stable/test/test-code/query-actions.lisp | lisp | Querying UI elements
Return elements that match the query |
(in-package :weblocks-test)
(export '(find-ui-actions find-ui-link find-ui-form))
(defun find-ui-actions (type &key name id class (test #'equalp))
"If called during an active unit test, looks for the action in the
unit test database and returns the action (if found), or nil. If no
active unit test is present, ... |
3ef34fc9d26f467b026d29909fd89ec2584b58cd652f1fa9845d6be6a12560bf | ChicagoBoss/chicagoboss_tutorial | greeting.erl | -module(greeting, [Id, GreetingText]).
-compile(export_all).
validation_tests() ->
[{fun() -> length(GreetingText) > 0 end,
"Greeting must be non-empty!"},
{fun() -> length(GreetingText) =< 140 end,
"Greeting must be tweetable"}].
before_create() ->
NewRecord = set(greeting_te... | null | https://raw.githubusercontent.com/ChicagoBoss/chicagoboss_tutorial/5ce3e0326b5c85e59bd5ede2f51482d12ebe0d99/src/model/greeting.erl | erlang | after_create() ->
boss_mq:push("new-greetings", THIS). | -module(greeting, [Id, GreetingText]).
-compile(export_all).
validation_tests() ->
[{fun() -> length(GreetingText) > 0 end,
"Greeting must be non-empty!"},
{fun() -> length(GreetingText) =< 140 end,
"Greeting must be tweetable"}].
before_create() ->
NewRecord = set(greeting_te... |
4c2f1f8f8e7c8e440b1add610087c72ab19182d35548540a47d6d4d17db94c34 | fourmolu/fourmolu | transform-multi-line4-four-out.hs | # LANGUAGE TransformListComp #
quux' xs ys =
[ ( x
, y
)
| x <- xs
, y <- ys
, then group by
First comment
( x
+ y
)
using
Second comment
groupWith -- Third comment
]
| null | https://raw.githubusercontent.com/fourmolu/fourmolu/1f8903a92c8d5001dc1ec8ecfd4a04a3b61c3283/data/examples/declaration/value/function/comprehension/transform-multi-line4-four-out.hs | haskell | Third comment | # LANGUAGE TransformListComp #
quux' xs ys =
[ ( x
, y
)
| x <- xs
, y <- ys
, then group by
First comment
( x
+ y
)
using
Second comment
]
|
4953fc6dc73c5f71b6414959bcbd9771d839753d2e11ff03fe66da77a235892e | yminsky/incremental-tutorial | ex5.ml | (* Compute the nth stalest checks *)
open! Core
open! Async
open! Import
Note that this is sorted first by time , then by host name
module Time_and_host = struct
include Tuple.Make (Time) (Host.Name)
include Tuple.Comparable (Time) (Host.Name)
include Tuple.Sexpable (Time) (Host.Name)
end
type result... | null | https://raw.githubusercontent.com/yminsky/incremental-tutorial/756dfe36ec1b0a102128b3fa78a6c6762bdab90a/solutions/ex5.ml | ocaml | Compute the nth stalest checks
* Returns the single stalest check from the map of checks |
open! Core
open! Async
open! Import
Note that this is sorted first by time , then by host name
module Time_and_host = struct
include Tuple.Make (Time) (Host.Name)
include Tuple.Comparable (Time) (Host.Name)
include Tuple.Sexpable (Time) (Host.Name)
end
type result = Check.Name.t Time_and_host.Map.t
[... |
0ad4fffb4114340ebf4b87b332f8c949e99475bd1f2f03ed09ef9a57fcc70799 | takikawa/racket-ppa | scheme-lang.rkt | #lang racket/base
(require (for-syntax racket/base
racket/match)
(prefix-in r: racket/include)
racket/fixnum
racket/flonum
racket/vector
racket/splicing
racket/pretty
racket/dict
"config.rkt"
(for-syntax "config.rkt")
... | null | https://raw.githubusercontent.com/takikawa/racket-ppa/5f2031309f6359c61a8dfd1fec0b77bbf9fb78df/src/ChezScheme/rktboot/scheme-lang.rkt | racket | If we have to avoid `read-syntax`:
Help the Racket compiler by lifting immediate record operations out
of a `letrec`. Otherwise, the Racket compiler cannot figure out that
they won't capture continuations, etc., and will make access slow.
We may even be able to substitute a literal procedure, since all record
ty... | #lang racket/base
(require (for-syntax racket/base
racket/match)
(prefix-in r: racket/include)
racket/fixnum
racket/flonum
racket/vector
racket/splicing
racket/pretty
racket/dict
"config.rkt"
(for-syntax "config.rkt")
... |
76ced9fda6ae0e496de701a312fa55502e97e5994163458c8583d7040f95b590 | bobjflong/stellar-haskell | Request.hs | # LANGUAGE DeriveGeneric #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
module Web.Stellar.Request (
module Web.Stellar.Types,
PingResponse,
pingStellar,
PingStatus,
PingSuccess(..),
PingFailure(..),
makeRequest
) where
import C... | null | https://raw.githubusercontent.com/bobjflong/stellar-haskell/b7beac482b0a78869de6090d5c13cda5d9601268/src/Web/Stellar/Request.hs | haskell | # LANGUAGE OverloadedStrings #
>>> :set -XOverloadedStrings
>>> pingStellar ":9002" | # LANGUAGE DeriveGeneric #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
module Web.Stellar.Request (
module Web.Stellar.Types,
PingResponse,
pingStellar,
PingStatus,
PingSuccess(..),
PingFailure(..),
makeRequest
) where
import Control.Applicative
import qualified C... |
7f4b77648604375e1517393f3b1ce1ee0295532ce61a144c00d0a1d74a437923 | ku-fpg/haskino-examples | LCD.hs | -------------------------------------------------------------------------------------------------
-- |
-- Module : System.Hardware.Haskino.Parts.LCD
-- Based on System.Hardware.Arduino
Copyright : ( c ) University of Kansas
System . Hardware . Arduino ( c )
-- Lice... | null | https://raw.githubusercontent.com/ku-fpg/haskino-examples/cdf10e43e5c8b5a38bc0bcbfb0e0faccfa9924e2/parts/LCD.hs | haskell | -----------------------------------------------------------------------------------------------
|
Module : System.Hardware.Haskino.Parts.LCD
Based on System.Hardware.Arduino
License : BSD3
Stability : experimental
source code: </>
-----------------------------------------... | Copyright : ( c ) University of Kansas
System . Hardware . Arduino ( c )
LCD ( Liquid Crystal Display ) parts supported by Haskino . The code
below has partly been implemented following the Arduino LiquidCrystal project
The Hitachi44780 data sheet is at : < -linux.sourceforge.ne... |
a4bb17cd6c9c4edb9a7fb2745a60f2f339bccad53d1a8dc147d0895e32a9ecf7 | maximedenes/native-coq | pretyping.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/pretyping/pretyping.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* This file implements type inferenc... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Names
open Sign
open Te... |
399aac02abbb39cafe0c15e99f18af839b45c719dc0b1afa8793fb5f19337891 | travelping/capwap | dp_mockup.erl | Copyright ( C ) 2013 - 2023 , Travelping GmbH < >
%% This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 of the License , or
%% (at your option) any later version.
%% Thi... | null | https://raw.githubusercontent.com/travelping/capwap/c2e503c5ad7d6b4c0ff3df2a4d5deed73d5f7c51/test/dp_mockup.erl | erlang | This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General P... | Copyright ( C ) 2013 - 2023 , Travelping GmbH < >
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
-module(dp_mockup).
-compile({parse_tra... |
a467ce89e72b1744f1762a9c382ec49fcee20041143cac253affb674ed3a9452 | christian-marie/oauth2-server | use-cases.hs | --
Copyright © 2013 - 2015 Anchor Systems , Pty Ltd and Others
--
-- The code in this file, and the program it is a part of, is
-- made available to you by its authors as open source software:
-- you can redistribute it and/or modify it under the terms of
the 3 - clause BSD licence .
--
# LANGUAGE FlexibleInstance... | null | https://raw.githubusercontent.com/christian-marie/oauth2-server/ebb75be9d05dd52d478a6e069d32461d4e54544e/test/use-cases.hs | haskell |
The code in this file, and the program it is a part of, is
made available to you by its authors as open source software:
you can redistribute it and/or modify it under the terms of
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeFamilies #
-webdriver-1.0.2/docs/Test-Hspec-WebDriver.html#t:BrowserDefaults | Copyright © 2013 - 2015 Anchor Systems , Pty Ltd and Others
the 3 - clause BSD licence .
# LANGUAGE FlexibleInstances #
# OPTIONS_GHC -fno - warn - orphans #
module Main where
import Network.URI
import System.Environment (getArgs, withArgs)
import System.FilePath.Posix ... |
a2336378d54d9bd332e691f7e39de4b7d3ce36aa1674d1891768e93cbaaf6f9d | typedclojure/typedclojure | typedclojure_config.clj | {:ext [typed.clj.ext.clojure.core.typed
typed.clj.ext.clojure.core.typed.unsafe]}
| null | https://raw.githubusercontent.com/typedclojure/typedclojure/3aa381a764df3cc39dc0a312a1d9823eb6b7c564/typed/clj.checker/src/typedclojure_config.clj | clojure | {:ext [typed.clj.ext.clojure.core.typed
typed.clj.ext.clojure.core.typed.unsafe]}
| |
91bdf10a24a58a46311172e1d4d273b87d01eeef7fc6d90815d26810b1550cdd | racket/math | inline-sort.rkt | #lang racket/base
(require (for-syntax racket/base
racket/list))
(provide inline-sort)
(define-syntax (inline-sort stx)
(syntax-case stx ()
[(_ lt-expr v-exprs ...)
(with-syntax ([(< vs ...) (generate-temporaries #'(lt-expr v-exprs ...))])
(quasisyntax/loc stx
(let ([... | null | https://raw.githubusercontent.com/racket/math/dcd2ea1893dc5b45b26c8312997917a15fcd1c4a/math-lib/math/private/inline-sort.rkt | racket | #lang racket/base
(require (for-syntax racket/base
racket/list))
(provide inline-sort)
(define-syntax (inline-sort stx)
(syntax-case stx ()
[(_ lt-expr v-exprs ...)
(with-syntax ([(< vs ...) (generate-temporaries #'(lt-expr v-exprs ...))])
(quasisyntax/loc stx
(let ([... | |
c9a061e1c258d5d5e9ed5eafbbbefc4b42996917608ed8cf4a1bf29bec6de6b8 | ixmatus/orgmode-parse | List.hs | -----------------------------------------------------------------------------
-- |
Module : Data . . . . Content . List
Copyright : © 2014 Parnell Springmeyer
-- License : All Rights Reserved
Maintainer : Parnell Springmeyer < >
-- Stability : stable
--
-- Parsing combinators for org-... | null | https://raw.githubusercontent.com/ixmatus/orgmode-parse/89adc4087556bb0dd58a7648a9e7e239463aa059/src/Data/OrgMode/Parse/Attoparsec/Content/List.hs | haskell | ---------------------------------------------------------------------------
|
License : All Rights Reserved
Stability : stable
Parsing combinators for org-mode markups and paragraphs.
--------------------------------------------------------------------------
| Parser will success when the parser position ... | Module : Data . . . . Content . List
Copyright : © 2014 Parnell Springmeyer
Maintainer : Parnell Springmeyer < >
# LANGUAGE ScopedTypeVariables #
module Data.OrgMode.Parse.Attoparsec.Content.List
(
parseList
)
where
import Control.Monad (guard... |
f5e3ca23f16ff35184ebd67e5e0afbf8a80e83d8b9b8415f026f5297968f4ec6 | tomhanika/conexp-clj | freese.clj | ;; Copyright ⓒ the conexp-clj developers; all rights reserved.
;; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( -1.0.php )
;; which can be found in the file LICENSE at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bou... | null | https://raw.githubusercontent.com/tomhanika/conexp-clj/3201c4781e836e91d8364382e2db606362fe407c/src/main/clojure/conexp/layouts/freese.clj | clojure | Copyright ⓒ the conexp-clj developers; all rights reserved.
The use and distribution terms for this software are covered by the
which can be found in the file LICENSE at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not re... | Eclipse Public License 1.0 ( -1.0.php )
(ns conexp.layouts.freese
(:use conexp.base
[conexp.math.algebra :only (base-set)]
[conexp.fca.posets :only (poset-upper-neighbours)]
[conexp.layouts.util :only (edges)]
[conexp.layouts.base :only (make-layout-nc)])
(:import [org.latdraw.d... |
e7a83422d83f81f2aad610080d3e85aba1a110b7d144f72e39bbc071ccbc4b73 | kanaka/html5-css3-ebnf | html_mangle_test.clj | (ns html5-css3-ebnf.html-mangle-test
(:require [clojure.test :refer :all]
[html5-css3-ebnf.html-mangle :as html-mangle]))
(def test1-attrs "
<html> <body>
<div class = \"bar\" class = \"baz\" >
World
</div>
</body> </html>")
(def test1-attrs-first "
<html> <body>
<div class = \"b... | null | https://raw.githubusercontent.com/kanaka/html5-css3-ebnf/b7057b137893dba77d1ecfd410eedef3d2134c41/test/html5_css3_ebnf/html_mangle_test.clj | clojure | TODO: this could be split to test each prune capability
\" >content <div> </div> </div></body> </html>") | (ns html5-css3-ebnf.html-mangle-test
(:require [clojure.test :refer :all]
[html5-css3-ebnf.html-mangle :as html-mangle]))
(def test1-attrs "
<html> <body>
<div class = \"bar\" class = \"baz\" >
World
</div>
</body> </html>")
(def test1-attrs-first "
<html> <body>
<div class = \"b... |
c04cc682d041039d141aa91a3c28dc961988319417d47087fcc35e83724b7003 | rubenbarroso/EOPL | 5-4-3.scm | This is 5-4-3.scm : class- and method- structs
(let ((time-stamp "Time-stamp: <2000-12-13 16:24:08 wand>"))
(eopl:printf "5-4-3.scm - class and method structs ~a~%"
(substring time-stamp 13 29)))
;;;;;;;;;;;;;;;; classes ;;;;;;;;;;;;;;;;
(define-datatype class class?
(a-class
(class-name symbol?)
... | null | https://raw.githubusercontent.com/rubenbarroso/EOPL/f9b3c03c2fcbaddf64694ee3243d54be95bfe31d/src/interps/5-4-3.scm | scheme | classes ;;;;;;;;;;;;;;;;
constructing classes
^;;;;;;;;;;;;;;; objects ;;;;;;;;;;;;;;;;
^; an object is now just a single part, with a vector representing the
^; managed storage for the all the fields.
^;;;;;;;;;;;;;;; methods ;;;;;;;;;;;;;;;;
^ m-decl -> method
method environments ;;;;;;;;;;;;;;;;
class environme... | This is 5-4-3.scm : class- and method- structs
(let ((time-stamp "Time-stamp: <2000-12-13 16:24:08 wand>"))
(eopl:printf "5-4-3.scm - class and method structs ~a~%"
(substring time-stamp 13 29)))
(define-datatype class class?
(a-class
(class-name symbol?)
(super-name symbol?)
(field-length i... |
4700f9df2cbd464170d5a2942a2a0f0a8234e09962b434b870c2b15b3fa07450 | Datomic/simulant | repl.clj | Copyright ( c ) Metadata Partners , LLC . 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 a... | null | https://raw.githubusercontent.com/Datomic/simulant/063292d50b6b77e3d333eddfb3c8b3280d38c915/examples/simulant/examples/repl.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) Metadata Partners , LLC . All rights reserved .
(ns simulant.examples.repl
(:require [datomic.api :as d]
[clojure.java.io :as io]))
(defn reset-conn
"Reset connection to a scratch database. Use memory database if no
URL passed in."
([]
(reset-conn (str "datomic:mem://" (d... |
e9954fdc499653f459a0f9c7090ebdc2cc110aad8046d4407532f4f01be2b906 | Clozure/ccl | xcoms.lisp | ;;; -*- Log: hemlock.log; Package: Hemlock -*-
;;;
;;; **********************************************************************
This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
;;;
#+CMU (ext:file-comment
"$Header$")
;;;
;;; ****... | null | https://raw.githubusercontent.com/Clozure/ccl/6c1a9458f7a5437b73ec227e989aa5b825f32fd3/cocoa-ide/hemlock/unused/archive/xcoms.lisp | lisp | -*- Log: hemlock.log; Package: Hemlock -*-
**********************************************************************
**********************************************************************
This file contains commands and support specifically for X related features.
| This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
#+CMU (ext:file-comment
"$Header$")
Written by .
(in-package :hemlock)
(defcommand "Region to Cut Buffer" (p)
"Place the current region into the X cut buffer."
"Place ... |
626eb1fd1b8d8e828ad1337fa5e32d8e4cde63bdeab870951ec891b21f420e96 | 2600hz-archive/whistle | couch_compactor.erl | %%%-------------------------------------------------------------------
@author < >
( C ) 2011 ,
%%% @doc
Utilities to compact BigCouch clusters , nodes , and DBs
%%% @end
Created : 8 Sep 2011 by < >
%%%-------------------------------------------------------------------
-module(couch_compactor).
-exp... | null | https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/lib/whistle_couch-1.0.0/src/couch_compactor.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
Conflict resolution-enabled API
Internal Functions ---------------------------------------------------------- | @author < >
( C ) 2011 ,
Utilities to compact BigCouch clusters , nodes , and DBs
Created : 8 Sep 2011 by < >
-module(couch_compactor).
-export([start_link/0, init/1]).
-export([compact_all/0, compact_node/1, compact_db/2]).
-export([compact_all/1, compact_all/2, compact_node/2, compact_node/3
,c... |
0920a1953b7e6c05433ec9435693adbf68c0a61c61085482bf68655f9c1f4e7a | agentbellnorm/dativity | graph.cljc | (ns dativity.graph
(:require [clojure.set :refer [subset?]]
[ysera.test :refer [is is=]]))
(defn empty-graph
[]
{:nodes {} :edges {}})
(defn add-node-with-attrs
{:test (fn []
(is (-> (empty-graph)
(add-node-with-attrs [:node {:color "green"}])
(add... | null | https://raw.githubusercontent.com/agentbellnorm/dativity/8d03d0a1ee7bf48397d900faef6f119649d95c83/src/dativity/graph.cljc | clojure | (ns dativity.graph
(:require [clojure.set :refer [subset?]]
[ysera.test :refer [is is=]]))
(defn empty-graph
[]
{:nodes {} :edges {}})
(defn add-node-with-attrs
{:test (fn []
(is (-> (empty-graph)
(add-node-with-attrs [:node {:color "green"}])
(add... | |
6c7abf90c4c8e84e57650c8ea4ebab94c5ffb943efe5e6bf3c0888c62497fbe4 | jbreindel/battlecraft | bc_gold_event.erl |
-module(bc_gold_event).
-behavior(gen_event).
-export([init/1,
handle_event/2,
handle_call/2,
handle_info/2,
terminate/2,
code_change/3]).
%% internal state
-record(state, {gold_fsm}).
%%====================================================================
%% Public functions
%%===================... | null | https://raw.githubusercontent.com/jbreindel/battlecraft/622131a1ad8c46f19cf9ffd6bf32ba4a74ef4137/apps/bc_entity/src/bc_gold_event.erl | erlang | internal state
====================================================================
Public functions
==================================================================== |
-module(bc_gold_event).
-behavior(gen_event).
-export([init/1,
handle_event/2,
handle_call/2,
handle_info/2,
terminate/2,
code_change/3]).
-record(state, {gold_fsm}).
-spec init(InitArgs) -> Result when
InitArgs :: Args | {Args, Term :: term()},
Args :: term(),
Result :: {ok, State}
| {ok,... |
2c9f77b412f036361fefe1b61dcfae96f9fb2ee839b7edcf0d96052a104516fb | falsetru/htdp | 35.3.3.scm | #lang racket
(require rackunit)
(require rackunit/text-ui)
(define switch-x-tests
(test-suite
"Test for switch-x"
(test-case
"switch-x"
(define x 0)
(define (switch-x)
(begin
(set! x (- x 1))
x))
(check-equal? (switch-x) -1)
(check-equal? x -1)
(check-equal? (swi... | null | https://raw.githubusercontent.com/falsetru/htdp/4cdad3b999f19b89ff4fa7561839cbcbaad274df/35/35.3.3.scm | scheme | #lang racket
(require rackunit)
(require rackunit/text-ui)
(define switch-x-tests
(test-suite
"Test for switch-x"
(test-case
"switch-x"
(define x 0)
(define (switch-x)
(begin
(set! x (- x 1))
x))
(check-equal? (switch-x) -1)
(check-equal? x -1)
(check-equal? (swi... | |
558d6436ae7ae9e16fec866c802b197caf36e42d5d0beb26d4f9a02d27051365 | basho/riak_test | riak_control.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2013 Basho Technologies , Inc.
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the Li... | null | https://raw.githubusercontent.com/basho/riak_test/8170137b283061ba94bc85bf42575021e26c929d/tests/riak_control.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2013 Basho Technologies , Inc.
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
from legacy and previous ... |
847eaf0ca8ba9c5d44397990a55231910b496a7dc24a53218da56648c1e03050 | BranchTaken/Hemlock | test_search_nth.ml | open! Basis.Rudiments
open! Basis
open! OrdmapTest
open Ordmap
let test () =
let test_search ordmap (key_max:uns) = begin
File.Fmt.stdout
|> (fmt_internals Uns.pp) ordmap
|> Fmt.fmt "\n"
|> ignore;
Range.Uns.iter (0L =:= key_max) ~f:(fun probe ->
let open Cmp in
File.Fmt.stdout
... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/a21b462fe7f70475591d2ffae185c91552bf6372/bootstrap/test/basis/ordmap/test_search_nth.ml | ocaml | open! Basis.Rudiments
open! Basis
open! OrdmapTest
open Ordmap
let test () =
let test_search ordmap (key_max:uns) = begin
File.Fmt.stdout
|> (fmt_internals Uns.pp) ordmap
|> Fmt.fmt "\n"
|> ignore;
Range.Uns.iter (0L =:= key_max) ~f:(fun probe ->
let open Cmp in
File.Fmt.stdout
... | |
f47ffdfc010d3f9d06f9ffee0ea266f41619f8544e1d97db70890b972f0b8434 | input-output-hk/cardano-ledger-byron | Dummy.hs | -- | Dummy values used in tests (replacing `configuration.yaml`)
module Test.Cardano.Crypto.Dummy
( annotatedProtocolMagicId
, aProtocolMagic
, protocolMagic
, protocolMagicId
)
where
import Cardano.Prelude
import Cardano.Binary (Annotated(..), serialize')
import Cardano.Crypto
( AProtocolMagic(..)
, P... | null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger-byron/d309449e6c303a9f0dcc8dcf172df6f0b3195ed5/crypto/test/Test/Cardano/Crypto/Dummy.hs | haskell | | Dummy values used in tests (replacing `configuration.yaml`) |
module Test.Cardano.Crypto.Dummy
( annotatedProtocolMagicId
, aProtocolMagic
, protocolMagic
, protocolMagicId
)
where
import Cardano.Prelude
import Cardano.Binary (Annotated(..), serialize')
import Cardano.Crypto
( AProtocolMagic(..)
, ProtocolMagic
, ProtocolMagicId(..)
, RequiresNetworkMagic(..)... |
1c1dc806c5036172052867f57195d26939bd27b500d09c97a918f2a496903100 | arsenm/Clutterhs | Transparent.hs |
-- Transparent stage
import Graphics.UI.Clutter
import Graphics.UI.Clutter.X11
import System.Glib.Signals
import System.Glib.Attributes
import Control.Monad.Trans (liftIO)
main = do
x11SetUseARGBVisual True
clutterInit
stg <- stageGetDefault
stageSetUseAlpha stg True
stageSetColor stg (Color 100 100 100 ... | null | https://raw.githubusercontent.com/arsenm/Clutterhs/ad3390895264c46906b5d3d954c4b04b04d96b1d/clutter/demo/Transparent.hs | haskell | Transparent stage |
import Graphics.UI.Clutter
import Graphics.UI.Clutter.X11
import System.Glib.Signals
import System.Glib.Attributes
import Control.Monad.Trans (liftIO)
main = do
x11SetUseARGBVisual True
clutterInit
stg <- stageGetDefault
stageSetUseAlpha stg True
stageSetColor stg (Color 100 100 100 100)
r1 <- rectang... |
e5e777cc2ab667b088260acf1b8243368ef5aea1c38394a0983b9e959cf21758 | apache/couchdb-mochiweb | mochiweb_socket_server_tests.erl | -module(mochiweb_socket_server_tests).
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
socket_server(Opts, ServerFun) ->
ServerOpts = [{ip, "127.0.0.1"}, {port, 0}, {backlog, 5}, {loop, ServerFun}],
{ok, Server} = mochiweb_socket_server:start(ServerOpts ++ Opts),
Port = mochiweb_socket_server:get(S... | null | https://raw.githubusercontent.com/apache/couchdb-mochiweb/d3c47a9e8833cd878c9227093e30a2341ee32900/test/mochiweb_socket_server_tests.erl | erlang | ExpectedActiveAfterConnect, ExpectedWaitingAfterConnect} | -module(mochiweb_socket_server_tests).
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
socket_server(Opts, ServerFun) ->
ServerOpts = [{ip, "127.0.0.1"}, {port, 0}, {backlog, 5}, {loop, ServerFun}],
{ok, Server} = mochiweb_socket_server:start(ServerOpts ++ Opts),
Port = mochiweb_socket_server:get(S... |
f3147b7d991e4522ebc70b3986290f796597ce22fb7587d0708e990967161727 | Tim-ats-d/Laius | slideshow.mli | type t = {
slides : Slide.t list;
ctx : Context.t;
widgets : (Context.t -> Statusbar_widget.styled_label) list;
}
val create :
?author:string ->
?date:string ->
title:string ->
statusbar:(Context.t -> Statusbar_widget.styled_label) list ->
Slide.t list ->
t
val present : t -> unit
| null | https://raw.githubusercontent.com/Tim-ats-d/Laius/feb8336fe72751b28fa574ed9e9d3d06c9e13843/src/slideshow.mli | ocaml | type t = {
slides : Slide.t list;
ctx : Context.t;
widgets : (Context.t -> Statusbar_widget.styled_label) list;
}
val create :
?author:string ->
?date:string ->
title:string ->
statusbar:(Context.t -> Statusbar_widget.styled_label) list ->
Slide.t list ->
t
val present : t -> unit
| |
01196f44f68ff10543a6457c17f359b30e1ade3ba0029e2d24e3374fe56d55b5 | janestreet/hardcaml | signal_graph.mli | (** A [Signal_graph.t] is a created from a list of signals, and defined by tracing back
to inputs (unassigned wires or constants). Functions are provided for traversing
the graph. *)
open Base
type t [@@deriving sexp_of]
(** Create a [Signal_graph.t] from a list of signals (commonly, circuit outputs). *)
va... | null | https://raw.githubusercontent.com/janestreet/hardcaml/4126f65f39048fef5853ba9b8d766143f678a9e4/src/signal_graph.mli | ocaml | * A [Signal_graph.t] is a created from a list of signals, and defined by tracing back
to inputs (unassigned wires or constants). Functions are provided for traversing
the graph.
* Create a [Signal_graph.t] from a list of signals (commonly, circuit outputs).
* Traverse the graph and find all inputs. Badly fo... |
open Base
type t [@@deriving sexp_of]
val create : Signal.t list -> t
val inputs : t -> Signal.t list Or_error.t
* Visit all signals in the graph , starting at the outputs , in a depth - first manner .
Each signal is visited only once . [ f_before ] is called before recursing on each
signal 's fan -... |
ef3fe84bf3dacf81634fa3b219056a02bb91d05baaea29fa5926b3caf5951703 | keera-studios/keera-hails | CombinedEnvironment.hs | -- |
--
Copyright : ( C ) Keera Studios Ltd , 2013
-- License : BSD3
Maintainer :
module CombinedEnvironment
( CRef
, CEnv
, GEnv.createCEnv
, view
, GEnv.model
, createCRef
, readIORef
, writeIORef
, updateView
, onViewAsync
)
where
import Data.IORef
Internal librar... | null | https://raw.githubusercontent.com/keera-studios/keera-hails/bf069e5aafc85a1f55fa119ae45a025a2bd4a3d0/demos/image-format-guesser/src/CombinedEnvironment.hs | haskell | |
License : BSD3 | Copyright : ( C ) Keera Studios Ltd , 2013
Maintainer :
module CombinedEnvironment
( CRef
, CEnv
, GEnv.createCEnv
, view
, GEnv.model
, createCRef
, readIORef
, writeIORef
, updateView
, onViewAsync
)
where
import Data.IORef
Internal libraries
import qualified Hails.MVC... |
885423db5212dbc0a69de50b24c458c400d710e2895ff272cf33d31a4112850e | lspector/Clojush | nth_prime.clj | ;; given some number number n, return the nth prime
(ns clojush.problems.integer-regression.nth-prime
(:require [clojush.pushstate :refer [push-item make-push-state top-item registered-for-stacks]]
[clojush.instructions.tag :refer [tag-instruction-erc tagged-instruction-erc]]
[clojush.interpr... | null | https://raw.githubusercontent.com/lspector/Clojush/685b991535607cf942ae1500557171a0739982c3/src/clojush/problems/integer_regression/nth_prime.clj | clojure | given some number number n, return the nth prime
the right integer on the stack gives 0 error |
(ns clojush.problems.integer-regression.nth-prime
(:require [clojush.pushstate :refer [push-item make-push-state top-item registered-for-stacks]]
[clojush.instructions.tag :refer [tag-instruction-erc tagged-instruction-erc]]
[clojush.interpreter :refer [run-push]]
[clojure.math.nu... |
a144589d8e27c14acaa89d67075887e8bd0e31093b762cf18aa408c66187094f | dterei/SafeHaskellExamples | a7.hs | {-# OPTIONS rtsopts=all #-}
module Main where
main = putStrLn "Hello World"
| null | https://raw.githubusercontent.com/dterei/SafeHaskellExamples/0f7bbb53cf1cbb8419ce3a4aa4258b84be30ffcc/flags/a7.hs | haskell | # OPTIONS rtsopts=all # | module Main where
main = putStrLn "Hello World"
|
a014da02ff170be35dce59eca11d9412be655bf81ab4e3dd66f8731f3ca141dd | typelead/etlas | Library.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
module Distribution.Types.Library (
Library(..),
emptyLibrary,
explicitLibModules,
libModulesAutogen,
libModules,
) where
import Prelude ()
import Distribution.Compat.Prelude
import Distribution.Types.BuildInfo
import Distribution.Typ... | null | https://raw.githubusercontent.com/typelead/etlas/bbd7c558169e1fda086e759e1a6f8c8ca2807583/etlas-cabal/Distribution/Types/Library.hs | haskell | # LANGUAGE DeriveDataTypeable #
^ What sigs need implementations?
^ Is the lib to be exposed by default?
so False propagates
| Get all the module names from the library (exposed and internal modules)
which are explicitly listed in the package description which would
need to be compiled. (This does not include re... | # LANGUAGE DeriveGeneric #
module Distribution.Types.Library (
Library(..),
emptyLibrary,
explicitLibModules,
libModulesAutogen,
libModules,
) where
import Prelude ()
import Distribution.Compat.Prelude
import Distribution.Types.BuildInfo
import Distribution.Types.ModuleReexport
import Distributio... |
447ef745a86301d20f23e7c4cb1323fd7b25903a2ddcafb6f31937e83f4ed8ef | agentm/project-m36 | AtomFunctionError.hs | # LANGUAGE DeriveGeneric , DeriveAnyClass #
module ProjectM36.AtomFunctionError where
import GHC.Generics
import Control.DeepSeq
import Data.Text
data AtomFunctionError = AtomFunctionUserError String |
AtomFunctionTypeMismatchError |
AtomFunctionParseError String |
... | null | https://raw.githubusercontent.com/agentm/project-m36/6b4adc2b227fab2ea3b62e75da824b7f5becccc3/src/lib/ProjectM36/AtomFunctionError.hs | haskell | # LANGUAGE DeriveGeneric , DeriveAnyClass #
module ProjectM36.AtomFunctionError where
import GHC.Generics
import Control.DeepSeq
import Data.Text
data AtomFunctionError = AtomFunctionUserError String |
AtomFunctionTypeMismatchError |
AtomFunctionParseError String |
... | |
5af0308294f9257752be046e726504137de0fa9a645dbd624933bd8e73f2fc0a | triffon/fp-2022-23 | 04-compose.rkt | #lang racket
(define (compose f g)
(lambda (x) (f (g x)))) | null | https://raw.githubusercontent.com/triffon/fp-2022-23/2fca66b8c82dca3063b0b6b55a41e4d54defdaee/exercises/inf2/03/04-compose.rkt | racket | #lang racket
(define (compose f g)
(lambda (x) (f (g x)))) | |
2b219b3a26ceab9b87dd7d524c2e9c785394a7725c3ef88a46800a68f51eecd3 | static-analysis-engineering/codehawk | bCHDisassembleInstruction.ml | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Binary Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Co... | null | https://raw.githubusercontent.com/static-analysis-engineering/codehawk/c1b3158e0d73cda7cfc10d75f6173f4297991a82/CodeHawk/CHB/bchlibx86/bCHDisassembleInstruction.ml | ocaml | bchlib
chutil
bchlib
bchlibx86
0x36 ---- segment override prefix: StackSegment
50+rd ----- PUSH r32 ------ Push r32
6A ------ PUSH imm8 ------ Push sign-extended imm8; stack
pointer is decremented by the
size of the stack pointer
8E/r ----... | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Binary Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Co... |
90073cdbaabc803ef7bffc8e5f14fbd08cbd9a03d3984909fb8b8089a0730fbc | evertedsphere/noether | Bool.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE Safe #-}
module Lemmata.Bool (
whenM
, unlessM
, ifM
, guardM
, bool
, (&&^)
, (||^)
, (<&&>)
, (<||>)
) where
import Control.Applicative (Applicative, liftA2)
import Control.Monad
( Monad
, MonadPlus
, guard
, return
,... | null | https://raw.githubusercontent.com/evertedsphere/noether/c4223f64b9df5b0dbbeec1fea726bfff7f5810f5/library/Lemmata/Bool.hs | haskell | # LANGUAGE Safe #
be evaluated.
same as (||)
| '||' lifted to an Applicative.
Unlike '||^' the operator is __not__ short-circuiting.
# INLINE (<||>) #
be evaluated.
same as (&&)
| '&&' lifted to an Applicative.
# INLINE (<&&>) # | # LANGUAGE NoImplicitPrelude #
module Lemmata.Bool (
whenM
, unlessM
, ifM
, guardM
, bool
, (&&^)
, (||^)
, (<&&>)
, (<||>)
) where
import Control.Applicative (Applicative, liftA2)
import Control.Monad
( Monad
, MonadPlus
, guard
, return
, unless
, when
, (=<<)
... |
99d88247659038f51a42e8c74958adf02de4778724d271ce60a280651bf6672a | siscia/css-parser | project.clj | (defproject css-parser "0.0.4"
:description "A parser for CSS"
:url "-parser"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0"]
[instaparse "1.3.6"]]
:resource-paths ["resources/"])
| null | https://raw.githubusercontent.com/siscia/css-parser/caf42a163aac27e261bd57814b7d79c129d6209c/project.clj | clojure | (defproject css-parser "0.0.4"
:description "A parser for CSS"
:url "-parser"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0"]
[instaparse "1.3.6"]]
:resource-paths ["resources/"])
| |
10cd9e91f6a6257c5a76d71397faec97bf50ab4f03b1e9ceb427cf77a75d5fb9 | skyzh/mips-simulator | ALU.hs | module ALU
( signExt
, zeroExt
, extMode
, aluRead
, isShift
, mapALUOp
, isArithmeticOp
)
where
import Prelude hiding ( xor )
import Data.Word ( Word16
, Word32
... | null | https://raw.githubusercontent.com/skyzh/mips-simulator/61a319ab776fa30831e75aab906c6ef22bb7755e/src/ALU.hs | haskell | map opcode to ALU operation
branch instructions
jal = add
other op as it is
extension mode
True if sign extension, otherwise False
is shift
True if reads shift amount field
- read output value from ALU
add
addu
addi
addiu
sub
subu
and
andi
div
divu
mult
multu
nor
or
ori
xor
xori
- lui
- sll
- s... | module ALU
( signExt
, zeroExt
, extMode
, aluRead
, isShift
, mapALUOp
, isArithmeticOp
)
where
import Prelude hiding ( xor )
import Data.Word ( Word16
, Word32
... |
294522823e136366b8a00d02ba6406690b568095de4067f7c61c895bae7f976e | flyspeck/flyspeck | vector3.ml | open Hol_core
include Vector2
(* ------------------------------------------------------------------------- *)
(* Individual closure properties. *)
(* ------------------------------------------------------------------------- *)
let SPAN_SUPERSET = prove
(`!x. x IN s ==> x IN... | null | https://raw.githubusercontent.com/flyspeck/flyspeck/05bd66666b4b641f49e5131a37830f4881f39db9/azure/hol-light-nat/Multivariate/vector3.ml | ocaml | -------------------------------------------------------------------------
Individual closure properties.
-------------------------------------------------------------------------
-------------------------------------------------------------------------
Mapping under l... | open Hol_core
include Vector2
let SPAN_SUPERSET = prove
(`!x. x IN s ==> x IN span s`,
MESON_TAC[SPAN_CLAUSES]);;
let SPAN_INC = prove
(`!s. s SUBSET span s`,
REWRITE_TAC[SUBSET; SPAN_SUPERSET]);;
let SPAN_UNION_SUBSET = prove
(`!s t. span s UNION span t SUBSET span(s UNION t)`,
REWRITE_TAC[span; HULL_UNIO... |
427f06d3c04de9706090b3e67eee2ab1a5777a53aff954067c45e3595f9b1349 | racket/racket7 | info.rkt | #lang info
(define collection "expander")
(define deps `(["base" #:version "6.6.0.2"]
"zo-lib"
"compiler-lib"))
(define build-deps `("at-exp-lib"))
(define pkg-desc "Racket's implementation of macros, modules, and top-level evaluation")
(define pkg-authors '(mflatt))
| null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/expander/info.rkt | racket | #lang info
(define collection "expander")
(define deps `(["base" #:version "6.6.0.2"]
"zo-lib"
"compiler-lib"))
(define build-deps `("at-exp-lib"))
(define pkg-desc "Racket's implementation of macros, modules, and top-level evaluation")
(define pkg-authors '(mflatt))
| |
68d21eadb58300eb703b925647ede10b618b6aaf1a13013165ff18b71f5acb9e | cdfa/frugel | Action.hs | module Frugel.Web.Action where
import Frugel ( GenericAction )
import qualified Frugel
import Frugel.Web.Model
import Scout
The Elm Architecture forces model changes to be centralised . Actions should describe the changes as precisely as possible given their origin
data Action
= Init
| GenerateRandom
... | null | https://raw.githubusercontent.com/cdfa/frugel/3d043489e3bf0028b2abe8ec27419daa8716eb5b/app/Frugel/Web/Action.hs | haskell | module Frugel.Web.Action where
import Frugel ( GenericAction )
import qualified Frugel
import Frugel.Web.Model
import Scout
The Elm Architecture forces model changes to be centralised . Actions should describe the changes as precisely as possible given their origin
data Action
= Init
| GenerateRandom
... | |
afbe3d63822945cd4e3bdb490031c6ea8d9db29dde6500dcd3df5fb87880a26b | chunsj/TH | generator.lisp | (declaim (optimize (speed 3) (debug 1) (safety 0)))
(in-package :th)
;; /* Manipulate THGenerator objects */
;; THGenerator * THGenerator_new(void);
(cffi:defcfun ("THGenerator_new" th-generator-new) th-generator-ptr)
;; THGenerator * THGenerator_copy(THGenerator *self, THGenerator *from);
(cffi:defcfun ("THGenerator... | null | https://raw.githubusercontent.com/chunsj/TH/890f05ab81148d9fe558be3979c30c303b448480/ffi/generator.lisp | lisp | /* Manipulate THGenerator objects */
THGenerator * THGenerator_new(void);
THGenerator * THGenerator_copy(THGenerator *self, THGenerator *from);
void THGenerator_free(THGenerator *gen);
unsigned long THRandom_seed(THGenerator *_generator);
/* Initializes the random number generator with the given long "the_seed_".... | (declaim (optimize (speed 3) (debug 1) (safety 0)))
(in-package :th)
(cffi:defcfun ("THGenerator_new" th-generator-new) th-generator-ptr)
(cffi:defcfun ("THGenerator_copy" th-generator-copy) th-generator-ptr
(generator th-generator-ptr)
(src th-generator-ptr))
(cffi:defcfun ("THGenerator_free" th-generator-free) ... |
893689b01018219e0f28c1bb5cb88d83c0289a286ec74ac42635c98dc9dfb34e | kupl/LearnML | original.ml | let rec iter ((n : int), (f : int -> int)) : int -> int =
match n with
| 1 -> f
| _ -> let g : int -> int = iter (n - 1, f) in
fun (x : int) -> f (g x)
| null | https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/iter/sub48/original.ml | ocaml | let rec iter ((n : int), (f : int -> int)) : int -> int =
match n with
| 1 -> f
| _ -> let g : int -> int = iter (n - 1, f) in
fun (x : int) -> f (g x)
| |
ad7ca9cc53acf2338c969b77c4da92158c063748f93652fd70edde9ea7974727 | b1412/clojure-web-admin | handler.clj | (ns clojure-web.handler
(:require [clojure-web
[exceptions :as ex]
[jobs :as jobs]
[middleware :as middleware]
[render :as render]]
[clojure-web.routes
[brand :refer [brand-routes]]
[computer :refer [computer-routes]]
... | null | https://raw.githubusercontent.com/b1412/clojure-web-admin/018161dcdb364cc168d6f5a56ceb798005a0701f/src/clj/clojure_web/handler.clj | clojure | (ns clojure-web.handler
(:require [clojure-web
[exceptions :as ex]
[jobs :as jobs]
[middleware :as middleware]
[render :as render]]
[clojure-web.routes
[brand :refer [brand-routes]]
[computer :refer [computer-routes]]
... | |
c441b59226ee5714bef3621a7aad9068069fe4bc2012e9ca6645a2dc5b2f9f24 | vshaxe/hxparser | jsonEmitter.ml | module type JsonApi = sig
type t
val jarray : t list -> t
val jobject : (string * t) list -> t
val jbool : bool -> t
val jstring : string -> t
val jint : int -> t
val jnull : t
end
module EnumApi = struct
type enum_api =
| NIdent
| NString
| PConstIdent
| PConstLiteral
| Var
| InlineFunction
| ... | null | https://raw.githubusercontent.com/vshaxe/hxparser/8621d5e44805b6d664654d15737faf6a3a4a18fa/src/syntax/jsonEmitter.ml | ocaml | Type hints
TODO: Compose these here?
Fields
TODO: This is stupid
TODO: This is stupid
TODO: This is stupid
Type declaration
TODO: Figure these out | module type JsonApi = sig
type t
val jarray : t list -> t
val jobject : (string * t) list -> t
val jbool : bool -> t
val jstring : string -> t
val jint : int -> t
val jnull : t
end
module EnumApi = struct
type enum_api =
| NIdent
| NString
| PConstIdent
| PConstLiteral
| Var
| InlineFunction
| ... |
b02d3bce86233c0fd7c7ff356e63eab69b2021f930694cfac6deb8e34ab81805 | LeventErkok/sbv | Lists.hs | -----------------------------------------------------------------------------
-- |
-- Module : TestSuite.Queries.Lists
Copyright : ( c )
-- License : BSD3
-- Maintainer:
-- Stability : experimental
--
-- Testing a few lists
-----------------------------------------------------------------------------
# LANGU... | null | https://raw.githubusercontent.com/LeventErkok/sbv/cfaa40b8c8ff8e1b7ff9ab71304654f6f531ba72/SBVTestSuite/TestSuite/Queries/Lists.hs | haskell | ---------------------------------------------------------------------------
|
Module : TestSuite.Queries.Lists
License : BSD3
Maintainer:
Stability : experimental
Testing a few lists
---------------------------------------------------------------------------
# OPTIONS_GHC -Wall -Werror #
Test suite | Copyright : ( c )
# LANGUAGE OverloadedLists #
# LANGUAGE ScopedTypeVariables #
module TestSuite.Queries.Lists (tests) where
import Data.SBV
import Data.SBV.Control
import Utils.SBVTestFramework
tests :: TestTree
tests =
testGroup "Basics.QueryLists"
[ goldenCapturedIO "query_Lists1" $ testQuery q... |
89678bb8dad884f54374f20105900855deaa0c563bc3585bc9ca2018e672fc25 | retro/keechma-next-realworld-app | protocols.cljs | (ns keechma.next.toolbox.pipeline.protocols) | null | https://raw.githubusercontent.com/retro/keechma-next-realworld-app/47a14f4f3f6d56be229cd82f7806d7397e559ebe/classes/production/realworld-2/keechma/next/toolbox/pipeline/protocols.cljs | clojure | (ns keechma.next.toolbox.pipeline.protocols) | |
0e4a8e85871470bba66deb07131cc9312bec7169804b81364ffa7316f75debb6 | Gbury/ocaml-cgroups | CGMemory.mli |
Copyright ( c ) 2015 ,
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 follo... | null | https://raw.githubusercontent.com/Gbury/ocaml-cgroups/448ec091c3407136e641bcbcc8fc99e4a7376461/subsystems/CGMemory.mli | ocaml |
Copyright ( c ) 2015 ,
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 follo... | |
8659557acca144de9acc68aecf49e4c82f2f5e92bb8f98b1bbc4c0bcde8aba0c | static-analysis-engineering/codehawk | bCHDisassembleARMStream.ml | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Binary Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Co... | null | https://raw.githubusercontent.com/static-analysis-engineering/codehawk/c1b3158e0d73cda7cfc10d75f6173f4297991a82/CodeHawk/CHB/bchlibarm32/bCHDisassembleARMStream.ml | ocaml | chutil
bchlib
bchlibarm32 | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Binary Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Co... |
5c5162f5bcf06fd884c5c2b78569eb213ef6ac9a10a71e8bf7d4d630d3b8cd74 | Rober-t/apxr_run | apxr_erl_tar.erl | @private
Copied from -20.0.1/lib/stdlib/src/erl_tar.erl
%% with modifications:
%% - Change module name to `apxr_erl_tar`
%% - Set tar mtimes to 0 and remove dependency on :os.system_time/1
%% - Preserve modes when building tarball
%% - Do not crash if failing to write tar
%% - Allow setting file_info opts on :apxr_... | null | https://raw.githubusercontent.com/Rober-t/apxr_run/9c62ab028af7ff3768ffe3f27b8eef1799540f05/src/lib/tar/apxr_erl_tar.erl | erlang | with modifications:
- Change module name to `apxr_erl_tar`
- Set tar mtimes to 0 and remove dependency on :os.system_time/1
- Preserve modes when building tarball
- Do not crash if failing to write tar
- Allow setting file_info opts on :apxr_erl_tar.add
%CopyrightBegin%
you may not use this file except in co... | @private
Copied from -20.0.1/lib/stdlib/src/erl_tar.erl
Copyright Ericsson AB 1997 - 2017 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
It supports reading most common tar formats , namely V... |
2c5c39bcaef801614ea5ed1c3ef1011dd8d7889e402b58abedfd5de02662782b | plumatic/grab-bag | distribution.clj | (ns flop.distribution
"Representations for distributions. Should probably look into Breeze or something instead."
(:use plumbing.core)
(:require
[schema.core :as s]
[plumbing.math :as plumbing-math]
[flop.array :as array]
[flop.math :as math]
[flop.stats :as stats])
(:import
[java.util Random... | null | https://raw.githubusercontent.com/plumatic/grab-bag/a15e943322fbbf6f00790ce5614ba6f90de1a9b5/lib/flop/src/flop/distribution.clj | clojure |
Base distributions
Conjugate priors
using notation from /~murphyk/Papers/bayesGauss.pdf
assumes we are using sample variance
| (ns flop.distribution
"Representations for distributions. Should probably look into Breeze or something instead."
(:use plumbing.core)
(:require
[schema.core :as s]
[plumbing.math :as plumbing-math]
[flop.array :as array]
[flop.math :as math]
[flop.stats :as stats])
(:import
[java.util Random... |
10897822e5bb57a195f452391406649f2beb1bf48e4d33380c2c5884fe7ba8ed | camfort/camfort | Model.hs |
Copyright 2016 , , , , under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
distribute... | null | https://raw.githubusercontent.com/camfort/camfort/3421e85f6fbbcaa6503a266b3fae029a09d2ff24/src/Camfort/Specification/Stencils/Model.hs | haskell |
This files gives an executable implementation of the model for
abstract stencil specifications. This model is used to drive both
the specification checking and program synthesis features.
# LANGUAGE GADTs #
# LANGUAGE DeriveTraversable #
# LANGUAGE DeriveDataTypeable #
# LANGUAGE MultiWayIf #
Utility container
---... |
Copyright 2016 , , , , under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
distribute... |
5e0b83ce57de281d38c6396df291536c7f567707d4fc97083bf8e03e0accaee0 | cbaggers/glsl-spec | types.lisp | (in-package :glsl-spec)
;; Types used in spec functions & variables
;;
;; No idea what to use this for, but here it is
(defvar *types-used*
'("atomic_uint"
"bool"
"bufferImage"
"bvec2"
"bvec3"
"bvec4"
"dmat2"
"dmat2x2"
"dmat2x3"
"dmat2x4"
"dmat3"
"dmat3x3"
"dmat3x2"
... | null | https://raw.githubusercontent.com/cbaggers/glsl-spec/f04476f7da89355ae6856b33283c60ba95c6555d/types.lisp | lisp | Types used in spec functions & variables
No idea what to use this for, but here it is | (in-package :glsl-spec)
(defvar *types-used*
'("atomic_uint"
"bool"
"bufferImage"
"bvec2"
"bvec3"
"bvec4"
"dmat2"
"dmat2x2"
"dmat2x3"
"dmat2x4"
"dmat3"
"dmat3x3"
"dmat3x2"
"dmat3x4"
"dmat4"
"dmat4x4"
"dmat4x2"
"dmat4x3"
"double"
"dvec2"
... |
8c0f83271102adb1249416218c0b2f1db7236a15d536f5db9e416a4c353eeb6c | xapix-io/axel-f | geo.cljc | (ns axel-f.excel.geo)
(def earth-radius 6371.0)
(defn to-radians
"Converts an angle measured in degrees to an approximately
equivalent angle measured in radians."
[x]
#?(:clj (Math/toRadians x)
:cljs (* x (/ Math/PI 180))))
(defn asin
"Returns the arc sine of `x`."
[x]
(Math/asin x))
(defn sin
... | null | https://raw.githubusercontent.com/xapix-io/axel-f/ec8fca880033e0ae78a8d9f42538d4a71fba29bd/src/axel_f/excel/geo.cljc | clojure | (ns axel-f.excel.geo)
(def earth-radius 6371.0)
(defn to-radians
"Converts an angle measured in degrees to an approximately
equivalent angle measured in radians."
[x]
#?(:clj (Math/toRadians x)
:cljs (* x (/ Math/PI 180))))
(defn asin
"Returns the arc sine of `x`."
[x]
(Math/asin x))
(defn sin
... | |
07473cf79c09d68403a5cdfb80e50be05885c98873c8e96c51c5f6765faac15c | Clozure/ccl-tests | get-setf-expansion.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Mon Jan 13 17:05:17 2003
;;;; Contains: Tests for GET-SETF-EXPANSION
(in-package :cl-test)
(deftest get-setf-expansion.error.1
(signals-error (get-setf-expansion) program-error)
t)
(deftest get-setf-expansion.error.2
(signals-error (get-setf-expansion 'x ni... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/get-setf-expansion.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests for GET-SETF-EXPANSION
Tests for proper behavior will go here
There are tests in DEFINE-SETF-EXPANDER too
form has to be present, since portable code walkers may | Author :
Created : Mon Jan 13 17:05:17 2003
(in-package :cl-test)
(deftest get-setf-expansion.error.1
(signals-error (get-setf-expansion) program-error)
t)
(deftest get-setf-expansion.error.2
(signals-error (get-setf-expansion 'x nil nil) program-error)
t)
FIXME
For a function on which the s... |
b16f4b8888e9196e89ad55fb1db5cebc36034bae6069279d425bca2a47ea9af5 | coq/coq | xmlprotocol.ml | (************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * *... | null | https://raw.githubusercontent.com/coq/coq/bf2d3b32c2383ea32f48802d85a2e6348fef05d1/ide/coqide/protocol/xmlprotocol.ml | ocaml | **********************************************************************
* The Coq Proof Assistant / The Coq Development Team
// * This file is distributed under the terms of the
* (see LICENSE file for the text of the license)
************************************... | v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* GNU Lesser Gener... |
ee54e3d7ba309e46530ec306d0d7b07ac1c90bd6f2d6ff943f39e65609d3d548 | janestreet/base | test_set.ml | open! Import
open! Set
type int_set = Set.M(Int).t [@@deriving compare, equal, hash, sexp]
let%test _ = invariants (of_increasing_iterator_unchecked (module Int) ~len:20 ~f:Fn.id)
let%test _ = invariants (Poly.of_increasing_iterator_unchecked ~len:20 ~f:Fn.id)
let of_list = of_list (module Int)
let%expect_test "spl... | null | https://raw.githubusercontent.com/janestreet/base/1462b7d5458e96569275a1c673df968ecbf3342f/test/test_set.ml | ocaml | open! Import
open! Set
type int_set = Set.M(Int).t [@@deriving compare, equal, hash, sexp]
let%test _ = invariants (of_increasing_iterator_unchecked (module Int) ~len:20 ~f:Fn.id)
let%test _ = invariants (Poly.of_increasing_iterator_unchecked ~len:20 ~f:Fn.id)
let of_list = of_list (module Int)
let%expect_test "spl... | |
fbac87a062d2c2f76eaae1bff56308364bb370e1ba21797097f3324184772cf1 | RefactoringTools/wrangler | refac_rm_op.erl | Copyright ( c ) 2013 , ,
%% 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... | null | https://raw.githubusercontent.com/RefactoringTools/wrangler/1c33ad0e923bb7bcebb6fd75347638def91e50a8/src/gen_refacs/refac_rm_op.erl | erlang | 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.
%% Redi... | Copyright ( c ) 2013 , ,
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR
@author < >
for QuickCheck ' sub - menu .
-module(refac_rm_op).
-behaviour(gen_refac).
-compile(export_all).
-include(... |
cf7cba5fefe1adfb08169d90a4c01c235238b6407d61c761fb4fe4f56717226a | runexec/chp | handler.clj | (ns chp.test.handler
(:use clojure.test
ring.mock.request
chp.handler))
(deftest test-app
(testing "main route"
(let [response (app (request :get "/"))]
(is (= (:status response) 200))
(is (= (:body response) "Hello World"))))
(testing "not-found route"
(let [response (ap... | null | https://raw.githubusercontent.com/runexec/chp/9059399c46fb4106a73631c741f1e557af541a8b/chp-examples/basic/test/chp/test/handler.clj | clojure | (ns chp.test.handler
(:use clojure.test
ring.mock.request
chp.handler))
(deftest test-app
(testing "main route"
(let [response (app (request :get "/"))]
(is (= (:status response) 200))
(is (= (:body response) "Hello World"))))
(testing "not-found route"
(let [response (ap... | |
edb40dd73487eaa73ee8d4c74518d6bcbb90276784233ee7945fb0878dc7eee8 | ony/exherbo-cabal | Haddock.hs | Copyright © 2015 < >
Distributed under the terms of the GNU General Public License v2
# OPTIONS_GHC -fno - warn - orphans #
# LANGUAGE UnicodeSyntax #
# LANGUAGE FlexibleInstances #
module ExRender.Haddock () where
import ExRender.Base
import Documentation.Haddock.Parser
import Documentation.Haddock.Types
... | null | https://raw.githubusercontent.com/ony/exherbo-cabal/d68af20efe65bba20707b7954df4b297b87fcaaa/src/ExRender/Haddock.hs | haskell | XXX: no images in description
XXX: examples are filtered out | Copyright © 2015 < >
Distributed under the terms of the GNU General Public License v2
# OPTIONS_GHC -fno - warn - orphans #
# LANGUAGE UnicodeSyntax #
# LANGUAGE FlexibleInstances #
module ExRender.Haddock () where
import ExRender.Base
import Documentation.Haddock.Parser
import Documentation.Haddock.Types
... |
53ca50448dc17b31df83215564076376e4aefaa12f938b4c78c72605d087adf5 | metosin/reitit | core.clj | (ns frontend-re-frame.core)
| null | https://raw.githubusercontent.com/metosin/reitit/1ab075bd353966636f154ac36ae9b7990efeb008/examples/frontend-re-frame/src/clj/frontend_re_frame/core.clj | clojure | (ns frontend-re-frame.core)
| |
4cf43fc8743bcaf408b46053fc0195cc485515fbdc16dfbb4c12f173510d9259 | keera-studios/keera-hails | HelloWorld.hs | import Control.Monad.Trans.MSF.Reader
import Data.IORef
import Data.MonadicStreamFunction
import Data.MonadicStreamFunction.InternalCore
import Data.ReactiveValue
import Graphics.UI.Gtk
import Graphics.UI.Gtk.Reactive
import Graphics.UI.Gtk.Reactive.Gtk2
main = do
-- View
initGUI
window <- windowNew
set wi... | null | https://raw.githubusercontent.com/keera-studios/keera-hails/bf069e5aafc85a1f55fa119ae45a025a2bd4a3d0/demos/keera-hails-demos-gtk-dunai/src/HelloWorld.hs | haskell | View
Controller Rules
Run!
Pure controller functions that can be debugged independently | import Control.Monad.Trans.MSF.Reader
import Data.IORef
import Data.MonadicStreamFunction
import Data.MonadicStreamFunction.InternalCore
import Data.ReactiveValue
import Graphics.UI.Gtk
import Graphics.UI.Gtk.Reactive
import Graphics.UI.Gtk.Reactive.Gtk2
main = do
initGUI
window <- windowNew
set window [windo... |
6c91f80d56575be7fa4b31c2c1340513f1338b1aa9e801c7124e513b46812c22 | janestreet/core | validated_intf.ml | * For making an abstract version of a type that ensures a validation check has passed .
Suppose one wants to have a type of positive integers :
{ [
module Positive_int = Validated . Make ( struct
type t = int
let here = [ % here ]
let validate = Int.validate_pos... | null | https://raw.githubusercontent.com/janestreet/core/4b6635d206f7adcfac8324820d246299d6f572fe/core/src/validated_intf.ml | ocaml | * [here] will appear in validation-failure error messages.
* [S_allowing_substitution] is the same as [S], but allows writing interfaces like:
{[
type t [@@deriving bin_io, compare, ...]
include Validated.S_allowing_substitution with type t := t and type raw := my_raw_type
]}
which is not po... | * For making an abstract version of a type that ensures a validation check has passed .
Suppose one wants to have a type of positive integers :
{ [
module Positive_int = Validated . Make ( struct
type t = int
let here = [ % here ]
let validate = Int.validate_pos... |
2d45b92325d1b1ad09a443d6780d2127c0c843945b9b7e2c4f837f838052e1e5 | opencog/pln | and-to-subset-rule1.scm | ; =============================================================================
; And to Subset Rule1
;
AndLink
; AndLink
; A
; B
; A
; |-
; SubsetLink
; A
; B
;
; -----------------------------------------------------------------------------
(define and-to-subset1-rule
(BindLink
(Vari... | null | https://raw.githubusercontent.com/opencog/pln/52dc099e21393892cf5529fef687a69682436b2d/opencog/pln/rules/wip/and-to-subset-rule1.scm | scheme | =============================================================================
And to Subset Rule1
AndLink
A
B
A
|-
SubsetLink
A
B
----------------------------------------------------------------------------- | AndLink
(define and-to-subset1-rule
(BindLink
(VariableList
(VariableNode "$A")
(VariableNode "$B"))
(AndLink
(AndLink
(VariableNode "$A")
(VariableNode "$B"))
(VariableNode "$A"))
(ExecutionOutputLink
... |
3025ddc397c3afa1764d64501e8f8a0ea6ab7916aa6fd9956c54e7496e4e4b87 | TOTBWF/teenytt | Spec.hs | module Main where
import Test.Hspec
import Spec.TeenyTT.Base.SymbolTable qualified as SymbolTable
main :: IO ()
main = hspec $ do
SymbolTable.specs
SymbolTable.properties
| null | https://raw.githubusercontent.com/TOTBWF/teenytt/a45162254b4b3c056b1607f4759bd608fd355165/test/Spec.hs | haskell | module Main where
import Test.Hspec
import Spec.TeenyTT.Base.SymbolTable qualified as SymbolTable
main :: IO ()
main = hspec $ do
SymbolTable.specs
SymbolTable.properties
| |
3b9eeafe6bfd9832fdd457c6ea95f747c1bc1b3625a3105586a05d333236779c | typeclasses/haskell-phrasebook | common-types.hs | main =
do
putStrLn ("hask" ++ "ell")
putStrLn ("1+1 = " ++ show (1 + 1))
putStrLn ("7.0/3.0 = " ++ show (7.0 / 3.0))
putStrLn (show (True && False))
putStrLn (show (True || False))
putStrLn (show (not True))
| null | https://raw.githubusercontent.com/typeclasses/haskell-phrasebook/61ee6a7e63e4d6fc0e86c0cb9dc2c0d9f06b9537/common-types.hs | haskell | main =
do
putStrLn ("hask" ++ "ell")
putStrLn ("1+1 = " ++ show (1 + 1))
putStrLn ("7.0/3.0 = " ++ show (7.0 / 3.0))
putStrLn (show (True && False))
putStrLn (show (True || False))
putStrLn (show (not True))
| |
3110552f36cfa9f3c574b37a1806082c7bc082a3eabed97fb1ee558409a9c7b7 | prometheusresearch-archive/action | Workflow.ml | module Result = Common.Result
(**
* Monadic structure on top queries which represent transition between screens.
*)
module Syntax (Q : sig type t end) = struct
type q = Q.t
type t =
(** Render concrete query to a screen *)
| Render of q
(** Define how to transition from one screen to another screen ... | null | https://raw.githubusercontent.com/prometheusresearch-archive/action/34e0a1058e3e3212066f732babc1bdd4f2eb1428/core/src/Workflow.ml | ocaml | *
* Monadic structure on top queries which represent transition between screens.
* Render concrete query to a screen
* Define how to transition from one screen to another screen | module Result = Common.Result
module Syntax (Q : sig type t end) = struct
type q = Q.t
type t =
| Render of q
| Next of (t * t list)
end
module Untyped = struct
include Syntax(Query.Untyped)
module Syntax = struct
let render q = Render q
let andThen path w = Next (w, path)
end
end
module... |
034fcdf0ab0252c431842e8d34080b65b9004ce30cd9738b703b05e53923b031 | takenobu-hs/haskell-ethereum-assembly | IR.hs |
module Language.Evm.IR where
------------------------------------------------------------------------
Internal Representation of EVM instructions
-- see yellow paper's Appendix H
------------------------------------------------------------------------
data EvmIr =
0s : Stop and Arithmetic Operations
... | null | https://raw.githubusercontent.com/takenobu-hs/haskell-ethereum-assembly/cdff2d298256d069f2b154550b810767412d4cf3/src/Language/Evm/IR.hs | haskell | ----------------------------------------------------------------------
see yellow paper's Appendix H
----------------------------------------------------------------------
20s: SHA3
--
| PUSH1
| PUSH2
| PUSH3
| PUSH4
| PUSH5
| PUSH6
| PUS... |
module Language.Evm.IR where
Internal Representation of EVM instructions
data EvmIr =
0s : Stop and Arithmetic Operations
STOP
| ADD
| MUL
| SUB
| DIV
| SDIV
| MOD
| SMOD
| ADDMOD
| MULMOD
|... |
743670ea5b805074a73a1022af0382ad9a5d3790f68ed1d46052caa2704e6168 | passy/coding-puzzles | day05.hs | {-# LANGUAGE ExplicitForAll #-}
module Main where
import Control.Applicative (liftA2)
import Data.List (foldl', group)
import qualified Data.Set as S
import System.Environment (getArgs)
-- | A lifted ('&&').
(<&&>) :: Applicative f => f Bool -> f Bool -> f Bool
(<&... | null | https://raw.githubusercontent.com/passy/coding-puzzles/686bd0775ee5a98004229d44c913376d033b13de/advent-of-code/day05.hs | haskell | # LANGUAGE ExplicitForAll #
| A lifted ('&&').
# INLINE (<&&>) # |
module Main where
import Control.Applicative (liftA2)
import Data.List (foldl', group)
import qualified Data.Set as S
import System.Environment (getArgs)
(<&&>) :: Applicative f => f Bool -> f Bool -> f Bool
(<&&>) = liftA2 (&&)
vowels :: S.Set Char
vowels = S.fro... |
76682603f71dc4573cd10a1575d2875c5d1c2584e992ca00037deb249e0ef3d8 | ngorogiannis/cyclist | rules.ml | open Lib
open Generic
open Seplog
open Program
exception Not_symheap = Form.Not_symheap
module Rule = Proofrule.Make (Seq)
module Seqtactics = Seqtactics.Make (Seq)
module Proof = Proof.Make (Seq)
module Slprover = Prover.Make (Seplog.Seq)
module EntlSeqHash = Hashtbl.Make (Seplog.Seq)
module ProofNode = Proofnode.M... | null | https://raw.githubusercontent.com/ngorogiannis/cyclist/c93a168d586b308ab2a2c730cd1b2375ab263167/src/procedure/rules.ml | ocaml | Wrapper for the entailment prover
Wrappers for backlink abducers
axioms
If the precondition of the candidate sequence is inconsistent, then we can
close it of as instance of the Ex Falso axiom
If the precondition entails the post condition and the command is a final
simplification rules
Tactic which tri... | open Lib
open Generic
open Seplog
open Program
exception Not_symheap = Form.Not_symheap
module Rule = Proofrule.Make (Seq)
module Seqtactics = Seqtactics.Make (Seq)
module Proof = Proof.Make (Seq)
module Slprover = Prover.Make (Seplog.Seq)
module EntlSeqHash = Hashtbl.Make (Seplog.Seq)
module ProofNode = Proofnode.M... |
20ea769db05c769fd46f83cc1e92b340a00e87519b7dfd37802173112d38403f | georepl/georepl | gui_base.clj | (ns georepl.gui-base
(:require [clojure.core.match :refer [match]]
[georepl.draw-primitives :as dp]
[georepl.gui :as gui]
[georepl.mathlib :as math]
[georepl.dialog :as dialog]
[georepl.configuration :as config]))
;;
NYI : weird bug : There is a state att... | null | https://raw.githubusercontent.com/georepl/georepl/1502ae04bbc3cab757000714008ccecc4e9e571b/src/georepl/gui_base.clj | clojure |
same value as :selection. Both values are set in the record constructors in gui.clj.
The value of :selection was changed in the constructor: The next time the status shows it comes with the former value
of :selection in the update-frame function (or whatever is called after the constructor).
Other attributes in th... | (ns georepl.gui-base
(:require [clojure.core.match :refer [match]]
[georepl.draw-primitives :as dp]
[georepl.gui :as gui]
[georepl.mathlib :as math]
[georepl.dialog :as dialog]
[georepl.configuration :as config]))
NYI : weird bug : There is a state attrib... |
570c16ec7b883a94aa5d4ac369c35bbded652b1c201531def54470bbf3ff6585 | TrustInSoft/tis-interpreter | register.mli | Modified by TrustInSoft
(**************************************************************************)
(* *)
This file is part of Frama - C.
(* ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/report/register.mli | ocaml | ************************************************************************
alternatives)
... | Modified by TrustInSoft
This file is part of Frama - C.
Copyright ( C ) 2007 - 2015
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Softwa... |
21b6c4ce330605890de5b4181cbc8feeca948a299b7e037b0e35daddd3bdb49d | TorXakis/TorXakis | TestPreGNFDisable.hs |
TorXakis - Model Based Testing
Copyright ( c ) 2015 - 2017 TNO and Radboud University
See LICENSE at root directory of this repository .
TorXakis - Model Based Testing
Copyright (c) 2015-2017 TNO and Radboud University
See LICENSE at root directory of this repository.
-}
# LANGUAGE ViewPatterns #
modu... | null | https://raw.githubusercontent.com/TorXakis/TorXakis/038463824b3d358df6b6b3ff08732335b7dbdb53/sys/lpe/test/TestPreGNFDisable.hs | haskell | import Debug.Trace
import TxsShow
type ProcDefs = Map.Map ProcId ProcDef
-------------------------------------------------------------------------
Tests
-------------------------------------------------------------------------
P[A]() := A >-> STOP [>> A >-> STOP
with procInst = P[A]()
becomes:
P$... |
TorXakis - Model Based Testing
Copyright ( c ) 2015 - 2017 TNO and Radboud University
See LICENSE at root directory of this repository .
TorXakis - Model Based Testing
Copyright (c) 2015-2017 TNO and Radboud University
See LICENSE at root directory of this repository.
-}
# LANGUAGE ViewPatterns #
modu... |
4b03df9a32f2850ca407851d4b70bd498c73956da293e5f637f4f8981028f89f | hyperfiddle/rcf | analyzer.clj | A simpler tools.analyzer for the restricted use case of RCF
;; Adapted from
(ns hyperfiddle.rcf.analyzer
(:refer-clojure :exclude [macroexpand-1 macroexpand update-vals])
(:import (clojure.lang IObj)))
(defn cljs? [env] (some? (:js-globals env)))
(defn empty-env
"Returns an empty env"
[]
{:locals {}... | null | https://raw.githubusercontent.com/hyperfiddle/rcf/86339e422e38f39951686b1aee6ececc17c4c1d4/src/hyperfiddle/rcf/analyzer.clj | clojure | Adapted from
Cannot use `cc/binding` as it relies on var which does a read-time resolve,
while we want a runtime var resolve.
handling invalid userland forms.
(nil? form) :nil
(boolean? form) :bool
(keyword? form) :keyword
(string? form) :string
(number? form) :number
(type? form) :type
(record? f... | A simpler tools.analyzer for the restricted use case of RCF
(ns hyperfiddle.rcf.analyzer
(:refer-clojure :exclude [macroexpand-1 macroexpand update-vals])
(:import (clojure.lang IObj)))
(defn cljs? [env] (some? (:js-globals env)))
(defn empty-env
"Returns an empty env"
[]
{:locals {}
:namespaces {}... |
873f2f30aa80fcd829789b9d0d8032ba8f27c304cec35d12cb293858fa666d81 | iamFIREcracker/cg | package.lisp | (defpackage #:cg
(:use #:cl)
(:export
:*version*
:define-guesser
:toplevel))
| null | https://raw.githubusercontent.com/iamFIREcracker/cg/b84e67a39fcb07322cc83aaaab1f0f545d18117b/package.lisp | lisp | (defpackage #:cg
(:use #:cl)
(:export
:*version*
:define-guesser
:toplevel))
| |
cb3d762d45311e715101e5dbe7f38b7f4916e33a469991e59b49e46818e73e6e | haskell/time | UTCTime.hs | {-# LANGUAGE Safe #-}
module Data.Time.Clock.Internal.UTCTime (
-- * UTC
-- | UTC is time as measured by a clock, corrected to keep pace with the earth by adding or removing
-- occasional seconds, known as \"leap seconds\".
These corrections are not predictable and are announced with six month 's notice... | null | https://raw.githubusercontent.com/haskell/time/857d8fd808548b2bf652236443adcbeae9188745/lib/Data/Time/Clock/Internal/UTCTime.hs | haskell | # LANGUAGE Safe #
* UTC
| UTC is time as measured by a clock, corrected to keep pace with the earth by adding or removing
occasional seconds, known as \"leap seconds\".
No table of these corrections is provided, as any program compiled with it would become
and you'll be fine.
| This is the simplest representatio... |
module Data.Time.Clock.Internal.UTCTime (
These corrections are not predictable and are announced with six month 's notice .
out of date in six months .
If you do n't care about leap seconds , use ' UTCTime ' and ' NominalDiffTime ' for your clock calculations ,
UTCTime (..),
) where
import Control.DeepSeq... |
3a64a0c5afdcf575f54dad080d37d1059018899cf9dae9b1513daacd5d589570 | typelead/etlas | UnqualComponentName.hs | # LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
module Distribution.Types.UnqualComponentName
( UnqualComponentName, unUnqualComponentName, mkUnqualComponentName
, packageNameToUnqualComponentName, unqualComponentNameToPackageName
) where
import Prelude ()
i... | null | https://raw.githubusercontent.com/typelead/etlas/bbd7c558169e1fda086e759e1a6f8c8ca2807583/etlas-cabal/Distribution/Types/UnqualComponentName.hs | haskell | # LANGUAGE DeriveDataTypeable #
| An unqualified component name, for any kind of component.
also states which of a library, executable, etc the name refers too. The
later uniquely identifiers a component and its closure.
@since 2.0
TODO: bad enabler of bad monoids
| Convert 'UnqualComponentName' to 'String'
@... | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE DeriveGeneric #
module Distribution.Types.UnqualComponentName
( UnqualComponentName, unUnqualComponentName, mkUnqualComponentName
, packageNameToUnqualComponentName, unqualComponentNameToPackageName
) where
import Prelude ()
import Distribution.Compat.Prelude
im... |
f73a532d54bd9437f3e8097d40d5cee9b9a25c6ed37457a4c8160911ebfa22c1 | haas/harmtrace | AnnotationParser.hs | # LANGUAGE FlexibleContexts #
{-# OPTIONS_GHC -Wall #-}
--------------------------------------------------------------------------------
-- |
Module : HarmTrace . Audio .
Copyright : ( c ) 2010 - 2012 Universiteit Utrecht , 2012 University of Oxford
-- License : GPL3
--
Maintainer : ... | null | https://raw.githubusercontent.com/haas/harmtrace/e250855a3bb6e5b28fe538c728f707cf82ca9fd3/src/HarmTrace/Audio/AnnotationParser.hs | haskell | # OPTIONS_GHC -Wall #
------------------------------------------------------------------------------
|
License : GPL3
Stability : experimental
Portability : non-portable
found at: <-annotations>
------------------------------------------------------------------------------
perhaps this file sho... | # LANGUAGE FlexibleContexts #
Module : HarmTrace . Audio .
Copyright : ( c ) 2010 - 2012 Universiteit Utrecht , 2012 University of Oxford
Maintainer : ,
Summary : Parses textual ground - truth Chord annotations , such as the ones
module HarmTrace.Audio.AnnotationParser ( parseAnnotationDat... |
70cb7a6f08b87bf1551cf34587da37b113ba538c093e1fab1a9530b9f51d3472 | arttuka/reagent-material-ui | desktop_date_time_picker.cljs | (ns reagent-mui.x.desktop-date-time-picker
"Imports @mui/x-date-pickers/DesktopDateTimePicker as a Reagent component.
Original documentation is at -pickers/desktop-date-time-picker/ ."
(:require [reagent.core :as r]
["@mui/x-date-pickers/DesktopDateTimePicker" :as MuiDesktopDateTimePicker]))
(def de... | null | https://raw.githubusercontent.com/arttuka/reagent-material-ui/14103a696c41c0eb67fc07fc67cd8799efd88cb9/src/x/reagent_mui/x/desktop_date_time_picker.cljs | clojure | (ns reagent-mui.x.desktop-date-time-picker
"Imports @mui/x-date-pickers/DesktopDateTimePicker as a Reagent component.
Original documentation is at -pickers/desktop-date-time-picker/ ."
(:require [reagent.core :as r]
["@mui/x-date-pickers/DesktopDateTimePicker" :as MuiDesktopDateTimePicker]))
(def de... | |
f82c107f11160fd87f1e844da1bae0f13347223a563887631f3f0e44f29abbc2 | kennytilton/its-alive | model-object.lisp | ;; -*- mode: Lisp; Syntax: Common-Lisp; Package: cells; -*-
#|
Cells -- Automatic Dataflow Managememnt
|#
(in-package :cells)
;;; --- model-object ----------------------
(eval-when (:compile-toplevel :load-toplevel :execute)
(export '(md-name fm-parent .parent )))
(defclass model-object ()
((.md-state ... | null | https://raw.githubusercontent.com/kennytilton/its-alive/9a627c1b7f16efc005103985ce27a4bcdbab9fce/src/tiltontec/lisp/model-object.lisp | lisp | -*- mode: Lisp; Syntax: Common-Lisp; Package: cells; -*-
Cells -- Automatic Dataflow Managememnt
--- model-object ----------------------
[nil | :nascent | :alive | :eternal-rest]
goes t at start of not-to-be (prolly could fold into state w/ work)
(excl:schedule-finalization self 'md-finalize)
bad idea if... |
(in-package :cells)
(eval-when (:compile-toplevel :load-toplevel :execute)
(export '(md-name fm-parent .parent )))
(defclass model-object ()
(.fnz :initform nil )
(.awaken-on-init-p :initform nil :initarg :awaken-on-init-p :accessor awaken-on-init-p)
(.cells :initform nil :accessor cells)
(.cells-flu... |
ffeddaad2dca6d30310ad285455bb129358b64de3b87e5572c9a53158ea8490e | hipsleek/hipsleek | saerror.ml | #include "xdebug.cppo"
open VarGen
open Gen.Basic
let partition_constrs_4_paths link_hpargs_w_path constrs0 prog proc_name =
let rec init body stmt cpl binding = match stmt with
(* | Cast.Label lab -> let () = print_endline "label" in init body lab.Cast.exp_label_exp cpl binding *)
| Cast . let ( ) = print... | null | https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/bef_indent/saerror.ml | ocaml | | Cast.Label lab -> let () = print_endline "label" in init body lab.Cast.exp_label_exp cpl binding
| Cast.Assert _ -> let () = print_endline "assert" in cpl
| Cast.Assign assi -> let () = print_endline "assign" in init body assi.Cast.exp_assign_rhs cpl binding
| Cast.Bind _ -> let () = print_endline "bind" in cp... | #include "xdebug.cppo"
open VarGen
open Gen.Basic
let partition_constrs_4_paths link_hpargs_w_path constrs0 prog proc_name =
let rec init body stmt cpl binding = match stmt with
| Cast . let ( ) = print_endline " check ref " in cpl
| Cast . let ( ) = print_endline " java " in cpl
| Cast . BConst _ - > ... |
db234fb7143253d32bf4fc46251076189589e46a88f9f7f82368662cdf6cc0bd | kuchenkruste/lambda-m | Main.hs | module Main where
import qualified Tree as Tree
import System.IO
import Utility
import Data.Char as Char
import qualified Value as Value
import Evaluator
import Context
import Eval
import Value
import Data.Time.Clock
prelude :: IO String
prelude = readFile "bootstrap/prelude.lm"
strip :: String -> String
strip = f .... | null | https://raw.githubusercontent.com/kuchenkruste/lambda-m/dec69313d550cb2e7fa391ea9f08a5d238f9f582/src/Main.hs | haskell | module Main where
import qualified Tree as Tree
import System.IO
import Utility
import Data.Char as Char
import qualified Value as Value
import Evaluator
import Context
import Eval
import Value
import Data.Time.Clock
prelude :: IO String
prelude = readFile "bootstrap/prelude.lm"
strip :: String -> String
strip = f .... | |
96117ced9662a1149b9924f057f5954a19a9e5c4449bdf4610022d82cf803fe4 | fdopen/ppx_cstubs | ptree.mli | This file is part of ppx_cstubs ( )
* Copyright ( c ) 2018 - 2020 fdopen
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version... | null | https://raw.githubusercontent.com/fdopen/ppx_cstubs/5d5ce9b7cf45d87bb71c046a76d30c17ec6075e5/src/internal/ptree.mli | ocaml | This file is part of ppx_cstubs ( )
* Copyright ( c ) 2018 - 2020 fdopen
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version... | |
5ff280cf65558f80560723eb9e7623c6b5596e45bdad416782957ef116e4af2b | WormBase/wormbase_rest | references.clj | (ns rest-api.classes.strain.widgets.references
(:require
[rest-api.classes.generic-fields :as generic]))
(def widget
{:name generic/name-field
:references generic/references})
| null | https://raw.githubusercontent.com/WormBase/wormbase_rest/e51026f35b87d96260b62ddb5458a81ee911bf3a/src/rest_api/classes/strain/widgets/references.clj | clojure | (ns rest-api.classes.strain.widgets.references
(:require
[rest-api.classes.generic-fields :as generic]))
(def widget
{:name generic/name-field
:references generic/references})
| |
b0df8782d75a16d41fa88b8a5949c9579665734962ac802a6990f14c87c28a8c | nilenso/time-tracker | db_test.clj | (ns time-tracker.timers.db-test
(:require [clojure.test :refer :all]
[clojure.java.jdbc :as jdbc]
[time-tracker.db :as db]
[time-tracker.timers.db :as timers-db]
[time-tracker.fixtures :as fixtures]
[time-tracker.test-helpers :refer [populate-db]]
... | null | https://raw.githubusercontent.com/nilenso/time-tracker/054d0dc6d6b89a4ed234d8f0b0a260b6deeef9e3/test/clj/time_tracker/timers/db_test.clj | clojure | populate-db also creates a user with given gid
populate-db also creates a user with given gid | (ns time-tracker.timers.db-test
(:require [clojure.test :refer :all]
[clojure.java.jdbc :as jdbc]
[time-tracker.db :as db]
[time-tracker.timers.db :as timers-db]
[time-tracker.fixtures :as fixtures]
[time-tracker.test-helpers :refer [populate-db]]
... |
6757a550f2f45537c9009097693fa9ef6c3111fde48220a7feead5a4ceadce7c | cvogt/2020-07-01-haskell-game-demo | ConcurrentState.hs | module Playtime.ConcurrentState where
import My.IO
import My.Prelude
import Playtime.EngineState
data ConcurrentState = ConcurrentState
{ csEngineState :: MVar EngineState,
csTimeStep :: MVar [(SystemTime, SystemTime)],
csTimeGL :: MVar [(SystemTime, SystemTime)],
csTimeRender :: MVar [(SystemTime, Syst... | null | https://raw.githubusercontent.com/cvogt/2020-07-01-haskell-game-demo/f90fcd19ea79802774dcfafe8505415d6f8c8a8b/lib/Playtime/ConcurrentState.hs | haskell | module Playtime.ConcurrentState where
import My.IO
import My.Prelude
import Playtime.EngineState
data ConcurrentState = ConcurrentState
{ csEngineState :: MVar EngineState,
csTimeStep :: MVar [(SystemTime, SystemTime)],
csTimeGL :: MVar [(SystemTime, SystemTime)],
csTimeRender :: MVar [(SystemTime, Syst... | |
39054998da3f372457f66baa120bfe54de25d9becaecd74eaee2454ee0956db0 | tensorflow/haskell | NN.hs | Copyright 2016 TensorFlow authors .
--
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- -2.0
--
-- Unless required by applicable law or agreed to in writing, software
distr... | null | https://raw.githubusercontent.com/tensorflow/haskell/d088e30b80f1508281e400975bec9d14b431a22c/tensorflow-ops/src/TensorFlow/NN.hs | haskell |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright 2016 TensorFlow authors .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
module TensorFlow.NN
( sigmoidCrossEntropyWithLogits
) where
import Prelude... |
6a268000c888a22af7a383a089e7a542870dacd42fb8922b086347186fe2ca3e | avik-das/garlic | set.scm | ;; A "set" data structure where every element appears exactly once. The
;; equality of elements in the set are determined by a user-supplied equality
;; function, and convenience constructors are provided when the equality
;; function is simply "=".
;;
;; Note that, in order to achieve simplicity of implementation, thi... | null | https://raw.githubusercontent.com/avik-das/garlic/b5f0698f287239eca6b1dd10b2d69d760f3e2e55/stdlib-includes/set.scm | scheme | A "set" data structure where every element appears exactly once. The
equality of elements in the set are determined by a user-supplied equality
function, and convenience constructors are provided when the equality
function is simply "=".
Note that, in order to achieve simplicity of implementation, this data
stru... | are O(N ) , meaning the " add - all " operator is ) . Do not depend on this
(define (new-with-equality fn= items) (cons fn= items))
(define (new items) (new-with-equality = items))
(define (empty-with-equality fn=) (new-with-equality fn= '()))
(define empty (empty-with-equality =))
(define get-fn= car)
(define ... |
150dd3ed668fdbb342b3f6872288834b8f660dbcbde07fccdacb98edb8b9d04b | andys8/network-manager-tui | Theme.hs | module Theme
( theme
)
where
import Graphics.Vty
import qualified Brick.Widgets.List as List
import Brick.AttrMap ( attrName )
import Brick.Util
import Brick.Themes ( Theme
, ne... | null | https://raw.githubusercontent.com/andys8/network-manager-tui/f3832d55abfaa297ea2a70e2670d2207c8d39e95/src/Theme.hs | haskell | module Theme
( theme
)
where
import Graphics.Vty
import qualified Brick.Widgets.List as List
import Brick.AttrMap ( attrName )
import Brick.Util
import Brick.Themes ( Theme
, ne... | |
c56b6409eeba4a22169399211927181170002468915d2d8b691f0c877be1f082 | yetanalytics/flint | modifier_test.cljc | (ns com.yetanalytics.flint.spec.modifier-test
(:require [clojure.test :refer [deftest testing is]]
[clojure.spec.alpha :as s]
[com.yetanalytics.flint.spec.modifier :as ms]))
(deftest conform-modifier-test
(testing "Conforming solution modifiers"
(is (= [[:ax/var '?foo]]
(s/co... | null | https://raw.githubusercontent.com/yetanalytics/flint/b0a2530582e04f5592869b0152b846864c283d77/src/test/com/yetanalytics/flint/spec/modifier_test.cljc | clojure | (ns com.yetanalytics.flint.spec.modifier-test
(:require [clojure.test :refer [deftest testing is]]
[clojure.spec.alpha :as s]
[com.yetanalytics.flint.spec.modifier :as ms]))
(deftest conform-modifier-test
(testing "Conforming solution modifiers"
(is (= [[:ax/var '?foo]]
(s/co... | |
a38b66ffb3075b8bc05bd5460cc0904da26c771d4ec24ab7daa8b4161b687a6c | CompSciCabal/SMRTYPRTY | sum_list.rkt | #lang plai/mutator
( allocator - setup " .. /good - collectors / mark_and_sweep_collector.rkt " 30 )
(allocator-setup "../good-collectors/mark_and_compact_collector.rkt" 40)
(define (sum-list L)
(if (empty? L)
0
(+ (first L) (sum-list (rest L)))))
(sum-list '(1 2 3))
| null | https://raw.githubusercontent.com/CompSciCabal/SMRTYPRTY/4a5550789c997c20fb7256b81469de1f1fce3514/experiments/scott/garbage_collector/plai/tests/gc/good-mutators/sum_list.rkt | racket | #lang plai/mutator
( allocator - setup " .. /good - collectors / mark_and_sweep_collector.rkt " 30 )
(allocator-setup "../good-collectors/mark_and_compact_collector.rkt" 40)
(define (sum-list L)
(if (empty? L)
0
(+ (first L) (sum-list (rest L)))))
(sum-list '(1 2 3))
| |
d5e9f33d5c74fce6657271a7d97449df8a33c05cab15da0fd2399f651194a90e | ivankelly/gambit | _source.scm | ;;;============================================================================
File : " _ " , Time - stamp : < 2009 - 02 - 16 14:58:03 feeley >
Copyright ( c ) 1994 - 2009 by , All Rights Reserved .
(include "fixnum.scm")
(include-adt "_envadt.scm")
(include-adt "_gvmadt.scm")
(include-adt "_ptreeadt.scm")
... | null | https://raw.githubusercontent.com/ivankelly/gambit/7377246988d0982ceeb10f4249e96badf3ff9a8f/gsc/_source.scm | scheme | ============================================================================
----------------------------------------------------------------------------
Source code manipulation module:
-------------------------------
This module contains procedures to manipulate source code
representations read in from Scheme so... |
File : " _ " , Time - stamp : < 2009 - 02 - 16 14:58:03 feeley >
Copyright ( c ) 1994 - 2009 by , All Rights Reserved .
(include "fixnum.scm")
(include-adt "_envadt.scm")
(include-adt "_gvmadt.scm")
(include-adt "_ptreeadt.scm")
(include "_sourceadt.scm")
* * * * * * * * * * * * * * * * * * *
A r... |
b1144b1e2177f415baff1314dddcc7acc7ef914e1cc94e71ffcc43efaf0e90a1 | ruHaskell/ruhaskell | Authors.hs | {-# LANGUAGE OverloadedStrings #-}
module Markup.Authors where
import Prelude hiding (div)
import Control.Monad ((<=<))
import Hakyll (Compiler, makeItem)
import Hakyll.Web.Template
import Text.Blaze.Html.Renderer.Pretty (renderHtml)
import Text.Blaze.Html5... | null | https://raw.githubusercontent.com/ruHaskell/ruhaskell/1e38eae50011307d11a2026af925a23a6fd8a346/src/Markup/Authors.hs | haskell | # LANGUAGE OverloadedStrings # |
module Markup.Authors where
import Prelude hiding (div)
import Control.Monad ((<=<))
import Hakyll (Compiler, makeItem)
import Hakyll.Web.Template
import Text.Blaze.Html.Renderer.Pretty (renderHtml)
import Text.Blaze.Html5
import qualified Text.Blaze.Html5.... |
e4b8cc17368a372e681e924788f2683d10a4155884f642cc12a8cdc7588bab2f | PEZ/shadow-w-backend | project.clj | (defproject lein-app "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:dependencies [[org.clojure/clojure "1.11.1"]
[org.clojure/clojurescript "1.11.60"]
[thheller/shadow-cljs "2.19.9"]
[binaryage/devtools "1.0.6"]
[reagent "1.1.1"]]
:sou... | null | https://raw.githubusercontent.com/PEZ/shadow-w-backend/9ad8a85b487d0d4860ebaca8fe285ff8f32bf0a3/project.clj | clojure | (defproject lein-app "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:dependencies [[org.clojure/clojure "1.11.1"]
[org.clojure/clojurescript "1.11.60"]
[thheller/shadow-cljs "2.19.9"]
[binaryage/devtools "1.0.6"]
[reagent "1.1.1"]]
:sou... | |
fe0611ca8fc148a0b50ab79d76c64195c515a1ef63e8b911553494d7b737c792 | Bike/mother | macro.lisp | ;;;; macro.lisp
req . COMBINE , EVAL
(in-package #:mother)
(defclass macro (operative)
((underlying :accessor macro-underlying :initarg :op)))
(defun macrotize (op) (make-instance 'macro :op op)) ; generic?
(defun expand-macro-combination (macro operands env) ; generic?
(combine (macro-underlying macro) opera... | null | https://raw.githubusercontent.com/Bike/mother/be571bcc8ed2a9f6c65a5d73e5e711509499420b/macro.lisp | lisp | macro.lisp
generic?
generic? | req . COMBINE , EVAL
(in-package #:mother)
(defclass macro (operative)
((underlying :accessor macro-underlying :initarg :op)))
(combine (macro-underlying macro) operands env))
(defmethod combine ((operator macro) operands env)
(eval (expand-macro-combination operator operands env) env))
(defprim macrotize... |
20b5681d2b234d9f6c6d1dd5ecfdbe2ad134a2763969ede8671e6b7b2d2242b4 | johnwhitington/ocamli | example02.ml | let safe_divide x y =
try x / y with
Division_by_zero -> 0
| null | https://raw.githubusercontent.com/johnwhitington/ocamli/28da5d87478a51583a6cb792bf3a8ee44b990e9f/OCaml%20from%20the%20Very%20Beginning/Chapter%207/example02.ml | ocaml | let safe_divide x y =
try x / y with
Division_by_zero -> 0
| |
f46bf6e6b949216c64a0dbccd15a5edaa5c3b5627e405254cdb99389d72f7a97 | neel-krishnaswami/adjs | ast.ml | (* Syntax of the mixed linepar/nonlinear term language *)
open Base
type kind =
| Int
| Lin
| KVar of id
| KArrow of kind * kind
type tp =
| Num
| Bool
| String
| Pure of tp
| Next of tp
| Stream of tp
| G of tp
| Product of tp list
| Arrow of tp * tp
| Forall of id * kind option * tp
|... | null | https://raw.githubusercontent.com/neel-krishnaswami/adjs/8c892658d56461e0ee7135d6776db13c8d80c72d/ast.ml | ocaml | Syntax of the mixed linepar/nonlinear term language
* exp |
open Base
type kind =
| Int
| Lin
| KVar of id
| KArrow of kind * kind
type tp =
| Num
| Bool
| String
| Pure of tp
| Next of tp
| Stream of tp
| G of tp
| Product of tp list
| Arrow of tp * tp
| Forall of id * kind option * tp
| Exists of id * kind option * tp
| TApp of tp * tp list
... |
58ac9fac5a56555c7c8a003293f1743fded6ee1a096508e8af0a446dba3beab7 | hexlet-codebattle/battle_asserts | check_brackets.clj | (ns battle-asserts.issues.check-brackets
(:require [clojure.string :as s]
[clojure.test.check.generators :as gen]))
(def level :medium)
(def tags ["strings"])
(def description
{:en "Check the balance of the brackets in the expression. Brackets can be round: \"()\", square: \"[]\", curly \"{}\" and an... | null | https://raw.githubusercontent.com/hexlet-codebattle/battle_asserts/5737a7aa54bf81c21c1fb5114bc13746a6925776/src/battle_asserts/issues/check_brackets.clj | clojure | (ns battle-asserts.issues.check-brackets
(:require [clojure.string :as s]
[clojure.test.check.generators :as gen]))
(def level :medium)
(def tags ["strings"])
(def description
{:en "Check the balance of the brackets in the expression. Brackets can be round: \"()\", square: \"[]\", curly \"{}\" and an... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.