_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 |
|---|---|---|---|---|---|---|---|---|
15fe14e5eb8235a487dd6b024da1f51b5ad9fbdeec11909baf5f55fad08926a6 | weavejester/strowger | core.cljs | (ns example.core
(:require [strowger.event :as event]))
(enable-console-print!)
(defn print-event [event]
(js/console.log event))
(defn print-key [event]
(prn (event/event-key event)))
(defn print-button [event]
(prn [(event/event-button event)
(event/client-xy event)
(event/offset-xy event)... | null | https://raw.githubusercontent.com/weavejester/strowger/c9e5351320bebfda28634f5f00a41100bd727048/example/src/example/core.cljs | clojure | (ns example.core
(:require [strowger.event :as event]))
(enable-console-print!)
(defn print-event [event]
(js/console.log event))
(defn print-key [event]
(prn (event/event-key event)))
(defn print-button [event]
(prn [(event/event-button event)
(event/client-xy event)
(event/offset-xy event)... | |
3b4b65038de06acf15916b5ae70e8b1594290b771fa8b92ba1d09cbd5133748b | kupl/FixML | sub1.ml |
type heap = EMPTY | NODE of rank * value * heap * heap
and rank = int
and value = int
exception EmptyHeap
let rank h =
match h with
EMPTY -> -1
| NODE (r, _, _, _) -> r
let shake (x, lh, rh) =
if (rank lh) >= (rank rh)
then NODE (rank rh+1, x, lh, rh)
else NODE (rank lh+1, x, rh, ... | null | https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/priority_queue/priority_queue/submissions/sub1.ml | ocaml |
type heap = EMPTY | NODE of rank * value * heap * heap
and rank = int
and value = int
exception EmptyHeap
let rank h =
match h with
EMPTY -> -1
| NODE (r, _, _, _) -> r
let shake (x, lh, rh) =
if (rank lh) >= (rank rh)
then NODE (rank rh+1, x, lh, rh)
else NODE (rank lh+1, x, rh, ... | |
18492fb99ef82e34daee9a407cb8be9c1a1b7879d1159761183419d0a9b61e40 | sethfowler/pygmalion | SourceKind.hs | Fail to compile if CursorKind has changed .
module Pygmalion.SourceKind
( SourceKind (..)
) where
import Control.Applicative
import Data.Serialize
import Database.SQLite.Simple (FromRow(..), field)
data SourceKind = UnexposedDecl
| StructDecl
| UnionDecl
| ClassDecl
... | null | https://raw.githubusercontent.com/sethfowler/pygmalion/d58cc3411d6a17cd05c3b0263824cd6a2f862409/src/Pygmalion/SourceKind.hs | haskell | Pygmalion custom kind.
Pygmalion custom kind. | Fail to compile if CursorKind has changed .
module Pygmalion.SourceKind
( SourceKind (..)
) where
import Control.Applicative
import Data.Serialize
import Database.SQLite.Simple (FromRow(..), field)
data SourceKind = UnexposedDecl
| StructDecl
| UnionDecl
| ClassDecl
... |
d3616a7b5570baa50b08fcd3c9b46ac3b6ba3310d99a96872342986d38603404 | borodust/cl-flow | suite.lisp | (cl:in-package :cl-flow.tests)
(5am:def-suite :cl-flow.tests)
(5am:in-suite :cl-flow.tests)
(defun serial-flow ()
(>> (loop repeat 5
collecting (-> :p (a)
(declare (type fixnum a))
(the fixnum (1+ a))))))
(defun parallel-flow ()
(~> (loop for i fro... | null | https://raw.githubusercontent.com/borodust/cl-flow/ebb0282a43c4e58126723afb0fa56ff8f66bad21/t/suite.lisp | lisp |
allow null result
| (cl:in-package :cl-flow.tests)
(5am:def-suite :cl-flow.tests)
(5am:in-suite :cl-flow.tests)
(defun serial-flow ()
(>> (loop repeat 5
collecting (-> :p (a)
(declare (type fixnum a))
(the fixnum (1+ a))))))
(defun parallel-flow ()
(~> (loop for i fro... |
ffea082cce5e37ffc1ef417441a6fb52489942697023e99336615571b31a37ef | dbuenzli/topkg | topkg_care_ocamlbuild.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2016 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
% % NAME%% % % ---------------------------------------------------------------------------
Copyright (c) ... | null | https://raw.githubusercontent.com/dbuenzli/topkg/ea1e0981a18ce4160ec21e8a73f67cb748059671/src-care/topkg_care_ocamlbuild.ml | ocaml | ---------------------------------------------------------------------------
Copyright ( c ) 2016 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
% % NAME%% % % ---------------------------------------------------------------------------
Copyright (c) ... | |
26bcd5c12d78e50d59ce06758d61c922e6a911865e4c6ba06f134ce31d66a7a0 | evolutics/haskell-formatter | Input.hs | predecessor = predecessor
-- ^comment 0
comment 1
successor :: a
successor = successor
| null | https://raw.githubusercontent.com/evolutics/haskell-formatter/3919428e312db62b305de4dd1c84887e6cfa9478/testsuite/resources/source/comments/depends_on_displacement/single_annotation/line_pair/after_none/Input.hs | haskell | ^comment 0 | predecessor = predecessor
comment 1
successor :: a
successor = successor
|
29729a27d68413ff6a90c6f3a426c0e2858a04609ce8997cebb7f6b9ee75ddb2 | antifuchs/sbcl | char.lisp | ;;;; x86 definition of character operations
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
;;;; public domain. The software is in the public doma... | null | https://raw.githubusercontent.com/antifuchs/sbcl/789bf105edca031aff991ad16a5fd207812336a0/src/compiler/x86/char.lisp | lisp | x86 definition of character operations
more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
moves and coercions
Move a tagged char to an untagged representation.
Move an untagged char to a tagg... |
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB!VM")
#!+sb-unicode
(define-vop (move-to-character)
(:args (x :scs (any-reg descriptor-reg) :target y
... |
eed0aedd929634ef6f5f6d7c141b15b56c389aa529390cd7843ad8391c21e4f1 | pink-gorilla/notebook | view.cljs | (ns pinkgorilla.notebook-ui.completion.view
(:require
[cljs.reader]
[cljs.tools.reader]
[reagent.core :as r]
[reagent.dom :as rd]
[reepl.helpers :as helpers]
[pinkie.pinkie :refer-macros [register-component]]))
; from:
(def styles
{:completion-container {;:position :relative
... | null | https://raw.githubusercontent.com/pink-gorilla/notebook/b01c806535f204c1c6e24c75a6619d747aba5655/src/pinkgorilla/notebook_ui/completion/view.cljs | clojure | from:
:position :relative
:font-weight :bold
:position :absolute
:cursor :pointer TODO make these clickable
text
(= i pos) ; selected
active
on active changed | (ns pinkgorilla.notebook-ui.completion.view
(:require
[cljs.reader]
[cljs.tools.reader]
[reagent.core :as r]
[reagent.dom :as rd]
[reepl.helpers :as helpers]
[pinkie.pinkie :refer-macros [register-component]]))
(def styles
:font-size 12}
:completion-list {:flex-directi... |
619c74da9cc6f03d60b1dcc17c4bb02e4e3cd3c0ce67567ba8740f5b95183e42 | tweag/ormolu | guards-out.hs | baz :: Int -> Int
baz x | x < 0 = x
baz x | otherwise = x
multi_baz :: Int -> Int
multi_baz x | x < 42 = x
multi_baz x | x < 0 = x
multi_baz x | otherwise = x
quux :: Int -> Int
quux x | x < 0 = x
quux x = x
| null | https://raw.githubusercontent.com/tweag/ormolu/34bdf62429768f24b70d0f8ba7730fc4d8ae73ba/data/examples/declaration/value/function/guards-out.hs | haskell | baz :: Int -> Int
baz x | x < 0 = x
baz x | otherwise = x
multi_baz :: Int -> Int
multi_baz x | x < 42 = x
multi_baz x | x < 0 = x
multi_baz x | otherwise = x
quux :: Int -> Int
quux x | x < 0 = x
quux x = x
| |
ba2c4edb022ba26a86468e3059e11e66c1949e9ba36f29e6b6e06ba593859242 | spawnfest/eep49ers | wxMask.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2021 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/wx/src/gen/wxMask.erl | erlang |
%CopyrightBegin%
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 lan... | Copyright Ericsson AB 2008 - 2021 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(wxMask).
-include("wxe.hrl").
-export([create/2,create/3,destroy/1,new/0,new/1,new/2]).
-export([parent_cla... |
53e1e8b81c6254f87a5740f0483816139d87cd4adb04b589f121e2013eff16f4 | kumarshantanu/cambium | mdc.clj | Copyright ( c ) . 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 bound by
; the ... | null | https://raw.githubusercontent.com/kumarshantanu/cambium/8e0bce44f6bc9a37adb4182f1a9e65ef9ddf4152/cambium.core/src/cambium/mdc.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 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 remove this ... | Copyright ( c ) . All rights reserved .
(ns cambium.mdc
(:import
[org.slf4j MDC]))
(defmacro preserving-mdc
"Execute body of code such that the MDC found at the start of execution is restored at the end of execution."
[& body]
`(let [mdc# (MDC/getCopyOfContextMap)]
(try
~@body
(... |
6dad53e0d787276d18f33588a186f4c423174b1d27fcd28fbaafbaa865cb1c70 | PacktPublishing/HaskellCookbook | Main.hs | module Main where
import Lib
main :: IO ()
main = do
putStrLn $ show $ (emptyList :: [Int])
putStrLn $ show $ prepend
putStrLn $ show $ list5
putStrLn $ show $ list10
putStrLn $ show $ getHead
putStrLn $ show $ getTail
putStrLn $ show $ allbutlast
putStrLn $ show $ take10
putStrLn $ show $ drop10
... | null | https://raw.githubusercontent.com/PacktPublishing/HaskellCookbook/27e146b6d91c008a7b1d06eda4ea63fe8a8cdb04/Ch_1-Foundations_of_Haskell/list-functions/app/Main.hs | haskell | module Main where
import Lib
main :: IO ()
main = do
putStrLn $ show $ (emptyList :: [Int])
putStrLn $ show $ prepend
putStrLn $ show $ list5
putStrLn $ show $ list10
putStrLn $ show $ getHead
putStrLn $ show $ getTail
putStrLn $ show $ allbutlast
putStrLn $ show $ take10
putStrLn $ show $ drop10
... | |
cf0d56b0d2daa65181635cbf86ab312b6e57649eb0c689d241c14daa44736a00 | SuzanneSoy/type-expander | type-expander.hl.rkt | #lang hyper-literate racket/base #:no-require-lang
@; The #:no-require-lang above is needed because type-expander requires
@; from 'main some identifiers (e.g. λ) which conflict with the re-required
racket / base . With this option , we loose arrows in for the
@; built-ins in this file, and have otherwise no adverse... | null | https://raw.githubusercontent.com/SuzanneSoy/type-expander/b182b9422083bf8adee71d6543f78372ad801ede/type-expander.hl.rkt | racket | The #:no-require-lang above is needed because type-expander requires
from 'main some identifiers (e.g. λ) which conflict with the re-required
built-ins in this file, and have otherwise no adverse effects.
(subtract-in typed-racket/base-env/annotate-classes
TODO: use the same code as for the not-applicable case, to ... | #lang hyper-literate racket/base #:no-require-lang
racket / base . With this option , we loose arrows in for the
@(require scribble-enhanced/doc)
@doc-lib-setup
@(module orig-ids racket/base
(require scribble/manual
(for-label typed/racket/base))
(provide (all-defined-out))
(define orig:: (rack... |
49bbc4acce85857d3a66dcd2c23f10d0d1cf46089f09b840828276a2946fd973 | penpot/penpot | projects.clj | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
;;
;; Copyright (c) KALEIDOS INC
(ns app.rpc.mutations.projects
(:require
[app.common.spec :as us]
[app.db :as db]
[app.loggers.audi... | null | https://raw.githubusercontent.com/penpot/penpot/42e97f8be105af41757f8e896b93a99032a2b72a/backend/src/app/rpc/mutations/projects.clj | clojure |
Copyright (c) KALEIDOS INC
--- Helpers & Specs
--- Mutation: Toggle Project Pin
--- Mutation: Rename Project
--- Mutation: Delete Project
TODO: right now, we just don't allow delete default projects, in a
future we need to ensure raise a correct exception signaling that
this is not allowed. | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(ns app.rpc.mutations.projects
(:require
[app.common.spec :as us]
[app.db :as db]
[app.loggers.audit :as-alias audit]
[app.logger... |
25de9377c6d90e79f782d1e941ed41a7745c540fa43ce14eac6d12cf3c054efb | dbuenzli/hyperbib | export.mli | ---------------------------------------------------------------------------
Copyright ( c ) 2020 University of Bern . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 20... | null | https://raw.githubusercontent.com/dbuenzli/hyperbib/90156d5eec776a20c39cb31f5221e5d94e101e14/src/export.mli | ocaml | * Data export functions. | ---------------------------------------------------------------------------
Copyright ( c ) 2020 University of Bern . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 20... |
c3446a4233f181e3dbbe196ce617be6365c050ddbec5995ac5e28c4346c7d459 | garycrawford/lein-life | healthcheck.clj | (ns {{ns-name}}.views.healthcheck
(:require [clostache.parser :refer [render-resource]]
[{{ns-name}}.views.shared :refer [wrap-with-layout]]))
(def healthcheck-path (partial format "templates/healthcheck/%s.mustache"))
(defn healthcheck-view
[template]
(let [path (healthcheck-path template)]
{:f... | null | https://raw.githubusercontent.com/garycrawford/lein-life/d55f3636950b58b02399ab32eb1f6d81ecfce823/src/leiningen/new/life/common/src/views/healthcheck.clj | clojure | (ns {{ns-name}}.views.healthcheck
(:require [clostache.parser :refer [render-resource]]
[{{ns-name}}.views.shared :refer [wrap-with-layout]]))
(def healthcheck-path (partial format "templates/healthcheck/%s.mustache"))
(defn healthcheck-view
[template]
(let [path (healthcheck-path template)]
{:f... | |
1e0e8d5b9a693180a02359c0ed4cca5f9586ea990b348227ad7335900fe1bdb7 | mabragor/defmacro-enhance | defmacro-enhance.lisp | defmacro-enhance.lisp
;;;;
;;;; This file is part of the defmacro-enhance library, released under GPL.
;;;; See file COPYING for details.
;;;;
Author :
(in-package #:defmacro-enhance)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defparameter *last-versions* (make-hash-table)))
(defmacro def-*!-sym... | null | https://raw.githubusercontent.com/mabragor/defmacro-enhance/bf9b57b6dd6adb7a6734ccb0121cd19da2c8438a/defmacro-enhance.lisp | lisp |
This file is part of the defmacro-enhance library, released under GPL.
See file COPYING for details.
My own version of parse-body, just to not depend on anyone
If some new defmacro/'s will be added, then change the following alias macroexpansion | defmacro-enhance.lisp
Author :
(in-package #:defmacro-enhance)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defparameter *last-versions* (make-hash-table)))
(defmacro def-*!-symbol-p (symb)
"Define test-function for argument to be prefix-bang-hyphen symbol."
(let ((s-symb (string symb)))
`... |
2f04084ca407965caf733c9bdcf759779013512f597ead74a4121f2818df186d | crategus/cl-cffi-gtk | rtest-gdk-device.lisp | (def-suite gdk-device :in gdk-suite)
(in-suite gdk-device)
;;; --- Types and Values -------------------------------------------------------
;;; GdkInputSource
(test gdk-input-source
;; Check the type
(is (g-type-is-enum "GdkInputSource"))
;; Check the type initializer
(is (eq (gtype "GdkInputSource")
... | null | https://raw.githubusercontent.com/crategus/cl-cffi-gtk/7f5a09f78d8004a71efa82794265f2587fff98ab/test/rtest-gdk-device.lisp | lisp | --- Types and Values -------------------------------------------------------
GdkInputSource
Check the type
Check the type initializer
Check the registered name
Check the names
Check the values
Check the enum definition
GdkInputMode
Check the type
Check the type initializer
Check the registered name
... | (def-suite gdk-device :in gdk-suite)
(in-suite gdk-device)
(test gdk-input-source
(is (g-type-is-enum "GdkInputSource"))
(is (eq (gtype "GdkInputSource")
(gtype (foreign-funcall "gdk_input_source_get_type" g-size))))
(is (eq 'gdk-input-source
(registered-enum-type "GdkInputSource")))
(is ... |
41383e904fb6f98a08ce2674028e13bb7ea9078373edafcb316341d7a9336c68 | binsec/haunted | taint_types.ml | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2019
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/haunted/7ffc5f4072950fe138f53fe953ace98fff181c73/src/dynamic/dse/tainting/taint_types.ml | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
6ed9a0826335f4f222fd2b034c884e128a647552d030288aa60b32ea5e32a3fe | vaclavsvejcar/headroom | Haddock.hs | # LANGUAGE DeriveFunctor #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
# LANGUAGE RecordWildCards #
{-# LANGUAGE StrictData #-}
# LANGUAGE NoImplicitPrelude #
-- |
Module : Headroom . FileSupport . .
-- Description : Extraction of /Haddock module header/ fields
Copyr... | null | https://raw.githubusercontent.com/vaclavsvejcar/headroom/3b20a89568248259d59f83f274f60f6e13d16f93/src/Headroom/FileSupport/Haskell/Haddock.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Description : Extraction of /Haddock module header/ fields
License : BSD-3-Clause
Maintainer :
Stability : experimental
Portability : POSIX
Support for extracting data from /Haddock module headers/ present in
/Haskell source code files/ or /templ... | # LANGUAGE DeriveFunctor #
# LANGUAGE LambdaCase #
# LANGUAGE QuasiQuotes #
# LANGUAGE RecordWildCards #
# LANGUAGE NoImplicitPrelude #
Module : Headroom . FileSupport . .
Copyright : ( c ) 2019 - 2022
module Headroom.FileSupport.Haskell.Haddock
( HaddockModuleHeader (..)
, extractOffsets
... |
a629ee9c7b7fd669cfe67a5144378e6987bb54643065e96b03a8647a7e0685c6 | dakk/bitcoinml | varint.mli | (** A VarInt (variable integer) is a field used in transaction data to indicate the number
of upcoming fields, or the length of an upcoming field. *)
open Stdint
val parse_varint : Bitstring.t -> Uint64.t * Bitstring.t
* [ parse_varint bits ] parse Bitstring [ bits ] returing the value and the rest
of the ... | null | https://raw.githubusercontent.com/dakk/bitcoinml/16a09393f4b10961db91f30200e2926f03a8716c/src/varint.mli | ocaml | * A VarInt (variable integer) is a field used in transaction data to indicate the number
of upcoming fields, or the length of an upcoming field.
* [bitstring_of_varint num] encodes [num] to its bitstring varint representation
* [encoding_length num] returns the length of [num] if encoded as varint | open Stdint
val parse_varint : Bitstring.t -> Uint64.t * Bitstring.t
* [ parse_varint bits ] parse Bitstring [ bits ] returing the value and the rest
of the bitstring
of the bitstring *)
val bitstring_of_varint : Int64.t -> Bitstring.t
val encoding_length : Uint64.t -> int
|
91dec23d2b23a0a5dd9d9b2ed01236f796c0f8a8f7c5e600d43eabfe66d1893b | bhuztez/russell | russell_prim_verify.erl | -module(russell_prim_verify).
-export([run/1]).
run([Filename]) ->
case russell_prim:parse(Filename) of
{ok, Forms} ->
case verify_forms(Forms, #{}) of
[] ->
ok;
Errors ->
russell:file_error(Filename, {error, Errors})
... | null | https://raw.githubusercontent.com/bhuztez/russell/eaafa8207f2da3e2544a567edf10e6d33120c4ce/src/russell_prim_verify.erl | erlang | -module(russell_prim_verify).
-export([run/1]).
run([Filename]) ->
case russell_prim:parse(Filename) of
{ok, Forms} ->
case verify_forms(Forms, #{}) of
[] ->
ok;
Errors ->
russell:file_error(Filename, {error, Errors})
... | |
39588519d95fc7c9bf9c5348738498091955c2a3c832f7dbab81e8f93a5fdbc8 | sordina/launchtext | core.clj | (ns launchpad.test.core
(:use [launchpad.core])
(:use [clojure.test]))
(deftest replace-me ;; FIXME: write
(is false "No tests have been written."))
| null | https://raw.githubusercontent.com/sordina/launchtext/861ea8271b352aa57adb30d79d1d13821c7ebc71/test/launchpad/test/core.clj | clojure | FIXME: write | (ns launchpad.test.core
(:use [launchpad.core])
(:use [clojure.test]))
(is false "No tests have been written."))
|
1fa4069140b7c8ac5d78d55f9e5dc66ef58a10df6f698dbd482a773edfa4222b | johnlawrenceaspden/hobby-code | project.clj | (defproject hobby-code "0.0.1"
:dependencies [[org.clojure/clojure "1.4.0"]]
:repl-options {
:port 4004
:init (println "hello from clojure 1.4")
}
:source-paths ["."]
:min-lein-version "2.0.0"
)
| null | https://raw.githubusercontent.com/johnlawrenceaspden/hobby-code/48e2a89d28557994c72299962cd8e3ace6a75b2d/clojure-versions/1.4/project.clj | clojure | (defproject hobby-code "0.0.1"
:dependencies [[org.clojure/clojure "1.4.0"]]
:repl-options {
:port 4004
:init (println "hello from clojure 1.4")
}
:source-paths ["."]
:min-lein-version "2.0.0"
)
| |
888e0caafebe4c22bc4c1f7801506ad5ce63d1d2a0a41b21a3cbdf4ecc51a8cb | Fresheyeball/Shpadoinkle | JSFFI.hs | # LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE CPP #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE JavaScriptFFI #
{-# LANGUAGE LambdaCase #-}
# LANGUAGE MonoLocalBinds #
# LANGUAGE MultiPara... | null | https://raw.githubusercontent.com/Fresheyeball/Shpadoinkle/ac0cb351042d076741120a9695174f6a9cbe1853/jsffi/lib/Shpadoinkle/JSFFI.hs | haskell | # LANGUAGE CPP #
# LANGUAGE ConstraintKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE RankNTypes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators #
ghcjs imports
------------------------------------------------------------... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE FlexibleInstances #
# LANGUAGE JavaScriptFFI #
# LANGUAGE MonoLocalBinds #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeApplications #
# LANGUAGE UndecidableInstances #
#ifdef ghcjs_HOST_OS
# LANGUAGE ViewPatterns #
#endif
modu... |
601f2aa96088f0d376b71b05d31189f6132ff357999298ef5d4c9fbbb4944c59 | vlobanov/population | core_test.clj | (ns population.core-test
(:require [clojure.test :refer :all]
[population.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| null | https://raw.githubusercontent.com/vlobanov/population/942c3625f7800780b9715c561ee1d8d91a5d8405/test/population/core_test.clj | clojure | (ns population.core-test
(:require [clojure.test :refer :all]
[population.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| |
39a41c3aa0c9b02ec2da6d64aad1bc4695c8fbcd4e07e8c6ab2a3b8db843e3da | alt-romes/ghengin | Camera.hs | # LANGUAGE LambdaCase #
# LANGUAGE ViewPatterns #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE OverloadedRecordDot #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE ScopedTypeVariables #
module G... | null | https://raw.githubusercontent.com/alt-romes/ghengin/1405afd72ce31908a627e67be598966f599869d5/src/Ghengin/Component/Camera.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes #
# UNPACK #
^ Field of view in radians
# UNPACK #
^ Near plane
# UNPACK #
^ Far plane
TODO: Cache matrix with laziness and trace to see if it's actually being cached
# UNPACK #
^ Ignore the camera's transform rotation (except for calculating up) and instead look at a targe... | # LANGUAGE LambdaCase #
# LANGUAGE ViewPatterns #
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE OverloadedRecordDot #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE ScopedTypeVariables #
module Ghengin.Component.Camera where
import Apecs
impo... |
e3214a5f9713b97d9ced57b56c646635c320f8ca57dc993bdabf09f501946580 | ahrefs/atd | ox_emit.ml |
Tools shared between OCaml code generators .
( ox means )
Tools shared between OCaml code generators.
(ox means OCaml-X)
*)
open Atd.Import
open Mapping
module Json = Atd.Json
type 'a expr = (Ocaml.Repr.t, 'a) Mapping.mapping
type 'a def = (Ocaml.Repr.t, 'a) Mapping.def
type 'a grouped_defs = (bool *... | null | https://raw.githubusercontent.com/ahrefs/atd/65a4534d43dd0fc732164e669624896132c1d238/atdgen/src/ox_emit.ml | ocaml | location of the containing record or variant,
location of the field definition,
field/constructor name
Add an optional type annotation on an OCaml expression or pattern
Add an optional type annotation after all function parameters
in a let binding (last thing before the equal sign)
* Create a record of t... |
Tools shared between OCaml code generators .
( ox means )
Tools shared between OCaml code generators.
(ox means OCaml-X)
*)
open Atd.Import
open Mapping
module Json = Atd.Json
type 'a expr = (Ocaml.Repr.t, 'a) Mapping.mapping
type 'a def = (Ocaml.Repr.t, 'a) Mapping.def
type 'a grouped_defs = (bool *... |
d95c0be4d66af4061dafe6347076ce05f573eff72207a65b8ad75d8d95c8357e | andrenth/ospec | pa_spec.ml | open Camlp4.PreCast
open Syntax
(*
* The string_of_* functions are taken from
* -archives/caml-list/2008/08/a6c9c42fbb20ce51984d26cc54b61c30.en.html
*)
let printer =
let module P = Camlp4.Printers.OCaml.Make(Syntax) in
new P.printer ()
let format_to_string (f : Format.formatter -> 'a -> unit) (v : 'a) : str... | null | https://raw.githubusercontent.com/andrenth/ospec/94afc8ebc1013555a777389e99f5511cc92b0a48/src/pa_spec.ml | ocaml |
* The string_of_* functions are taken from
* -archives/caml-list/2008/08/a6c9c42fbb20ce51984d26cc54b61c30.en.html
* Expectations.
* "it" blocks.
* "before/after each" blocks.
* "describe" blocks.
* Property testing.
From Camlp4OCamlRevisedParser.ml | open Camlp4.PreCast
open Syntax
let printer =
let module P = Camlp4.Printers.OCaml.Make(Syntax) in
new P.printer ()
let format_to_string (f : Format.formatter -> 'a -> unit) (v : 'a) : string =
let buf = Buffer.create 128 in
let fmt = Format.formatter_of_buffer buf in
f fmt v;
Format.pp_print_flush fmt (... |
f39ced3a3eb849b2ff8047d3b8a5968c53f53b7718b4182070743460d1f3814c | yrashk/ocaml-traits | partial_eq.ml | let%test "PartialEq.eq works with the trait implementation" =
Alcotest.(check bool)
"works as expected" true
Traits.(
let module Trait = struct
module PartialEq = struct
type t = int
type rhs = t
let eq = Int.equal
let ne x y = not @@ eq x y
end
... | null | https://raw.githubusercontent.com/yrashk/ocaml-traits/cb9d94a0f3fa372bfcda7effe022f716fd1c84f0/test/partial_eq.ml | ocaml | let%test "PartialEq.eq works with the trait implementation" =
Alcotest.(check bool)
"works as expected" true
Traits.(
let module Trait = struct
module PartialEq = struct
type t = int
type rhs = t
let eq = Int.equal
let ne x y = not @@ eq x y
end
... | |
60f4a5ad2c3e9239a74b3aa1d701686064516d81ccf61640b8b35cccf7a62572 | mirage/irmin-server | test.ml | open Lwt.Syntax
open Irmin_client_unix
open Util
module Info = Info (Client.Info)
let info = Info.v
let () =
let style_renderer = `None in
Fmt_tty.setup_std_outputs ~style_renderer ();
Logs.set_level (Some Logs.Error);
Logs.set_reporter (Logs_fmt.reporter ())
module type R = sig
val pid : int
val uri : U... | null | https://raw.githubusercontent.com/mirage/irmin-server/013a28fd1507f8ba69494515533119804903aa99/test/test.ml | ocaml | open Lwt.Syntax
open Irmin_client_unix
open Util
module Info = Info (Client.Info)
let info = Info.v
let () =
let style_renderer = `None in
Fmt_tty.setup_std_outputs ~style_renderer ();
Logs.set_level (Some Logs.Error);
Logs.set_reporter (Logs_fmt.reporter ())
module type R = sig
val pid : int
val uri : U... | |
3c1ef83dc0d23920c16305cea44575b91f116d9d0f169f5d07fbd18c1aeda5f0 | jeromesimeon/Galax | top_xmlplan2plan.mli | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/toplevel/top_xmlplan2plan.mli | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ Id$
Module : Top_xmlplan2plan
Description :
Maps a query plan in XML into a query plan .
Description:
Maps a query plan in XML into a query plan.
*)
val go: Top_args.gargs -> unit
|
8ba3336d66d3a7dae22df71fda3f0642757a3b343b4ab201010496a21542ea3a | replikativ/datahike | components_test.cljc | (ns datahike.test.components-test
(:require
[#?(:cljs cljs.reader :clj clojure.edn) :as edn]
#?(:cljs [cljs.test :as t :refer-macros [is deftest testing]]
:clj [clojure.test :as t :refer [is deftest testing]])
[datahike.api :as d]
[datahike.db :as db]
[datahike.test.core-test :as tdc]
... | null | https://raw.githubusercontent.com/replikativ/datahike/408cb0f538a837267e44b098df895fa00348fe10/test/datahike/test/components_test.cljc | clojure | (ns datahike.test.components-test
(:require
[#?(:cljs cljs.reader :clj clojure.edn) :as edn]
#?(:cljs [cljs.test :as t :refer-macros [is deftest testing]]
:clj [clojure.test :as t :refer [is deftest testing]])
[datahike.api :as d]
[datahike.db :as db]
[datahike.test.core-test :as tdc]
... | |
a87aa20d71b068707c6e04fddf0207b1ac54b33529c357e730633058f5ada2a0 | seanomlor/programming-in-haskell | filter.hs | import Prelude hiding (filter)
filter :: (a -> Bool) -> [a] -> [a]
filter p xs = [x | x <- xs, p x]
filter' :: (a -> Bool) -> [a] -> [a]
filter' _ [] = []
filter' p (x:xs)
| p x = x : filter' p xs
| otherwise = filter' p xs
| null | https://raw.githubusercontent.com/seanomlor/programming-in-haskell/e05142e6709eeba2e95cf86f376a32c9e629df88/07-higher-order-functions/filter.hs | haskell | import Prelude hiding (filter)
filter :: (a -> Bool) -> [a] -> [a]
filter p xs = [x | x <- xs, p x]
filter' :: (a -> Bool) -> [a] -> [a]
filter' _ [] = []
filter' p (x:xs)
| p x = x : filter' p xs
| otherwise = filter' p xs
| |
deffd64c448fbdadcaed6c44a105a98df978da4eafc32e42cfe8110712ed2bbc | eltex-ecss/pt_scripts | pt_str_parser.erl | %%%-------------------------------------------------------------------
-*- coding : utf-8 -*-
@author Konstantin ' $ ky '
( C ) 2015 , Eltex , Novosibirsk , Russia
%%% @doc
string : match(Input , Match , Match , ... , Match ) - > ok .
%%%
%%% PEG:
%%%
Main : : Token+
%%% Token :: Match / Exp
%%% Match... | null | https://raw.githubusercontent.com/eltex-ecss/pt_scripts/c05a0c67608f67a5e0bd23324ba0386f27186342/src/pt_str_parser.erl | erlang | -------------------------------------------------------------------
@doc
PEG:
Token :: Match / Exp
Match :: Var = Exp
Opt :: \[Token+\]
Pattern :: Type / String
Type :: [a-z]+
String :: \".+\"
string:match(Input, Name = string, Value = any) -> ok.
@end
----------------------------------------... | -*- coding : utf-8 -*-
@author Konstantin ' $ ky '
( C ) 2015 , Eltex , Novosibirsk , Russia
string : match(Input , Match , Match , ... , Match ) - > ok .
Main : : Token+
Var : : [ A - Z ] . *
Exp : : Seq / Opt / Sel / Pattern
Seq : : \{Token+\ }
Sel : : }
string : match(I... |
435122f5cbfe444a58982fd8cdb0e0f50d76b039caac6ddb0e488ccdf9ef9c1d | madjestic/Haskell-OpenGL-Tutorial | Shape.hs | --------------------------------------------------------------------------------
-- |
-- | Module : Data
| Copyright : ( c ) 2014
-- | License : BSD3
-- |
| Maintainer : < >
-- | Stability : experimental
-- | Portability : untested
-- |
| The NGL library works , by dumping a vertex ar... | null | https://raw.githubusercontent.com/madjestic/Haskell-OpenGL-Tutorial/9f685ddde9d6c5d2cc9c2c62f214ca0d43e717c7/tutorial05/NGL/Shape.hs | haskell | ------------------------------------------------------------------------------
|
| Module : Data
| License : BSD3
|
| Stability : experimental
| Portability : untested
|
|
| Shapes positioned by center
| Shapes' positioned by bottom-left corner--
-----------------------------------------------... | | Copyright : ( c ) 2014
| Maintainer : < >
| The NGL library works , by dumping a vertex array into OpenGL buffer
| basic shapes types should be of 2 kinds :
module NGL.Shape where
import Graphics.Rendering.OpenGL (Vertex4(..),
Color4(..),
... |
60ce53cedf72694823ade0698c8ca5c09c1e7d91e0822c4b58b5bf79b03d7807 | craigl64/clim-ccl | coordinate-sorted-set.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Package : CLIM - INTERNALS ; Base : 10 ; Lowercase : Yes -*-
;; See the file LICENSE for the full license governing this code.
;;
(in-package :clim-internals)
" Copyright ( c ) 1990 , 1991 , 1992 Symbolics , Inc. All rights reserved .
Portions copyright ( c ) 19... | null | https://raw.githubusercontent.com/craigl64/clim-ccl/301efbd770745b429f2b00b4e8ca6624de9d9ea9/clim/coordinate-sorted-set.lisp | lisp | Syntax : ANSI - Common - Lisp ; Package : CLIM - INTERNALS ; Base : 10 ; Lowercase : Yes -*-
See the file LICENSE for the full license governing this code.
The output record generics:
output-record-children: (record)
add-output-record: (child record)
delete-output-record: (child record)
clear-output-record:... |
(in-package :clim-internals)
" Copyright ( c ) 1990 , 1991 , 1992 Symbolics , Inc. All rights reserved .
Portions copyright ( c ) 1988 , 1989 , 1990 International Lisp Associates . "
(defclass standard-tree-output-record
(output-record-mixin output-record-element-mixin output-record)
a simple vector ,... |
9cd1bd9a61ef1f38ee8bb761b80a5cfbb4cc2018657c14cdfc635a3bda8aba2d | manuel-serrano/bigloo | vector.scm | ;*---------------------------------------------------------------------*/
* serrano / prgm / project / bigloo / bigloo / recette / vector.scm * /
;* */
* Author : * /
* Creation ... | null | https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/recette/vector.scm | scheme | *---------------------------------------------------------------------*/
* */
* */
*---------------------------------------------------------------------*/
*---------------------------... | * serrano / prgm / project / bigloo / bigloo / recette / vector.scm * /
* Author : * /
* Creation : Tue Nov 3 09:39:09 1992 * /
* Last change : We d Mar 13 07:13:58 2019 ( serrano ) * /
* On... |
48c13d835c4921c4652d163ebbd956840c919e41d386553fbc84a55802d18cbb | gja/pwa-clojure | pages.cljc | (ns pwa-clojure.pages
(:require [pwa-clojure.components :as components]
[rum.core :as rum]))
(def pages
{:home-page {:data-fn (constantly [[:characters {}]])
:component #'components/home-component
:title-fn (constantly "PWA Of Thrones")}
:character-page {:data-fn #(vect... | null | https://raw.githubusercontent.com/gja/pwa-clojure/a06450747c6ead439d1a74653a34afe415d8ef02/src-clj/pwa_clojure/pages.cljc | clojure | (ns pwa-clojure.pages
(:require [pwa-clojure.components :as components]
[rum.core :as rum]))
(def pages
{:home-page {:data-fn (constantly [[:characters {}]])
:component #'components/home-component
:title-fn (constantly "PWA Of Thrones")}
:character-page {:data-fn #(vect... | |
d4394874960fe398625d34bcd6d636cd59026b00997f28fb9e59f66ac3a83ab0 | morpheusgraphql/morpheus-graphql | Utils.hs | # LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeFamilies #
module Server.Utils
( httpEndpoint,
startServer,
isSchema,
)
where
-- examples
import Control.Applicative ((<|>))
import Control.Monad.IO.Class (lif... | null | https://raw.githubusercontent.com/morpheusgraphql/morpheus-graphql/0d7ec120df4ea3b1e030f64ed9820a8a66de7d6a/examples/scotty/src/Server/Utils.hs | haskell | # LANGUAGE OverloadedStrings #
examples | # LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
module Server.Utils
( httpEndpoint,
startServer,
isSchema,
)
where
import Control.Applicative ((<|>))
import Control.Monad.IO.Class (liftIO)
import Data.Morpheus
( httpPlayground,
... |
8802500311adb086bfc3d3e9bbcf842bf9aafb95e64f482cf8f2665cf8d6483f | TrustInSoft/tis-kernel | clone.ml | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/kernel_services/ast_transformations/clone.ml | ocaml | ************************************************************************
... | This file is part of .
is a fork of Frama - C. All the differences are :
Copyright ( C ) 2016 - 2017
is released under GPLv2
This file is part of Frama - C.
Copyright ( C ) 2007 - 2015 ... |
cfd85099d5e13f4115197b30900de7ab8ac3ccc0ea1d207b0463c1de9c53d974 | pmundkur/flowcaml | doc_errors.ml | (**************************************************************************)
(* *)
(* *)
, Projet C... | null | https://raw.githubusercontent.com/pmundkur/flowcaml/ddfa8a37e1cb60f42650bed8030036ac313e048a/src-flowcaml/docgen/doc_errors.ml | ocaml | ************************************************************************
et en Automatique. All ri... |
, Projet Cristal , INRIA Rocquencourt
Copyright 2002 , 2003 Institut National de Recherche en Informatique
under the terms of the Q Public License version 1.0 .
$ I d : doc_errors.ml , v 1.3 2003/06/2... |
d179851a4e69879dea7ca32adbca47ffcc823e2b7480d397b0b2b0e6ef662f62 | patrikja/AFPcourse | API.hs | module DSL.API where
-- DSL: design embedded domain specific languages
-- DSL.Concepts: (abstract) syntax, semantics, ...
DSL.Implement : implement EDSLs in Haskell ( as combinator libraries )
-- DSL: design an embedded domain specific language
This assignment is about design and implementation of an embe... | null | https://raw.githubusercontent.com/patrikja/AFPcourse/1a079ae80ba2dbb36f3f79f0fc96a502c0f670b6/exam/2014-08/DSL/API.hs | haskell | DSL: design embedded domain specific languages
DSL.Concepts: (abstract) syntax, semantics, ...
DSL: design an embedded domain specific language
------+
-+ |
-+ |
----+|
----+|
------+
------+
-+ |
-+ |
----+|
----+|
------+
--------------------------------------------------------------
Design... | module DSL.API where
DSL.Implement : implement EDSLs in Haskell ( as combinator libraries )
This assignment is about design and implementation of an embedded
language for ` ` ASCII art '' . The language should be compositional , that
is , enable building complex images by combining simpler images .
Here... |
6f77d33cbf329b2642b9f2a1fde2c5cf90774743be5fb418da871a46a5b37466 | tezos/tezos-mirror | l1_operation.mli | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2023 Nomadic Labs , < >
(* ... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/adb9ff09cb5f0a9cae8c8d8924efee6c4764399a/src/proto_016_PtMumbai/lib_sc_rollup_layer2/l1_operation.mli | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2023 Nomadic Labs , < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN A... |
3e6765504f0d29f39f054c20eba525032d468274d277a1813b8561be9dee5a59 | jonascarpay/apecs | Prelude.hs | | This module re - exports the apecs prelude with STM versions .
module Apecs.STM.Prelude
( System
, module Apecs.STM
, module Apecs
) where
import Apecs hiding (EntityCounter, Global, Map, System, Unique,
makeWorld, makeWorldAndComponents, newEntity)
import ... | null | https://raw.githubusercontent.com/jonascarpay/apecs/19c9dc15b31bfd4173230a327dec98e2aa959936/apecs-stm/src/Apecs/STM/Prelude.hs | haskell | | This module re - exports the apecs prelude with STM versions .
module Apecs.STM.Prelude
( System
, module Apecs.STM
, module Apecs
) where
import Apecs hiding (EntityCounter, Global, Map, System, Unique,
makeWorld, makeWorldAndComponents, newEntity)
import ... | |
87e645cf072805ef12089b90b2799676ee88d41e902678ac80b755803530a464 | spurious/sagittarius-scheme-mirror | uri-template.scm | (import (rnrs)
(rfc uri-template)
(srfi :64))
(test-begin "RFC URI Template")
(define (uri-parse template)
(parse-uri-template template))
(define (test-parse expected template)
(test-equal expected (uri-parse (open-string-input-port template)))
(test-equal expected (uri-parse template)))
(test-parse '("" (#\... | null | https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/test/tests/rfc/uri-template.scm | scheme | reserved but can be parsed
(print (expand-uri-template parsed parameter)) | (import (rnrs)
(rfc uri-template)
(srfi :64))
(test-begin "RFC URI Template")
(define (uri-parse template)
(parse-uri-template template))
(define (test-parse expected template)
(test-equal expected (uri-parse (open-string-input-port template)))
(test-equal expected (uri-parse template)))
(test-parse '("" (#\... |
29ac9c4de88ce97ccaef184254ee6f6573325b5993e0aa92ceca3f546663d913 | avsm/platform | perf.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2014 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
% % NAME%% % % ---------------------------------------------------------------------------
Copyright (c) ... | null | https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/uucp.12.0.0%2Bdune/test/perf.ml | ocaml | Reapeatedly looks up properties for the whole character set. | ---------------------------------------------------------------------------
Copyright ( c ) 2014 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
% % NAME%% % % ---------------------------------------------------------------------------
Copyright (c) ... |
af76c2fb83fadee8e767639ea0cd2a0fcee46963ac50f4ffe4e104e2613e3a93 | ropas/sparrow | ssaDug.mli | (***********************************************************************)
(* *)
Copyright ( c ) 2007 - present .
Programming Research Laboratory ( ROPAS ) , Seoul National University .
(* All rights reserved... | null | https://raw.githubusercontent.com/ropas/sparrow/3ec055b8c87b5c8340ef3ed6cde34f5835865b31/src/sparse/ssaDug.mli | ocaml | *********************************************************************
All rights reserved.
See the LICENSE file for details. ... | Copyright ( c ) 2007 - present .
Programming Research Laboratory ( ROPAS ) , Seoul National University .
This software is distributed under the term of the BSD license .
module type S =
sig
module Access : Access.S
module DUGraph : Dug.S
module PowLoc : PowDom.C... |
1ddf79e0bd1d9ca634c2963f71c32952a8b656798871817e5078991ee2496b41 | albertoruiz/easyVision | stereo.hs | -- 3D reconstruction from point correspondences
module Main where
import Vision
import Numeric.LinearAlgebra
import Data.List(genericLength)
import System.Process(system)
import Graphics.Plot
import Text.Printf(printf)
matrix m = fromLists m :: Matrix Double
vector v = fromList v :: Vector Double
vmap = mapVector
d... | null | https://raw.githubusercontent.com/albertoruiz/easyVision/26bb2efaa676c902cecb12047560a09377a969f2/projects/old/vision/stereo.hs | haskell | 3D reconstruction from point correspondences |
module Main where
import Vision
import Numeric.LinearAlgebra
import Data.List(genericLength)
import System.Process(system)
import Graphics.Plot
import Text.Printf(printf)
matrix m = fromLists m :: Matrix Double
vector v = fromList v :: Vector Double
vmap = mapVector
disp n = putStrLn . format " " (printf $ "%."++ ... |
5e1281850583fc1703f6c88d92f98841073a6b931e5210fa19116a95aaa1f2a4 | borodust/alien-works-demo | tools.lisp | (cl:in-package :alien-works-demo)
(declaim (special *tools*))
(defgeneric make-tools (name &key &allow-other-keys)
(:method (name &key)
(declare (ignore name))
nil))
(defgeneric init-tools (tools)
(:method (tools)
(declare (ignore tools))))
(defgeneric destroy-tools (tools)
(:method (tools)
... | null | https://raw.githubusercontent.com/borodust/alien-works-demo/ba9fd8ae7ec692460d60e4156700794910aae062/app/tools.lisp | lisp | (cl:in-package :alien-works-demo)
(declaim (special *tools*))
(defgeneric make-tools (name &key &allow-other-keys)
(:method (name &key)
(declare (ignore name))
nil))
(defgeneric init-tools (tools)
(:method (tools)
(declare (ignore tools))))
(defgeneric destroy-tools (tools)
(:method (tools)
... | |
64b6290d4a8a1c92fd5348dcdd6dfdd0c12d5fff7c2a52dea9ce753ec5ad0817 | elaforge/karya | Linkify.hs | Copyright 2013
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
| Turn single quoted strings into links to haddock docs , depending on
whether the module can be found or not .
E.g. , . Score . Event\'@ becomes
@[Derive . Score . ... | null | https://raw.githubusercontent.com/elaforge/karya/471a2131f5a68b3b10b1a138e6f9ed1282980a18/Util/Linkify.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt | Copyright 2013
| Turn single quoted strings into links to haddock docs , depending on
whether the module can be found or not .
E.g. , . Score . Event\'@ becomes
@[Derive . Score . Event](build / doc / Derive - Score.html#t : Event)@
and . Score\'@ becomes
@[Derive . Score](build ... |
b5c6e4b2d710d92d9bf2433ef21b77b387a3510373d7555d551097d92b6598b1 | Rainist/kubeletter | store.clj | (ns kubeletter.store
(:require [kubeletter.stores.redis-store :as redis]
[kubeletter.stores.mem-store :as mem])
)
(def ^:private chosen-store 'mem) ;; default store
(defn decide-store []
(if (redis/selectable?)
(def chosen-store 'redis)))
(defn- store-symbol [fn-symbol]
(symbol (name chosen-s... | null | https://raw.githubusercontent.com/Rainist/kubeletter/da326a067147f45b069a49d22730ea07675f9e16/kubeletter/src/kubeletter/store.clj | clojure | default store | (ns kubeletter.store
(:require [kubeletter.stores.redis-store :as redis]
[kubeletter.stores.mem-store :as mem])
)
(defn decide-store []
(if (redis/selectable?)
(def chosen-store 'redis)))
(defn- store-symbol [fn-symbol]
(symbol (name chosen-store) (name fn-symbol)))
(defn- local-sym-resolve ... |
4d9e3f22ab400b506640b968a8cc3990010c82e491b7671ed8cc6c2b87ff130d | TrustInSoft/tis-kernel | security_slicing_parameters.mli | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/security_slicing/security_slicing_parameters.mli | ocaml | ************************************************************************
... | This file is part of .
is a fork of Frama - C. All the differences are :
Copyright ( C ) 2016 - 2017
is released under GPLv2
This file is part of Frama - C.
Copyright ( C ) 2007 - 2015 ... |
09728d90281a25387281b8225273952e16a9c9817448a9a5dbb148a626dceb68 | HaskellForCats/HaskellForCats | ch4Probs2.hs | module Ch4prob where
4.8.1 --
halve :: [a] -> ([a], [a])
halve x = splitAt dee x
where
dee = (length x) `div` 2
4.8.2.a --
safetail1 xs = if null xs then [] else tail xs
4.8.2.b --
safetail2 xs | null xs = []
| otherwise = tail ... | null | https://raw.githubusercontent.com/HaskellForCats/HaskellForCats/2d7a15c0cdaa262c157bbf37af6e72067bc279bc/MenaBeginning/Ch004/ch4Probs2.hs | haskell |
what if we just wanted the value and not the value in cased in a list.
4.8.3 --
note that b should be either a True or False
using an earlier example as a guide | module Ch4prob where
halve :: [a] -> ([a], [a])
halve x = splitAt dee x
where
dee = (length x) `div` 2
safetail1 xs = if null xs then [] else tail xs
safetail2 xs | null xs = []
| otherwise = tail xs
safetail3 as pattern matching... |
e6d91708e62588dff80753b4c5e205144c87db6ebe76394bee0c810b93f2dd7c | kupl/LearnML | original.ml | type formula =
| True
| False
| Not of formula
| AndAlso of (formula * formula)
| OrElse of (formula * formula)
| Imply of (formula * formula)
| Equal of (exp * exp)
and exp = Num of int | Plus of (exp * exp) | Minus of (exp * exp)
let andAlso ((x : bool), (y : bool)) : bool =
if x = true && y = true ... | null | https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/formula/sub105/original.ml | ocaml | type formula =
| True
| False
| Not of formula
| AndAlso of (formula * formula)
| OrElse of (formula * formula)
| Imply of (formula * formula)
| Equal of (exp * exp)
and exp = Num of int | Plus of (exp * exp) | Minus of (exp * exp)
let andAlso ((x : bool), (y : bool)) : bool =
if x = true && y = true ... | |
ca2c0a96344c23d4c3bfd84bb9b7d1d6293afc3a8fbbd2e11cd027b09bb0ae0b | NorfairKing/smos | IntegrationSpec.hs | module Smos.Archive.IntegrationSpec (spec) where
import Path
import Path.IO
import Smos.Archive
import Smos.Data
import System.Environment
import Test.Syd
spec :: Spec
spec = do
let archive ls = withArgs ls smosArchive
it "It 'just works' with a given workflow dir" $
withSystemTempDir "smos-archive-test" $
... | null | https://raw.githubusercontent.com/NorfairKing/smos/f72b26c2e66ab4f3ec879a1bedc6c0e8eeb18a01/smos-archive/test/Smos/Archive/IntegrationSpec.hs | haskell | module Smos.Archive.IntegrationSpec (spec) where
import Path
import Path.IO
import Smos.Archive
import Smos.Data
import System.Environment
import Test.Syd
spec :: Spec
spec = do
let archive ls = withArgs ls smosArchive
it "It 'just works' with a given workflow dir" $
withSystemTempDir "smos-archive-test" $
... | |
178f0ef1e71dd19e58567f6e96c7d6f8e56ba5e535044624f14cdc348e68d458 | rtoy/ansi-cl-tests | copy-seq.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sat Nov 2 21:38:08 2002
;;;; Contains: Tests for COPY-SEQ
(in-package :cl-test)
;;; This function is extensively used elsewhere, but is tested again
;;; here for completeness.
(deftest copy-seq.1
(copy-seq nil)
nil)
(deftest copy-seq.2
(let* ((s1 '(a b c... | null | https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/copy-seq.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests for COPY-SEQ
This function is extensively used elsewhere, but is tested again
here for completeness.
Order of evaluation test
Error tests | Author :
Created : Sat Nov 2 21:38:08 2002
(in-package :cl-test)
(deftest copy-seq.1
(copy-seq nil)
nil)
(deftest copy-seq.2
(let* ((s1 '(a b c))
(s2 (check-values (copy-seq s1))))
(and (not (eql s1 s2))
(equalt s1 s2)))
t)
(deftest copy-seq.3
(let* ((s1 #(a b c))
... |
c70cc803ff22a37e53dd4fa580a612b5063a39bf5517859de4d735c20cc86bee | samrushing/irken-compiler | gparser.scm | ;; -*- Mode: Irken -*-
(define (lex-grammar path)
(make-generator
(lambda (consumer)
(define (emit tok)
(consumer (maybe:yes tok)))
(let ((file (file/open-read path))
(gen0 (file-char-generator file))
(gen1 (make-lex-generator dfa-g gen0))
(toks '()))
(for ... | null | https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/lib/parse/gparser.scm | scheme | -*- Mode: Irken -*-
grammar is a mapping from prod -> (list (list prod))
parse-xxx convert the parse tree into a grammar of the form
seen above: an alist mapping prod -> (list (list prod))
(print-grammar (read-grammar sys.argv[1])) |
(define (lex-grammar path)
(make-generator
(lambda (consumer)
(define (emit tok)
(consumer (maybe:yes tok)))
(let ((file (file/open-read path))
(gen0 (file-char-generator file))
(gen1 (make-lex-generator dfa-g gen0))
(toks '()))
(for tok gen1
(matc... |
ffebef1354ebcd7507a15cc98163225c5ab3528cf9b25b60b32f7c4532ec90fb | tsloughter/rebar3_tests | project_app_behaviours_app.erl | %%%-------------------------------------------------------------------
%% @doc project_app_behaviours public API
%% @end
%%%-------------------------------------------------------------------
-module(project_app_behaviours_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) ->
... | null | https://raw.githubusercontent.com/tsloughter/rebar3_tests/090bfef7d3a4790bb6b16e4c38df6e4c0460b4b2/project_app_behaviours/apps/project_app_behaviours/src/project_app_behaviours_app.erl | erlang | -------------------------------------------------------------------
@doc project_app_behaviours public API
@end
-------------------------------------------------------------------
internal functions |
-module(project_app_behaviours_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) ->
project_app_behaviours_sup:start_link().
stop(_State) ->
ok.
|
01da92b65f46190be062e6d08a50213fd689b464cdf96ec29d73cd6ee2823e71 | sgbj/MaximaSharp | trmode.lisp | -*- Mode : Lisp ; Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; The data in this file contains enhancments. ;;;;;
;;; ;;;;;
... | null | https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/src/trmode.lisp | lisp | Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ;
The data in this file contains enhancments. ;;;;;
;;;;;
; ; ; ;
All rights reserved ;;;;;
; ;
Get rid of p... | gjc : 6:27pm sunday , 20 july 1980
(in-package :maxima)
(macsyma-module trmode)
(defmvar $mode_checkp t "if true, modedeclare checks the modes of bound variables.")
(defmvar $mode_check_warnp t "if true, mode errors are described.")
(defmvar $mode_check_errorp nil "if true, modedeclare calls error.")
(defun mse... |
4d1a394b31d2c5b09b03386185233c4eaf4329b944f205ccb23fd6757b6cb373 | samrocketman/home | lasm-lab-wow.scm |
;
; The GIMP -- an image manipulation program
Copyright ( C ) 1995 and
;
Photo LAB script for GIMP 2.4
Original author : < >
;;;
;;;
;;;
;
; Tags: color
;
; Author statement:
;
; Welcome to the Line Art Coffee House
This Photo LAB script is for only
If it does n't work for your image... | null | https://raw.githubusercontent.com/samrocketman/home/63a8668a71dc594ea9ed76ec56bf8ca43b2a86ca/dotfiles/.gimp/scripts/lasm-lab-wow.scm | scheme |
The GIMP -- an image manipulation program
Tags: color
Author statement:
Welcome to the Line Art Coffee House
--------------------------------------------------------------------
--------------------------------------------------------------------
- Changelog -
- Initial release
- Added... |
Copyright ( C ) 1995 and
Photo LAB script for GIMP 2.4
Original author : < >
This Photo LAB script is for only
If it does n't work for your images , perhaps you prefer the Bubble Tea House next door ?
Lasm 's famous Photo LAB script a.k.a . Grand Mother 's Kung - fu script
Dedication -... |
a9b54dc25ad6aec1e33bb64a8afbaaaf4725ef9c141b37643ef77b27856df9b5 | futurice/haskell-mega-repo | TimereportsDump.hs | {-# LANGUAGE DataKinds #-}
# LANGUAGE TemplateHaskell #
{-# LANGUAGE TypeFamilies #-}
module Futurice.App.Reports.TimereportsDump (
SimpleTimereport (..),
timereportsDump,
) where
import FUM.Types.Login (Login)
import Futurice.Generics
import Futurice.Integrations
import Futurice.Prelude... | null | https://raw.githubusercontent.com/futurice/haskell-mega-repo/95fe8e33ad6426eb6e52a9c23db4aeffd443b3e5/reports-app/src/Futurice/App/Reports/TimereportsDump.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
we ask for all timereports
-----------------------------------------------------------------------------
Extras
-----------------------------------------------------------------------------
bindForM and chopInterval used to cut the parallelism, as we ask "for... | # LANGUAGE TemplateHaskell #
module Futurice.App.Reports.TimereportsDump (
SimpleTimereport (..),
timereportsDump,
) where
import FUM.Types.Login (Login)
import Futurice.Generics
import Futurice.Integrations
import Futurice.Prelude
import Futurice.Time
import Numeric.Interval.NonEmpty (Interval, ... |
5e6cf32ede38458933d95ff1d1273395c907bedffebb0977922203f1b9c49a85 | WorksHub/client | focus.cljs | (ns wh.common.fx.focus
(:require
[re-frame.core :refer [reg-fx dispatch]]))
(defn focus-effect
[id]
(when-let [el (.querySelector js/document id)]
(.focus el)))
(reg-fx :focus focus-effect) | null | https://raw.githubusercontent.com/WorksHub/client/e6105f56dad0b8ec2906fc41026116277b3eb729/client/src/wh/common/fx/focus.cljs | clojure | (ns wh.common.fx.focus
(:require
[re-frame.core :refer [reg-fx dispatch]]))
(defn focus-effect
[id]
(when-let [el (.querySelector js/document id)]
(.focus el)))
(reg-fx :focus focus-effect) | |
643737ca5d7dad183c1b9d007e41025ba80b3975d59f95596504b0e0b13766b9 | roburio/albatross | albatross_influx.ml | ( c ) 2018 , all rights reserved
open Lwt.Infix
open Vmm_core
open Vmm_core.Stats
line protocol :
` ` `
< measurement>[,<tag_key>=<tag_value>[,<tag_key>=<tag_value > ] ] \
< field_key>=<field_value>[,<field_key>=<field_value > ] [ < timestamp > ]
` ` `
( measurement , tag_key , tag_value , fiel... | null | https://raw.githubusercontent.com/roburio/albatross/83dff4a3fe6a4a1486d935550136c59a35645c34/daemon/albatross_influx.ml | ocaml | TODO: flags
how many times did I write this now?
loop
the query task queries the stat_socket at each
- if this fails, closing is set to true (and unit is returned)
the read_sock reads the stat_socket, and forwards to a TCP socket
- if closing is true, the TCP socket is closed and unit is re... | ( c ) 2018 , all rights reserved
open Lwt.Infix
open Vmm_core
open Vmm_core.Stats
line protocol :
` ` `
< measurement>[,<tag_key>=<tag_value>[,<tag_key>=<tag_value > ] ] \
< field_key>=<field_value>[,<field_key>=<field_value > ] [ < timestamp > ]
` ` `
( measurement , tag_key , tag_value , fiel... |
da0d422bef867bad22343b72d930a9394cd1204a7df8f3e998145d60a456e609 | GaloisInc/tower | External.hs | # LANGUAGE DataKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE QuasiQuotes #
# LANGUAGE RecordWildCards #
# LANGUAGE QuasiQuotes #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE OverloadedStrings #-}
# OPTIONS_GHC -fno - warn - orphans #
module Main where
import Ivory.Tower
import Ivory.Language
import Tower.AADL
i... | null | https://raw.githubusercontent.com/GaloisInc/tower/a43f5e36c6443472ea2dc15bbd49faf8643a6f87/tower-aadl/test/External.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE DataKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE QuasiQuotes #
# LANGUAGE RecordWildCards #
# LANGUAGE QuasiQuotes #
# LANGUAGE FlexibleInstances #
# OPTIONS_GHC -fno - warn - orphans #
module Main where
import Ivory.Tower
import Ivory.Language
import Tower.AADL
import Ivory.Tower.Config
simpleTow... |
6b8d9e03cb66181ae5bf707b9887962e652951497dd97fd7dadd29daeee4a9af | turquoise-hexagon/euler | solution.scm | (import
(chicken fixnum)
(euler))
(define (make-S l m)
(let* ((n (fibonacci l)) (acc (make-vector (fx+ n 1) 0)))
(define (_ n)
(vector-ref acc n))
(vector-set! acc 0 1)
(for-each
(lambda (p)
(do ((i p (fx+ i 1))) ((fx> i n))
(vector-set! acc i (fxmod (fx+ (_ i) (fx* p (_... | null | https://raw.githubusercontent.com/turquoise-hexagon/euler/ba4651e6a2798618390b890f0750b1de86e6e7e3/src/spoilers/618/solution.scm | scheme | (import
(chicken fixnum)
(euler))
(define (make-S l m)
(let* ((n (fibonacci l)) (acc (make-vector (fx+ n 1) 0)))
(define (_ n)
(vector-ref acc n))
(vector-set! acc 0 1)
(for-each
(lambda (p)
(do ((i p (fx+ i 1))) ((fx> i n))
(vector-set! acc i (fxmod (fx+ (_ i) (fx* p (_... | |
7c19a4d4212612801b91f7f2ebbf123dff2c935083a9d3b13f4b38c6ad639e8d | paurkedal/batyr | slack_rtm.mli | Copyright ( C ) 2018 - -2019 < >
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later version .
*
... | null | https://raw.githubusercontent.com/paurkedal/batyr/814791b6ce6476b79ecddc12b7d28fa4d23dc591/batyr-on-slack/lib/slack_rtm.mli | ocaml | * Slack RTM. | Copyright ( C ) 2018 - -2019 < >
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later version .
*
... |
c5444e8600d9519dbcdb2b5cfeb053195475a25f65d93a08b54e77c35d800dba | ocaml-gospel/ortac | printers.ml | module W = Warnings
open Ppxlib
open Gospel
module A = Ast_builder.Default
module B = Ortac_core.Builder
let loc = Location.none
let unsupported msg loc = raise (W.Error (W.MonolithPrinter msg, loc))
let rec ty2printer drv (ty : Ttypes.ty) =
match ty.ty_node with
(* 'a is generated as int but the type checker doe... | null | https://raw.githubusercontent.com/ocaml-gospel/ortac/dacc564ffaf8cfeb6f012bacefa5319d042ba29f/src/monolith/printers.ml | ocaml | 'a is generated as int but the type checker doesn't know it | module W = Warnings
open Ppxlib
open Gospel
module A = Ast_builder.Default
module B = Ortac_core.Builder
let loc = Location.none
let unsupported msg loc = raise (W.Error (W.MonolithPrinter msg, loc))
let rec ty2printer drv (ty : Ttypes.ty) =
match ty.ty_node with
| Tyvar _tvs -> [%expr fun _ -> Print.string "alph... |
053bec73512b0693ac9dc1d76d02888d5175132e074cb05a6886316aaa3bdb85 | fpco/schoolofhaskell.com | TutorialPreview.hs | module Handler.TutorialPreview where
import Model
import Import
import Yesod.Auth.Email (randomKey)
import Handler.UserTutorial (disqusWidget)
postTutorialPreviewCodeResetR :: TutorialId -> PreviewCode -> Handler ()
postTutorialPreviewCodeResetR tid previewCode = do
Entity _ author <- requireProfile
let uid =... | null | https://raw.githubusercontent.com/fpco/schoolofhaskell.com/15ec1a03cb9d593ee9c0d167dc522afe45ba4f8e/src/Handler/TutorialPreview.hs | haskell | For user-tutorial.hamlet | module Handler.TutorialPreview where
import Model
import Import
import Yesod.Auth.Email (randomKey)
import Handler.UserTutorial (disqusWidget)
postTutorialPreviewCodeResetR :: TutorialId -> PreviewCode -> Handler ()
postTutorialPreviewCodeResetR tid previewCode = do
Entity _ author <- requireProfile
let uid =... |
1a25e393bb6788569f305f2aad2b4aba36a50e017567f3d507943f9d508f82b8 | cbaggers/varjo | globals.lisp | (in-package :varjo.internals)
(in-readtable fn:fn-reader)
(defvar *global-env-form-bindings* (make-hash-table :test #'eq))
(defvar *global-env-compiler-macros* (make-hash-table :test #'eq))
(defvar *supported-versions* '(:140 :150 :330 :400 :410 :420 :430 :440 :450 :460))
(defvar *stage-names*
'(:vertex
:tesse... | null | https://raw.githubusercontent.com/cbaggers/varjo/9e77f30220053155d2ef8870ceba157f75e538d4/src/varjo.internals/globals.lisp | lisp | special
macros
WARNING ORDER SENSITIVE
:int32, when it should be :int | (in-package :varjo.internals)
(in-readtable fn:fn-reader)
(defvar *global-env-form-bindings* (make-hash-table :test #'eq))
(defvar *global-env-compiler-macros* (make-hash-table :test #'eq))
(defvar *supported-versions* '(:140 :150 :330 :400 :410 :420 :430 :440 :450 :460))
(defvar *stage-names*
'(:vertex
:tesse... |
28db7f94051d6ee575bbd96dd694fcbfb4684a10b0a2f3f29831af14e37e5355 | ultralisp/ultralisp | dist-source.lisp | (defpackage #:ultralisp-test/models/dist-source
(:use #:cl
#:rove)
(:import-from #:hamcrest/rove
#:assert-that
#:contains
#:has-type)
(:import-from #:reblocks-test/utils)
(:import-from #:ultralisp-test/utils
#:get-projects-linked-to-the
... | null | https://raw.githubusercontent.com/ultralisp/ultralisp/37bd5d92b2cf751cd03ced69bac785bf4bcb6c15/t/models/dist-source.lisp | lisp | (defpackage #:ultralisp-test/models/dist-source
(:use #:cl
#:rove)
(:import-from #:hamcrest/rove
#:assert-that
#:contains
#:has-type)
(:import-from #:reblocks-test/utils)
(:import-from #:ultralisp-test/utils
#:get-projects-linked-to-the
... | |
0fcf52f76403967a2cdd5dc9e7f24361771604db4e360133c8cd9bafec0394e9 | manuel-serrano/hop | regexp.scm | ;*=====================================================================*/
* serrano / prgm / project / hop / hop / hopscript / regexp.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation ... | null | https://raw.githubusercontent.com/manuel-serrano/hop/48dcc32fab96323bbafb18bfbe30ede33d5f49fd/hopscript/regexp.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
*=====================================================================*/
*---------------------------... | * serrano / prgm / project / hop / hop / hopscript / regexp.scm * /
* Author : * /
* Creation : Fri Sep 20 10:41:39 2013 * /
* Last change : Fri Jan 13 23:50:16 2023 ( serrano ) * /
* Copy... |
e35463834ac58aef1d38c5a853473540711e42598f3ac40054fb00457f58dc27 | TrustInSoft/tis-kernel | indexer.mli | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/libraries/utils/indexer.mli | ocaml | ************************************************************************
... | This file is part of .
is a fork of Frama - C. All the differences are :
Copyright ( C ) 2016 - 2017
is released under GPLv2
This file is part of Frama - C.
Copyright ( C ) 2007 - 2015 ... |
cd419e28f1d3eea2fa771460ccc22f8c5c09c00278c9fb918b6f8c409615a586 | DavidAlphaFox/aiwiki | aiwiki_db.erl | -module(aiwiki_db).
-export([create/0,id/0]).
-include("include/model.hrl").
create() ->
Node = node(),
_ = application:stop(mnesia),
_ = case mnesia:create_schema([Node]) of
ok -> ok;
{error, {Node, {already_exists, Node}}} -> ok
end,
{ok, _} = application:ensure_all_started(mnesia),
... | null | https://raw.githubusercontent.com/DavidAlphaFox/aiwiki/3a2a78668d4a708fda4af35430f25a69c4b91a7e/src/db/aiwiki_db.erl | erlang | -module(aiwiki_db).
-export([create/0,id/0]).
-include("include/model.hrl").
create() ->
Node = node(),
_ = application:stop(mnesia),
_ = case mnesia:create_schema([Node]) of
ok -> ok;
{error, {Node, {already_exists, Node}}} -> ok
end,
{ok, _} = application:ensure_all_started(mnesia),
... | |
fe426a974e3781ef710d388fc33fe0775a53f08391abc3d08421739c0b4e8e06 | futurice/haskell-futurice-prelude | Aeson.hs | # LANGUAGE CPP #
module Futurice.Aeson (
ParsedAsText (..),
ParsedAsIntegral (..),
withValueDump,
withObjectDump,
withTextDump,
FromJSONField1 (..),
fromJSONField1,
module Data.Aeson.Compat,
) where
import Data.Aeson.Compat
import Data.Aeson.Internal (JSONPathElement (..), (<?>))
#... | null | https://raw.githubusercontent.com/futurice/haskell-futurice-prelude/3297616a1f9b613ba17ce6cb16a61fadfbf1fa00/src/Futurice/Aeson.hs | haskell | $setup
>>> :set -XOverloadedStrings
>>> import Data.Maybe (fromJust)
-----------------------------------------------------------------------------
ParsedAs*
-----------------------------------------------------------------------------
| Parse integral values as text.
Left ...
>>> eitherDecode "\"42\"" ::... | # LANGUAGE CPP #
module Futurice.Aeson (
ParsedAsText (..),
ParsedAsIntegral (..),
withValueDump,
withObjectDump,
withTextDump,
FromJSONField1 (..),
fromJSONField1,
module Data.Aeson.Compat,
) where
import Data.Aeson.Compat
import Data.Aeson.Internal (JSONPathElement (..), (<?>))
#... |
7fe5217bd1cfeb744c2cc950ac12dc492700ea1f9b2aef00615668d08ff471fd | jiesoul/soul-talk | helper.clj | (ns soul-talk.helper
(:require [clojure.test :refer :all]
[soul-talk.handler :refer :all]
[cheshire.core :as cheshire]
[ring.mock.request :as mock]
[soul-talk.utils :as utils]
[clojure.tools.logging :as log]
[clojure.string :as s]
[ri... | null | https://raw.githubusercontent.com/jiesoul/soul-talk/630de08c6549b206d59023764d5f2576d97d1030/api/test/soul_talk/helper.clj | clojure | (ns soul-talk.helper
(:require [clojure.test :refer :all]
[soul-talk.handler :refer :all]
[cheshire.core :as cheshire]
[ring.mock.request :as mock]
[soul-talk.utils :as utils]
[clojure.tools.logging :as log]
[clojure.string :as s]
[ri... | |
a5b2d6df76a4317c7b67f37ef87a3df512da65d005b7591c429f90e5eacdb63c | mkremins/flense-nw | env.cljs | (ns flense-nw.env
(:require [devtools.core :as dev]))
; note: depends on resources/scripts/env.js
(defn nwjs-present? []
(js/isNodePresent))
(defn browser-present? []
(not (nwjs-present?)))
(defn init! []
(if (browser-present?)
(println "Browser present - some node functionatily could be broken.")
(... | null | https://raw.githubusercontent.com/mkremins/flense-nw/3a2f20f887aec0c1dbcef9495b4388641d59af92/src/flense_nw/env.cljs | clojure | note: depends on resources/scripts/env.js | (ns flense-nw.env
(:require [devtools.core :as dev]))
(defn nwjs-present? []
(js/isNodePresent))
(defn browser-present? []
(not (nwjs-present?)))
(defn init! []
(if (browser-present?)
(println "Browser present - some node functionatily could be broken.")
(println "NW.JS present."))
(dev/install-de... |
3f8a18eea80c111c278200e0d76854ee9e813707685b23d9ca729fa45afaa343 | thoughtbot/carnival | RecipientOverride.hs | module Network.Mail.RecipientOverride (overrideRecipients) where
import Prelude -- Remove when extracted
import Network.Mail.Mime (Address(..), Mail(..))
import System.Environment (getEnvironment)
import qualified Data.Text as T
-- | Override the recipients of the given @'Mail'@ from the @EMAIL_RECIPIENTS@
-- env... | null | https://raw.githubusercontent.com/thoughtbot/carnival/1cd4bd02ea6884b86020029257ab69ec3892a168/Network/Mail/RecipientOverride.hs | haskell | Remove when extracted
| Override the recipients of the given @'Mail'@ from the @EMAIL_RECIPIENTS@
environment variable if present. Returns the mail unmodified if not. | module Network.Mail.RecipientOverride (overrideRecipients) where
import Network.Mail.Mime (Address(..), Mail(..))
import System.Environment (getEnvironment)
import qualified Data.Text as T
overrideRecipients :: Mail -> IO Mail
overrideRecipients m = do
moverrides <- lookup "EMAIL_RECIPIENTS" <$> getEnvironment
... |
88b1cfbad0d3673416e0a98027c675d0b0db727e00ae216a0af2aa2a10da1278 | input-output-hk/plutus | Common.hs | | The types and functions that are common among all ledger versions .
module PlutusLedgerApi.Common
( -- * Script (de)serialization
SerialisedScript
, serialiseCompiledCode
, serialiseUPLC
, deserialiseUPLC
, ScriptDecodeError (..)
, assertScriptWellFormed
-- * Script evaluation
... | null | https://raw.githubusercontent.com/input-output-hk/plutus/bb9b5a18c26476fbf6b2f446ab267706426fec3a/plutus-ledger-api/src/PlutusLedgerApi/Common.hs | haskell | * Script (de)serialization
* Script evaluation
* Network's versioning
* Network's costing parameters
** Evaluation context
While not strictly used by the ledger, this is useful for people trying to
reconstruct the term evaluated by the ledger from the arguments, e.g.
for profiling purposes. | | The types and functions that are common among all ledger versions .
module PlutusLedgerApi.Common
SerialisedScript
, serialiseCompiledCode
, serialiseUPLC
, deserialiseUPLC
, ScriptDecodeError (..)
, assertScriptWellFormed
, evaluateScriptCounting
, evaluateScriptRestricting
... |
3c7bf6c6fe7f059d2b67c6537d6122fddd099b753a69b0547dda9cb4f27e029c | jwiegley/notes | Operational.hs | {-# LANGUAGE GADTs #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PackageImports #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
{-# OPTIONS -fno-warn-missing-signatures #-}
... | null | https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/haskell/Operational.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE PackageImports #
# OPTIONS -fno-warn-missing-signatures #
------------------------------------------------------------------------ | # LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
module Operational where
import ClassyPrelude.Conduit hiding (singleton)
import Control.Monad.M... |
d19d4cbfd10f02c71ccad363618d49ec6a3c9b0daf8e00402172830d9996b371 | rackerlabs/gen_batch | batch_kill_sup.erl | -module(batch_kill_sup).
-behaviour(gen_batch).
-export([init/1, process_item/3, worker_died/5, job_stopping/1, job_complete/2]).
init([]) ->
{ok, 2, [1, 2], []}.
process_item(1, _StartTime, []) ->
exit(whereis(gen_batch_worker_sup), stop),
ok;
process_item(2, _, []) ->
timer:sleep(100),
ok.
wor... | null | https://raw.githubusercontent.com/rackerlabs/gen_batch/cbd50ad86985d042cc33ae9c99491f37bdd23e89/test/batch_kill_sup.erl | erlang | -module(batch_kill_sup).
-behaviour(gen_batch).
-export([init/1, process_item/3, worker_died/5, job_stopping/1, job_complete/2]).
init([]) ->
{ok, 2, [1, 2], []}.
process_item(1, _StartTime, []) ->
exit(whereis(gen_batch_worker_sup), stop),
ok;
process_item(2, _, []) ->
timer:sleep(100),
ok.
wor... | |
f935f8bac0ce27172066fa3a760c93af6b548c396a6bf9c49d0021353547f29f | Eventuria/demonstration-gsd | Monitoring.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE NamedFieldPuns #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE DataKinds #
{-# LANGUAGE Rank2Types #-}
# LANGUAGE RecordWildCards #
module Eventuria.GSD.CLI.UI.Monitoring where
import Control.Monad.IO.Class (MonadIO(liftIO))
import Data.Text
import Data.Function ((&))
im... | null | https://raw.githubusercontent.com/Eventuria/demonstration-gsd/5c7692b310086bc172d3fd4e1eaf09ae51ea468f/src/Eventuria/GSD/CLI/UI/Monitoring.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE Rank2Types # | # LANGUAGE NamedFieldPuns #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE DataKinds #
# LANGUAGE RecordWildCards #
module Eventuria.GSD.CLI.UI.Monitoring where
import Control.Monad.IO.Class (MonadIO(liftIO))
import Data.Text
import Data.Function ((&))
import System.Console.Byline
import Eventuria.Commons.Logger.Cor... |
0d308ba4505d020008ac94091a9fda8c0025535e5b4f7997bcfe2d581c5fa1fb | rzezeski/try-try-try | rts_stat_vnode.erl | %% @doc A vnode to handle get & put commands for stat data. The vnode
requests will be hashed on Client and StatName and will use a
%% coordinator to enforce N/R/W values.
-module(rts_stat_vnode).
-behaviour(riak_core_vnode).
-include("rts.hrl").
-include_lib("riak_core/include/riak_core_vnode.hrl").
-export([start_... | null | https://raw.githubusercontent.com/rzezeski/try-try-try/c5d99f29fb3380f8653efdd1aa6a8f52143a9717/2011/riak-core-conflict-resolution/rts/src/rts_stat_vnode.erl | erlang | @doc A vnode to handle get & put commands for stat data. The vnode
coordinator to enforce N/R/W values.
===================================================================
API
===================================================================
@doc Attempt to repair -- fire and forget.
TODO: I have to look at the... | requests will be hashed on Client and StatName and will use a
-module(rts_stat_vnode).
-behaviour(riak_core_vnode).
-include("rts.hrl").
-include_lib("riak_core/include/riak_core_vnode.hrl").
-export([start_vnode/1,
init/1,
terminate/2,
handle_command/3,
is_empty/1,
delete... |
48f44335bc5618a51c0591b28496924b5769046c28c217d12cf5121a9db57c30 | jqueiroz/lojban.io | Lessons.hs | {-# LANGUAGE OverloadedStrings #-}
-- | This module defines the course lessons.
module Study.Courses.English.Grammar.Introduction.Lessons where
import Core
import Study.Courses.English.Grammar.Introduction.Documents
import Study.Courses.English.Grammar.Introduction.Exercises
import Study.Courses.English.Grammar.Intr... | null | https://raw.githubusercontent.com/jqueiroz/lojban.io/68c3e919f92ea1294f32ee7772662ab5667ecef6/haskell/src/Study/Courses/English/Grammar/Introduction/Lessons.hs | haskell | # LANGUAGE OverloadedStrings #
| This module defines the course lessons.
| Lesson: Tanru 1.
| Lesson: Terminator elision.
| Lesson: Checkpoint (Lessons 1--7).
| Lesson: Relative clauses.
| Lesson: Linked sumti.
| Lesson: Sumtcita
| Lesson: Checkpoint (Lessons 9--12)
| Lesson: Relative phrases
| Lesson: Checkp... |
module Study.Courses.English.Grammar.Introduction.Lessons where
import Core
import Study.Courses.English.Grammar.Introduction.Documents
import Study.Courses.English.Grammar.Introduction.Exercises
import Study.Courses.English.Grammar.Introduction.Vocabulary
| Lesson : Basics 1 .
lesson1 :: Lesson
lesson1 = Lesson ... |
6e819c557baf3af8da5d7fb173304a81a92fcb08a344d681fc77000baa8e6006 | achirkin/vulkan | VK_EXT_buffer_device_address.hs | # OPTIONS_GHC -fno - warn - missing - pattern - synonym - signatures #
# OPTIONS_GHC -fno - warn - orphans #
# OPTIONS_HADDOCK not - home #
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE ForeignFunctionInterface #
{-# LANGUAGE MagicH... | null | https://raw.githubusercontent.com/achirkin/vulkan/b2e0568c71b5135010f4bba939cd8dcf7a05c361/vulkan-api/src-gen/Graphics/Vulkan/Ext/VK_EXT_buffer_device_address.hs | haskell | # LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE MagicHash #
# LANGUAGE PatternSynonyms #
# LANGUAGE Strict #
# LANGUAGE TypeFamilies #
# LANGUAGE ViewPatterns #
|
supported: @vulkan@
type: @device@
Require... | # OPTIONS_GHC -fno - warn - missing - pattern - synonym - signatures #
# OPTIONS_GHC -fno - warn - orphans #
# OPTIONS_HADDOCK not - home #
# LANGUAGE FlexibleInstances #
# LANGUAGE ForeignFunctionInterface #
module Graphics.Vulkan.Ext.VK_EXT_buffer_device_address
* Vulkan extension : @VK_EXT_buffer_device_ad... |
89ffcd26411f9774fb482a4b685cd1f96f75b4838870fb7966d25fd2132ce703 | ConsumerDataStandardsAustralia/validation-prototype | Common.hs | {-# LANGUAGE OverloadedStrings #-}
module Web.ConsumerData.Au.LambdaBank.Server.Common where
import Web.ConsumerData.Au.Api.Types
import Servant.API.Generic (ToServant)
import Servant.Server.Generic (AsServerT, genericServerT)
import Web.ConsumerData.Au.LambdaBank.Server.Internal (LambdaBankM)
import Web.Consumer... | null | https://raw.githubusercontent.com/ConsumerDataStandardsAustralia/validation-prototype/ff63338b77339ee49fa3e0be5bb9d7f74e50c28b/consumer-data-au-lambdabank/src/Web/ConsumerData/Au/LambdaBank/Server/Common.hs | haskell | # LANGUAGE OverloadedStrings # | module Web.ConsumerData.Au.LambdaBank.Server.Common where
import Web.ConsumerData.Au.Api.Types
import Servant.API.Generic (ToServant)
import Servant.Server.Generic (AsServerT, genericServerT)
import Web.ConsumerData.Au.LambdaBank.Server.Internal (LambdaBankM)
import Web.ConsumerData.Au.LambdaBank.Server.Common.Cu... |
49b00957ed15837360fc6d38ff255a000f9146792105ed25902480ca0b2c316d | ksseono/the-joy-of-clojure | chess.clj | (ns joy.chess)
(defrecord Move [from to castle? promotion]
Object
(toString [this]
(str "Move " (:from this)
" to " (:to this)
(if (:castle? this) " castle"
(if-let [p (:promotion this)]
(str " promote to " p)
"")))))
(comment
(str (Move. "e2" "e4... | null | https://raw.githubusercontent.com/ksseono/the-joy-of-clojure/4fee3fb2750236b85b59ae9d7a83e0929040e4f0/src/clj/ch09/joy/chess.clj | clojure | => "Move e2 to e4"
Move e7 to e8 promote to Q
=> "Move e2 to e4" | (ns joy.chess)
(defrecord Move [from to castle? promotion]
Object
(toString [this]
(str "Move " (:from this)
" to " (:to this)
(if (:castle? this) " castle"
(if-let [p (:promotion this)]
(str " promote to " p)
"")))))
(comment
(str (Move. "e2" "e4... |
ee4419e3a9c55bce041491dd089184aa6f6f1ebade754d227e1dd18b0921bc06 | g-andrade/locus | locus_database_sup.erl | Copyright ( c ) 2017 - 2023
%%
%% Permission is hereby granted, free of charge, to any person obtaining a
%% copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction , including without limitation
%% the rights to use, copy, modify, merge, publish, di... | null | https://raw.githubusercontent.com/g-andrade/locus/c731b1a4a819e998c60d90a0484e75e36966aa8c/src/locus_database_sup.erl | erlang |
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
the rights to use, copy, modify, merge, publish, distribute, sublicense,
Software is furnished to do so, subject to the following conditions:
The above copyright not... | Copyright ( c ) 2017 - 2023
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
... |
26a71282b54ee440a576c64e3e8afd2db1190cd91bd7d3040f41d2d1daa00dc2 | genya0407/hash-demo | Utils.hs | module Hash.Utils(waitPid, forkWait, hDuplicateTo') where
import GHC.IO.Handle (hDuplicateTo)
import System.Exit (ExitCode(..))
import System.Posix.Process (getProcessStatus, forkProcess)
import System.Posix.Types (ProcessID)
import System.Posix.Process (ProcessStatus(Exited))
waitPid :: ProcessID -> IO ExitCode
wait... | null | https://raw.githubusercontent.com/genya0407/hash-demo/9a40aed857b98a0cb042b43fc14ce837f4235d93/src/Hash/Utils.hs | haskell | module Hash.Utils(waitPid, forkWait, hDuplicateTo') where
import GHC.IO.Handle (hDuplicateTo)
import System.Exit (ExitCode(..))
import System.Posix.Process (getProcessStatus, forkProcess)
import System.Posix.Types (ProcessID)
import System.Posix.Process (ProcessStatus(Exited))
waitPid :: ProcessID -> IO ExitCode
wait... | |
97f64cca4c0d7806bad53114cf0672023b5ed776abb2407830eabede24c602f1 | airbus-seclab/bincat | cfa.ml |
This file is part of BinCAT .
Copyright 2014 - 2021 - Airbus
BinCAT 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
opti... | null | https://raw.githubusercontent.com/airbus-seclab/bincat/ab4787e7fa70c3fc4bd2399e0e695fef446a5e81/ocaml/src/disassembly/cfa.ml | ocaml | * abstract data type for the nodes of the control flow graph
* data type for the decoding context
* size in bits of the addresses
* size in bits of operands
* data type for handler management
* unique identificator of the state
* instruction pointer
* abstract value
* abstract value computed in backward mode. N... |
This file is part of BinCAT .
Copyright 2014 - 2021 - Airbus
BinCAT 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
opti... |
2a7c3cf488f2f2e74fef5956c60885b85dccfbbf447892bb5cae6c89cafda9f3 | mwotton/roboservant | Seeded.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeOperators #
module Seeded where
import Data.Aeson
import Data.Hashable
import Data.Typeable (Typeable)
import GHC.Generics (Generic)
import Servan... | null | https://raw.githubusercontent.com/mwotton/roboservant/28b26280bc6f59d03dbe1de3298ae30b79aa95bb/test/Seeded.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE TypeOperators #
module Seeded where
import Data.Aeson
import Data.Hashable
import Data.Typeable (Typeable)
import GHC.Generics (Generic)
import Servant
newtype Seed = Seed Int
derivi... |
eac3ddde6368abfddc814448e45d98fec421b5fb7560fc7df4cc4118e7f078a7 | ryantm/nixpkgs-update | Check.hs | # LANGUAGE ExtendedDefaultRules #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -fno - warn - type - defaults #
module Check
( result,
-- exposed for testing:
hasVersion
)
where
import Control.Applicative (many)
import Data.Char (isDigit, isLetter)
... | null | https://raw.githubusercontent.com/ryantm/nixpkgs-update/121ddb518c4b640e6104420bf8878b7b3e2112a1/src/Check.hs | haskell | # LANGUAGE OverloadedStrings #
exposed for testing: | # LANGUAGE ExtendedDefaultRules #
# LANGUAGE QuasiQuotes #
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -fno - warn - type - defaults #
module Check
( result,
hasVersion
)
where
import Control.Applicative (many)
import Data.Char (isDigit, isLetter)
import Data.Maybe (fromJust)
import qualified Data.Text as T
im... |
a196bf3697ccadcbcbdbe095d3a708d39d96ea0045b31cb23dc66f01b80bc264 | glguy/advent | 11.hs | # Language QuasiQuotes , ImportQualifiedPost , BangPatterns #
|
Module : Main
Description : Day 11 solution
Copyright : ( c ) , 2018
License : ISC
Maintainer :
< >
This solution uses dynamic programming to efficiently compute
the area of an arbitrary square on the power - cell grid... | null | https://raw.githubusercontent.com/glguy/advent/7ab9f9e47208fd5720e36bac33fee2b78d4ec50b/solutions/src/2018/11.hs | haskell | | Print the answers to day 11
>>> :main
"33,45"
| Compute the position and size of the largest-valued square on the grid
| Compute power level of power cell given the cells coordinate
and the player's serial number.
-5
^ serial number
^ grid coordinate
^ power level
| Compute the coordinates and... | # Language QuasiQuotes , ImportQualifiedPost , BangPatterns #
|
Module : Main
Description : Day 11 solution
Copyright : ( c ) , 2018
License : ISC
Maintainer :
< >
This solution uses dynamic programming to efficiently compute
the area of an arbitrary square on the power - cell grid... |
29d34395846c420b7d7715953f5bbeeed6fd6b8967c0965d22fab1f99b024bad | ypyf/fscm | r5rs_pitfall.scm |
;;saved from url=(0039)-scheme.org/r5rs_pitfall.scm;; r5rs_pitfalls.scm
;;
;; This program attempts to test a Scheme implementation's conformance
;; to various subtle edge-cases and consequences of the R5RS Scheme standard.
;; Code was collected from public forums, and is hereby placed in the public domain.
;;
;;
(de... | null | https://raw.githubusercontent.com/ypyf/fscm/4e6a31665051d51bbcfc823ac8d85dcc3491a6ef/test/r5rs_pitfall.scm | scheme | saved from url=(0039)-scheme.org/r5rs_pitfall.scm;; r5rs_pitfalls.scm
This program attempts to test a Scheme implementation's conformance
to various subtle edge-cases and consequences of the R5RS Scheme standard.
Code was collected from public forums, and is hereby placed in the public domain.
Section 1: Proper... |
(define-syntax should-be
(syntax-rules ()
((_ test-id value expression)
(let ((return-value expression))
(if (not (equal? return-value value))
(for-each (lambda (v) (display v))
`("Failure: " test-id ", expected '"
value "', got '" ,return-value ... |
e764e7cfda63b5390c32b624fa20ca9cee579b67a90f98089304767ff1be1eea | rroohhh/guix_system | boulderhaus.scm | (define-module (services boulderhaus)
#:use-module (vup python-xyz)
#:use-module (gnu)
#:use-module (gnu services)
#:use-module (gnu services shepherd)
#:use-module (gnu system shadow)
#:use-module (gnu packages admin)
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
#:use... | null | https://raw.githubusercontent.com/rroohhh/guix_system/6cc95da380d3a383e8423f7ac13867c261b1a1a8/services/boulderhaus.scm | scheme | <package>
user to run it under
string
<package>
user to run it under
string
<path> | (define-module (services boulderhaus)
#:use-module (vup python-xyz)
#:use-module (gnu)
#:use-module (gnu services)
#:use-module (gnu services shepherd)
#:use-module (gnu system shadow)
#:use-module (gnu packages admin)
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
#:use... |
ee774f58ac42a107092af9b754a09505f40afcd24f793d890d2daace93a89a25 | ghc/packages-Cabal | P.hs | module P where
p = 12
| null | https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-testsuite/PackageTests/CopyComponent/Lib/src/P.hs | haskell | module P where
p = 12
| |
2b83f796bb7f1a0ca5a1e3038a04daff6d4a51943eda20669051a0043b7b52d9 | chenyukang/eopl | 05.scm | (load-relative "../libs/init.scm")
(load-relative "./base/test.scm")
(load-relative "./base/letrec-cases.scm")
;; add list into interpreter
;; including cons, car, cdr, null? and emptylist
;; see new stuff
;;;;;;;;;;;;;;;;; grammatical specification ;;;;;;;;;;;;;;;;
(define the-lexical-spec
'((whitespace (whitespa... | null | https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/ch5/05.scm | scheme | add list into interpreter
including cons, car, cdr, null? and emptylist
see new stuff
grammatical specification ;;;;;;;;;;;;;;;;
new stuff
sllgen boilerplate ;;;;;;;;;;;;;;;;
extractors:
continuations ;;;;;;;;;;;;;;;;
procedures ;;;;;;;;;;;;;;;;
environment structures ;;;;;;;;;;;;;;;;
environment constructors... | (load-relative "../libs/init.scm")
(load-relative "./base/test.scm")
(load-relative "./base/letrec-cases.scm")
(define the-lexical-spec
'((whitespace (whitespace) skip)
(comment ("%" (arbno (not #\newline))) skip)
(identifier
(letter (arbno (or letter digit "_" "-" "?")))
symbol)
(number (digi... |
bef84aca7dc8cd16f200533f4a6e7553f506c7afbc4c109ced2741461e24a497 | mixphix/toolbox | Internal.hs | # LANGUAGE TemplateHaskell #
module Data.Function.Toolbox.Internal where
import Control.Monad (forM, replicateM)
import Data.Foldable (foldl')
import Language.Haskell.TH (
Body (NormalB),
Clause (Clause),
Dec (FunD),
Exp (..),
Pat (..),
Q,
mkName,
newName,
)
curryN, uncurryN :: (Inte... | null | https://raw.githubusercontent.com/mixphix/toolbox/9579422c75112c3108b9cfbc34d6bea21350ca8f/src/Data/Function/Toolbox/Internal.hs | haskell | # LANGUAGE TemplateHaskell #
module Data.Function.Toolbox.Internal where
import Control.Monad (forM, replicateM)
import Data.Foldable (foldl')
import Language.Haskell.TH (
Body (NormalB),
Clause (Clause),
Dec (FunD),
Exp (..),
Pat (..),
Q,
mkName,
newName,
)
curryN, uncurryN :: (Inte... | |
cc04a9ccb7bc44850507612a184ed51e9347de41ed47789da8c39cae007c7ae7 | redstarssystems/rssyslib | bump-semver.clj | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
the code below is taken from Leiningen
;;
(def ^:dynamic *level* nil)
(defn string->semantic-version
[version-string]
"Create map representing the given version string. Returns nil if the
string does ... | null | https://raw.githubusercontent.com/redstarssystems/rssyslib/68a9232fa620541cc4657bbd507313974158f92e/resources/clj/new/rssyslib/scripts/bump-semver.clj | clojure |
<MajorVersion>.<MinorVersion>.<PatchVersion>[-<Qualifier>][-SNAPSHOT]
| the code below is taken from Leiningen
(def ^:dynamic *level* nil)
(defn string->semantic-version
[version-string]
"Create map representing the given version string. Returns nil if the
string does not follow guidelines setforth by Semantic Versioning 2.0.0,
/"
(if-let [[_ major minor patch qualifier snap... |
2635256bb58c1564216a6bf213a9e4e63559ec38698c434348e9d6f9492f8ccc | MinaProtocol/mina | coda_worker_testnet.ml | open Core
open Async
open Signature_lib
open Mina_base
open Pipe_lib
module Api = struct
type user_cmd_status = { expected_deadline : int; passed_root : unit Ivar.t }
type user_cmds_under_inspection = (User_command.t, user_cmd_status) Hashtbl.t
type restart_type = [ `Catchup | `Bootstrap ]
TODO : remove sta... | null | https://raw.githubusercontent.com/MinaProtocol/mina/34961ab38efc5608c41e384489644948cad815a4/src/app/cli/src/tests/coda_worker_testnet.ml | ocaml | * The int counts the number of ongoing RPCs. when it is 0, it is safe to take the worker offline.
[stop] below will set the status to `Off, and we only try doing an RPC if the status is `On,
so eventually the counter _must_ become 0, ensuring progress.
* the prefix check keeps track of the "best path" ... | open Core
open Async
open Signature_lib
open Mina_base
open Pipe_lib
module Api = struct
type user_cmd_status = { expected_deadline : int; passed_root : unit Ivar.t }
type user_cmds_under_inspection = (User_command.t, user_cmd_status) Hashtbl.t
type restart_type = [ `Catchup | `Bootstrap ]
TODO : remove sta... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.