_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 |
|---|---|---|---|---|---|---|---|---|
14897df830b56e2bf6db3fff23e19c9bae423f19921f4504cb496e7a29c9d189 | fossas/fossa-cli | Debug.hs | {-# LANGUAGE GADTs #-}
# LANGUAGE UndecidableInstances #
module App.Fossa.Analyze.Debug (
collectDebugBundle,
collectSystemInfo,
SystemInfo (..),
-- * Debug individual effects
DiagDebugC,
diagToDebug,
ReadFSDebugC,
readFSToDebug,
ExecDebugC,
execToDebug,
LogDebugC,
logToDebug,
-- * Debug al... | null | https://raw.githubusercontent.com/fossas/fossa-cli/f344cc427e3101514171f92a89f50985792140fc/src/App/Fossa/Analyze/Debug.hs | haskell | # LANGUAGE GADTs #
* Debug individual effects
* Debug all effects
---------------------------------------------
| Transcribe 'scope' as 'debugScope'
---------------------------------------------
| Transcribe 'fatal' as 'debugError'
---------------------------------------------
| Record ReadFS constructors which ar... | # LANGUAGE UndecidableInstances #
module App.Fossa.Analyze.Debug (
collectDebugBundle,
collectSystemInfo,
SystemInfo (..),
DiagDebugC,
diagToDebug,
ReadFSDebugC,
readFSToDebug,
ExecDebugC,
execToDebug,
LogDebugC,
logToDebug,
debugEverything,
) where
import App.Version (fullVersionDescription... |
1afec60808e316b0b9af47deea0308bfc8a32e9d1861e5cc9bc63d818a3ec95a | janestreet/universe | msgpack_unix.mli | open Async
open Msgpack_rpc
module Unix_socket : sig
include Connection
val with_socket_file
: string
-> ((t -> 'a Deferred.t) -> 'a Deferred.t) Tcp.with_connect_options
val open_from_filename : string -> t Deferred.t
end
include Msgpack_rpc.S with type conn = Unix_socket.t
| null | https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/vcaml/msgpack_unix/src/msgpack_unix.mli | ocaml | open Async
open Msgpack_rpc
module Unix_socket : sig
include Connection
val with_socket_file
: string
-> ((t -> 'a Deferred.t) -> 'a Deferred.t) Tcp.with_connect_options
val open_from_filename : string -> t Deferred.t
end
include Msgpack_rpc.S with type conn = Unix_socket.t
| |
59a2a903b163ef646f7446612b3ede5931969c0217caf53f75b6370d21c42aba | simmone/racket-simple-qr | remainder-bits-dic.rkt | #lang racket
(provide (contract-out
[*remainder_bits_table* hash?]
))
(define *remainder_bits_table*
#hash(
(1 . 0)
(2 . 7)
(3 . 7)
(4 . 7)
(5 . 7)
(6 . 7)
(7 . 0)
(8 . 0)
(9 . 0)
(10 . 0)
(11 . 0)
(1... | null | https://raw.githubusercontent.com/simmone/racket-simple-qr/904f1491bc521badeafeabd0d7d7e97e3d0ee958/simple-qr/write/lib/func/remainder-bits/remainder-bits-dic.rkt | racket | #lang racket
(provide (contract-out
[*remainder_bits_table* hash?]
))
(define *remainder_bits_table*
#hash(
(1 . 0)
(2 . 7)
(3 . 7)
(4 . 7)
(5 . 7)
(6 . 7)
(7 . 0)
(8 . 0)
(9 . 0)
(10 . 0)
(11 . 0)
(1... | |
b1a97b99626849fbb6ca6cc2497dcbdf48c258faefa72fdb7ba5c31e8f266059 | nuvla/ui | step_group.cljs | (ns sixsq.nuvla.ui.plugins.step-group
(:require [cljs.spec.alpha :as s]
[clojure.string :as str]
[re-frame.core :refer [dispatch reg-event-fx subscribe]]
[reagent.core :as r]
[sixsq.nuvla.ui.plugins.helpers :as helpers]
[sixsq.nuvla.ui.utils.semantic-ui :as ... | null | https://raw.githubusercontent.com/nuvla/ui/c10704eabd339489722fa53bc99f11f21103c070/code/src/cljs/sixsq/nuvla/ui/plugins/step_group.cljs | clojure | (ns sixsq.nuvla.ui.plugins.step-group
(:require [cljs.spec.alpha :as s]
[clojure.string :as str]
[re-frame.core :refer [dispatch reg-event-fx subscribe]]
[reagent.core :as r]
[sixsq.nuvla.ui.plugins.helpers :as helpers]
[sixsq.nuvla.ui.utils.semantic-ui :as ... | |
9b0a2898bb482ef721bbabb6b58e36ee1fa6cc090f2c0f32200cfdff7f1ab68c | plum-umd/c-strider | kttcompare.ml |
Kttcompare.ml
*
* This file implements a comparison between the set of elements ( i.e. ,
* types and variables ) of two versions of a program and produces a
* summary of the differences . It compares elements starting from
* variables in the original program that the developer indicated that
* th... | null | https://raw.githubusercontent.com/plum-umd/c-strider/3d3a3743bc28456eb6d50e01805ce484ab3c04e6/tools/ocaml-src/tools/kttcompare.ml | ocaml | The following datatypes are used to represent the results of a
comparison
TODO: include type for error messages
The comparison context is passed throughout the comparison code to
represent the current state of the comparison. It also contains
data that is needed throughout the comparison (e.g., the set o... |
Kttcompare.ml
*
* This file implements a comparison between the set of elements ( i.e. ,
* types and variables ) of two versions of a program and produces a
* summary of the differences . It compares elements starting from
* variables in the original program that the developer indicated that
* th... |
e976d732c1cc3d1f97a8b4ebd24557ebe1932525466552a4b25ba32a3c2315a4 | l04m33/parenscript-react-examples | app.lisp | (in-package #:react-examples/jquery-mobile)
(defmacro def-component-with-factory (name &body props)
`(progn
(defvar ,name
(chain React (createClass (create ,@props))))
(setf ,name (chain React (createFactory ,name)))))
(def-component-with-factory App
displayName "App"
render
(lambda ()
... | null | https://raw.githubusercontent.com/l04m33/parenscript-react-examples/104063d1b73ef4ed41c04817d8b9bae9a1e0948f/examples/jquery-mobile/ps/app.lisp | lisp | (in-package #:react-examples/jquery-mobile)
(defmacro def-component-with-factory (name &body props)
`(progn
(defvar ,name
(chain React (createClass (create ,@props))))
(setf ,name (chain React (createFactory ,name)))))
(def-component-with-factory App
displayName "App"
render
(lambda ()
... | |
34eb702625bf2026a4dd3241f16396a83dab680ad966a76f29223bca384d357c | exercism/scheme | test.scm | (load "test-util.ss")
(define test-cases
`((test-success
"returns the total number of grains on the board" equal?
total '() 18446744073709551615) (test-success "1" equal? square '(1) 1)
(test-success "2" equal? square '(2) 2)
(test-success "3" equal? square '(3) 4)
(test-success "4" equal?... | null | https://raw.githubusercontent.com/exercism/scheme/2064dd5e5d5a03a06417d28c33c5349bec97dad7/exercises/practice/grains/test.scm | scheme | (load "test-util.ss")
(define test-cases
`((test-success
"returns the total number of grains on the board" equal?
total '() 18446744073709551615) (test-success "1" equal? square '(1) 1)
(test-success "2" equal? square '(2) 2)
(test-success "3" equal? square '(3) 4)
(test-success "4" equal?... | |
6d3670bf7c09452d8e7245b0572c109474ccdbb709e7ca21d946b848d89ac770 | lojic/LearningRacket | day07-1.rkt | #lang racket
(require threading)
( parse - spec str ) - > ( symbol ? )
;; str : string?
;;
;; Parse a string of the form:
" light red bags contain 1 bright white bag , 2 muted yellow bags . "
;; into a list of symbols of bag colors:
;; '(light-red bright-white muted-yellow)
;;
For part 1 , we do n't care about... | null | https://raw.githubusercontent.com/lojic/LearningRacket/eb0e75b0e16d3e0a91b8fa6612e2678a9e12e8c7/advent-of-code-2020/day07-1.rkt | racket | str : string?
Parse a string of the form:
into a list of symbols of bag colors:
'(light-red bright-white muted-yellow)
(parse-specs fname) -> (and/c hash? hash-eq? immutable?)
fname : string?
Read a file containing bag specs and return a hash where the key is
the bag color and the value is a list of bag colo... | #lang racket
(require threading)
( parse - spec str ) - > ( symbol ? )
" light red bags contain 1 bright white bag , 2 muted yellow bags . "
For part 1 , we do n't care about quantities
(define (parse-spec str)
(~> (regexp-match* #px"([a-z]+ [a-z]+)(?= bag)" str)
(map (compose string->symbol (λ (l) (st... |
b382f64c7e513e52e561bce4eeb0e25620fe8d6ce90b14084db4fa1f07d044a4 | rpav/cl-freetype2 | ft2docs.lisp | (in-package :freetype2)
(defun generate-freetype2-docs (path stream)
(gendoc (:path path :stream stream
:title "cl-freetype2"
:css "ft2docs.css")
(:mdf "abstract.md")
(:mdf "toc.md")
(:mdf "intro.md")
(:mdf "example.md")
(:apiref :freetype2)
(:mdf "internal.md")
(:md... | null | https://raw.githubusercontent.com/rpav/cl-freetype2/96058da730b4812df916c1f4ee18c99b3b15a3de/doc/ft2docs.lisp | lisp | (in-package :freetype2)
(defun generate-freetype2-docs (path stream)
(gendoc (:path path :stream stream
:title "cl-freetype2"
:css "ft2docs.css")
(:mdf "abstract.md")
(:mdf "toc.md")
(:mdf "intro.md")
(:mdf "example.md")
(:apiref :freetype2)
(:mdf "internal.md")
(:md... | |
3253e8230055a752d022b4773f2ccc4b041df068f396198f6ad4cf5d37077c9b | ndmitchell/catch | Fix.hs |
module Data.Proposition.Fix(PropFix, propRebuildFix) where
import Data.Proposition.Internal
import Data.Proposition.Formula
import Data.Proposition.BDD
import Control.Monad
propRebuildFix :: (Prop p, PropLit a) => p a -> PropFix a
propRebuildFix = propRebuild
data PropFix a = PropFix {fix :: Formula a}
instance... | null | https://raw.githubusercontent.com/ndmitchell/catch/5d834416a27b4df3f7ce7830c4757d4505aaf96e/proposition/Data/Proposition/Fix.hs | haskell |
module Data.Proposition.Fix(PropFix, propRebuildFix) where
import Data.Proposition.Internal
import Data.Proposition.Formula
import Data.Proposition.BDD
import Control.Monad
propRebuildFix :: (Prop p, PropLit a) => p a -> PropFix a
propRebuildFix = propRebuild
data PropFix a = PropFix {fix :: Formula a}
instance... | |
a5faa513571f66baea2a5beeea2a31aca2839cd689564359fa4f8b9e9d162188 | input-output-hk/cardano-explorer | test.hs | import Hedgehog.Main (defaultMain)
import qualified Test.Explorer.Web.Property.Types
main :: IO ()
main =
defaultMain
[ Test.Explorer.Web.Property.Types.tests
]
| null | https://raw.githubusercontent.com/input-output-hk/cardano-explorer/3abcb32339edac7c2397114a1d170cc76b82e9b6/cardano-explorer-webapi/test/test.hs | haskell | import Hedgehog.Main (defaultMain)
import qualified Test.Explorer.Web.Property.Types
main :: IO ()
main =
defaultMain
[ Test.Explorer.Web.Property.Types.tests
]
| |
ce81ac3ade4e18f720da10f675f5855ee0d912d423e4d811d1642aeb16c61c28 | ocaml-multicore/lockfree | benchmark_result.mli | module Metric : sig
type t = {
name : String.t;
value : [ `Text of string | `Numeric of float ];
units : String.t;
description : String.t;
}
end
type t = { name : String.t; metrics : Metric.t list }
val to_json : t -> string
val create_generic :
?median_time:float -> ?median_throughput:float ->... | null | https://raw.githubusercontent.com/ocaml-multicore/lockfree/bf8f5000a6e802b4a21a6cfbf8ec8aa5208a8612/bench/benchmark_result.mli | ocaml | module Metric : sig
type t = {
name : String.t;
value : [ `Text of string | `Numeric of float ];
units : String.t;
description : String.t;
}
end
type t = { name : String.t; metrics : Metric.t list }
val to_json : t -> string
val create_generic :
?median_time:float -> ?median_throughput:float ->... | |
3c817015b402c46116834ecc2cdf02eff560f0d45dad0d79b334e2cd5ae23096 | unisonweb/unison | Context.hs | {-# LANGUAGE OverloadedStrings #-}
module Unison.Test.Typechecker.Context (test) where
import Data.Foldable (for_)
import EasyTest
import Unison.Symbol (Symbol)
import qualified Unison.Term as Term
import qualified Unison.Type as Type
import qualified Unison.Typechecker.Context as Context
import qualified Unison.Var ... | null | https://raw.githubusercontent.com/unisonweb/unison/7843e48cddbe46436bffb5a2e1bb5fb444f55302/parser-typechecker/tests/Unison/Test/Typechecker/Context.hs | haskell | # LANGUAGE OverloadedStrings #
(a : a')(b : b') |
module Unison.Test.Typechecker.Context (test) where
import Data.Foldable (for_)
import EasyTest
import Unison.Symbol (Symbol)
import qualified Unison.Term as Term
import qualified Unison.Type as Type
import qualified Unison.Typechecker.Context as Context
import qualified Unison.Var as Var
test :: Test ()
test =
sc... |
623dc7a35cfe6740bac1d1f113547672ee3039c0891239e6af06a6a6e351909a | 2600hz/kazoo | knm_converters.erl | %%%-----------------------------------------------------------------------------
( C ) 2010 - 2020 , 2600Hz
%%% @doc
@author
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 /.
%%%
%%% @end... | null | https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_numbers/src/converters/knm_converters.erl | erlang | -----------------------------------------------------------------------------
@doc
@end
-----------------------------------------------------------------------------
Orders of classifiers matters, but unfortunately schema file system_config.number_manager.json
-------------------------------------------------------... | ( C ) 2010 - 2020 , 2600Hz
@author
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 /.
-module(knm_converters).
-include("knm.hrl").
-export([normalize/1, normalize/2, normalize/3
... |
c57f21cc751672fbd4e4d21114387830e0575542cb7f958f571cdfdaeb222a98 | ralsei/graphite | with-area.rkt | #lang racket/base
(require pict
plot/no-gui
racket/match)
(provide plot-extras-size plot-with-area)
(define (plot-extras-size plotpict)
(match-define (vector (vector x-min x-max)
(vector y-min y-max))
(plot-pict-bounds plotpict))
(match-define (vector x-left y-bottom)
... | null | https://raw.githubusercontent.com/ralsei/graphite/303becd5036f9181f729a4c480dbf9fecb2a50bc/graphite-lib/with-area.rkt | racket | left
right
bottom
top | #lang racket/base
(require pict
plot/no-gui
racket/match)
(provide plot-extras-size plot-with-area)
(define (plot-extras-size plotpict)
(match-define (vector (vector x-min x-max)
(vector y-min y-max))
(plot-pict-bounds plotpict))
(match-define (vector x-left y-bottom)
... |
5e8f689a7966ce3eb001c36fd36b16b7f3e3e34a4140759b4e1bb1ebc1048aad | kronkltd/jiksnu | page_element_components.cljs | (ns jiksnu.app.components.page-element-components
(:require [jiksnu.app :refer [jiksnu]]
[jiksnu.app.helpers :as helpers]
[jiksnu.app.protocols :as p]
jiksnu.app.services
[jiksnu.registry :as registry]
[taoensso.timbre :as timbre]))
(.controller jiksnu "App... | null | https://raw.githubusercontent.com/kronkltd/jiksnu/8c91e9b1fddcc0224b028e573f7c3ca2f227e516/src-cljs/jiksnu/app/components/page_element_components.cljs | clojure | (ns jiksnu.app.components.page-element-components
(:require [jiksnu.app :refer [jiksnu]]
[jiksnu.app.helpers :as helpers]
[jiksnu.app.protocols :as p]
jiksnu.app.services
[jiksnu.registry :as registry]
[taoensso.timbre :as timbre]))
(.controller jiksnu "App... | |
c47cdb63d3210662feef1611bcd41acf17d7b41db91c2c91eeb814787c207728 | ghcjs/jsaddle-dom | SVGLineElement.hs | # LANGUAGE PatternSynonyms #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.SVGLineElement
(getX1, getY1, getX2, getY2, SVGLineElement(..),
gTypeSVGLineElement)
where
import Pr... | null | https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/SVGLineElement.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | # LANGUAGE PatternSynonyms #
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.SVGLineElement
(getX1, getY1, getX2, getY2, SVGLineElement(..),
gTypeSVGLineElement)
where
import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fromIntegral, roun... |
758c3959db10d633dae665b8dda0a88c8c7fe4ffc5c6e5faa13d9dec11c72323 | EdAyers/Robotone | Suspension.hs | module Suspension (
unlockExistentialUniversalConditionalTarget,
unlockExistentialTarget,
convertDiamondToBullet
) where
import Control.Applicative
import Control.Monad
import TexBase
import Types
import Move
import Tex
import RobotM
import Writeup
--------------------------------------------------------... | null | https://raw.githubusercontent.com/EdAyers/Robotone/1cdcde674a54a47c382fef2b060d50b35361f120/src/Suspension.hs | haskell | --------------------------------------------------------------------------------------------------
If the target is existential-universal-conditional, then unlock it to create a diamonded tableau.
ui' <- createStatement STTarget ui
,Let [Suspended $ addDiamond <$> vs]
If the target is existential, then ... | module Suspension (
unlockExistentialUniversalConditionalTarget,
unlockExistentialTarget,
convertDiamondToBullet
) where
import Control.Applicative
import Control.Monad
import TexBase
import Types
import Move
import Tex
import RobotM
import Writeup
addDiamond :: Variable -> Variable
addDiamond (Variable... |
6c5421a8b02f252b2d274c67156b23857db172c9472b06339e75e9520596fd22 | distrap/gcodehs | Eval.hs | | GCode evaluator
Evaluates RS274 GCode
Evaluates RS274 GCode
-}
# LANGUAGE RecordWildCards #
module Data.GCode.Eval where
import Data.Maybe
import Data.Monoid
import Data.Map (Map)
import qualified Data.Map
import Data.GCode.Ann (Ann(SrcLine))
import Data.GCode.Types
import Data.GCode.RS274
import Data.GCod... | null | https://raw.githubusercontent.com/distrap/gcodehs/8a8dbc66445cff4ce832bb56f42ef03b3215e235/src/Data/GCode/Eval.hs | haskell | | Interpreter state
| Default modals
| Create new interpreter state
| Step `Code` interpreter
update position with new codeAxes
handle empty/comments/other
| Evaluate GCode and return each evaluation step
interpreter *always* runs
* in absolute mode
* with millimeters as units
* with total commands in modal ... | | GCode evaluator
Evaluates RS274 GCode
Evaluates RS274 GCode
-}
# LANGUAGE RecordWildCards #
module Data.GCode.Eval where
import Data.Maybe
import Data.Monoid
import Data.Map (Map)
import qualified Data.Map
import Data.GCode.Ann (Ann(SrcLine))
import Data.GCode.Types
import Data.GCode.RS274
import Data.GCod... |
25c47bc0641d1c6f7ca86fa62818d43d734bced7c029cdd6f99aacada79754bd | robert-strandh/CLIMatis | test1.lisp | (require :split-sequence)
(defparameter *za1*
(clim3:hframe
200 200 200
(clim3:vframe
200 200 200
(clim3:opaque (clim3:make-color 0.2 0.2 1.0)))))
(defparameter *za2*
(clim3:hbox*
(clim3:hframe
200 200 200
(clim3:vframe
200 200 200
(clim3:opaque (clim3:make-color 0.2 0.... | null | https://raw.githubusercontent.com/robert-strandh/CLIMatis/4949ddcc46d3f81596f956d12f64035e04589b29/Test/test1.lisp | lisp | (require :split-sequence)
(defparameter *za1*
(clim3:hframe
200 200 200
(clim3:vframe
200 200 200
(clim3:opaque (clim3:make-color 0.2 0.2 1.0)))))
(defparameter *za2*
(clim3:hbox*
(clim3:hframe
200 200 200
(clim3:vframe
200 200 200
(clim3:opaque (clim3:make-color 0.2 0.... | |
471e711e352f29c9d3a567645b6fb766c9d05c44b0850d042e1f1f70e8280d36 | input-output-hk/cardano-sl | Types.hs | # LANGUAGE TemplateHaskell #
module Pos.Infra.Shutdown.Types
( ShutdownContext (..)
, shdnIsTriggered, shdnFInjects
) where
import System.Exit (ExitCode)
import Universum
import Control.Lens (makeLenses)
import Pos.Infra.InjectFail (FInjects)
data Shutdow... | null | https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/infra/src/Pos/Infra/Shutdown/Types.hs | haskell | ^ If this flag is `Just`, then workers should stop. | # LANGUAGE TemplateHaskell #
module Pos.Infra.Shutdown.Types
( ShutdownContext (..)
, shdnIsTriggered, shdnFInjects
) where
import System.Exit (ExitCode)
import Universum
import Control.Lens (makeLenses)
import Pos.Infra.InjectFail (FInjects)
data Shutdow... |
ec9e0c4cb892f17b32b9836946f1218d28ece369c10be5d5c6445729c9fead64 | darioteixeira/pgocaml | test_pgocaml_lowlevel.ml | Test the lowlevel interface to the database .
* Assumes that $ PGHOST , etc . are set to point to a database .
*
* PG'OCaml - type safe interface to PostgreSQL .
* Copyright ( C ) 2005 - 2009 and other authors .
*
* This library is free software ; you can redistribute it and/or
* modify it unde... | null | https://raw.githubusercontent.com/darioteixeira/pgocaml/1bb0025deeb3d14029afdcc69aaa7847026e243e/tests/test_pgocaml_lowlevel.ml | ocaml | Simple query with no parameters.
Describe the statement.
A query with parameters.
Describe the statement.
Create a temporary table and populate it. | Test the lowlevel interface to the database .
* Assumes that $ PGHOST , etc . are set to point to a database .
*
* PG'OCaml - type safe interface to PostgreSQL .
* Copyright ( C ) 2005 - 2009 and other authors .
*
* This library is free software ; you can redistribute it and/or
* modify it unde... |
8add810a42cc8b3b9553fbf39022f71f9acc562fe720a17e5f09f2637cab4d70 | btmura/b1 | Animation.hs | module B1.Program.Chart.Animation
( Animation
, animateOnce
, current
, next
, incomingScaleAnimation
, incomingAlphaAnimation
, outgoingScaleAnimation
, outgoingAlphaAnimation
) where
import Graphics.Rendering.OpenGL
import B1.Data.Range
import B1.Program.Chart.Dirty
type Animation a = [a]
curr... | null | https://raw.githubusercontent.com/btmura/b1/9cf0514ba1e03e9f4da05be9231acde07b199864/src/B1/Program/Chart/Animation.hs | haskell | module B1.Program.Chart.Animation
( Animation
, animateOnce
, current
, next
, incomingScaleAnimation
, incomingAlphaAnimation
, outgoingScaleAnimation
, outgoingAlphaAnimation
) where
import Graphics.Rendering.OpenGL
import B1.Data.Range
import B1.Program.Chart.Dirty
type Animation a = [a]
curr... | |
e0f5c6fac5017bb0b49edfdf676b46b8644b202d35897ce297b6fadb485704a6 | bld/bld-ode | tests.lisp | (asdf:load-system :bld-ode)
(asdf:load-system :fiveam)
(defpackage :bld-ode-tests
(:use :cl :bld-ode :fiveam))
(in-package :bld-ode-tests)
(def-suite :bld-ode)
(in-suite :bld-ode)
(test rka
(is-true (let* ((tol 1d-11)
(results (rka #'(lambda (tm x p) (cos tm)) 0 pi 0 :tol tol)))
(every #'identity
... | null | https://raw.githubusercontent.com/bld/bld-ode/dcc0990ec1adc833424a81043d121ee0419a42a3/tests.lisp | lisp | (asdf:load-system :bld-ode)
(asdf:load-system :fiveam)
(defpackage :bld-ode-tests
(:use :cl :bld-ode :fiveam))
(in-package :bld-ode-tests)
(def-suite :bld-ode)
(in-suite :bld-ode)
(test rka
(is-true (let* ((tol 1d-11)
(results (rka #'(lambda (tm x p) (cos tm)) 0 pi 0 :tol tol)))
(every #'identity
... | |
3b5260d87fb2675fa0cffdc3b6c6d21856b881d8f6de2924f0482ab11c97ff28 | 5HT/ant | PageLayout.ml |
open XNum;
open Runtime;
open Unicode.Types;
open Logging;
open Dim;
open Substitute;
open FontMetric;
open Box;
open Page;
type area = (* an area of the page *)
{
ar_name : uc_string;
ar_shape : area_shape;
ar_contents : area_contents_function (* function to fill the area with... | null | https://raw.githubusercontent.com/5HT/ant/6acf51f4c4ebcc06c52c595776e0293cfa2f1da4/Typesetting/PageLayout.ml | ocaml | an area of the page
function to fill the area with its contents
description of a page
paper dimensions
the areas
state while filling areas
marks in previous pages
marks in the current page
layout of the next page
floats found in the current page, in reverse order
the ac... |
open XNum;
open Runtime;
open Unicode.Types;
open Logging;
open Dim;
open Substitute;
open FontMetric;
open Box;
open Page;
{
ar_name : uc_string;
ar_shape : area_shape;
}
and page_update = (page * area_finaliser * page_state)
and area_contents_function =
page -> area_shape -> list (list extended_glyph... |
9e90f953a53a06ae4d29c6d9e5ce1eb42b03a88ade5ad252183be72681e3c463 | jgoerzen/gopherbot | Config.hs |
Copyright ( C ) 2005 < >
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 2 of the License , or
( at your option ) any later version .
This program is distributed in ... | null | https://raw.githubusercontent.com/jgoerzen/gopherbot/6e83120d108d7b73d82e9949c41148bd260d17aa/Config.hs | haskell | ["gopher.quux.org", "quux.org"] |
Copyright ( C ) 2005 < >
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 2 of the License , or
( at your option ) any later version .
This program is distributed in ... |
c6379020405bb9368c143ca08903588e7f50a51dc82a8c64316eb454b5a35c47 | steinuil/xobl | parser_output.ml | let modules =
[
"bigreq";
"composite";
"damage";
"dpms";
"dri2";
"dri3";
"ge";
"glx";
"present";
"randr";
"record";
"render";
"res";
"screensaver";
"shape";
"shm";
"sync";
"xc_misc";
"xevie";
"xf86dri";
"xf86vidmode";
"xfixes";
... | null | https://raw.githubusercontent.com/steinuil/xobl/36f24b03673e487e3c862555433ab7eb213738e2/test/parser_output.ml | ocaml | let modules =
[
"bigreq";
"composite";
"damage";
"dpms";
"dri2";
"dri3";
"ge";
"glx";
"present";
"randr";
"record";
"render";
"res";
"screensaver";
"shape";
"shm";
"sync";
"xc_misc";
"xevie";
"xf86dri";
"xf86vidmode";
"xfixes";
... | |
4b99256a1c413ede5f4dbbf685218b77974ea2aeeebd4f0fa61d406692243aa2 | david-christiansen/pudding | lift-tooltips.rkt | #lang racket
(require (for-syntax syntax/srcloc))
(provide (for-syntax save-tooltip ensure-lifted-tooltips))
(begin-for-syntax
(define lifted-tooltips? (box #f))
(define lifted-tooltips (box null))
(define (ensure-lifted-tooltips)
(when (and (syntax-transforming-with-lifts?) (not (unbox lifted-tooltips?)))
... | null | https://raw.githubusercontent.com/david-christiansen/pudding/ead4e1a2e8e0d77a884211adcc4466edcf65e406/lift-tooltips.rkt | racket | (set-box! lifted-tooltips | #lang racket
(require (for-syntax syntax/srcloc))
(provide (for-syntax save-tooltip ensure-lifted-tooltips))
(begin-for-syntax
(define lifted-tooltips? (box #f))
(define lifted-tooltips (box null))
(define (ensure-lifted-tooltips)
(when (and (syntax-transforming-with-lifts?) (not (unbox lifted-tooltips?)))
... |
db2438d8ffe465ddd04e351f9f9548b2f9e3473cb913a59d2cc12dd29c8e2ff4 | rowangithub/DOrder | lexer.ml | # 17 "parsing/lexer.mll"
open Lexing
open Misc
open Parser
type error =
| Illegal_character of char
| Illegal_escape of string
| Unterminated_comment
| Unterminated_string
| Unterminated_string_in_comment
| Keyword_as_label of string
| Literal_overflow of string
;;
exception Error of error * Location.... | null | https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/parsing/lexer.ml | ocaml | The table of keywords
"parser", PARSER;
To buffer string literals
To store the position of the beginning of a string and comment
To translate escape sequences
Remove underscores from float literals
s.[dst] <- c;
Update the current location with file name and line number.
Error report | # 17 "parsing/lexer.mll"
open Lexing
open Misc
open Parser
type error =
| Illegal_character of char
| Illegal_escape of string
| Unterminated_comment
| Unterminated_string
| Unterminated_string_in_comment
| Keyword_as_label of string
| Literal_overflow of string
;;
exception Error of error * Location.... |
feae618d7f33dbebe0ea86095345dab6367499b64d205630752fd5c83ebd8154 | geremih/xcljb | shape_internal.clj | This file is automatically generated . DO NOT MODIFY .
(clojure.core/ns
xcljb.gen.shape-internal
(:require [xcljb common gen-common] [xcljb.gen shape-types]))
(clojure.core/defmethod
xcljb.common/read-reply
["SHAPE" 0]
[_ _ reply-buf]
(xcljb.gen-common/deserialize
xcljb.gen.shape-types/QueryVersionReply
r... | null | https://raw.githubusercontent.com/geremih/xcljb/59e9ff795bf00595a3d46231a7bb4ec976852396/src/xcljb/gen/shape_internal.clj | clojure | Manually written. | This file is automatically generated . DO NOT MODIFY .
(clojure.core/ns
xcljb.gen.shape-internal
(:require [xcljb common gen-common] [xcljb.gen shape-types]))
(clojure.core/defmethod
xcljb.common/read-reply
["SHAPE" 0]
[_ _ reply-buf]
(xcljb.gen-common/deserialize
xcljb.gen.shape-types/QueryVersionReply
r... |
ab263ca78f5fc5292018d4c3046c356498179cae0d85de7edfcd79b5e9b05335 | tokenrove/imago | package.lisp | (defpackage imago-pngload
(:use #:cl
#:imago)
(:export #:read-pngload))
| null | https://raw.githubusercontent.com/tokenrove/imago/9b06d5cb0d12da4d75f8d9570c76ab3001c68e57/pngload/package.lisp | lisp | (defpackage imago-pngload
(:use #:cl
#:imago)
(:export #:read-pngload))
| |
5bc1b4f62683ba58a1a4439340078af44ef1cabb7f5decbe55adf47db09da686 | 2600hz-archive/whistle | cf_callflow.erl | %%%-------------------------------------------------------------------
@author < >
( C ) 2011 , VoIP INC
%%% @doc
%%%
%%% @end
Created : 15 Jul 2011 by < >
%%%-------------------------------------------------------------------
-module(cf_callflow).
-include("../callflow.hrl").
-export([handle/2]).
%%---... | null | https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/whistle_apps/apps/callflow/src/module/cf_callflow.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
--------------------------------------------------------------------
@doc
Entry point for this module
@end
-------------------------------------------------------------... | @author < >
( C ) 2011 , VoIP INC
Created : 15 Jul 2011 by < >
-module(cf_callflow).
-include("../callflow.hrl").
-export([handle/2]).
@public
-spec(handle/2 :: (Data :: json_object(), Call :: #cf_call{}) -> no_return()).
handle(Data, #cf_call{call_id=CallId, account_db=AccountDb, cf_pid=CFPid}) ->
... |
43785cb0526074f6f4b6dd4b991079112186340c1d0d0aca18fd9d359e14b18b | sonyxperiadev/dataflow | ValidationSpec.hs | module DataFlow.ValidationSpec where
import Data.Map as M
import Test.Hspec
import DataFlow.Core
import DataFlow.Validation
shouldAccept :: Diagram -> Expectation
shouldAccept d = either onFailure onSuccess (validate d)
where onSuccess _ = return ()
onFailure e = expectationFailure $
... | null | https://raw.githubusercontent.com/sonyxperiadev/dataflow/8bef5bd6bf96a918197e66ad9d675ff8cd2a4e33/test/DataFlow/ValidationSpec.hs | haskell | module DataFlow.ValidationSpec where
import Data.Map as M
import Test.Hspec
import DataFlow.Core
import DataFlow.Validation
shouldAccept :: Diagram -> Expectation
shouldAccept d = either onFailure onSuccess (validate d)
where onSuccess _ = return ()
onFailure e = expectationFailure $
... | |
ef37ebd6118b556b587cacc9b59711413d9851eaef94a5df8987a41eb7d64f5b | ucsd-progsys/dsolve | heapsort.ml | let rec heapify size data i =
let left = 2 * i in
let right = 2 * i in
let left = left + 1 in
let right = right + 2 in
let largest =
(if left < size then
let gl = Array.get data left in
let gi = Array.get data i in
if gl > gi then left else i
else i (*: int[0,n)*))
in
let largest... | null | https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/tests/PLDI2008/heapsort.ml | ocaml | : int[0,n)
: int[0,n)
let _none = print_float sdk in
maximum size, current size, data | let rec heapify size data i =
let left = 2 * i in
let right = 2 * i in
let left = left + 1 in
let right = right + 2 in
let largest =
(if left < size then
let gl = Array.get data left in
let gi = Array.get data i in
if gl > gi then left else i
in
let largest =
(if right < size then... |
05dad583b8717f4b0650962ef80d128a5f869bfca2010ed738f42f6d84a89a37 | Workiva/eva | pull_helpers.clj | Copyright 2015 - 2019 Workiva Inc.
;;
;; Licensed under the Eclipse Public License 1.0 (the "License");
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;; -1.0.php
;;
;; Unless required by applicable law or agreed to in writing, software
dist... | null | https://raw.githubusercontent.com/Workiva/eva/b7b8a6a5215cccb507a92aa67e0168dc777ffeac/core/src/eva/query/dialect/pull_helpers.clj | clojure |
Licensed under the Eclipse Public License 1.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-1.0.php
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expre... | Copyright 2015 - 2019 Workiva Inc.
distributed under the License is distributed on an " AS IS " BASIS ,
(ns eva.query.dialect.pull-helpers
"Contains helpers for reading data from a conformed pull spec.
Mostly involves normalizing pattern-data-literal from the grammar
into a form that's a bit more amenable... |
8413bac925286f52d1fcb6752777510185182288b6f4ac10143d863c54ea759f | jrh13/hol-light | tactics_refine.ml |
(* ------------------------------------------------------------------ *)
(* This bundles an interactive session into a proof. *)
(* ------------------------------------------------------------------ *)
let labels_flag = ref false;;
let LABEL_ALL_TAC:tactic =
let mk_label avoid =
let rec mk_one_label i avoid =
... | null | https://raw.githubusercontent.com/jrh13/hol-light/ea44a4cacd238d7fa5a397f043f3e3321eb66543/Jordan/tactics_refine.ml | ocaml | ------------------------------------------------------------------
This bundles an interactive session into a proof.
------------------------------------------------------------------
global_var
------------------------------------------------------------------
DUMPING AND PRELOADED THEOREMS
--------------... |
let labels_flag = ref false;;
let LABEL_ALL_TAC:tactic =
let mk_label avoid =
let rec mk_one_label i avoid =
let label = "Z-"^(string_of_int i) in
if not(mem label avoid) then label else mk_one_label (i+1) avoid in
mk_one_label 0 avoid in
let update_label i asl =
let rec f_at_i f j =
functi... |
c10f931fb5d06364036a49b1c90a1a04c369923c686f41210b538ddcc5d6c4f8 | mzp/coq-ruby | auto_ind_decl.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/mzp/coq-ruby/99b9f87c4397f705d1210702416176b13f8769c1/toplevel/auto_ind_decl.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
boolean equality
Some pre declara... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
i $ I d : auto_ind_decl.ml ... |
3beab6c4f77c34f8ad8fbeb4808f6046fa7df8d23254282bc6d085d01d64dccf | dams/graphite-riakts | graphite_riakts_indexer.erl | -module(graphite_riakts_indexer).
-behaviour(gen_server).
-include_lib("graphite_riakts_config.hrl").
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]).
-export([start_link/0, maybe_index/0]).
-record(search_results, {
docs, %% Result documents
max_s... | null | https://raw.githubusercontent.com/dams/graphite-riakts/9f1e77984556cec99fe21d9d7ca2dbcde9c80bc3/src/graphite_riakts_indexer.erl | erlang | Result documents
Maximum score
Number of results
public API
behaviour implementation
private functions
TODO: if wait failed, readd the metrics to be indexed in the set
we're going to wait for the last stored metric name to be indexed
we fetch the corresponding key from the riakkv bucket, we get the list of met... | -module(graphite_riakts_indexer).
-behaviour(gen_server).
-include_lib("graphite_riakts_config.hrl").
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]).
-export([start_link/0, maybe_index/0]).
-record(search_results, {
}).
start_link() ->
gen_server:start_link... |
218b693db2b0cbec839155bf4a6a904fe6153c0acef28748d37d01fc855c0269 | Kah0ona/re-dnd | project.clj | (defproject re-dnd "0.1.19"
:description "A configurable drag/drop widget + API for re-frame apps"
:url "-dnd.git"
:license {:name "MIT"}
:dependencies [[org.clojure/clojure "1.10.0"]
[org.clojure/clojurescript "1.10.597"]
[reagent "0.8.1"]
[re-frame "0.10.6"]
... | null | https://raw.githubusercontent.com/Kah0ona/re-dnd/32ecacc8c28a25aa854bb340a5d73cb03e5751cb/project.clj | clojure | figwheel-main, if you want to run it from the commandline
:jar-exclusions [#"(?:^|\/)re_dnd_demo\/" #"(?:^|\/)demo\/" #"(?:^|\/)compiled.*\/" #"html$"] | (defproject re-dnd "0.1.19"
:description "A configurable drag/drop widget + API for re-frame apps"
:url "-dnd.git"
:license {:name "MIT"}
:dependencies [[org.clojure/clojure "1.10.0"]
[org.clojure/clojurescript "1.10.597"]
[reagent "0.8.1"]
[re-frame "0.10.6"]
... |
4392099bb4f77c9c9b9a664ac9978653523ba9b38a2ee2cfdaab73a6eb225698 | metosin/sormilla | user.clj | (ns user
(:require [clojure.java.io :as io]
[clojure.string :as s]
[clojure.pprint :refer [pprint]]
[clojure.repl :refer :all]
[clojure.tools.namespace.repl :refer [refresh refresh-all] :as repl]
[sormilla.system :refer [start-system! stop-system!]]
... | null | https://raw.githubusercontent.com/metosin/sormilla/e50930930c41f64272f06c4bd02a4e3ab58e923f/dev/user.clj | clojure | (ns user
(:require [clojure.java.io :as io]
[clojure.string :as s]
[clojure.pprint :refer [pprint]]
[clojure.repl :refer :all]
[clojure.tools.namespace.repl :refer [refresh refresh-all] :as repl]
[sormilla.system :refer [start-system! stop-system!]]
... | |
d7460edcedc9c63c3f77f8a26c4e69232beba18d468680dfee4f2906c1208b7a | byulparan/cl-collider | lw-extension.lisp | (in-package :sc-osc)
;;; JBJMC201309
(defun single-float-bits (x)
(declare (type single-float x))
(assert (= (float-radix x) 2))
(if (zerop x)
(if (eql x 0.0f0) 0 #x-80000000)
(multiple-value-bind (lisp-significand lisp-exponent lisp-sign)
(integer-decode-float x)
(assert (plusp lis... | null | https://raw.githubusercontent.com/byulparan/cl-collider/1ad7f59c36acb61987e65973b77c5deb180285b1/osc/lw-extension.lisp | lisp | JBJMC201309
format looks like, augmented by some experiments with
I found floating around on the net at
</~jac/MAD3401/Backgrnd/ieee.html>,
</~johnson2/ieee.html>,
and
<>.
And beyond the probable sheer flakiness of the code, all the bare
float number
greater than the exponent field.
ordinary terminati... | (in-package :sc-osc)
(defun single-float-bits (x)
(declare (type single-float x))
(assert (= (float-radix x) 2))
(if (zerop x)
(if (eql x 0.0f0) 0 #x-80000000)
(multiple-value-bind (lisp-significand lisp-exponent lisp-sign)
(integer-decode-float x)
(assert (plusp lisp-significand))
... |
4219514c451c69f06918144ee54487533f6448944f31c60d6d87dc9cdeeadabb | Flexiana/tiny-rbac | project.clj | (defproject liberator-demo "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
:url "-2.0/"}
:plugins [[lein-ring "0.12.5"]]
:ring {:handler liberator-demo.core/handler}
:dependencies [[org.clojure/clojure "1... | null | https://raw.githubusercontent.com/Flexiana/tiny-rbac/9014fa028ed850dccdf1c0d0fa8b379b0c14ad16/examples/liberator-demo/project.clj | clojure | (defproject liberator-demo "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
:url "-2.0/"}
:plugins [[lein-ring "0.12.5"]]
:ring {:handler liberator-demo.core/handler}
:dependencies [[org.clojure/clojure "1... | |
676c05ea848a4094d8e0e3c15c67144802eaa6ab53049fd5785df4cddfeff41e | dmjio/miso | Event.hs | -----------------------------------------------------------------------------
-- |
-- Module : Miso.Event
Copyright : ( C ) 2016 - 2018
-- License : BSD3-style (see the file LICENSE)
Maintainer : < >
-- Stability : experimental
-- Portability : non-portable
---------------------------... | null | https://raw.githubusercontent.com/dmjio/miso/0be227bca6e0aec16a69a1c09f9a90624af070c1/src/Miso/Event.hs | haskell | ---------------------------------------------------------------------------
|
Module : Miso.Event
License : BSD3-style (see the file LICENSE)
Stability : experimental
Portability : non-portable
-------------------------------------------------------------------------- | Copyright : ( C ) 2016 - 2018
Maintainer : < >
module Miso.Event
( module Miso.Event.Decoder
, module Miso.Event.Types
) where
import Miso.Event.Decoder
import Miso.Event.Types
|
cf77d65c093e209e7dd478d7b7c2d2cc598549276cf67c951ddde61d76325f7f | tnelson/Forge | booleanLogic.rkt | #lang forge
option solver MiniSatProver
option logtranslation 2
option coregranularity 2
------------------------------------------------------
-- Formula Type
------------------------------------------------------
abstract sig Formula {
truth: set Instance -- Instances this is true in
}
sig Var extends Formula {}... | null | https://raw.githubusercontent.com/tnelson/Forge/1687cba0ebdb598c29c51845d43c98a459d0588f/forge/examples/booleanLogic.rkt | racket | #lang forge
option solver MiniSatProver
option logtranslation 2
option coregranularity 2
------------------------------------------------------
-- Formula Type
------------------------------------------------------
abstract sig Formula {
truth: set Instance -- Instances this is true in
}
sig Var extends Formula {}... | |
f95b887fd9433ec2a80520dc24cf57d1e10625ee2e646d2781b8a0f7ca8beecf | SanderSpies/ocaml-gist | pprintast2.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/SanderSpies/ocaml-gist/7dc229aebdf51310e8c7dae12df0cb55b5de5a32/ocaml_webworker/merlin_lite/src/ocaml/typer_4.04.2/parsing/pprintast2.ml | ocaml | ************************************************************************
OCaml
Fabrice L... | , OCamlPro
, University of Pennsylvania
Copyright 2007 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
Original Code from Ber - metaocaml , modified... |
77daeb6ee159bdc356d70142c8f6c1d6be838a6678dec079b874a56401cc916a | oriansj/mes-m2 | quote.scm | GNU --- Maxwell Equations of Software
Copyright © 2016,2018 Jan ( janneke ) Nieuwenhuizen < >
;;;
This file is part of GNU .
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version... | null | https://raw.githubusercontent.com/oriansj/mes-m2/b44fbc976ae334252de4eb82a57c361a195f2194/test/test009/quote.scm | scheme |
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
Setup output file | GNU --- Maxwell Equations of Software
Copyright © 2016,2018 Jan ( janneke ) Nieuwenhuizen < >
This file is part of GNU .
under the terms of the GNU General Public License as published by
GNU is distributed in the hope that it will be useful , but
You should have received a copy of the GNU General Public... |
fc31d9b9965c1ce76412ed9d617d7e01792541c002c3eb204a51fad24ee20a16 | annenkov/unmix | xpe.rkt | #lang racket
(define ($specialize-fundef ann-prog sv)
(let ((s-prog (caddr ann-prog))
(d-prog (cadr ann-prog))
(goal (caar ann-prog)))
(let ((%%1 (assq goal d-prog)))
(let ((body (car (cddddr %%1))) (dn (caddr %%1)) (sn (cadr %%1)))
(let ((%%2 (umainpe:find-name! goal sv)))
... | null | https://raw.githubusercontent.com/annenkov/unmix/e156fb706e52994f86029ac512a79c737d7ee0d8/recurs/xpe.rkt | racket | #lang racket
(define ($specialize-fundef ann-prog sv)
(let ((s-prog (caddr ann-prog))
(d-prog (cadr ann-prog))
(goal (caar ann-prog)))
(let ((%%1 (assq goal d-prog)))
(let ((body (car (cddddr %%1))) (dn (caddr %%1)) (sn (cadr %%1)))
(let ((%%2 (umainpe:find-name! goal sv)))
... | |
cb464bee1ef5fda18b73420801f95f94865ecd4cd0d08ef7ad376b434d6cbd1f | SonyCSLParis/BENG | demo.lisp |
(ql:quickload :beng)
(in-package :beng)
(export '(categories))
;; (make-beng-cxns)
(defun show-multidimensional-analysis (sentence)
(multiple-value-bind (meaning resulting-node)
(comprehend sentence)
(add-element (make-html-fcg-light resulting-node
:feature-types (fe... | null | https://raw.githubusercontent.com/SonyCSLParis/BENG/1eb525e132d2b1f74ae18532657561725f6fbb78/demo.lisp | lisp | (make-beng-cxns) |
(ql:quickload :beng)
(in-package :beng)
(export '(categories))
(defun show-multidimensional-analysis (sentence)
(multiple-value-bind (meaning resulting-node)
(comprehend sentence)
(add-element (make-html-fcg-light resulting-node
:feature-types (feature-types *fcg-con... |
a56ff68e78cd1aa516c460ea6f1f8fcebdaf6b1dc877696c44d637170e6e98c2 | igorhvr/bedlam | prioq.scm | ;(import s2j)
;(import generic-procedures)
( define < PQueue > ( java - class " PQueue " ) )
;(define-generic put)
;(define-generic get)
;(define-generic empty)
;(define (pq-create) (make <PQueue>))
;(define (pq-add! pq item value)
; (put pq (java-wrap item) (->jfloat value)))
;(define (pq-remove-max! pq)
; (java-unw... | null | https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/sisc/sisc-contrib/icfp/prioq.scm | scheme | (import s2j)
(import generic-procedures)
(define-generic put)
(define-generic get)
(define-generic empty)
(define (pq-create) (make <PQueue>))
(define (pq-add! pq item value)
(put pq (java-wrap item) (->jfloat value)))
(define (pq-remove-max! pq)
(java-unwrap (get pq)))
(define (pq-empty? pq)
(->boolean (empty pq... | ( define < PQueue > ( java - class " PQueue " ) )
(define (pq-create) (cons 'priority-queue '()))
(define (pq-add! pq item value)
(set-cdr! pq (pq-add-h (cdr pq) item value)))
(define (pq-add-h pq item value)
(cond [(null? pq) (list (cons value item))]
[(> (caar pq) value)
(cons (car pq) (pq-add-h (cdr pq) item ... |
655b1319da86fd52c18e5596c5b14c64867cd53c513cea2473516f8a8bdbeb84 | ocaml-sf/learn-ocaml-corpus | test.ml | open Printf
let iter = List.iter
let map = List.map
module T = Test_lib
module R = Report
type report = R.t
(* Determinism. *)
let () = Random.init 0
(* The auto-grader. *)
(* -------------------------------------------------------------------------- *)
(* Some of the code below should move to separate library files... | null | https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/tictactoe/test.ml | ocaml | Determinism.
The auto-grader.
--------------------------------------------------------------------------
Some of the code below should move to separate library files.
--------------------------------------------------------------------------
Miscellaneous.
--------------------------------------------------... | open Printf
let iter = List.iter
let map = List.map
module T = Test_lib
module R = Report
type report = R.t
let () = Random.init 0
let postincrement c =
let n = !c in
c := n + 1;
n
type requirement =
Infinity is encoded as [ max_int ] .
let infinity : requirement =
max_int
let (++) (x : require... |
01d0f035f8a0e2caa804c0d17e6141fcd52511252f4180a7961cd3c5bd8d724c | sgbj/MaximaSharp | colnew-package.lisp | (defpackage :colnew
(:use :common-lisp)
(:export "COLNEW" "APPSLN"))
| null | https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/share/colnew/colnew-package.lisp | lisp | (defpackage :colnew
(:use :common-lisp)
(:export "COLNEW" "APPSLN"))
| |
43ae4cdf3ab71d63c705deeb73ea6d7a7a07bdd50cb9cf54657d4314463a63b6 | basho/bitcask | bitcask_file.erl | %% -------------------------------------------------------------------
%%
bitcask : - inspired key / value store
%%
Copyright ( c ) 2012 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except i... | null | https://raw.githubusercontent.com/basho/bitcask/d70499096e23b4cefbddc4e80d16f8c91aad2003/src/bitcask_file.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissi... | bitcask : - inspired key / value store
Copyright ( c ) 2012 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT... |
8ba2ef422ff6f92a362a4ebb9c9aa9e1d426f1f8d40155a43d4af79080c954b8 | kushidesign/kushi | core.cljs | (ns ^:dev/always kushi.core
(:require-macros [kushi.core])
(:require [clojure.string :as string]
[kushi.clean :as clean]))
(def sheet-ids-by-type
?
{:kushi-atomic "_kushi-defclass-utility_"
:kushi-css-sync "_kushi-css-sync_"
:defclass-kushi-override "_kushi-defclass-over... | null | https://raw.githubusercontent.com/kushidesign/kushi/095f9852d426d0b58ec0cdc06fb278dbdf05353b/src/kushi/core.cljs | clojure | (ui-components!)
Functionality for injecting styles into during development builds ------------------------------------------
This is also used in release builds if :runtime-injection? config param is set to true ----------------------
Used to keep track of what has been injected, to avoid duplicate injections.
T... | (ns ^:dev/always kushi.core
(:require-macros [kushi.core])
(:require [clojure.string :as string]
[kushi.clean :as clean]))
(def sheet-ids-by-type
?
{:kushi-atomic "_kushi-defclass-utility_"
:kushi-css-sync "_kushi-css-sync_"
:defclass-kushi-override "_kushi-defclass-over... |
3448207e6ffbe82d1007414773e31932b171ea556b5abf68b479fc0d11b3dd9f | wololock/programming-in-haskell-2nd-edition | ch07_01_solutions.hs | module Chapter_07 where
Ex . 1
-- [f x | x <- xs, p x]
ex1 :: (a -> Bool) -> (a -> b) -> [a] -> [b]
ex1 p f = map f . filter p
Ex . 2
-- a.
all' :: (a -> Bool) -> [a] -> Bool
all' p = foldr (\x y -> y && p x) True
-- b.
any' :: (a -> Bool) -> [a] -> Bool
any' p = foldr (\x y -> y || p x) False
-- c.
takeWhile'... | null | https://raw.githubusercontent.com/wololock/programming-in-haskell-2nd-edition/19d4b173ac3a41a0579bcd9f55753dbeda293494/ch07_01_solutions.hs | haskell | [f x | x <- xs, p x]
a.
b.
c.
d.
> [15,104,13,102,11] | module Chapter_07 where
Ex . 1
ex1 :: (a -> Bool) -> (a -> b) -> [a] -> [b]
ex1 p f = map f . filter p
Ex . 2
all' :: (a -> Bool) -> [a] -> Bool
all' p = foldr (\x y -> y && p x) True
any' :: (a -> Bool) -> [a] -> Bool
any' p = foldr (\x y -> y || p x) False
takeWhile' :: (a -> Bool) -> [a] -> [a]
takeWhile' _... |
6bb021abdf5abb2646e030e09e63fc7246a8e48ab93d7938db687e72d3470f97 | binaryage/chromex | crash_report_private.clj | (ns chromex.ext.crash-report-private
"Private API for Chrome component extensions to report errors.
* available since Chrome 84"
(:refer-clojure :only [defmacro defn apply declare meta let partial])
(:require [chromex.wrapgen :refer [gen-wrap-helper]]
[chromex.callgen :refer [gen-call-helper ge... | null | https://raw.githubusercontent.com/binaryage/chromex/33834ba5dd4f4238a3c51f99caa0416f30c308c5/src/exts_private/chromex/ext/crash_report_private.clj | clojure | -- convenience ------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------
-- API TABLE --------------------------------------------------------... | (ns chromex.ext.crash-report-private
"Private API for Chrome component extensions to report errors.
* available since Chrome 84"
(:refer-clojure :only [defmacro defn apply declare meta let partial])
(:require [chromex.wrapgen :refer [gen-wrap-helper]]
[chromex.callgen :refer [gen-call-helper ge... |
6143ef965f642a82f147610bd27d370a3ab79c099836352db9866f40febf270d | hmb-ba/protocol | SpecFixtures.hs | module SpecFixtures where
import Data.Binary.Put
import qualified Data.ByteString.Lazy.Char8 as BL
import qualified Data.ByteString.Char8 as BS
import Data.Word
import Kafka.Protocol
getMessageSetFixture :: Message -> MessageSet
getMessageSetFixture m = MessageSet
{ msOffset = 0
, msLen = encode... | null | https://raw.githubusercontent.com/hmb-ba/protocol/3df7ff48051f69651a29111ecc245dfb1660f4b5/test/SpecFixtures.hs | haskell | reqApiKey
reqApiVersion
correlationId
clientIdLen | module SpecFixtures where
import Data.Binary.Put
import qualified Data.ByteString.Lazy.Char8 as BL
import qualified Data.ByteString.Char8 as BS
import Data.Word
import Kafka.Protocol
getMessageSetFixture :: Message -> MessageSet
getMessageSetFixture m = MessageSet
{ msOffset = 0
, msLen = encode... |
35ee8ff7b1a9487aed82da61dbbc4756f77d93fef79f36e6e18d04203744dfa2 | UnixJunkie/dokeysto | gen_gen.ml |
Generic key and generic value to / from string using Marshal .
*
* Most users will want to pass this module to parameterize one of
* the provided functors .
*
* Most users will want to pass this module to parameterize one of
* the provided functors. *)
let string_of_key (k: 'k): string =
Marshal.(to_s... | null | https://raw.githubusercontent.com/UnixJunkie/dokeysto/48b0486769d127f60d523cce89db001179ced92b/src/gen_gen.ml | ocaml |
Generic key and generic value to / from string using Marshal .
*
* Most users will want to pass this module to parameterize one of
* the provided functors .
*
* Most users will want to pass this module to parameterize one of
* the provided functors. *)
let string_of_key (k: 'k): string =
Marshal.(to_s... | |
90ca3a791d91f4c4c5ffb7c8805faf5aa134720a70a443367ae56bf940e01dde | onyx-platform/learn-onyx | challenge_4_2.clj | (ns workshop.challenge-4-2
(:require [workshop.workshop-utils :as u]))
Workflows ; ; ;
(def workflow
[[:read-segments :identity]
[:identity :write-segments]])
;;; Catalogs ;;;
(defn build-catalog
([] (build-catalog 5 50))
([batch-size batch-timeout]
[{:onyx/name :read-segments
:onyx/plugin ... | null | https://raw.githubusercontent.com/onyx-platform/learn-onyx/6bf1936f35d26e3c8cf171b5971e1bc95e82b3c8/src/workshop/challenge_4_2.clj | clojure | ; ;
Catalogs ;;;
Functions ;;;
; ;
<<< BEGIN FILL ME IN >>>
<<< END FILL ME IN >>> | (ns workshop.challenge-4-2
(:require [workshop.workshop-utils :as u]))
(def workflow
[[:read-segments :identity]
[:identity :write-segments]])
(defn build-catalog
([] (build-catalog 5 50))
([batch-size batch-timeout]
[{:onyx/name :read-segments
:onyx/plugin :onyx.plugin.core-async/input
... |
b03ccaa6dc157bdd34d366e5eeb840d6326a4f5d3c6085e53ce85ef55df27380 | inventi/seed | smcore.clj | (ns seed.accounts.pm.smcore
(:require [automat.core :as a]
[seed.core.command :as command]
[seed.core.event-bus :as eb]
[seed.core.event-store :as es]
[seed.core.util :refer [keywordize success]]
[clojure.core.async :as async :refer [go <! >! go-loop]]
... | null | https://raw.githubusercontent.com/inventi/seed/0a0088a587d6b147215694dcba585b6782eeec80/src/seed/accounts/pm/smcore.clj | clojure | (ns seed.accounts.pm.smcore
(:require [automat.core :as a]
[seed.core.command :as command]
[seed.core.event-bus :as eb]
[seed.core.event-store :as es]
[seed.core.util :refer [keywordize success]]
[clojure.core.async :as async :refer [go <! >! go-loop]]
... | |
5a506ead9cacafd5e2bdd31153aa74a3386b3395e1d4d3901a29ca700aaab8b5 | ricardobcl/DottedDB | dotted_db_get_fsm_sup.erl | @doc Supervise the dotted_db_get FSM .
-module(dotted_db_get_fsm_sup).
-behavior(supervisor).
-export([start_get_fsm/1,
start_link/0]).
-export([init/1]).
start_get_fsm(Args) ->
supervisor:start_child(?MODULE, Args).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
init([]) -... | null | https://raw.githubusercontent.com/ricardobcl/DottedDB/e3b96a9ec77439af90f94a80b875a01732c1425e/src/dotted_db_get_fsm_sup.erl | erlang | @doc Supervise the dotted_db_get FSM .
-module(dotted_db_get_fsm_sup).
-behavior(supervisor).
-export([start_get_fsm/1,
start_link/0]).
-export([init/1]).
start_get_fsm(Args) ->
supervisor:start_child(?MODULE, Args).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
init([]) -... | |
b5a8172df0cf01d8caafad13e7d694d559286d414c87c386a048f6201b9a0541 | yaxu/hstexture | UI.hs | # LANGUAGE FlexibleContexts #
module Texture.UI where
import Control.Monad
import Control.Monad.State
import Control.Monad.Reader
import Control.Concurrent.MVar
import Data.Array.IArray
import Graphics.UI.SDL
import Graphics.UI.SDL.Image
import qualified Graphics.UI.SDL.Framerate as FR
import qualified Graphics.UI.SD... | null | https://raw.githubusercontent.com/yaxu/hstexture/ba2c23009376528d5163b62c91aec1b716d31704/Texture/UI.hs | haskell | liftIO $ T.printDists $ parsed s
liftIO $ putStrLn $ "sending '" ++ code' ++ "'"
liftIO $ putStrLn $ show (map ident movingWs)
distance from word which has mousepos..
liftIO $ putStrLn $ show mods
liftIO $ putStrLn [c]
oscOutput :: MVar (ParamPattern),
mxyz :: MVar (Float, Float, Float),
mEnergy ... | # LANGUAGE FlexibleContexts #
module Texture.UI where
import Control.Monad
import Control.Monad.State
import Control.Monad.Reader
import Control.Concurrent.MVar
import Data.Array.IArray
import Graphics.UI.SDL
import Graphics.UI.SDL.Image
import qualified Graphics.UI.SDL.Framerate as FR
import qualified Graphics.UI.SD... |
d0157fd0f31b3b92ad79808af31d507e14be043dff27b8988aef80963b229f94 | WFP-VAM/RAMResourcesScripts | rCSI-indicator.sps | Reduced coping strategy index
**************************************************************************************************************
/**rCSI (Reduced Consumption Strategies Index***
/***Variable labels
/*1. Relied on less preferred, less expensive food *1-rCSILessQlty
/*2. Borrowed food or relied on help ... | null | https://raw.githubusercontent.com/WFP-VAM/RAMResourcesScripts/236e1a630f053d27161c73dfe01a9ef04b7ebdcc/Indicators/Reduced-coping-strategy-index/rCSI-indicator.sps | scheme | Reduced coping strategy index
**************************************************************************************************************
/**rCSI (Reduced Consumption Strategies Index***
/***Variable labels
/*1. Relied on less preferred, less expensive food *1-rCSILessQlty
/*2. Borrowed food or relied on help ... | |
e16b2f225ca2bdc75ab203f9a9eb4b9a414a3b6adc3325cb653d571b71983473 | Carnap/Carnap | Util.hs | module Filter.Util (splitIt, intoChunks, formatChunk, unlines',sanitizeHtml,
exerciseWrapper, contentOf, numof, toDataCarnap) where
import Prelude
import Text.Pandoc
import qualified Data.Text as T
import Data.Text (Text)
import Data.Char (isDigit)
import Text.Blaze.Html
import Text.Blaze.Html.Rend... | null | https://raw.githubusercontent.com/Carnap/Carnap/a2b314474db803f31ee228f23ad7406c10a5c85a/Carnap-Server/Filter/Util.hs | haskell | | like 'T.unlines' but without a trailing newline | module Filter.Util (splitIt, intoChunks, formatChunk, unlines',sanitizeHtml,
exerciseWrapper, contentOf, numof, toDataCarnap) where
import Prelude
import Text.Pandoc
import qualified Data.Text as T
import Data.Text (Text)
import Data.Char (isDigit)
import Text.Blaze.Html
import Text.Blaze.Html.Rend... |
4bc53a16621b93f445a9b8cf1417cf423b11fe10a37e1867510f56a13f060398 | iokasimov/pandora | Transformation.hs | module Pandora.Pattern.Transformation (module Exports, Component (..), Transformation (..)) where
import Pandora.Pattern.Transformation.Lowerable as Exports
import Pandora.Pattern.Transformation.Liftable as Exports
import Pandora.Pattern.Transformation.Hoistable as Exports
import Pandora.Pattern.Morphism.Tensor (Tens... | null | https://raw.githubusercontent.com/iokasimov/pandora/68662a508749f1cf02d0178679435a24f07dcaf2/Pandora/Pattern/Transformation.hs | haskell | TODO: Monoidal category p q t =
Law: (-|-) morphism . component = component . (-|-) morphism
TODO: natural transformations on semigroupoids? | module Pandora.Pattern.Transformation (module Exports, Component (..), Transformation (..)) where
import Pandora.Pattern.Transformation.Lowerable as Exports
import Pandora.Pattern.Transformation.Liftable as Exports
import Pandora.Pattern.Transformation.Hoistable as Exports
import Pandora.Pattern.Morphism.Tensor (Tens... |
95292eeeb103f3217814c2691d1c3266a4c8d75a0f9fea5a41d23c20c4d961d7 | chapmanb/clj-blend | util.clj | (ns org.galaxyproject.clj-blend.util
(:import java.util.Base64)
(:require [clojure.string]))
(defn key-fn [key]
(keyword (clojure.string/replace key "_" "-")))
(defn b64-encode-str [to-encode]
(.encodeToString (Base64/getEncoder) (.getBytes to-encode)))
| null | https://raw.githubusercontent.com/chapmanb/clj-blend/f11fc9b599eddc1127f5e1a5f2d3a57919752baf/src/org/galaxyproject/clj_blend/util.clj | clojure | (ns org.galaxyproject.clj-blend.util
(:import java.util.Base64)
(:require [clojure.string]))
(defn key-fn [key]
(keyword (clojure.string/replace key "_" "-")))
(defn b64-encode-str [to-encode]
(.encodeToString (Base64/getEncoder) (.getBytes to-encode)))
| |
a219f81f5f402a0f3875cb3d8120990776d95a630601c4688df7839795c7fdee | adamschoenemann/clofrp | Instantiation.hs | {-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE LambdaCase #
# LANGUAGE OverloadedLists #
module CloFRP.Check.Instantiation where
import Control.Monad.Error (throwError, catchError)
import Data.Foldable (foldrM)
import CloFRP.AST.Name
import CloFRP.AST.Type
import CloFRP.AST.Kind
import CloFRP.C... | null | https://raw.githubusercontent.com/adamschoenemann/clofrp/c26f86aec2cdb8fa7fd317acd13f7d77af984bd3/library/CloFRP/Check/Instantiation.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
| Under input context Γ, instantiate α^ such that α^ <: A, with output context ∆
TODO: Find a way to abstract all these near-identical definitions out. Also, combine instL and instR, or
at least implement them both in terms of a more general combinator
InstLSolve
I... | # LANGUAGE LambdaCase #
# LANGUAGE OverloadedLists #
module CloFRP.Check.Instantiation where
import Control.Monad.Error (throwError, catchError)
import Data.Foldable (foldrM)
import CloFRP.AST.Name
import CloFRP.AST.Type
import CloFRP.AST.Kind
import CloFRP.Check.TypingM
import CloFRP.Check.Contexts
import CloFRP.An... |
145f9e77f3896b5b1fc8d836d92986f03d971bc4081ff04935c745867ce6a0a7 | typedclojure/typedclojure | malli.clj | (ns typed-test.malli
(:require [clojure.test :refer [deftest is]]
[clojure.core.typed :as t]
[typed.malli :as sut] ;:as tm
[typed.clj.checker.test-utils :refer [is-tc-e is-tc-err]]
[malli.core :as m]))
(t/load-if-needed)
(sut/defparser AnyInteger-parser t/AnyInteger)
... | null | https://raw.githubusercontent.com/typedclojure/typedclojure/80e5c01e72491234c78b0f5234ddd478fdc868c4/typed/malli/test/typed_test/malli.clj | clojure | :as tm
(assert (vector? prs))
:int a | (ns typed-test.malli
(:require [clojure.test :refer [deftest is]]
[clojure.core.typed :as t]
[typed.clj.checker.test-utils :refer [is-tc-e is-tc-err]]
[malli.core :as m]))
(t/load-if-needed)
(sut/defparser AnyInteger-parser t/AnyInteger)
(deftest malli-ops-test
(is (true? (su... |
e3d708d024b7f676bab03f9d9854014fed60637122acdf87bb552ee64bc2be19 | S8A/htdp-exercises | ex070.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex070) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt... | null | https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex070.rkt | racket | about the language level of this file in a form that our tools can easily process. | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex070) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp") (lib "batch-io.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t ... |
e2ef66e6be2f6f8ac0049888c3ba0e9f6bd9a8537d5ef6b7b9b114250d457f5b | fukamachi/myway | mapper.lisp | (in-package :cl-user)
(defpackage myway.mapper
(:use :cl)
(:import-from :myway.route
:route-rule
:route-handler
:route-name
:equal-route
:match-route)
(:import-from :myway.rule
:rule-methods
:rule-url)
... | null | https://raw.githubusercontent.com/fukamachi/myway/172807db9a32617cd2a03fbc323a99e76badec8d/src/mapper.lisp | lisp | (in-package :cl-user)
(defpackage myway.mapper
(:use :cl)
(:import-from :myway.route
:route-rule
:route-handler
:route-name
:equal-route
:match-route)
(:import-from :myway.rule
:rule-methods
:rule-url)
... | |
5fb2d13a579fdc28bd9af03ff1e85afb66da9485fcabdf276353fc74a0afe5a9 | eudoxia0/corvus | util.lisp | ;;;; This file is less a test of the utilities (compiler/bootstrap/util.lisp)
;;;; and more colection of utilities for tests.
(in-package :cl-user)
(defpackage :corvus-test.util
(:use :cl :fiveam)
(:export :is-type))
(in-package :corvus-test.util)
(defmacro is-type (expr type)
`(is-true (typep ,expr ,type)))
| null | https://raw.githubusercontent.com/eudoxia0/corvus/360cf1e646facaeae067e1350c7e5345ac881d50/compiler/bootstrap/tests/util.lisp | lisp | This file is less a test of the utilities (compiler/bootstrap/util.lisp)
and more colection of utilities for tests. | (in-package :cl-user)
(defpackage :corvus-test.util
(:use :cl :fiveam)
(:export :is-type))
(in-package :corvus-test.util)
(defmacro is-type (expr type)
`(is-true (typep ,expr ,type)))
|
ff025cd7edc9f7ed78f2cb71ab1d62023f53e51a06ef2a2b51832e220fbe3c2c | OCamlPro/freeton_wallet | utils.ml | (**************************************************************************)
(* *)
Copyright ( c ) 2021 OCamlPro SAS
(* *)
(* All right... | null | https://raw.githubusercontent.com/OCamlPro/freeton_wallet/b97877379e51d96cb3544141d386d502348cfca9/src/freeton_wallet_lib/utils.ml | ocaml | ************************************************************************
All rights reserved.
This file is distributed u... | Copyright ( c ) 2021 OCamlPro SAS
Public License version 2.1 , with the special exception on linking
open Ez_file.V1
open EzCompat
open EzFile.OP
open Types
let net_dir config =
let net = Config.current_network config in
Globals.ft_dir // net.net_name
let tonoscl... |
c2d7050ccd9a4f54761ca03aaf8850e60b7308f128425d13b9f061fd6dedd821 | heyoka/dfs | dfs_rewriter.erl | %%%-------------------------------------------------------------------
@author
( C ) 2020 , < COMPANY >
%%% @doc
%%%
%%% @end
Created : 18 . Feb 2020 08:55
%%%-------------------------------------------------------------------
-module(dfs_rewriter).
-author("heyoka").
-ifdef(TEST).
-include_lib("eunit/include/... | null | https://raw.githubusercontent.com/heyoka/dfs/ad9e4abb857bd5535b37db1ec7acd7e2323bb105/src/dfs_rewriter.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API
TESTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
end of string | @author
( C ) 2020 , < COMPANY >
Created : 18 . Feb 2020 08:55
-module(dfs_rewriter).
-author("heyoka").
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
-endif.
-define(BASE_PATTERN, <<"(?<!%|%%|%\\s)(def\\s*(">>).
-define(PATTERN_NUMBER(VarName),
[?BASE_PATTERN, VarName, <<")\\s*=[\\s\\n\\t\\r]*-?\... |
a709ff395f60e1ca508662308e91a256e4f81625ace56e63b2fcf23b3a8269a2 | vonadz/trader | strategies.clj | (ns trader.strategies
(:require [trader.data :refer :all]))
;; strategies should be symbol and interval agnostic
;; strategies should emit a buy or sell signal, with the symbol and amount
;;
(defmulti ema-cross (fn [status shorter-ema longer-ema data] status))
(defmethod ema-cross "starting"
;; Strategy starting... | null | https://raw.githubusercontent.com/vonadz/trader/936aef26c9bbf04a1b770ab8c5ba1ea70c7198dd/src/trader/strategies.clj | clojure | strategies should be symbol and interval agnostic
strategies should emit a buy or sell signal, with the symbol and amount
Strategy starting
Buy when short crosses over long
Sell when short falls under longer | (ns trader.strategies
(:require [trader.data :refer :all]))
(defmulti ema-cross (fn [status shorter-ema longer-ema data] status))
(defmethod ema-cross "starting"
[status shorter-ema longer-ema data]
(map data )
(shorter-ema)
)
(defmethod ema-cross "waiting to buy"
[status shorter-ema longer-ema data]
(... |
7ede4a3ded6d3647fb7b4e3a110dea8e8403ada67203968027ac3e7a7b025264 | arclanguage/Clamp | deftem.lisp | ;;;; This defines deftem, a macro that makes defining a class similar
;;;; to defining a structure. If no initial value is given, slots
;;;; default to nil.
(in-package :clamp)
(use-syntax :clamp)
(defclass template () ()
(:documentation "The template base class."))
(defgeneric get-slots (obj)
(:documentation "R... | null | https://raw.githubusercontent.com/arclanguage/Clamp/9f165b057a109564cd0e836cf611d1e81e43cb12/src/deftem.lisp | lisp | This defines deftem, a macro that makes defining a class similar
to defining a structure. If no initial value is given, slots
default to nil. |
(in-package :clamp)
(use-syntax :clamp)
(defclass template () ()
(:documentation "The template base class."))
(defgeneric get-slots (obj)
(:documentation "Returns all of the slots of the template OBJ.")
(:method-combination append :most-specific-last))
(defmethod print-object ((tem template) stream)
"Print ... |
fe479ab5e550d79cd381337d051f70d0264a47b910053e0cb6a0da48bb33ca50 | r0man/sqlingvo | runner.cljs | (ns sqlingvo.test.runner
(:require [clojure.spec.test.alpha :as stest]
[doo.runner :refer-macros [doo-tests]]
[sqlingvo.compiler-test]
[sqlingvo.copy-test]
[sqlingvo.core-test]
[sqlingvo.create-table-test]
[sqlingvo.db-test]
[sqlingvo... | null | https://raw.githubusercontent.com/r0man/sqlingvo/1f13624ed60ec0866fe51311d92da73638708172/test/sqlingvo/test/runner.cljs | clojure | (ns sqlingvo.test.runner
(:require [clojure.spec.test.alpha :as stest]
[doo.runner :refer-macros [doo-tests]]
[sqlingvo.compiler-test]
[sqlingvo.copy-test]
[sqlingvo.core-test]
[sqlingvo.create-table-test]
[sqlingvo.db-test]
[sqlingvo... | |
e04715f65727bbf25fa5b4739f59cc800331ab77186e7160d8163757b6885520 | frenetic-lang/netcore-1.0 | Sat.hs | module Frenetic.Slices.Sat
( compiledCorrectly
, separate
, breaksObserves
, breaksForwards
, breaksForwards2
, multipleVlanEdge
, unconfinedDomain
, unconfinedRange
, sharedIO
, sharedInput
, sharedOutput
) where
import qualified Data.Map as Map
import qualified Data.Set as Set
import Nettle.O... | null | https://raw.githubusercontent.com/frenetic-lang/netcore-1.0/976b08b740027e8ed19f2d55b1e77f663bee6f02/src/Frenetic/Slices/Sat.hs | haskell | | Verify that source has compiled correctly to target under topo and slice.
Note that in these cases we need to include information about the
slice when we test that the target simulates the source so that in
those cases we can excuse the target from simulating on packets
that aren't in the slice.
| helper functi... | module Frenetic.Slices.Sat
( compiledCorrectly
, separate
, breaksObserves
, breaksForwards
, breaksForwards2
, multipleVlanEdge
, unconfinedDomain
, unconfinedRange
, sharedIO
, sharedInput
, sharedOutput
) where
import qualified Data.Map as Map
import qualified Data.Set as Set
import Nettle.O... |
43d754645b4743db236a4fe26eeb543e41df001b0116fd474886f10c474433f8 | the-dr-lazy/cascade | Api.hs | |
Module : Cascade . Api . Network . Anatomy . Api
Description : ! ! ! INSERT MODULE SHORT DESCRIPTION ! ! !
Copyright : ( c ) 2020 - 2021 Cascade
License : MPL 2.0
Maintainer : < > ( the-dr-lazy.github.io )
Stability : Stable
Portability : POSIX
! ! ! INSERT MODULE LONG DESCRIPTI... | null | https://raw.githubusercontent.com/the-dr-lazy/cascade/014a5589a2763ce373e8c84a211cddc479872b44/cascade-api/src/Cascade/Api/Network/Anatomy/Api.hs | haskell | |
Module : Cascade . Api . Network . Anatomy . Api
Description : ! ! ! INSERT MODULE SHORT DESCRIPTION ! ! !
Copyright : ( c ) 2020 - 2021 Cascade
License : MPL 2.0
Maintainer : < > ( the-dr-lazy.github.io )
Stability : Stable
Portability : POSIX
! ! ! INSERT MODULE LONG DESCRIPTI... | |
344a9b1df8ecdcebf37e7949679ee9e85580930d14859f2baa049bc247bee8df | symbiont-io/detsys-testkit | Http.hs | {-# LANGUAGE OverloadedStrings #-}
module StuntDouble.Frontend.Http where
import Control.Concurrent.Async
import Data.Aeson
import Data.String
import Network.HTTP.Client
( Manager
, RequestBody(..)
, defaultManagerSettings
, httpLbs
, managerResponseTimeout
, method
, ... | null | https://raw.githubusercontent.com/symbiont-io/detsys-testkit/29a3a0140730420e4c5cc8db23df6fdb03f9302c/src/runtime-prototype/src/StuntDouble/Frontend/Http.hs | haskell | # LANGUAGE OverloadedStrings #
----------------------------------------------------------------------
- just `Message`... |
module StuntDouble.Frontend.Http where
import Control.Concurrent.Async
import Data.Aeson
import Data.String
import Network.HTTP.Client
( Manager
, RequestBody(..)
, defaultManagerSettings
, httpLbs
, managerResponseTimeout
, method
, newManager
, parseRequest
... |
065e4793033030ed5879b8f3f3dd175d1a996e079054f3f8edcae486efcc722e | tweag/linear-base | Generically.hs | {-# LANGUAGE LinearTypes #-}
# LANGUAGE NoImplicitPrelude #
module Prelude.Linear.Generically
( unGenerically,
unGenerically1,
module Prelude.Linear.Internal.Generically,
)
where
import Prelude.Linear.Internal.Generically
unGenerically :: Generically a %1 -> a
unGenerically (Generically a) = a
unGeneric... | null | https://raw.githubusercontent.com/tweag/linear-base/6869779b4f8a675125784063ddd2a89e49f61b38/src/Prelude/Linear/Generically.hs | haskell | # LANGUAGE LinearTypes # | # LANGUAGE NoImplicitPrelude #
module Prelude.Linear.Generically
( unGenerically,
unGenerically1,
module Prelude.Linear.Internal.Generically,
)
where
import Prelude.Linear.Internal.Generically
unGenerically :: Generically a %1 -> a
unGenerically (Generically a) = a
unGenerically1 :: Generically1 f a %1 ... |
0114017b65b5267ec5473142e0ec2edfdec3b98ff8928168df8b7b78cd4c6e15 | kazu-yamamoto/http2 | hpack-debug.hs | module Main where
import Data.Aeson (eitherDecode)
import qualified Data.ByteString.Lazy as BL
import JSON
import HPACKDecode
main :: IO ()
main = do
bs <- BL.getContents
let etc = eitherDecode bs :: Either String Test
res <- case etc of
Left e -> return $ Just e
Right tc -> do
... | null | https://raw.githubusercontent.com/kazu-yamamoto/http2/3c29763be147a3d482eff28f427ad80f1d4df706/test-hpack/hpack-debug.hs | haskell | module Main where
import Data.Aeson (eitherDecode)
import qualified Data.ByteString.Lazy as BL
import JSON
import HPACKDecode
main :: IO ()
main = do
bs <- BL.getContents
let etc = eitherDecode bs :: Either String Test
res <- case etc of
Left e -> return $ Just e
Right tc -> do
... | |
410dc9380a9893bd90c5d2775a22d6eba00b3a0c5ba85dc4588986b74f3db0b0 | yomimono/stitchcraft | colors.ml | let scale n = (float_of_int n) /. 255.0
relative luminance calculation is as described in Web Content
Accessibility Guidelines ( WCAG ) 2.0 , retrieved from
-WCAG20-20081211/#relativeluminancedef
Accessibility Guidelines (WCAG) 2.0, retrieved from
-WCAG20-20081211/#relativeluminancedef *)
let relativ... | null | https://raw.githubusercontent.com/yomimono/stitchcraft/b1ec89478e284c691d769d9f4f1f32fbe4756fdf/pattern/lib/colors.ml | ocaml | let scale n = (float_of_int n) /. 255.0
relative luminance calculation is as described in Web Content
Accessibility Guidelines ( WCAG ) 2.0 , retrieved from
-WCAG20-20081211/#relativeluminancedef
Accessibility Guidelines (WCAG) 2.0, retrieved from
-WCAG20-20081211/#relativeluminancedef *)
let relativ... | |
1c8f2483b4aeab6868f91102b4c0a6adca85a93c77a0886a1b6353f73414f57b | haskell-foundation/foundation | Keyed.hs | -- |
-- Module : Foundation.Array.Keyed
-- License : BSD-style
Maintainer : < >
-- Stability : experimental
-- Portability : portable
--
# LANGUAGE FlexibleInstances #
module Foundation.Collection.Keyed
( KeyedCollection(..)
) where
import Basement.Compat.Base
import qualified Data.... | null | https://raw.githubusercontent.com/haskell-foundation/foundation/58568e9f5368170d272000ecf16ef64fb91d0732/foundation/Foundation/Collection/Keyed.hs | haskell | |
Module : Foundation.Array.Keyed
License : BSD-style
Stability : experimental
Portability : portable
| Collection of things that can be looked up by Key | Maintainer : < >
# LANGUAGE FlexibleInstances #
module Foundation.Collection.Keyed
( KeyedCollection(..)
) where
import Basement.Compat.Base
import qualified Data.List
class KeyedCollection c where
type Key c
type Value c
lookup :: Key c -> c -> Maybe (Value c)
instance Eq k => K... |
0b62e0998fcab8880c8dac39b975bb1e5183d76a3cf6f9caef96e7b12c414a4a | punit-naik/ssh-cli | project.clj | (defproject ssh-cli "1.0.2"
:description "A Clojure library designed to interact with the SSH CLI to perform tasks like setting up passwordless SSH between machines, executing remote commands, performing SCP, etc."
:url "-naik/ssh-cli.git"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:... | null | https://raw.githubusercontent.com/punit-naik/ssh-cli/0d8b44703c00f6462e228157cd995d494d982c08/project.clj | clojure | (defproject ssh-cli "1.0.2"
:description "A Clojure library designed to interact with the SSH CLI to perform tasks like setting up passwordless SSH between machines, executing remote commands, performing SCP, etc."
:url "-naik/ssh-cli.git"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:... | |
b57ab90cd4801a40ebe623cdb3efd3a533ab106282f9ac605c4dcc5b6cfe9081 | input-output-hk/project-icarus-importer | TransactionSpecs.hs | {-# LANGUAGE RankNTypes #-}
# LANGUAGE TupleSections #
module TransactionSpecs (transactionSpecs) where
import Universum
import Cardano.Wallet.API.V1.Errors hiding (describe)
import Cardano.Wallet.Client.Http
import Control.Lens hiding ((^..), (^?))
import qualified Pos.Cor... | null | https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/wallet-new/integration/TransactionSpecs.hs | haskell | # LANGUAGE RankNTypes # | # LANGUAGE TupleSections #
module TransactionSpecs (transactionSpecs) where
import Universum
import Cardano.Wallet.API.V1.Errors hiding (describe)
import Cardano.Wallet.Client.Http
import Control.Lens hiding ((^..), (^?))
import qualified Pos.Core as Core
import Test... |
81804901b6fb15bb2f7140d2127709c927531fe7b7f7aa33cc5cf9e791be61a7 | metaocaml/ber-metaocaml | unused_rec.ml | (* TEST
* expect
*)
[@@@ocaml.warning "+39"]
let rec f () = 3;;
[%%expect{|
Line 3, characters 8-9:
3 | let rec f () = 3;;
^
Warning 39: unused rec flag.
val f : unit -> int = <fun>
|}];;
let[@warning "-39"] rec g () = 3;;
[%%expect{|
val g : unit -> int = <fun>
|}];;
let[@warning "+39"] rec h () = 3... | null | https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/typing-warnings/unused_rec.ml | ocaml | TEST
* expect
|
[@@@ocaml.warning "+39"]
let rec f () = 3;;
[%%expect{|
Line 3, characters 8-9:
3 | let rec f () = 3;;
^
Warning 39: unused rec flag.
val f : unit -> int = <fun>
|}];;
let[@warning "-39"] rec g () = 3;;
[%%expect{|
val g : unit -> int = <fun>
|}];;
let[@warning "+39"] rec h () = 3;;
[%%expect{|
Line 1, ... |
a3e7f8fd635a0b7c444c6d8af0d2131fcb20af6480146e34a38c055ad769687f | DerekCuevas/interview-cake-clj | project.clj | (defproject merging-meeting-times "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]]
:main ^:skip-aot merging-meeting-times.core
:target-path "target/%s"
:profiles {:uberjar {... | null | https://raw.githubusercontent.com/DerekCuevas/interview-cake-clj/f17d3239bb30bcc17ced473f055a9859f9d1fb8d/merging-meeting-times/project.clj | clojure | (defproject merging-meeting-times "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]]
:main ^:skip-aot merging-meeting-times.core
:target-path "target/%s"
:profiles {:uberjar {... | |
bd1d9205af87b275dc5932471e2b8990aa9c41b30094bff4eb39c8b86369fa50 | mpenet/jet | async.clj | (ns qbits.jet.async
(:require [clojure.core.async :as async]))
(defn put!
"Takes a `ch`, a `msg`, a single arg function that when passed
`true` enables backpressure and when passed `false` disables it,
and a no-arg function which, when invoked, closes the upstream
source."
([ch msg backpressure! close!]... | null | https://raw.githubusercontent.com/mpenet/jet/c667b1ba24d8c21b38b06f92951742eaed1be5fe/src/clj/qbits/jet/async.clj | clojure | it's still sending, means it's parked, so suspend source | (ns qbits.jet.async
(:require [clojure.core.async :as async]))
(defn put!
"Takes a `ch`, a `msg`, a single arg function that when passed
`true` enables backpressure and when passed `false` disables it,
and a no-arg function which, when invoked, closes the upstream
source."
([ch msg backpressure! close!]... |
782e5d09a1213b316fc34268bb5cf17479c0f1418838a9102a192498da8be868 | holyjak/fulcro-intro-wshop | mock_server.cljs | (ns holyjak.fulcro-exercises.mock-server
"Simulate a Pathom backend but running in the browser
Source: -developer-guide/blob/master/src/book/book/pathom.cljs"
(:require
[com.fulcrologic.fulcro.mutations :as m :refer [defmutation]]
[com.fulcrologic.fulcro.networking.mock-server-remote :refer [mock-http-se... | null | https://raw.githubusercontent.com/holyjak/fulcro-intro-wshop/ef7512d8ebf814b5b8c9be5f770f57bbb630caac/src/holyjak/fulcro_exercises/mock_server.cljs | clojure | (ns holyjak.fulcro-exercises.mock-server
"Simulate a Pathom backend but running in the browser
Source: -developer-guide/blob/master/src/book/book/pathom.cljs"
(:require
[com.fulcrologic.fulcro.mutations :as m :refer [defmutation]]
[com.fulcrologic.fulcro.networking.mock-server-remote :refer [mock-http-se... | |
abf67bac3b77bf44df30ca98db64caca761e5453a6958b6d0f2b342ea1211b83 | janestreet/core | ref.mli | (** This module extends {{!Base.Ref}[Base.Ref]}. *)
open! Import
open Perms.Export
type 'a t = 'a Base.Ref.t = { mutable contents : 'a }
[@@deriving bin_io, quickcheck, typerep]
* @inline
include module type of struct
include Base.Ref
end
with type 'a t := 'a t
module Permissioned : sig
type ('a, -'perms) t [@@... | null | https://raw.githubusercontent.com/janestreet/core/e362df38c28fed401e7bcbad09db3fb283281010/core/src/ref.mli | ocaml | * This module extends {{!Base.Ref}[Base.Ref]}. |
open! Import
open Perms.Export
type 'a t = 'a Base.Ref.t = { mutable contents : 'a }
[@@deriving bin_io, quickcheck, typerep]
* @inline
include module type of struct
include Base.Ref
end
with type 'a t := 'a t
module Permissioned : sig
type ('a, -'perms) t [@@deriving sexp, bin_io]
val create : 'a -> ('a, [<... |
f1a6a17e00e775fb79cb1bfa8a4b70386855ab35c9f717374289535f446c54ca | jeremyjh/higher-leveldb | HigherSpec.hs | # LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE OverloadedStrings #-}
module Database.LevelDB.HigherSpec (main, spec) where
import Control.Applicative (Applicative)
import Control.Monad.Base (MonadBase (..))
import Control.Monad.Reader
import Co... | null | https://raw.githubusercontent.com/jeremyjh/higher-leveldb/9ca7197645a9eb8b27da9eba0904be9d5aa047b8/test/Database/LevelDB/HigherSpec.hs | haskell | # LANGUAGE OverloadedStrings #
debug
debug
not found in this keyspace
our top Reader still works | # LANGUAGE GeneralizedNewtypeDeriving #
module Database.LevelDB.HigherSpec (main, spec) where
import Control.Applicative (Applicative)
import Control.Monad.Base (MonadBase (..))
import Control.Monad.Reader
import Control.Monad.Trans.Resource
import ... |
9804c5c54f22e9f66945276cf5df01feb83c34d88fb1f1037c125992402fd44e | lambdageek/unbound-generics | ParallelReduction.hs | --
-- We implement the parallel reduction relation e ⇛ e'
-- that is a key to some kinds of confluence proofs for lambda calculi.
# LANGUAGE DeriveGeneric , DeriveDataTypeable , MultiParamTypeClasses #
module ParallelReduction where
import Control.Applicative
import Control.Monad.Identity
import GHC.Generics (Generic... | null | https://raw.githubusercontent.com/lambdageek/unbound-generics/04fe1ba015adccc6965bbeb814bb22357ff91829/test/ParallelReduction.hs | haskell |
We implement the parallel reduction relation e ⇛ e'
that is a key to some kinds of confluence proofs for lambda calculi.
in this case we just have an untyped lambda calculus
we choose to allow reduction under a lambda.
repeatedly take parStep steps until the term doesn't change anymore.
same as ex2 but with some... | # LANGUAGE DeriveGeneric , DeriveDataTypeable , MultiParamTypeClasses #
module ParallelReduction where
import Control.Applicative
import Control.Monad.Identity
import GHC.Generics (Generic)
import Data.Typeable (Typeable)
import Unbound.Generics.LocallyNameless
type Var = Name Expr
data Expr = V Var
| La... |
505129ebbf18fe22f0bdaca0c345e5aecd8b1164d27cc5f41b07d6e21284811a | jbracker/supermonad | CodeGenMonad.hs | # LANGUAGE RebindableSyntax #
# LANGUAGE MultiParamTypeClasses #
{-# OPTIONS_GHC -fplugin Control.Supermonad.Plugin #-}
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* H M... | null | https://raw.githubusercontent.com/jbracker/supermonad/2595396a225a65b1dce6ed9a1ce59960f392a55b/examples/monad/hmtc/supermonad/CodeGenMonad.hs | haskell | # OPTIONS_GHC -fplugin Control.Supermonad.Plugin #
| Code generation monad. This module provides an abstraction for
code generation computations with support for generation of distinct
names, e.g. for labels.
o Consider diversion to numbered sections:
- divertTo :: Integer -> CG i a -> CG I a, and/or
- emitTo... | # LANGUAGE RebindableSyntax #
# LANGUAGE MultiParamTypeClasses #
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* H M T C *
* ... |
9feac3f4f8b5f522f296dff416cc9271f92ab75e6f4e17a9e031d4b31b33117b | racket/htdp | batch-io2.rkt | #lang racket
;; test for pr11445
(require 2htdp/batch-io)
(define file "batch-io2.txt")
(with-output-to-file file
(lambda ()
(display "hello")
(display #\return)
(display #\linefeed))
#:exists 'replace)
(require rackunit)
(check-equal? (read-lines "batch-io2.txt") '("hello"))
(when (file-exists? f... | null | https://raw.githubusercontent.com/racket/htdp/aa78794fa1788358d6abd11dad54b3c9f4f5a80b/htdp-test/2htdp/tests/batch-io2.rkt | racket | test for pr11445 | #lang racket
(require 2htdp/batch-io)
(define file "batch-io2.txt")
(with-output-to-file file
(lambda ()
(display "hello")
(display #\return)
(display #\linefeed))
#:exists 'replace)
(require rackunit)
(check-equal? (read-lines "batch-io2.txt") '("hello"))
(when (file-exists? file)
(delete-file ... |
3a81f3164a9aadf1f59d145d5af9b01033624f91607cea0b09228fb76ae62684 | rescript-lang/rescript-compiler | js_null.mli | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later... | null | https://raw.githubusercontent.com/rescript-lang/rescript-compiler/c3fcc430360079546a6aabd2b2770303480f8486/jscomp/others/js_null.mli | ocaml | * Provides functionality for dealing with the `Js.null('a)` type
* Local alias for `Js.null('a)`
* Constructs a value of `Js.null('a)` containing a value of `'a`.
* Returns `true` if the given value is empty (`null`), `false` otherwise.
* The empty value, `null`
*
Maps `option('a)` to `Js.null('a)`.
`Some(a)` => `... | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later... |
83a5b38ef7972acb5d454b483f79ca344392e291f8188a5ec29818b162f01a36 | zikajk/pg_copycat | utils.clj | (ns pg-copycat.utils
(:require [clojure.java.shell :as shell]
[clojure.string :as string]
[babashka.fs :as fs]
[clojure.term.colors :as c]))
(defn zero-exit? [m]
(cond
(zero? (:exit m)) true
:else false))
(defn gcloud-auth? []
(zero-exit? (shell/sh "gclo... | null | https://raw.githubusercontent.com/zikajk/pg_copycat/6a6eb2ca8ef8b510de73636611a74691bc239755/src/pg_copycat/utils.clj | clojure | (ns pg-copycat.utils
(:require [clojure.java.shell :as shell]
[clojure.string :as string]
[babashka.fs :as fs]
[clojure.term.colors :as c]))
(defn zero-exit? [m]
(cond
(zero? (:exit m)) true
:else false))
(defn gcloud-auth? []
(zero-exit? (shell/sh "gclo... | |
b16fe84e272dd7604a84a1e0ebf047e4adce91ed6dabb641e8f6eab8b72aa4bf | guicho271828/alien | local-novelty.lisp |
(in-package :alien)
#|
novelty heuristics local to a plateau
|#
(in-compilation-phase ((not (or phase/packed-structs phase/full-compilation)))
(defun local-novelty1 (evaluator)
(push 'local-novelty1 *optional-features*)
(make-evaluator
:storage '(list 'local-novelty1)
:function `(lambda (state)... | null | https://raw.githubusercontent.com/guicho271828/alien/6987d034426b8928adf67f498dc6cb06fd7f923e/search-instance-dependent/local-novelty.lisp | lisp |
novelty heuristics local to a plateau
|
(in-package :alien)
(in-compilation-phase ((not (or phase/packed-structs phase/full-compilation)))
(defun local-novelty1 (evaluator)
(push 'local-novelty1 *optional-features*)
(make-evaluator
:storage '(list 'local-novelty1)
:function `(lambda (state)
(funcall (load-time-value (... |
85a6da021476b221883a963289e947240e3c6119e74de5ae7c9211d196ef8aad | gren-lang/compiler | Outline.hs | {-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
# OPTIONS_GHC -Wall #
module Gren.Outline
( Outline (..),
AppOutline (..),
PkgOutline (..),
Exposed (..),
SrcDir (..),
PossibleFilePath (..),
read,
write,
encode,
decoder,
defaultSummary,
flattenExposed,
to... | null | https://raw.githubusercontent.com/gren-lang/compiler/05366ca456a2376fe8fdd23e88c7e637760ebbd1/builder/src/Gren/Outline.hs | haskell | # LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
OUTLINE
HELPERS
WRITE
JSON DECODE
JSON DECODE HELPERS
EXPOSED MODULES DECODER
BINARY | # OPTIONS_GHC -Wall #
module Gren.Outline
( Outline (..),
AppOutline (..),
PkgOutline (..),
Exposed (..),
SrcDir (..),
PossibleFilePath (..),
read,
write,
encode,
decoder,
defaultSummary,
flattenExposed,
toAbsoluteSrcDir,
toGiven,
sourceDirs,
platform,
... |
9c21d39e6a6250ca70e2a00e74d2a9c032938a873f1049a07e279aaffb0b6d93 | kostmo/circleci-failure-tracker | PushWebhooks.hs | {-# LANGUAGE DeriveGeneric #-}
# LANGUAGE DuplicateRecordFields #
module PushWebhooks where
import Data.Aeson
import Data.Text.Lazy (Text)
import Data . Time ( UTCTime )
import GHC.Generics
-- | See API documentation:
-- /#pushevent
data GitHubPushEvent = GitHu... | null | https://raw.githubusercontent.com/kostmo/circleci-failure-tracker/393d10a72080bd527fdb159da6ebfea23fcd52d1/app/fetcher/src/PushWebhooks.hs | haskell | # LANGUAGE DeriveGeneric #
| See API documentation:
/#pushevent
^ XXX The documentation is *wrong*; the key name is "head_commit" not "head" | # LANGUAGE DuplicateRecordFields #
module PushWebhooks where
import Data.Aeson
import Data.Text.Lazy (Text)
import Data . Time ( UTCTime )
import GHC.Generics
data GitHubPushEvent = GitHubPushEvent {
ref :: Text
, before :: Text
, repository :: Re... |
98044848a13bd52a1558184bf096dbf235ce5e87dbb87aa40a99ce25f2aef753 | rmloveland/geiser-scsh | modules.scm | ;;; modules.scm -- module metadata
Copyright ( C ) 2009 , 2010 , 2011
Copyright ( C ) 2013 , 2014 Rich Loveland
;; This program is free software; you can redistribute it and/or
modify it under the terms of the Modified BSD License . You should
;; have received a copy of the license along with this program. ... | null | https://raw.githubusercontent.com/rmloveland/geiser-scsh/5f7358c39670305a3048388576977f8a43c8daaa/scheme/scsh/geiser/modules.scm | scheme | modules.scm -- module metadata
This program is free software; you can redistribute it and/or
have received a copy of the license along with this program. If
not, see <#5>.
++ Given a SYMBOL, and an optional argument that determines whether to
++ search all modules for the binding of SYMBOL, search for the
++ bindin... |
Copyright ( C ) 2009 , 2010 , 2011
Copyright ( C ) 2013 , 2014 Rich Loveland
modify it under the terms of the Modified BSD License . You should
(define (ge:module-name? module-name)
(and (symbol? module-name)
(list module-name)))
(define-syntax ge:symbol-module
(syntax-rules ()
((ge:symbol-... |
6b623a24bf17b55555ba818ee0ff55df6bf89abe679a93a0c2677429940c2c4c | GaloisInc/HaLVM | DomainInfo.hs | Copyright 2013 Galois , Inc.
This software is distributed under a standard , three - clause BSD license .
-- Please see the file LICENSE, distributed with this software, for specific
-- terms and conditions.
-- |Various pieces of useful information about the current domain.
module Hypervisor.DomainInfo(
Do... | null | https://raw.githubusercontent.com/GaloisInc/HaLVM/3ec1d7e4b6bcb91304ba2bfe8ee280cb1699f24d/src/HALVMCore/Hypervisor/DomainInfo.hs | haskell | Please see the file LICENSE, distributed with this software, for specific
terms and conditions.
|Various pieces of useful information about the current domain.
# SOURCE #
|A domain identifier
|A domain handle
|A security identifier
|The possible flags we might be passed at startup.
|This is a generic domain ide... | Copyright 2013 Galois , Inc.
This software is distributed under a standard , three - clause BSD license .
module Hypervisor.DomainInfo(
DomId
, DomainHandle
, newDomainHandle
, SID
#ifdef TESTING
, toSID
#endif
, VCPU
, fromDomId, toDomId
, fromVCPU, toVCPU
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.