_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 |
|---|---|---|---|---|---|---|---|---|
7db423687263bf5bd1254f40a0cc2a0faf317b656b3932b40244f24c62e572da | skanev/playground | 16.scm | SICP exercise 5.16
;
; Augment the simulator to provide for instruction tracing. That is, before
; each instruction is executed, the simulator should print the text of the
; instruction. Make the machine model accept trace-on and trace-off messages
; to turn tracing on and off.
; I will base this on the solution of ... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/05/16.scm | scheme |
Augment the simulator to provide for instruction tracing. That is, before
each instruction is executed, the simulator should print the text of the
instruction. Make the machine model accept trace-on and trace-off messages
to turn tracing on and off.
I will base this on the solution of the previous exercise, since... | SICP exercise 5.16
(define (make-new-machine)
(let ((pc (make-register 'pc))
(flag (make-register 'flag))
(stack (make-stack))
(the-instruction-sequence '())
(trace-proc (lambda (inst) (void)))
(tracing #f)
(instruction-count 0))
(let ((the-ops (list (list 'init... |
2965dcc9792f9d7353570333038e484caa3d3521b406fe8ce5a2b992139ebacc | mainej/re-stated | input.cljs | (ns examples.input
"Sample of tracking how a user has interacted with an input field."
(:require [examples.utils :as utils]
[re-frame.core :as re-frame]
[reagent.core :as reagent]
[mainej.re-stated :as state]))
(defn state-pristine? [{:keys [value initial-value]} _]
(= value i... | null | https://raw.githubusercontent.com/mainej/re-stated/a2334088ba8dd9e114f32ce55dcd000fd5d234d1/examples/src/examples/input.cljs | clojure | ever entered the input?
currently in the input?
ever left the input?
ever changed the input?
is the input's value the same as it was originally? | (ns examples.input
"Sample of tracking how a user has interacted with an input field."
(:require [examples.utils :as utils]
[re-frame.core :as re-frame]
[reagent.core :as reagent]
[mainej.re-stated :as state]))
(defn state-pristine? [{:keys [value initial-value]} _]
(= value i... |
6fb2a8a90505433bd130435345dfa837a147909574d666966b3b49def8910cfc | bbc/haskell-workshop | C2StartingOut.hs | module C2StartingOut where
-- To load in ghci: :load C2StartingOut.hs
-- Then you will be able to run all of these functions
Write a function to subtract two numbers
Example : sub 100 72 returns 28
sub x y = x - y
-- Write a function that calculates the area of a circle
Hint : Use pi from Prelude
Example : ... | null | https://raw.githubusercontent.com/bbc/haskell-workshop/475b9bac04167665030d7863798ccd27dfd589d0/matttaylor/exercises/src/C2StartingOut.hs | haskell | To load in ghci: :load C2StartingOut.hs
Then you will be able to run all of these functions
Write a function that calculates the area of a circle
element from a list using only head and tail
Example: getLetters 8 returns ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h']
Generate a palindrome from any input string (doesn't... | module C2StartingOut where
Write a function to subtract two numbers
Example : sub 100 72 returns 28
sub x y = x - y
Hint : Use pi from Prelude
Example : area 10 returns 314.1592653589793
area x = pi * x^2
Take two arguments and concatenate them together
Example : myConcat " hello " " Haskell " returns ... |
f09d3a04572cc9348a44849d460214ce9d0484df6e08d2d5c33798ea17f0909c | Simre1/haskell-game | Common.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE Rank2Types #-} -- For `forall` in projectLines
# LANGUAGE TypeFamilies #
module Test.Common where
import qualified System.Environment as Env
import Control.Concurrent (threadDelay)
import GHC.Float (double2Float)
import Control.Monad.Exception (MonadException)
import Control.... | null | https://raw.githubusercontent.com/Simre1/haskell-game/272a0674157aedc7b0e0ee00da8d3a464903dc67/GPipe-GLFW/Smoketests/src/Test/Common.hs | haskell | # LANGUAGE Rank2Types #
For `forall` in projectLines
red
green
blue
white
make mesh buffers
make projection matrix buffer
project points
write fragment depths and return frags
XXX: just adds the draw call to the end of the shader & glues some init functions together
eye: camera position in world coordinates
... | # LANGUAGE FlexibleContexts #
# LANGUAGE TypeFamilies #
module Test.Common where
import qualified System.Environment as Env
import Control.Concurrent (threadDelay)
import GHC.Float (double2Float)
import Control.Monad.Exception (MonadException)
import Control.Monad.IO.Class (MonadIO, liftIO)
import Data.Traversable (fo... |
1dde7d48ea970f2253b3572805943e9006c947e092d5c67c078cb960526b3993 | robert-strandh/SICL | enable-class-initialization.lisp | (cl:in-package #:sicl-boot-phase-3)
;;; The problem we solve with this code is that we create host classes
;;; using the host MAKE-INSTANCE function. Doing so will trigger that
;;; class-initialization protocol. Part of that protocol involves
;;; adding slot readers and slot writers to generic functions, and
;;; tho... | null | https://raw.githubusercontent.com/robert-strandh/SICL/6c380fd86cbbef034ea1c484344d36664490c8af/Code/Boot/Phase-3/enable-class-initialization.lisp | lisp | The problem we solve with this code is that we create host classes
using the host MAKE-INSTANCE function. Doing so will trigger that
class-initialization protocol. Part of that protocol involves
adding slot readers and slot writers to generic functions, and
those functions are determined by their names. As part... | (cl:in-package #:sicl-boot-phase-3)
generic functions are located in environment E3 . We solve the
INITIALIZE - INSTANCE . This : AROUND method first removes all
INITIALIZE - INSTANCE , which then prevents methods from being added
to host generic functions in the host global environment . Next ,
functi... |
866325a822aa53ea3029374cde19038a663c276bd024709c8d15b9962a56c66f | jakemcc/sicp-study | ex3_34.clj | Exercise 3.34
; Q.
; What is flawed about doing the following to make a squarer?
( defn squarer [ a b ]
; (multiplier a a b))
; A.
; You cannot backout what the value of a is given the value of b
; with the above setup. The multiplier constraint expects to see
two of its connectors with values to back out the... | null | https://raw.githubusercontent.com/jakemcc/sicp-study/3b9e3d6c8cc30ad92b0d9bbcbbbfe36a8413f89d/clojure/section3.3/src/ex3_34.clj | clojure | Q.
What is flawed about doing the following to make a squarer?
(multiplier a a b))
A.
You cannot backout what the value of a is given the value of b
with the above setup. The multiplier constraint expects to see | Exercise 3.34
( defn squarer [ a b ]
two of its connectors with values to back out the third . It was
not written to know if two of its connectors are the same . |
128c2300a32ea42638cdef8b6b1f080946942e4824a93346695e59f079933b46 | SquidDev/urn | method.lisp | (import core/base (defun defmacro let* with if when for for-pairs and or
unless values-list
get-idx set-idx! n print not car cdr else setmetatable
getmetatable list error gensym tostring const-val len#
= /= >= + - ..))
(import core/type (type k... | null | https://raw.githubusercontent.com/SquidDev/urn/6e6717cf1376b0950e569e3771cb7e287aed291d/lib/core/method.lisp | lisp | Even sillier: Instead of resolving to guarded.
The mixed syntax accepted by `define` is not allowed.
this is a bodged-together letrec
the implementation is new but the optimism is not | (import core/base (defun defmacro let* with if when for for-pairs and or
unless values-list
get-idx set-idx! n print not car cdr else setmetatable
getmetatable list error gensym tostring const-val len#
= /= >= + - ..))
(import core/type (type k... |
46a26f8473e443777734e98d138b470c9e90cf337c27645c79c7665017473513 | aantron/markup.ml | stream_io.ml | This file is part of Markup.ml , released under the MIT license . See
LICENSE.md for details , or visit .
LICENSE.md for details, or visit . *)
open Kstream
let state_fold f initial =
let state = ref initial in
(fun throw e k ->
f !state throw e (fun (c, new_state) ->
state := new_state; k c)... | null | https://raw.githubusercontent.com/aantron/markup.ml/9afbf57ac7ef10a03bece6cae677a151fa164666/src/stream_io.ml | ocaml | This file is part of Markup.ml , released under the MIT license . See
LICENSE.md for details , or visit .
LICENSE.md for details, or visit . *)
open Kstream
let state_fold f initial =
let state = ref initial in
(fun throw e k ->
f !state throw e (fun (c, new_state) ->
state := new_state; k c)... | |
e33ffcebcadf1f34a1637de4bed68ea5266a517edfffbdb400e79b311465d62d | enaeher/local-time-duration | duration.lisp | (in-package :ltd-tests)
(5am:test duration-equality
(5am:is (duration= (duration :day 1) (duration :hour 24))))
(5am:test duration-comparison
(5am:is (duration< (duration :day 1) (duration :hour 48)))
(5am:is (duration> (duration :day 1) (duration :hour 12))))
(5am:test duration-in-units
(5am:is (eql (durati... | null | https://raw.githubusercontent.com/enaeher/local-time-duration/fa20a4a03a1ee076eada649796e2f2345c930c21/tests/duration.lisp | lisp | (in-package :ltd-tests)
(5am:test duration-equality
(5am:is (duration= (duration :day 1) (duration :hour 24))))
(5am:test duration-comparison
(5am:is (duration< (duration :day 1) (duration :hour 48)))
(5am:is (duration> (duration :day 1) (duration :hour 12))))
(5am:test duration-in-units
(5am:is (eql (durati... | |
f4d3ce94a0cef30316034dd2f9e3ecad0740bcdf07e6413fb45e0745c8933ca0 | WormBase/wormbase_rest | widget.clj | (ns rest-api.classes.graphview.widget
(:require
[clojure.string :as str]
[datomic.api :as d]
[pseudoace.utils :as pace-utils]
[rest-api.db.main :refer [datomic-conn]]
[pseudoace.schema-datomic :as schema-datomic]
[rest-api.classes.generic-fields :as generic]
[rest-api.formatters.object :refer [pa... | null | https://raw.githubusercontent.com/WormBase/wormbase_rest/e51026f35b87d96260b62ddb5458a81ee911bf3a/src/rest_api/classes/graphview/widget.clj | clojure | (ns rest-api.classes.graphview.widget
(:require
[clojure.string :as str]
[datomic.api :as d]
[pseudoace.utils :as pace-utils]
[rest-api.db.main :refer [datomic-conn]]
[pseudoace.schema-datomic :as schema-datomic]
[rest-api.classes.generic-fields :as generic]
[rest-api.formatters.object :refer [pa... | |
29d2dde86f02731bbf780b7bd67cb5f6e2e58fde4c7814e906e21a98f28d0d72 | vindarel/ABStock | config-example.lisp | ;;
;; Configuration variables, loaded at startup.
;;
;; (in-package :abstock-user)
Enable the triple - quotes pythonic syntax .
;; Easier to write text with simple quotes.
(pythonic-string-reader:enable-pythonic-string-syntax)
(setf *port* 8989)
(setf *api-token* "your secret token")
(setf *contact-infos*
'(:|... | null | https://raw.githubusercontent.com/vindarel/ABStock/45acb11a4c687544db14f542aabdc27dd86f9884/config-example.lisp | lisp |
Configuration variables, loaded at startup.
(in-package :abstock-user)
Easier to write text with simple quotes.
SendGrid config:
Simple anti-script-kiddy question for the validation form:
Theme
Themes are defined in src/templates/themes/<yourtheme>/
"path/to/img.png"
Sélection du libraire.
mainly for the ... |
Enable the triple - quotes pythonic syntax .
(pythonic-string-reader:enable-pythonic-string-syntax)
(setf *port* 8989)
(setf *api-token* "your secret token")
(setf *contact-infos*
'(:|phone| "06 09 09 09 09"
:|phone2| "06 09 09 77 77"
:|email| ""))
(setf *email-config*
'(:|sender-api-key| "api-key"... |
a243ecd03176abc5754e9033fcf236d7ef48192744d57497060ac400e130c101 | Vaguery/klapaucius | boolean.clj | (ns push.type.item.boolean
; (:use push.type.item.generator)
(:require [push.instructions.dsl :as d]
[push.instructions.core :as i]
[push.instructions.aspects :as aspects]
[push.util.exotics :as exotics]
[push.type.core :as types]
... | null | https://raw.githubusercontent.com/Vaguery/klapaucius/17b55eb76feaa520a85d4df93597cccffe6bdba4/src/push/type/item/boolean.clj | clojure | (:use push.type.item.generator) | (ns push.type.item.boolean
(:require [push.instructions.dsl :as d]
[push.instructions.core :as i]
[push.instructions.aspects :as aspects]
[push.util.exotics :as exotics]
[push.type.core :as types]
))
(defn xor2 [p q] (or (and p (no... |
ec3bdda422cb2964361449686c122bc37852ffea090fd9694ecd7977208fc5c3 | smimram/funk | misc.mli | misc.mli [ part of the funk project ]
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* contents : miscellaneous utilities module interface
* copyright : ( C ) 2005 by the authors
* published under GPL ( see COPYING in root directory )
*************************************
... | null | https://raw.githubusercontent.com/smimram/funk/88328dd9087c9097b1bfe2cf5394ba99fa631934/src/kernel/mk/misc.mli | ocaml | process id type
free pid generation function | misc.mli [ part of the funk project ]
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* contents : miscellaneous utilities module interface
* copyright : ( C ) 2005 by the authors
* published under GPL ( see COPYING in root directory )
*************************************
... |
009e904174dd9a6e622268b3e2cbafa8b7ca65a9e234a1d461105f76bb18e12d | clklein/decompose-plug | examples.rkt | #lang racket/base
(require slideshow
redex
(only-in redex/private/reduction-semantics make-match)
racket/sandbox
framework
racket/gui/base
slideshow/code
"util.rkt"
"../2-models/double.rkt"
"../2-models/models.rkt")
(provide example flush-... | null | https://raw.githubusercontent.com/clklein/decompose-plug/5bb1acff487d055386c075581b395eb3cfdc12e9/pld-talk/examples.rkt | racket |
;;;
;;; ;;;; ;;; ;;; ;; ;;; ;; ;;; ;;; ;; ;... | #lang racket/base
(require slideshow
redex
(only-in redex/private/reduction-semantics make-match)
racket/sandbox
framework
racket/gui/base
slideshow/code
"util.rkt"
"../2-models/double.rkt"
"../2-models/models.rkt")
(provide example flush-... |
7aefe4866f612e0eef1ad509ef3954246dc40dae92afe5ad61f2bd553ced6043 | vernemq/vernemq | vmq_diversity_http.erl | Copyright 2018 Erlio GmbH Basel Switzerland ( )
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing, sof... | null | https://raw.githubusercontent.com/vernemq/vernemq/234d253250cb5371b97ebb588622076fdabc6a5f/apps/vmq_diversity/src/vmq_diversity_http.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright 2018 Erlio GmbH Basel Switzerland ( )
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(vmq_diversity_http).
-include_lib("luerl/include/luerl.hrl").
-export([install/1]).
-import(luerl_lib, [badarg_erro... |
76d59c94f36f01db55d88e9e25b1a35e7b383fa3ce66489f8099ebc3209ae4a6 | janestreet/bonsai | compose_message.ml | open! Core
open! Async_kernel
open! Bonsai_web
open Bonsai.Let_syntax
module Style =
[%css
stylesheet
{|
.compose {
display: flex;
flex-direction:row;
}
.compose button {
width:40px;
}
.compose input {
flex: 1;
}
|}]
let component ~send_message =
let%sub textbox... | null | https://raw.githubusercontent.com/janestreet/bonsai/782fecd000a1f97b143a3f24b76efec96e36a398/examples/rpc_chat/client/src/compose_message.ml | ocaml | open! Core
open! Async_kernel
open! Bonsai_web
open Bonsai.Let_syntax
module Style =
[%css
stylesheet
{|
.compose {
display: flex;
flex-direction:row;
}
.compose button {
width:40px;
}
.compose input {
flex: 1;
}
|}]
let component ~send_message =
let%sub textbox... | |
6ed4013956c27c7d1b7e031aa0d402af68d2e803df007960fd2cf468c5a64457 | rd--/hsc3 | Base.hs | -- | Common core functions.
module Sound.Sc3.Common.Base where
import Data.Char {- base -}
import Data.List {- base -}
import Data.Maybe {- base -}
import Data.Ord {- base -}
-- * Function
-- | Unary function.
type Fn1 a b = a -> b
-- | Binary function.
type Fn2 a b c = a -> b -> c
-- | Ternary function.
type Fn3 ... | null | https://raw.githubusercontent.com/rd--/hsc3/fd62c79b625dd3e4ef072919bee15e9c4a1b0d2a/Sound/Sc3/Common/Base.hs | haskell | | Common core functions.
base
base
base
base
* Function
| Unary function.
| Binary function.
| Ternary function.
| Quaternary function.
| 5-parameter function.
| 6-parameter function.
| 10-parameter function.
| 11-parameter function.
| Apply /f/ n times, ie. iterate f x !! n
* Functor
* Read
| Va... | module Sound.Sc3.Common.Base where
type Fn1 a b = a -> b
type Fn2 a b c = a -> b -> c
type Fn3 a b c d = a -> b -> c -> d
type Fn4 a b c d e = a -> b -> c -> d -> e
type Fn5 a b c d e f = a -> b -> c -> d -> e -> f
type Fn6 a b c d e f g = a -> b -> c -> d -> e -> f -> g
type Fn10 a b c d e f g h i j k = a -> ... |
3d4bd8a11adde70fd6b90f18e6c3fc35e1e15c6396fd5d2ec9bd37719b5c9744 | jgm/illuminate | Format.hs | module Text.Highlighting.Illuminate.Format
( Options(..)
, defaultOptions
, Style
, Styling(..)
, Color(..)
, colorful
, hscolour
, monochrome
, toANSI
, toLaTeX
, toXHtmlCSS
, toXHtmlInli... | null | https://raw.githubusercontent.com/jgm/illuminate/d576f5c786e686d775c8ad3c40eafd8354dc6e49/Text/Highlighting/Illuminate/Format.hs | haskell | ^ Highlighting style
^ Number lines?
^ Add anchor with number as ID to each line
| A Style is a generic instruction for formatting a token of the given
type. The same style can be used for various output formats (HTML,
Styles
| A colorful style.
| A style based on hscolour.
| A black and white style.
Colors
... | module Text.Highlighting.Illuminate.Format
( Options(..)
, defaultOptions
, Style
, Styling(..)
, Color(..)
, colorful
, hscolour
, monochrome
, toANSI
, toLaTeX
, toXHtmlCSS
, toXHtmlInli... |
f5eb9508ae07e39c3b74ce0ec63a186a83608298205bcc0771cd649254a553f3 | tisnik/clojure-examples | core.clj | rozhodovacích v
;
:
;
Řídicí struktury využitelné v
; -struktury-vyuzitelne-v-programovacim-jazyku-clojure/
Popsány a použity rozhodovací konstrukce
; ---------------------------------------------------------------------------------------------------------------------------------------------------... | null | https://raw.githubusercontent.com/tisnik/clojure-examples/984af4a3e20d994b4f4989678ee1330e409fdae3/conditions/src/conditions/core.clj | clojure |
-struktury-vyuzitelne-v-programovacim-jazyku-clojure/
--------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------... | rozhodovacích v
:
Řídicí struktury využitelné v
Popsány a použity rozhodovací konstrukce
| # | Konstrukce | Typ | |
| 1 | if | speciální forma | základní rozhodovací konstrukce , základ pro ... |
18a40dae64ccad24f5e0268679d667c80bb33714734ee48323005ae55d540dde | locusmath/locus | object.clj | (ns locus.set.tree.two-quiver.path.object
(:require [locus.set.logic.core.set :refer :all]
[locus.set.logic.limit.product :refer :all]
[locus.set.logic.sequence.object :refer :all]
[locus.set.logic.structure.protocols :refer :all]
[locus.set.mapping.general.core.object ... | null | https://raw.githubusercontent.com/locusmath/locus/fb6068bd78977b51fd3c5783545a5f9986e4235c/src/clojure/locus/set/tree/two_quiver/path/object.clj | clojure | Path quivers are the basis of partial magmoids, magmoids, categories and a number of other
Path quivers form their own topos.
Get the paths of a path quiver or other object of topos theory
Underlying multirelations for path quivers
categories, groupoids, and all other fundamental algebraic structures. In particula... | (ns locus.set.tree.two-quiver.path.object
(:require [locus.set.logic.core.set :refer :all]
[locus.set.logic.limit.product :refer :all]
[locus.set.logic.sequence.object :refer :all]
[locus.set.logic.structure.protocols :refer :all]
[locus.set.mapping.general.core.object ... |
64c3505f93277de26df6ca6d2081f77e9e1e6a2fa12284d7b6bb97dab8441ad1 | jaredly/reason-language-server | types.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/jaredly/reason-language-server/ce1b3f8ddb554b6498c2a83ea9c53a6bdf0b6081/ocaml_typing/402/types.ml | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
open Asttypes
type type_expr =
{ m... |
69a3cea3c307c6015cc30f75f4a023756b99dc51c288dcbbe5085a869d3cdee5 | tsoding/aoc-2019 | Intcode.hs | {-# LANGUAGE OverloadedStrings #-}
module Intcode where
import qualified Data.Text as T
import qualified Data.Text.IO as T
import Text.Printf
import Data.List
import Control.Exception
import Control.Monad
import Debug.Trace
import qualified Data.Map.Strict as M
import Data.Maybe
type Address = Integer
type Value = In... | null | https://raw.githubusercontent.com/tsoding/aoc-2019/bd186aa96558676a4380a465351b877dbaae261d/Intcode.hs | haskell | # LANGUAGE OverloadedStrings #
ABCDE
t = trace | module Intcode where
import qualified Data.Text as T
import qualified Data.Text.IO as T
import Text.Printf
import Data.List
import Control.Exception
import Control.Monad
import Debug.Trace
import qualified Data.Map.Strict as M
import Data.Maybe
type Address = Integer
type Value = Integer
type Memory = M.Map Address ... |
ef9c4d30401b24880a7bb1cc3c24804b48bc0853178e17f484a0967cfe2edca4 | tarcieri/reia | CodeServer.erl | %
CodeServer : Reia code loading and management service
Copyright ( C)2010
%
Redistribution is permitted under the MIT license . See LICENSE for details .
%
-module('CodeServer').
-behaviour(gen_server).
-record(state, {debug=true, paths=[]}).
-define(DEBUG(Msg, Args), (_={void, Msg, Args})).
-define(DEBUG(M... | null | https://raw.githubusercontent.com/tarcieri/reia/77b8b5603ae5d89a0d8fc0b3e179ef052260b5bf/src/core/CodeServer.erl | erlang |
Public API
gen_server callbacks
If the Reia code server crashes, we're horked. Fuck the system. | CodeServer : Reia code loading and management service
Copyright ( C)2010
Redistribution is permitted under the MIT license . See LICENSE for details .
-module('CodeServer').
-behaviour(gen_server).
-record(state, {debug=true, paths=[]}).
-define(DEBUG(Msg, Args), (_={void, Msg, Args})).
-define(DEBUG(Msg , ... |
34c6108f2268aac923d604c59c880fe6100026d3bfa70b8f7be8acb1c0d05c0d | Vetd-Inc/vetd-app | round_product_detail.cljs | (ns vetd-app.vendors.pages.round-product-detail
(:require [vetd-app.ui :as ui]
[vetd-app.util :as util]
[vetd-app.common.components :as cc]
[vetd-app.docs :as docs]
[reagent.core :as r]
[re-frame.core :as rf]
[re-com.core :as rc]))
(rf/reg-even... | null | https://raw.githubusercontent.com/Vetd-Inc/vetd-app/9b33b1443b9d84d39305a63fc58119f8e014cf11/src/cljs/app/vetd_app/vendors/pages/round_product_detail.cljs | clojure | TODO sort | (ns vetd-app.vendors.pages.round-product-detail
(:require [vetd-app.ui :as ui]
[vetd-app.util :as util]
[vetd-app.common.components :as cc]
[vetd-app.docs :as docs]
[reagent.core :as r]
[re-frame.core :as rf]
[re-com.core :as rc]))
(rf/reg-even... |
742707c1fe847909b10d777e73beda37aa436b98a73614aac14151ba88d97116 | jonase/eastwood | case.clj | (ns testcases.performance.green.case)
(defn foo [x]
(case (long x)
1 :one))
| null | https://raw.githubusercontent.com/jonase/eastwood/605ab4a1d169270701200005792fa37b4c025405/cases/testcases/performance/green/case.clj | clojure | (ns testcases.performance.green.case)
(defn foo [x]
(case (long x)
1 :one))
| |
5f01e475d23769429fb2524ea74b7e1a45d1c06c8cb5ac890fab1e38dcf40d89 | basho/stableboy | json2.erl | @author < >
2007 Mochi Media , Inc.
@doc Yet another JSON ( RFC 4627 ) library for Erlang . mochijson2 works
%% with binaries as strings, arrays as lists (without an {array, _})
wrapper and it only knows how to decode UTF-8 ( and ASCII ) .
%%
%% JSON terms are decoded as follows (javascript ... | null | https://raw.githubusercontent.com/basho/stableboy/fcb944872069a0994da0b288257acefe8256009a/src/json2.erl | erlang | with binaries as strings, arrays as lists (without an {array, _})
JSON terms are decoded as follows (javascript -> erlang):
<ul>
<li>{"key": "value"} ->
{struct, [{<<"key">>, <<"value">>}]}</li>
</li>
</ul>
<ul>
<li>Strings in JSON d... | @author < >
2007 Mochi Media , Inc.
@doc Yet another JSON ( RFC 4627 ) library for Erlang . mochijson2 works
wrapper and it only knows how to decode UTF-8 ( and ASCII ) .
< li>["array " , 123 , 12.34 , true , false , null ] - >
[ & lt;<"array " > > , 123 , 12.34 , true , f... |
36a0258d34785a08902a7fa034a4c0b34b7c8572267811c25962d9c38f5298c6 | michiakig/LispInSmallPieces | after.scm | $ Id$
;;;(((((((((((((((((((((((((((((((( L i S P ))))))))))))))))))))))))))))))))
;;; This file is part of the files that accompany the book:
LISP Implantation Semantique Programmation ( InterEditions , France )
By Christian Queinnec < >
;;; Newest version may be retrieved from:
( IP 128.93.2.54 ) ftp.... | null | https://raw.githubusercontent.com/michiakig/LispInSmallPieces/0a2762d539a5f4c7488fffe95722790ac475c2ea/tmp.si/after.scm | scheme | (((((((((((((((((((((((((((((((( L i S P ))))))))))))))))))))))))))))))))
This file is part of the files that accompany the book:
Newest version may be retrieved from:
Check the README file before using this file.
(((((((((((((((((((((((((((((((( L i S P ))))))))))))))))))))))))))))))))
This file uses some global v... | $ Id$
LISP Implantation Semantique Programmation ( InterEditions , France )
By Christian Queinnec < >
( IP 128.93.2.54 ) ftp.inria.fr : INRIA / Projects / icsla / Books / LiSP*.tar.gz
( run - application 400 " si / a.out " )
(set! fib fact)
89
(dynamic-let (x -34)
... |
08239671c883f40161071aec90dd991b15cbcf26c6553d335fc4282921c025aa | weyrick/roadsend-php | make-mhttpd-lib.scm | (module __make-mhttpd-lib
(import (micro-httpd "microhttpd.scm"))
(eval (export-all)) )
| null | https://raw.githubusercontent.com/weyrick/roadsend-php/d6301a897b1a02d7a85bdb915bea91d0991eb158/webconnect/micro/make-mhttpd-lib.scm | scheme | (module __make-mhttpd-lib
(import (micro-httpd "microhttpd.scm"))
(eval (export-all)) )
| |
e67e7572e77ed97a6c05be6568bc7e840afd4d2b6bc5c0dcc5fbcab80bb2777e | Glue42/gateway-modules | restrictions.cljc | (ns gateway.state.spec.restrictions
(:require [clojure.spec.alpha :as s]))
(s/def ::restrictions (s/or
::empty-restrictions nil?
::string-restrictions string?
::parsed-restrictions vector?))
| null | https://raw.githubusercontent.com/Glue42/gateway-modules/be48a132134b5f9f41fd6a6067800da6be5e6eca/common/src/gateway/state/spec/restrictions.cljc | clojure | (ns gateway.state.spec.restrictions
(:require [clojure.spec.alpha :as s]))
(s/def ::restrictions (s/or
::empty-restrictions nil?
::string-restrictions string?
::parsed-restrictions vector?))
| |
1e9c9ee086a3e68dddd4cdfd1a1b88e37823caf21d6156da138fbc2a701e2766 | racket/scribble | main.rkt | #lang racket/base
(define-syntax-rule (out)
(begin (require scribble/doclang)
(provide (all-from-out scribble/doclang))))
(out)
| null | https://raw.githubusercontent.com/racket/scribble/beb2d9834169665121d34b5f3195ddf252c3c998/scribble-lib/scribble/doc/main.rkt | racket | #lang racket/base
(define-syntax-rule (out)
(begin (require scribble/doclang)
(provide (all-from-out scribble/doclang))))
(out)
| |
4dad8cd8cbf9617d2876c2503ca2b74fdf02f0e37d6f9cfb04e2cce4c99e86fc | NorfairKing/validity | Operations.hs | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
-- | Properties of operations
module Test.Syd.Validity.Operations
( module Test.Syd.Validity.Operations.Associativity,
module Test.Syd.Validity.Operations.Commutativity,
module Test.Syd.Validity.Operations.Identity,
)
where
import Test.Sy... | null | https://raw.githubusercontent.com/NorfairKing/validity/35bc8d45b27e6c21429e4b681b16e46ccd541b3b/genvalidity-sydtest/src/Test/Syd/Validity/Operations.hs | haskell | | Properties of operations | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
module Test.Syd.Validity.Operations
( module Test.Syd.Validity.Operations.Associativity,
module Test.Syd.Validity.Operations.Commutativity,
module Test.Syd.Validity.Operations.Identity,
)
where
import Test.Syd.Validity.Operations.Associat... |
1c63e2ac848201d26aaf6d0493b865f981b43fd4a4d483fc210c87d662d2938b | rtoy/ansi-cl-tests | minus.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sun Aug 31 11:15:14 2003
;;;; Contains: Tests of the - function
(in-package :cl-test)
(compile-and-load "numbers-aux.lsp")
(deftest minus.error.1
(signals-error (-) program-error)
t)
Unary minus tests
(deftest minus.1
(loop for x in *numbers*
unl... | null | https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/minus.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of the - function
Test that explicit calls to macroexpand in subforms
are done in the correct environment
Binary minus tests
Float contagion
Complex subtraction
Test that explicit calls to macroexpand in subforms
are done in the correct environment | Author :
Created : Sun Aug 31 11:15:14 2003
(in-package :cl-test)
(compile-and-load "numbers-aux.lsp")
(deftest minus.error.1
(signals-error (-) program-error)
t)
Unary minus tests
(deftest minus.1
(loop for x in *numbers*
unless (eql (- (- x)) x)
collect x)
nil)
(deftest minus... |
61d63f9968a435c8557de27ca03ffc0d1eaaae8faab26712eceb2c803a6e5e12 | zotonic/zotonic | z_db.erl | @author < >
2009 - 2021
%% @doc Interface to database, uses database definition from Context
Copyright 2009 - 2021
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%... | null | https://raw.githubusercontent.com/zotonic/zotonic/057bc6dbeecfa7c76397e0e1918201d41595d551/apps/zotonic_core/src/db/z_db.erl | erlang | @doc Interface to database, uses database definition from Context
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or... | @author < >
2009 - 2021
Copyright 2009 - 2021
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(z_db).
-author("Marc Worrell <>").
-author("Arjan Scherpenisse <>").
-define(TIMEOUT, 30000).
-export([
... |
c910474e414b3cd4a83716864075db394151a17ac183d5c5a46646e25faa2251 | xclerc/ocamljava | rejectedExecutionHandler.ml |
* This file is part of library .
* Copyright ( C ) 2007 - 2015 .
*
* library is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation ; either version 3 of the License , or
* ( at yo... | null | https://raw.githubusercontent.com/xclerc/ocamljava/8330bfdfd01d0c348f2ba2f0f23d8f5a8f6015b1/library/concurrent/src/futures/rejectedExecutionHandler.ml | ocaml |
* This file is part of library .
* Copyright ( C ) 2007 - 2015 .
*
* library is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation ; either version 3 of the License , or
* ( at yo... | |
b83660da71e6fca22cb0daa3ca2f8531205be5c56724db260978393946139a94 | penpot/penpot | text_svg_position.cljs | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
;;
;; Copyright (c) KALEIDOS INC
(ns app.util.text-svg-position
(:require
[app.common.data :as d]
[app.common.data.macros :as dm]
[a... | null | https://raw.githubusercontent.com/penpot/penpot/c78cb89943080efc57ffdb57445d4372f25f2d4b/frontend/src/app/util/text_svg_position.cljs | clojure |
Copyright (c) KALEIDOS INC
We can get the font shorthand with the font-size + font-family | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(ns app.util.text-svg-position
(:require
[app.common.data :as d]
[app.common.data.macros :as dm]
[app.common.transit :as transit]
... |
c53106cce253c0e10e1dfd5c97ef893b6c7632055787bf70e23e03e2a55824ec | ghcjs/jsaddle-dom | URLSearchParams.hs | # LANGUAGE PatternSynonyms #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.URLSearchParams
(newURLSearchParams, append, delete, get, get_, getUnsafe,
getUnchecked, getAll, getAll_, h... | null | https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/URLSearchParams.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
| <-US/docs/Web/API/URLSearchParams.has Mozilla URLSearchParams.has documentation>
| <-US/docs/Web/API/URLSearchParams.has Mozilla URLSearchParams.has documentation> | # LANGUAGE PatternSynonyms #
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.URLSearchParams
(newURLSearchParams, append, delete, get, get_, getUnsafe,
getUnchecked, getAll, getAll_, has, has_, set, sort, toString,
toString_, URLSearchParams(..), gTypeURLSearchParams)
... |
247c0114c181d02be5db50ca3ffdf0b0cd99b66dc76bcd15f1fb87df9e17060c | ahri/eventdb | Main.hs | # LANGUAGE LambdaCase #
{-# LANGUAGE MultiWayIf #-}
# LANGUAGE ScopedTypeVariables #
module Main where
import Database.EventDB
import Control.Concurrent
import Control.Concurrent.STM
import Control.Monad
import qualified Data.ByteString.Lazy.Char8 as B
import Data.Monoid
import System.Environment
main :: IO ()
main... | null | https://raw.githubusercontent.com/ahri/eventdb/94a681abf01594779734bb60d79e23c230c6550a/app-mem-profile-file-read/Main.hs | haskell | # LANGUAGE MultiWayIf # | # LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
module Main where
import Database.EventDB
import Control.Concurrent
import Control.Concurrent.STM
import Control.Monad
import qualified Data.ByteString.Lazy.Char8 as B
import Data.Monoid
import System.Environment
main :: IO ()
main = do
(dir:_) <- getArgs... |
d2fb2e77aff7ee9d6d65f2a2d6aa5ff732f0a2703661a5422dd29acd9528c2b6 | danr/hipspec | ListsAndLambdas.hs | module ListsAndLambdas where
import Prelude ()
f . g = \x -> f (g x)
flip f = \x y -> f y x
foldr :: (a -> b -> b) -> b -> [a] -> b
foldr f z [] = z
foldr f z (x:xs) = f x (foldr f z xs)
unzip :: [(a,b)] -> ([a],[b])
unzip = foldr (\(a,b) (as,bs) -> (a:as,b:bs)) ([],[])
... | null | https://raw.githubusercontent.com/danr/hipspec/a114db84abd5fee8ce0b026abc5380da11147aa9/tfp1/tests/ListsAndLambdas.hs | haskell | module ListsAndLambdas where
import Prelude ()
f . g = \x -> f (g x)
flip f = \x y -> f y x
foldr :: (a -> b -> b) -> b -> [a] -> b
foldr f z [] = z
foldr f z (x:xs) = f x (foldr f z xs)
unzip :: [(a,b)] -> ([a],[b])
unzip = foldr (\(a,b) (as,bs) -> (a:as,b:bs)) ([],[])
... | |
b1c96eeab5295bcbbf9d37fca1660751fc986a9a084f6481c1459875c50eed7e | igorhvr/bedlam | memoize.scm | (require-extension (lib iasylum/srfi-89))
(require-extension (lib iasylum/match))
(module iasylum/memoize
(memoize)
(define (memoize func)
(let ((memoresults '()))
(lambda args
(let ((memoized-pair (assoc args memoresults)))
; for debugging:
... | null | https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/iasylum/memoize.scm | scheme | for debugging:
(if memoized-pair (begin (print memoized-pair) (cdr memoized-pair)) | (require-extension (lib iasylum/srfi-89))
(require-extension (lib iasylum/match))
(module iasylum/memoize
(memoize)
(define (memoize func)
(let ((memoresults '()))
(lambda args
(let ((memoized-pair (assoc args memoresults)))
(if memoized-pair (cdr memoized-pair)
(let ((th... |
cb9550af065abd8d8c1afc09101afe48c67064bab13af24da8de479bcc94da3e | pkpkpk/cljs-node-io | proc.cljs | (ns cljs-node-io.proc
"A thin wrapper over child_process"
(:require-macros [cljs.core.async.macros :refer [go go-loop]]
[cljs-node-io.macros :refer [goog-typedef]])
(:require [cljs.core.async :as casync :refer [put! take! chan pipe close! promise-chan]]
[cljs.core.async.impl.protoco... | null | https://raw.githubusercontent.com/pkpkpk/cljs-node-io/3e5b941a1758885d4952176de08b24964073b0af/src/main/cljs_node_io/proc.cljs | clojure | #child_process_child_process_spawn_command_args_options | (ns cljs-node-io.proc
"A thin wrapper over child_process"
(:require-macros [cljs.core.async.macros :refer [go go-loop]]
[cljs-node-io.macros :refer [goog-typedef]])
(:require [cljs.core.async :as casync :refer [put! take! chan pipe close! promise-chan]]
[cljs.core.async.impl.protoco... |
c7de9f611d358a6b4acdedcc1ebef1e796457c6c45e7574686b4a5b645e4b9c5 | techascent/tech.datatype | iterable_to_writer.clj | (ns tech.v2.datatype.writers.iterable-to-writer
(:require [tech.v2.datatype.casting :as casting]
[tech.v2.datatype.protocols :as dtype-proto]
[tech.v2.datatype.typecast :as typecast]))
(defmacro make-iterable-write-fn
[datatype]
`(fn [dst# src# unchecked?#]
(let [dst-writer# (... | null | https://raw.githubusercontent.com/techascent/tech.datatype/8cc83d771d9621d580fd5d4d0625005bd7ab0e0c/src/tech/v2/datatype/writers/iterable_to_writer.clj | clojure | (ns tech.v2.datatype.writers.iterable-to-writer
(:require [tech.v2.datatype.casting :as casting]
[tech.v2.datatype.protocols :as dtype-proto]
[tech.v2.datatype.typecast :as typecast]))
(defmacro make-iterable-write-fn
[datatype]
`(fn [dst# src# unchecked?#]
(let [dst-writer# (... | |
4ec3d61cad7c34d610f298f785e8b3d3d337a83e525238ce3595452628ea098c | ghcjs/ghcjs-dom | SVGPreserveAspectRatio.hs | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
module GHCJS.DOM.JSFFI.Generated.SVGPreserveAspectRatio
(pattern SVG_PRESERVEASPECTRATIO_UNKNOWN,
pattern SVG_PR... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/SVGPreserveAspectRatio.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
| <-US/docs/Web/API/SVGPreserveAspectRatio.meetOrSlice Mozilla SVGPreserveAspectRatio.meetOrSlice documentation>
| <-US/docs/Web/API/SVGPreserveAspectRatio.meetOrSlice Mozilla SVGPreserveAspectRatio.meetOrSlice documentation... | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
module GHCJS.DOM.JSFFI.Generated.SVGPreserveAspectRatio
(pattern SVG_PRESERVEASPECTRATIO_UNKNOWN,
pattern SVG_PRESERVEASPECTRATIO_NONE,
pattern SVG_PRESERVEASPECTRATIO_XMINYMIN,
pattern SVG_PRESE... |
c29f11f2c6a74ad39f1465897754e26fbdd73f069f21e64f5149655b611da401 | MinaProtocol/mina | step_branch_data.ml | open Core_kernel
open Pickles_types
open Hlist
open Common
open Import
(* The data obtained from "compiling" an inductive rule into a circuit. *)
type ( 'a_var
, 'a_value
, 'ret_var
, 'ret_value
, 'auxiliary_var
, 'auxiliary_value
, 'max_proofs_verified
, 'branches
, 'prev_vars
... | null | https://raw.githubusercontent.com/MinaProtocol/mina/8403887a428f56e91bfdf4187c6b8dc260e5424a/src/lib/pickles/step_branch_data.ml | ocaml | The data obtained from "compiling" an inductive rule into a circuit.
Compile an inductive rule. | open Core_kernel
open Pickles_types
open Hlist
open Common
open Import
type ( 'a_var
, 'a_value
, 'ret_var
, 'ret_value
, 'auxiliary_var
, 'auxiliary_value
, 'max_proofs_verified
, 'branches
, 'prev_vars
, 'prev_values
, 'local_widths
, 'local_heights )
t =
... |
05d59f0aaaefac9be402766b11bff6da44c077b3f723a5d1d16c470b3d7325cd | openbadgefactory/salava | admintool.cljs | (ns salava.admin.ui.admintool
(:require [reagent.core :refer [atom]]
[reagent-modals.modals :as m]
[clojure.string :refer [trim]]
[reagent.session :as session]
[salava.core.ui.ajax-utils :as ajax]
[salava.core.ui.helper :refer [path-for current-path]]
... | null | https://raw.githubusercontent.com/openbadgefactory/salava/97f05992406e4dcbe3c4bff75c04378d19606b61/src/cljs/salava/admin/ui/admintool.cljs | clojure | :id "buttons" | (ns salava.admin.ui.admintool
(:require [reagent.core :refer [atom]]
[reagent-modals.modals :as m]
[clojure.string :refer [trim]]
[reagent.session :as session]
[salava.core.ui.ajax-utils :as ajax]
[salava.core.ui.helper :refer [path-for current-path]]
... |
284228a18c15721f633fd92d5a976aa390c43b8be19cf23cc17415d65e4992ee | bryanhughes/proto-crudl | proto_crudl_parse.erl | %%%-------------------------------------------------------------------
@author
( C ) 2021 , < COMPANY >
%%% @doc
%%%
%%% @end
Created : 01 . Oct 2021 6:12 PM
%%%-------------------------------------------------------------------
-module(proto_crudl_parse).
-author("bryan").
%% API
-export([parse_query/3]).
-i... | null | https://raw.githubusercontent.com/bryanhughes/proto-crudl/5929eb0e44c0e3c11aa9a90b602ad3bf3e7fc9be/src/proto_crudl_parse.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API
Tests
The input
The column dict
The output
The input
The output
The input
The column dict
The output | @author
( C ) 2021 , < COMPANY >
Created : 01 . Oct 2021 6:12 PM
-module(proto_crudl_parse).
-author("bryan").
-export([parse_query/3]).
-include("proto_crudl.hrl").
-spec parse_query(RecordName :: string(), QueryIn :: string(), ColDict :: orddict:orddict()) ->
{ok, QueryOut :: string(), BindParams :: st... |
4ae1a14a6f6c0a28db1145bedf38a863dd1203f3f7c6f0ffa6cf519d00bfb9fb | day8/re-frame-10x | events.cljs | (ns todomvc.events
(:require
[todomvc.db :refer [default-db todos->local-store]]
[re-frame.core :refer [reg-event-db reg-event-fx inject-cofx path after]]
[cljs.spec.alpha :as s]
[day8.re-frame.tracing :refer-macros [fn-traced]]
[malli.generator :as mg]
[day8.re-frame-10x.inlined-deps.re-frame... | null | https://raw.githubusercontent.com/day8/re-frame-10x/7f5eb35c99d390870899c2483667977ff2755313/examples/todomvc/src/todomvc/events.cljs | clojure | -- Interceptors --------------------------------------------------------------
Interceptors are a more advanced topic. So, we're plunging into the deep
end here.
There is a tutorial on Interceptors in re-frame's `/docs`, but to get
you going fast, here's a very high level description ...
Every event handler ca... | (ns todomvc.events
(:require
[todomvc.db :refer [default-db todos->local-store]]
[re-frame.core :refer [reg-event-db reg-event-fx inject-cofx path after]]
[cljs.spec.alpha :as s]
[day8.re-frame.tracing :refer-macros [fn-traced]]
[malli.generator :as mg]
[day8.re-frame-10x.inlined-deps.re-frame... |
7ccc215b5253b7a90a83242d7dba388abefeb1ee52a69244e430fd0af81db15d | ghc/ghc | T22513h.hs | module T22513h where
class C a where
f :: a -> Bool
instance C (Maybe id) where
f (Just _) = True
f Nothing = False | null | https://raw.githubusercontent.com/ghc/ghc/083f701553852c4460159cd6deb2515d3373714d/testsuite/tests/rename/should_compile/T22513h.hs | haskell | module T22513h where
class C a where
f :: a -> Bool
instance C (Maybe id) where
f (Just _) = True
f Nothing = False | |
828c2838ad2ae66cc702fcdba6d79ba8e3a374c3b3a22a0b0ed99c0880894eda | helium/blockchain-core | blockchain_ledger_gateway_v2.erl | %%%-------------------------------------------------------------------
%% @doc
%% == Blockchain Ledger Gateway ==
%% @end
%%%-------------------------------------------------------------------
-module(blockchain_ledger_gateway_v2).
-include("blockchain_caps.hrl").
-export([
new/2, new/3, new/4,
owner_address/... | null | https://raw.githubusercontent.com/helium/blockchain-core/0caf2295d0576c0ef803258e834bf6ec3b3e74bc/src/ledger/v1/blockchain_ledger_gateway_v2.erl | erlang | -------------------------------------------------------------------
@doc
== Blockchain Ledger Gateway ==
@end
-------------------------------------------------------------------
sampled rssi histogram
most recent a hotspots witnessed this one
TODO: add time of flight histogram
------------------------------------... | -module(blockchain_ledger_gateway_v2).
-include("blockchain_caps.hrl").
-export([
new/2, new/3, new/4,
owner_address/1, owner_address/2,
location/1, location/2,
gain/1, gain/2,
elevation/1, elevation/2,
mode/1, mode/2,
last_location_nonce/1, last_location_nonce/2,
score/4,
version/... |
e3824234142ee3c97dc3c2bae06890ffc35930bd55f47f5e9ab2b7ef0447dcdf | arohner/spectrum | check_return_multiple_methods.clj | (ns spectrum.examples.bad.check-return
(:require [clojure.spec.alpha :as s]))
(s/fdef foo :args (s/cat :x integer? :y (s/? integer?)) :ret string?)
(defn foo
([x]
"foo")
([x y]
(+ x y)))
| null | https://raw.githubusercontent.com/arohner/spectrum/72b47a91a5ce4567eed547507d25b2528f48c2d1/test/spectrum/examples/bad/check_return_multiple_methods.clj | clojure | (ns spectrum.examples.bad.check-return
(:require [clojure.spec.alpha :as s]))
(s/fdef foo :args (s/cat :x integer? :y (s/? integer?)) :ret string?)
(defn foo
([x]
"foo")
([x y]
(+ x y)))
| |
4c053947a9134e2819e6dbfbcdf3eb52fd10807f46d92addfb7d3ce674f3f87f | soulomoon/SICP | Exercise 2.48.scm | Exercise 2.48 : A directed line segment in the plane can be represented as a pair of vectors — the vector running from the origin to the start - point of the segment , and the vector running from the origin to the end - point of the segment . Use your vector representation from Exercise 2.46 to define a representatio... | null | https://raw.githubusercontent.com/soulomoon/SICP/1c6cbf5ecf6397eaeb990738a938d48c193af1bb/Chapter2/Exercise%202.48.scm | scheme | memory limit : 128 MB .
start_segment:
end_segment:
> | Exercise 2.48 : A directed line segment in the plane can be represented as a pair of vectors — the vector running from the origin to the start - point of the segment , and the vector running from the origin to the end - point of the segment . Use your vector representation from Exercise 2.46 to define a representatio... |
2025df45fcd15dfaa4f2e51ef9e29e962f957c34ae00d274dffc9ede337b799a | 3b/3bgl-misc | extrude.lisp | (in-package #:glu-ttf-extrude)
(defclass extrude-tess (glu:tessellator)
each triangle is stored as 3 lists of 2 sb - cga : vec , position then normal
;; which will be optimized to reuse shared vertices in fill-buffers
((triangles :accessor triangles
:initform (make-array 1 :adjustable t :fill-point... | null | https://raw.githubusercontent.com/3b/3bgl-misc/e3bf2781d603feb6b44e5c4ec20f06225648ffd9/ttf/extrude.lisp | lisp | which will be optimized to reuse shared vertices in fill-buffers
should always be triangles since we have edge-flag
callback... ignore for now...
calculate face normals if we don't have a normal already
skip degenerate tris
should this normalize existing normals or rely on
caller to provide them normalized?
add... | (in-package #:glu-ttf-extrude)
(defclass extrude-tess (glu:tessellator)
each triangle is stored as 3 lists of 2 sb - cga : vec , position then normal
((triangles :accessor triangles
:initform (make-array 1 :adjustable t :fill-pointer 0))
(edge-flag :accessor edge-flag :initform nil)
(current-tr... |
194f342f6d2c9acb4cb5e2bafad940d387d9c4c48b9c0e8ce48eeef2669e7bea | wimvanderbauwhede/tytra | NDVec.hs | module NDVec where
import Prelude hiding (Foldable)
NDVec is a nested vector
data NDVec b = Vec [b] | MkNDVec [NDVec b] deriving (Ord,Eq,Show)
class Mappable v where
ndmap :: (a -> b) -> (v a) -> (v b)
instance Mappable NDVec where
ndmap f xs = case xs of
MkNDVec ys -> MkNDVec (map (\y -> ndmap f... | null | https://raw.githubusercontent.com/wimvanderbauwhede/tytra/6787f845a878e0b008bf966015ad6faca6cf0ec7/TyTra-CL/src/NDVec.hs | haskell | ndsplit [] v = v | module NDVec where
import Prelude hiding (Foldable)
NDVec is a nested vector
data NDVec b = Vec [b] | MkNDVec [NDVec b] deriving (Ord,Eq,Show)
class Mappable v where
ndmap :: (a -> b) -> (v a) -> (v b)
instance Mappable NDVec where
ndmap f xs = case xs of
MkNDVec ys -> MkNDVec (map (\y -> ndmap f... |
10224c952c8e8d3e83e087a9ba9594525d77077d88ed7980d619f97ef2859480 | grimmelm/littleton | program.mli | open Semantics
module Json = Yojson
module type PROGRAM = sig
(** An abstract type representing individual statements in the program *)
type statement [@@deriving sexp]
(** A program is a list of statements of abstract type *)
type t = statement list [@@deriving sexp]
(** A step is a single result after ... | null | https://raw.githubusercontent.com/grimmelm/littleton/efa8c90ae13b3965c81876723f6622f6d0319e80/lib/program.mli | ocaml | * An abstract type representing individual statements in the program
* A program is a list of statements of abstract type
* A step is a single result after a single statement has been executed
* A point is tuple of a program statement and step reached upon executing it
* The trace of a program is a list of points
... | open Semantics
module Json = Yojson
module type PROGRAM = sig
type statement [@@deriving sexp]
type t = statement list [@@deriving sexp]
type step [@@deriving sexp]
module Point : sig
type t = (statement * step)
val statement : t -> statement
val step : t -> step
val to_json : t -> Json.t
... |
2dd179ce43ed2609a958bd13fc812ce98642cf06a00b2d76c0509bfc3afb8062 | robrix/starlight | Histogram.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE TypeFamilies #
module Stochastic.Histogram
( histogram
, histogram2
, sparkify
, sparkify2
, printHistogram
, printHistogram2
) where
import Control.Effect.Lift
import Control.Lens (ix, (&), (+~), (^.))
import Control.Monad (replicateM)
import ... | null | https://raw.githubusercontent.com/robrix/starlight/ad80ab74dc2eedbb52a75ac8ce507661d32f488e/src/Stochastic/Histogram.hs | haskell | # LANGUAGE FlexibleContexts #
# LANGUAGE TypeFamilies #
module Stochastic.Histogram
( histogram
, histogram2
, sparkify
, sparkify2
, printHistogram
, printHistogram2
) where
import Control.Effect.Lift
import Control.Lens (ix, (&), (+~), (^.))
import Control.Monad (replicateM)
import ... | |
8f9763aff76bebc3b66a9c8d06a784b54aa039b8c6df7ad91f677de2357a48e1 | camllight/camllight | ouster-f16.14.ml | #open"tk";;
let top = OpenTk () in
let m = menu__create top [] in
let bold = textvariable__new()
and italic = textvariable__new()
and underline = textvariable__new() in
menu__add_checkbutton m [Label "Bold"; Variable bold];
menu__add_checkbutton m [Label "Italic"; Variable italic];
menu__add_check... | null | https://raw.githubusercontent.com/camllight/camllight/0cc537de0846393322058dbb26449427bfc76786/sources/contrib/camltk/books-examples/ouster-f16.14.ml | ocaml | #open"tk";;
let top = OpenTk () in
let m = menu__create top [] in
let bold = textvariable__new()
and italic = textvariable__new()
and underline = textvariable__new() in
menu__add_checkbutton m [Label "Bold"; Variable bold];
menu__add_checkbutton m [Label "Italic"; Variable italic];
menu__add_check... | |
24b9266874b1595d6649ded8a798b356c5b5cedd22fa48892969b5c68d0c180a | zarkone/stumpwm.d | keys.lisp | (in-package :stumpwm)
(defvar *terminal* "gnome-terminal"
"Command to start a terminal.")
(defcommand exec-term (cmd) (:string)
(run-commands (format nil "exec ~A -x ~A" *terminal* cmd)))
(defcommand void-cmd () () nil)
(define-key *root-map* (kbd "RET")
(format nil "exec ~A" *terminal*))
(define-key *root-m... | null | https://raw.githubusercontent.com/zarkone/stumpwm.d/021e51c98a80783df1345826ac9390b44a7d0aae/keys.lisp | lisp | execute apps map
some control commands | (in-package :stumpwm)
(defvar *terminal* "gnome-terminal"
"Command to start a terminal.")
(defcommand exec-term (cmd) (:string)
(run-commands (format nil "exec ~A -x ~A" *terminal* cmd)))
(defcommand void-cmd () () nil)
(define-key *root-map* (kbd "RET")
(format nil "exec ~A" *terminal*))
(define-key *root-m... |
5c81fe5bf9e258062fb5f58879e998a03edd14712ebee1c0514c699e16f0119f | flavioc/cl-hurd | checkdirmod.lisp |
(in-package :hurd)
(defmethod can-modify-dir-p ((dir stat) (user iouser))
"Check if user can write on directory dir."
(has-access-p dir user :write))
| null | https://raw.githubusercontent.com/flavioc/cl-hurd/982232f47d1a0ff4df5fde2edad03b9df871470a/hurd/fshelp/checkdirmod.lisp | lisp |
(in-package :hurd)
(defmethod can-modify-dir-p ((dir stat) (user iouser))
"Check if user can write on directory dir."
(has-access-p dir user :write))
| |
83c11a64934741a34d9acef2bec89e8659bd2c8762dad0d4a489bca73e7fcb57 | schmidt73/guidescan-web | parsing_test.clj | (ns guidescan-web.query.parsing-test
(:require [clojure.test :refer :all]
[clojure.java.io :as io]
[guidescan-web.mock :as mock]
[failjure.core :as f]
[guidescan-web.query.parsing :as query-parsing]))
(def good-text-query
{:params {:query-text "chrIV:911770-916325\nc... | null | https://raw.githubusercontent.com/schmidt73/guidescan-web/130f189c88aadcce7a2d857943d16be54f789059/test/guidescan_web/query/parsing_test.clj | clojure | (ns guidescan-web.query.parsing-test
(:require [clojure.test :refer :all]
[clojure.java.io :as io]
[guidescan-web.mock :as mock]
[failjure.core :as f]
[guidescan-web.query.parsing :as query-parsing]))
(def good-text-query
{:params {:query-text "chrIV:911770-916325\nc... | |
e8415a4565ce557f57dedcb6b6d90e39969da0f55b114fbad6fa468c0ec346de | sergv/emacs-module | Class.hs | ----------------------------------------------------------------------------
-- |
Module : Emacs . Module . . Class
Copyright : ( c ) 2018
-- License : Apache-2.0 (see LICENSE)
-- Maintainer :
----------------------------------------------------------------------------
{-# LANGUAGE DataKind... | null | https://raw.githubusercontent.com/sergv/emacs-module/bca0ee4271dccf4c4fe13b38ae5edec2009b8ded/src/Emacs/Module/Monad/Class.hs | haskell | --------------------------------------------------------------------------
|
License : Apache-2.0 (see LICENSE)
Maintainer :
--------------------------------------------------------------------------
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE ImportQualifiedPost #
#... | Module : Emacs . Module . . Class
Copyright : ( c ) 2018
# LANGUAGE FunctionalDependencies #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
module Emacs.Module.Monad.Class
( EmacsFunction
, MonadEmacs(..)
) where
import Control... |
e30bb4e895625f56c8b65c9ec9510946d94e8384a2c73376808dd2a63d5c485f | fukamachi/clozure-cl | streams.lisp | -*-Mode : LISP ; Package : CCL -*-
;;;
Copyright ( C ) 2009 Clozure Associates
Copyright ( C ) 1994 - 2001 Digitool , Inc
This file is part of Clozure CL .
;;;
Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
License , known as the LLGPL and distributed with Clozure CL as the
;... | null | https://raw.githubusercontent.com/fukamachi/clozure-cl/4b0c69452386ae57b08984ed815d9b50b4bcc8a2/lib/streams.lisp | lisp | Package : CCL -*-
file "LICENSE". The LLGPL consists of a preamble and the LGPL,
conflict, the preamble takes precedence.
Clozure CL is referenced in the preamble as the "LIBRARY."
The LLGPL is also available online at
streams.lisp
General io-functions
OUTPUT STREAMS
General stream functions
... | Copyright ( C ) 2009 Clozure Associates
Copyright ( C ) 1994 - 2001 Digitool , Inc
This file is part of Clozure CL .
Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
License , known as the LLGPL and distributed with Clozure CL as the
which is distributed with Clozure CL as ... |
4a73f48104c9ccfbce12fa7c4c85e908983e80fb7c199cb6fc2fb38fe89a14a9 | unison-code/uni-instr-sel | PrettyShow.hs | |
Copyright : Copyright ( c ) 2012 - 2017 , < >
License : BSD3 ( see the LICENSE file )
Maintainer :
Copyright : Copyright (c) 2012-2017, Gabriel Hjort Blindell <>
License : BSD3 (see the LICENSE file)
Maintainer :
-}
Main authors :
< >
Main authors:
Gabriel Hjort ... | null | https://raw.githubusercontent.com/unison-code/uni-instr-sel/2edb2f3399ea43e75f33706261bd6b93bedc6762/hlib/instr-sel/Language/InstrSel/PrettyShow.hs | haskell | |
Copyright : Copyright ( c ) 2012 - 2017 , < >
License : BSD3 ( see the LICENSE file )
Maintainer :
Copyright : Copyright (c) 2012-2017, Gabriel Hjort Blindell <>
License : BSD3 (see the LICENSE file)
Maintainer :
-}
Main authors :
< >
Main authors:
Gabriel Hjort ... | |
85c145b9c2ddee7bc90ecc0ce133749eda05aa0aeb467fd21853cd1d4e06ac01 | jrh13/hol-light | induction.ml | (******************************************************************************)
(* FILE : induction.ml *)
(* DESCRIPTION : Induction. *)
(* ... | null | https://raw.githubusercontent.com/jrh13/hol-light/d125b0ae73e546a63ed458a7891f4e14ae0409e2/Boyer_Moore/induction.ml | ocaml | ****************************************************************************
FILE : induction.ml
DESCRIPTION : Induction.
READS FILES... | AUTHOR : R.J.Boulton
DATE : 26th June 1991
LAST MODIFIED : ( University of Edinburgh )
DATE : 2008
let (CONV_OF_RCONV... |
7eb37da591f51f0d102413651c7e9b63ccd2528650bf672d51e35dee0de0da1d | raffy2010/grand-slam | video_list.cljs | (ns ui.component.video-list
(:require [ui.state :refer [active-files]]
[ui.utils.common :refer [component-uid]]
[ui.component.video-item :refer [video-item]]))
(defn video-list
[]
[:div
(for [file (vals @active-files)]
^{:key (:id file)}
[video-item file])])
| null | https://raw.githubusercontent.com/raffy2010/grand-slam/752984d606f4e201b305c6ac931dd0d03a12f4b4/ui_src/ui/component/video_list.cljs | clojure | (ns ui.component.video-list
(:require [ui.state :refer [active-files]]
[ui.utils.common :refer [component-uid]]
[ui.component.video-item :refer [video-item]]))
(defn video-list
[]
[:div
(for [file (vals @active-files)]
^{:key (:id file)}
[video-item file])])
| |
bf5afcd4632ca5c9111491dd17aa8ef37761383540c424928262237e04f456c9 | liqula/react-hs | Main.hs | # LANGUAGE DataKinds , OverloadedStrings , TypeApplications , TypeFamilies #
module Main (main) where
import React.Flux
( StoreAction, StoreArg, StoreData, View, action, mkControllerView
, reactRenderView, registerInitialStore, transform, view_
)
import Base
import Init
import State
import View
main :: ... | null | https://raw.githubusercontent.com/liqula/react-hs/204c96ee3514b5ddec65378d37872266b05e8954/react-hs-examples/redux/src/Main.hs | haskell | # LANGUAGE DataKinds , OverloadedStrings , TypeApplications , TypeFamilies #
module Main (main) where
import React.Flux
( StoreAction, StoreArg, StoreData, View, action, mkControllerView
, reactRenderView, registerInitialStore, transform, view_
)
import Base
import Init
import State
import View
main :: ... | |
0524417b3c192f9d936a3e07139c0eb7b553a37c827641bd6e9015f539504ee1 | byorgey/diagrams-play | StarsOfTheMindsSky.hs | # LANGUAGE NoMonomorphismRestriction #
-- Based on -of-the-minds-sky/
import Control.Arrow ((***))
import Data.Colour.SRGB
import Diagrams.Backend.Cairo.CmdLine
import Diagrams.Prelude
orbits :: Int -> (Diagram Cairo R2, Diagram Cairo R2)
orbits n = (stars n, ... | null | https://raw.githubusercontent.com/byorgey/diagrams-play/5362c715db394be6848ff5de1bbe71178e5f173f/StarsOfTheMindsSky.hs | haskell | Based on -of-the-minds-sky/ | # LANGUAGE NoMonomorphismRestriction #
import Control.Arrow ((***))
import Data.Colour.SRGB
import Diagrams.Backend.Cairo.CmdLine
import Diagrams.Prelude
orbits :: Int -> (Diagram Cairo R2, Diagram Cairo R2)
orbits n = (stars n, circle (fromIntegral n - 1) # l... |
980a3d37c94a6030004f35c80315e34eab56ef03b85e757ae4b2315c5ba21bcd | evturn/haskellbook | chapter-exercises.hs | -- Source
z = 7
-- y = z + 8
x = y ^ 2
waxOn = x * 5
-- REPL safe
let z = 7
-- let y = z + 8
let x = y ^ 2
waxOn = x * 5
-- where clause
waxOn = x * 5
where z = 7
y = z + 8
x = y ^ 2
triple x = x * 3
waxOff x = triple x | null | https://raw.githubusercontent.com/evturn/haskellbook/3d310d0ddd4221ffc5b9fd7ec6476b2a0731274a/02/chapter-exercises.hs | haskell | Source
y = z + 8
REPL safe
let y = z + 8
where clause | z = 7
x = y ^ 2
waxOn = x * 5
let z = 7
let x = y ^ 2
waxOn = x * 5
waxOn = x * 5
where z = 7
y = z + 8
x = y ^ 2
triple x = x * 3
waxOff x = triple x |
3640a27be16bb5a7ae566d00f67c2bade685be8260ce9e62001469ec0fc87339 | PrecursorApp/precursor | email_landing.clj | (ns pc.views.email-landing
(:require [cheshire.core :as json]
[hiccup.core :as h]
[pc.views.common :refer (cdn-path)]
[pc.views.scripts :as scripts]
[pc.profile :refer (prod-assets?)]))
(def template->gif-url
{"simple-tools" "/email/simple-tools.gif"
"team-ch... | null | https://raw.githubusercontent.com/PrecursorApp/precursor/30202e40365f6883c4767e423d6299f0d13dc528/src/pc/views/email_landing.clj | clojure | (ns pc.views.email-landing
(:require [cheshire.core :as json]
[hiccup.core :as h]
[pc.views.common :refer (cdn-path)]
[pc.views.scripts :as scripts]
[pc.profile :refer (prod-assets?)]))
(def template->gif-url
{"simple-tools" "/email/simple-tools.gif"
"team-ch... | |
6717c80e5530d3bfaab82a8a962272be1cb92d71033644a2e2722824f69a8111 | coingaming/lnd-client | GetInfo.hs | # LANGUAGE FlexibleContexts #
module LndClient.Data.GetInfo
( GetInfoResponse (..),
)
where
import LndClient.Import
import qualified Proto.Lightning as LnGRPC
import qualified Proto.Lightning_Fields as LnGRPC
data GetInfoResponse = GetInfoResponse
{ identityPubkey :: NodePubKey,
syncedToChain :: Bool,
... | null | https://raw.githubusercontent.com/coingaming/lnd-client/98974c514cd82253dbd6111bafbbb2bbff6bffe2/src/LndClient/Data/GetInfo.hs | haskell | # LANGUAGE FlexibleContexts #
module LndClient.Data.GetInfo
( GetInfoResponse (..),
)
where
import LndClient.Import
import qualified Proto.Lightning as LnGRPC
import qualified Proto.Lightning_Fields as LnGRPC
data GetInfoResponse = GetInfoResponse
{ identityPubkey :: NodePubKey,
syncedToChain :: Bool,
... | |
fe42505f39c9a8fb3434d5bdc58ab0169a7f9901c8076502a7d17da75cc350b5 | wingo/racket-jpeg | main.rkt | #lang racket
guile - jpeg
Copyright ( C ) 2014 < wingo at pobox dot com >
;; This library is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 3 of the License , or ( at
;; your option) any l... | null | https://raw.githubusercontent.com/wingo/racket-jpeg/0734c7150f8d174668476c1b84f3a6147fc84913/main.rkt | racket | This library is free software; you can redistribute it and/or modify
either version 3 of the License , or ( at
your option) any later version.
This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR... | #lang racket
guile - jpeg
Copyright ( C ) 2014 < wingo at pobox dot com >
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
A parser for JPEG .
(provide jpeg-dimensions
jpeg-dimensions-and-exif
jpeg->rg... |
e28b78ab18548908d3db74ad4b41107b5825965bb1bcda7b8e4c66cc0363456c | jarohen/advent-of-code | day5.clj | (ns aoc2020.day5
(:require [aoc2020.util :as util]
[clojure.test :as t]))
(do
(defn decode [chs hi]
(reduce (fn [acc el]
(cond-> (bit-shift-left acc 1)
(= el hi) inc))
0
chs))
(defn parse-seat [s]
(let [[row col] (split-at 7 s)]
[(d... | null | https://raw.githubusercontent.com/jarohen/advent-of-code/3fa1d87a539fb9163b05b732973bbd415dd21312/2020/src/aoc2020/day5.clj | clojure | (ns aoc2020.day5
(:require [aoc2020.util :as util]
[clojure.test :as t]))
(do
(defn decode [chs hi]
(reduce (fn [acc el]
(cond-> (bit-shift-left acc 1)
(= el hi) inc))
0
chs))
(defn parse-seat [s]
(let [[row col] (split-at 7 s)]
[(d... | |
36a53a62af60703e70d37d0aeffe9a5ca0a0b95dac5301715feddd360bcfdf73 | caribou/caribou-core | position.clj | (ns caribou.field.position
(:require [caribou.field :as field]
[caribou.db :as db]
[caribou.validation :as validation]
[caribou.util :as util]
[caribou.field.integer :as int]))
(defn position-update-values
[field content values original]
(let [slug (-> field :row :... | null | https://raw.githubusercontent.com/caribou/caribou-core/6ebd9db4e14cddb1d6b4e152e771e016fa9c55f6/src/caribou/field/position.clj | clojure | (ns caribou.field.position
(:require [caribou.field :as field]
[caribou.db :as db]
[caribou.validation :as validation]
[caribou.util :as util]
[caribou.field.integer :as int]))
(defn position-update-values
[field content values original]
(let [slug (-> field :row :... | |
cb680b51b7910c5fe7386badb131427642a7d23e7f81425d4e6ca0641e5e83e7 | planetfederal/signal | http.clj | Copyright 2016 - 2018 Boundless ,
;;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;; -2.0
;;
;; Unless required by applicable law or agreed to in writing, software
distribute... | null | https://raw.githubusercontent.com/planetfederal/signal/e3eae56c753f0a56614ba8522278057ab2358c96/src/signal/io/http.clj | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permiss... | Copyright 2016 - 2018 Boundless ,
distributed under the License is distributed on an " AS IS " BASIS ,
(ns signal.io.http
(:require [clj-http.client :as http]
[xy.geojson :as geojson]
[signal.io.protocol :as io-proto]
[clojure.tools.logging :as log]))
(def identifier "http")... |
25f3f5eed77e0b69e706079354bba5e6a1435291ccf2dcecfef3b20c02c57f05 | csabahruska/jhc-components | Eval.hs | module E.Eval(eval, strong) where
-- Simple lambda Calculus interpreter
-- does not handle recursive Let or Case statements, but those don't appear in types anyway.
import Data.Monoid
import qualified Data.Map as Map
--import Debug.Trace
import Doc.DocLike
import Doc.PPrint
import E.E
import E.Subst
import Name.Id
i... | null | https://raw.githubusercontent.com/csabahruska/jhc-components/a7dace481d017f5a83fbfc062bdd2d099133adf1/jhc-core/src/E/Eval.hs | haskell | Simple lambda Calculus interpreter
does not handle recursive Let or Case statements, but those don't appear in types anyway.
import Debug.Trace
# SOURCE #
final terms
argument applications
fudge
currently we do not do eta check. etas should only appear for good reason.
fudge
currently we do not do eta check. et... | module E.Eval(eval, strong) where
import Data.Monoid
import qualified Data.Map as Map
import Doc.DocLike
import Doc.PPrint
import E.E
import E.Subst
import Name.Id
trace _ x = x
evaluate to WHNF
eval :: E -> E
eval term = eval' term [] where
eval' t@EVar {} [] = t
eval' (ELam v body) [] = check_eta $ EL... |
843ce0f878a1e92bdd56a8900ffea6786a7b299dd9b3df72ae927561f258c91b | cedlemo/OCaml-GI-ctypes-bindings-generator | Revealer.ml | open Ctypes
open Foreign
type t = unit ptr
let t_typ : t typ = ptr void
let create =
foreign "gtk_revealer_new" (void @-> returning (ptr Widget.t_typ))
let get_child_revealed =
foreign "gtk_revealer_get_child_revealed" (t_typ @-> returning (bool))
let get_reveal_child =
foreign "gtk_revealer_get_reveal_child" (... | null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Revealer.ml | ocaml | open Ctypes
open Foreign
type t = unit ptr
let t_typ : t typ = ptr void
let create =
foreign "gtk_revealer_new" (void @-> returning (ptr Widget.t_typ))
let get_child_revealed =
foreign "gtk_revealer_get_child_revealed" (t_typ @-> returning (bool))
let get_reveal_child =
foreign "gtk_revealer_get_reveal_child" (... | |
0f41d7a50db5ef675ae75ec95c9b8dea7c1dd2895389d336197e1d65371b148b | Clojure2D/clojure2d-examples | hittable.clj | (ns rt4.the-next-week.ch05b.hittable
(:require [fastmath.core :as m]
[fastmath.vector :as v]))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(m/use-primitive-operators)
(defprotocol HittableProto
(hit [object r ray-t]))
(defrecord HitData [p normal mat ^double t u v front-fa... | null | https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/ead92d6f17744b91070e6308157364ad4eab8a1b/src/rt4/the_next_week/ch05b/hittable.clj | clojure | (ns rt4.the-next-week.ch05b.hittable
(:require [fastmath.core :as m]
[fastmath.vector :as v]))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(m/use-primitive-operators)
(defprotocol HittableProto
(hit [object r ray-t]))
(defrecord HitData [p normal mat ^double t u v front-fa... | |
7632806dc4ef63f9e67d490085899327a81fccfe129bcbbb5cc2d4deac7e4a5f | stan-dev/stanc3 | Pretty_printing.mli | val pp_expression : Format.formatter -> Ast.untyped_expression -> unit
val pp_typed_expression : Format.formatter -> Ast.typed_expression -> unit
val pretty_print_program :
?bare_functions:bool
-> ?line_length:int
-> ?inline_includes:bool
-> Ast.untyped_program
-> string
val pretty_print_typed_program :
... | null | https://raw.githubusercontent.com/stan-dev/stanc3/3043ac3807c652255a42b4cc855ab5375204d9fd/src/frontend/Pretty_printing.mli | ocaml | val pp_expression : Format.formatter -> Ast.untyped_expression -> unit
val pp_typed_expression : Format.formatter -> Ast.typed_expression -> unit
val pretty_print_program :
?bare_functions:bool
-> ?line_length:int
-> ?inline_includes:bool
-> Ast.untyped_program
-> string
val pretty_print_typed_program :
... | |
7026966a0b13ca7f9089921c8e298d887ca4a7ac921fea3680cf2c84623ba9c9 | nikodemus/raylisp | sky-sphere.lisp | by Nikodemus Siivola < > , 2009 .
;;;;
;;;; Permission is hereby granted, free of charge, to any person
;;;; obtaining a copy of this software and associated documentation files
( the " Software " ) , to deal in the Software without restriction ,
;;;; including without limitation the rights to use, copy, modify, m... | null | https://raw.githubusercontent.com/nikodemus/raylisp/f79f61c6df283baad265dfdc207d798b63ca19a9/shaders/sky-sphere.lisp | lisp |
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
including without limitation the rights to use, copy, modify, merge,
subject to the following conditions:
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
IN NO EVEN... | by Nikodemus Siivola < > , 2009 .
( the " Software " ) , to deal in the Software without restriction ,
publish , distribute , sublicense , and/or sell copies of the Software ,
and to permit persons to whom the Software is furnished to do so ,
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ... |
511a94e8ea8e46e56c3bd0e09f2f37216f374aa702cb2e2215f7ccecd12d07d3 | acl2/acl2 | good-atom-listp@useless-runes.lsp | (GOOD-ATOM-LISTP-OF-CONS
(24 24 (:REWRITE DEFAULT-CDR))
(24 24 (:REWRITE DEFAULT-CAR))
(8 8 (:REWRITE RATIONALP-IMPLIES-ACL2-NUMBERP))
)
| null | https://raw.githubusercontent.com/acl2/acl2/f64742cc6d41c35f9d3f94e154cd5fd409105d34/books/kestrel/std/system/.sys/good-atom-listp%40useless-runes.lsp | lisp | (GOOD-ATOM-LISTP-OF-CONS
(24 24 (:REWRITE DEFAULT-CDR))
(24 24 (:REWRITE DEFAULT-CAR))
(8 8 (:REWRITE RATIONALP-IMPLIES-ACL2-NUMBERP))
)
| |
010262c4af10af32ec33b2cbb0d933c9be691b41c09f779ecc73f4a095fe250d | antoniogarrote/jobim | zeromq.clj | (ns jobim.services.messaging.zeromq
(:use [jobim.core])
(:use [jobim.definitions]))
(defonce *node-messaging-zeromq-znode* "/jobim/messaging/zeromq")
;; ZeroMQ implementation of the messaging service
;;(declare zk-zeromq-node)
(defn node-to-zeromq-socket
([node node-map]
(if (nil? (get @node-map node))
... | null | https://raw.githubusercontent.com/antoniogarrote/jobim/f041331d2c02cf38741e8604263bd08a3a1f11a5/jobim-zeromq/src/jobim/services/messaging/zeromq.clj | clojure | ZeroMQ implementation of the messaging service
(declare zk-zeromq-node)
we delete the old node if it exists
we register the new node
we establish the connection | (ns jobim.services.messaging.zeromq
(:use [jobim.core])
(:use [jobim.definitions]))
(defonce *node-messaging-zeromq-znode* "/jobim/messaging/zeromq")
(defn node-to-zeromq-socket
([node node-map]
(if (nil? (get @node-map node))
(let [result (zk/get-data (zk-zeromq-node node))]
(if (nil? res... |
58016de1a65905caeed2f225891ce0517fc2e7d670135b237f04985c896e4dbd | conal/Fran | Editor7.hs | Curve editor version 7 . Adds simple insertion of curve segments .
-- No undo.
module Editor7 ( XPoint, renderXPoint, editXPoint, editXPointTest
, pointSize, grabDistance, graphPaper
, renderCurve, EditCurve, editCurve, spinMessage
, ECurve, renderECurve, editECu... | null | https://raw.githubusercontent.com/conal/Fran/a113693cfab23f9ac9704cfee9c610c5edc13d9d/demos/CurveEditor/Editor7.hs | haskell | No undo.
Editable curve. A list of x-points, and an change event. (BTW,
there's a very common pattern here that should be captured in a type.)
Type of editCurve. Used in "editorWith" below. Yields
Shift a list of points so that their bounding box is centered on the
origin.
| Curve editor version 7 . Adds simple insertion of curve segments .
module Editor7 ( XPoint, renderXPoint, editXPoint, editXPointTest
, pointSize, grabDistance, graphPaper
, renderCurve, EditCurve, editCurve, spinMessage
, ECurve, renderECurve, editECurve
... |
c0b00dcaeeefaf45abe5a9b3c75f09b0a235c32fe6136412f1731ef8e7f2ea2e | theodormoroianu/SecondYearCourses | lab6-sol_20210115144752.hs | -- /
import Data.Char
import Data.List
import Test.QuickCheck
1 .
rotate :: Int -> [Char] -> [Char]
rotate n l
| n > 0
, n < length l
= suf ++ pre
where
(pre, suf) = splitAt n l
rotate _ _ = error "număr negativ sau prea mare"
2 .
prop_rotate :: Int -> String -> Bool
prop_rotate k str = rotate (l ... | null | https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/99185b0e97119135e7301c2c7be0f07ae7258006/Haskell/l/.history/lab6/lab6-sol_20210115144752.hs | haskell | / |
import Data.Char
import Data.List
import Test.QuickCheck
1 .
rotate :: Int -> [Char] -> [Char]
rotate n l
| n > 0
, n < length l
= suf ++ pre
where
(pre, suf) = splitAt n l
rotate _ _ = error "număr negativ sau prea mare"
2 .
prop_rotate :: Int -> String -> Bool
prop_rotate k str = rotate (l + 1 -... |
67843dae798d0339c69ddd7b20a5a1999996653146faf59f3d6b087a7fbfda4d | somnusand/Poker | hackney_pool_handler.erl | %%% -*- erlang -*-
%%%
This file is part of hackney released under the Apache 2 license .
%%% See the NOTICE for more information.
%%%
-module(hackney_pool_handler).
-include("hackney.hrl").
-type host() :: binary() | string().
-type client() :: #client{}.
-ifdef(no_callback_support).
-export([behaviour_info/1]).... | null | https://raw.githubusercontent.com/somnusand/Poker/4934582a4a37f28c53108a6f6e09b55d21925ffa/server/deps/hackney/src/hackney_pool_handler.erl | erlang | -*- erlang -*-
See the NOTICE for more information.
start a bool handler | This file is part of hackney released under the Apache 2 license .
-module(hackney_pool_handler).
-include("hackney.hrl").
-type host() :: binary() | string().
-type client() :: #client{}.
-ifdef(no_callback_support).
-export([behaviour_info/1]).
-spec behaviour_info(atom()) -> [{atom(), arity()}] | undefined.
b... |
f17f434d18f4744b5a3f776ade632e1936c091b6d777f5022cc3a039fccc85f8 | sondresl/AdventOfCode | 24.hs | import Data.Maybe
import Data.List.Extra
import qualified Data.Map.Strict as M
type Node = Int
type Graph = M.Map Node [Node]
type Edge = (Int, Int)
parseEdge :: String -> [Edge]
parseEdge = map (toTup . map read . splitOn "/")
. lines
where
toTup [x,y] = (x,y)
parse :: String -> Graph
parse = (nub... | null | https://raw.githubusercontent.com/sondresl/AdventOfCode/a460af1866077639e0c58947354d750d1b96975c/2017/Haskell/24.hs | haskell | | Find all paths through the graph, starting at Node n | import Data.Maybe
import Data.List.Extra
import qualified Data.Map.Strict as M
type Node = Int
type Graph = M.Map Node [Node]
type Edge = (Int, Int)
parseEdge :: String -> [Edge]
parseEdge = map (toTup . map read . splitOn "/")
. lines
where
toTup [x,y] = (x,y)
parse :: String -> Graph
parse = (nub... |
17365a16be3a233a188ed3aa22d18a162c1e6b00e6d5dd4031fc65076321b052 | dbuenzli/uunf | pkg.ml | #!/usr/bin/env ocaml
#use "topfind"
#require "topkg"
open Topkg
let massage () =
let ocaml = Conf.tool "ocaml" `Build_os in
OS.Cmd.run Cmd.(ocaml % "pkg/build_support.ml")
let distrib =
(* FIXME OPAMv2, move this to an x-unicode-version field in the opam file. *)
let watermarks = ("UNICODE_VERSION", `String "... | null | https://raw.githubusercontent.com/dbuenzli/uunf/ce14ffd83f269de961d1f323cbe8ab3e907de472/pkg/pkg.ml | ocaml | FIXME OPAMv2, move this to an x-unicode-version field in the opam file. | #!/usr/bin/env ocaml
#use "topfind"
#require "topkg"
open Topkg
let massage () =
let ocaml = Conf.tool "ocaml" `Build_os in
OS.Cmd.run Cmd.(ocaml % "pkg/build_support.ml")
let distrib =
let watermarks = ("UNICODE_VERSION", `String "15.0.0") :: Pkg.watermarks in
let exclude_paths () = Pkg.exclude_paths () >>| ... |
697d2742a2ce3d3949dcb764d03b64674053a490aaa2ad2ea5756759b57017ea | Spivoxity/obc-3 | mach.ml |
* mach.ml
*
* This file is part of the Oxford Oberon-2 compiler
* Copyright ( c ) 2006 - -2016 J. M. Spivey
* All rights reserved
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are met :
*
* 1 . ... | null | https://raw.githubusercontent.com/Spivoxity/obc-3/9e5094df8382ac5dd25ff08768277be6bd71a4ae/compiler/mach.ml | ocaml | Machine parameters for the bytecode machine
metrics -- target representation of data object
Size of object
Address must be multiple of this
assert (maxdouble = double_of_hex "0x7fefffffffffffff") |
* mach.ml
*
* This file is part of the Oxford Oberon-2 compiler
* Copyright ( c ) 2006 - -2016 J. M. Spivey
* All rights reserved
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are met :
*
* 1 . ... |
4a529218b07172b46d83680e9e8c9e68afb50860ee284cd69baa0fed6af3a2dc | psibi/shell-conduit | Shell.hs | # LANGUAGE NoMonomorphismRestriction #
| Shell scripting with Conduit
--
This module consists only of re - exports , including a few thousand
-- top-level names based on @PATH@. If you don't want that, you can
-- cherry-pick specific modules to import from the library.
--
-- See "Data.Conduit.Shell.PATH" for all b... | null | https://raw.githubusercontent.com/psibi/shell-conduit/ac93851967d3f3099fdbafa9f5bdb4b990537f06/src/Data/Conduit/Shell.hs | haskell |
top-level names based on @PATH@. If you don't want that, you can
cherry-pick specific modules to import from the library.
See "Data.Conduit.Shell.PATH" for all binaries. But you should be
able to use whatever executables are in your @PATH@ when the library
is compiled.
== Examples
results:
together, as in ... | # LANGUAGE NoMonomorphismRestriction #
| Shell scripting with Conduit
This module consists only of re - exports , including a few thousand
The monad instance of Conduit will simply pass along all stdout
Piping with Conduit 's normal pipe will predictably pipe things
dist LICENSE README.md Setup.hs sh... |
6005acf693e8b5c2460ad4a4b011c8c13f1761c579d51e23de9897840f7c0d3f | static-analysis-engineering/codehawk | jCHTypeSetsDomainNoArrays.ml | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Java Analyzer
Author : and
------------------------------------------------------------------------------
The MIT License ( MIT )
... | null | https://raw.githubusercontent.com/static-analysis-engineering/codehawk/98ced4d5e6d7989575092df232759afc2cb851f6/CodeHawk/CHJ/jchpre/jCHTypeSetsDomainNoArrays.ml | ocaml | chutil
jchlib
jchpre
Local variable table
Result of the analysis. We are interested only in stack variables
Printing utilities for debugging
Used to record the last assign. We postpone the action until
* we know where where the assign is coming from.
* For a copy stack assign - which are the assigns tha... | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Java Analyzer
Author : and
------------------------------------------------------------------------------
The MIT License ( MIT )
... |
ed4ab42c9069ff2399ffe49748321db9eade305728cb31dd6e1c53f079fcac43 | reanimate/reanimate | External.hs | module Reanimate.External
( URL,
SHA256,
zipArchive,
tarball,
-- * External Icon Datasets
simpleIcon,
simpleIconColor,
simpleIcons,
svgLogo,
svgLogos,
)
where
import Codec.Picture (PixelRGB8 (..))
import Control.Monad (unless)
import ... | null | https://raw.githubusercontent.com/reanimate/reanimate/5ea023980ff7f488934d40593cc5069f5fd038b0/src/Reanimate/External.hs | haskell | * External Icon Datasets
| Resource address
| Resource hash
# NOINLINE zipArchive #
| Download and unpack zip archive. The returned path is the unpacked folder.
| Download and unpack tarball. The returned path is the unpacked folder.
-----------------------------------------------------------------------------
@... | module Reanimate.External
( URL,
SHA256,
zipArchive,
tarball,
simpleIcon,
simpleIconColor,
simpleIcons,
svgLogo,
svgLogos,
)
where
import Codec.Picture (PixelRGB8 (..))
import Control.Monad (unless)
import Crypto.Hash.SHA256 (hash... |
4365656783607c09bc501ae3a6aa7d7b077a5b2b9ad056fff7fd199804f3909f | kocubinski/clojurewm | core.clj | (ns clojurewm.core
(:require [clojure.tools.logging :as log]
[clojurewm.win :as win])
(:use [clojure.clr.pinvoke :only [dllimports]]
[clojure.set :only [difference]]
[clojurewm.util :only [gen-c-delegate defcommand commands get-command
new-linked-list]]
... | null | https://raw.githubusercontent.com/kocubinski/clojurewm/b368f418b8abd813114e553c67580d06a583bd18/src/clojurewm/core.clj | clojure | p-invoke
command processing
init/destruction
other commands | (ns clojurewm.core
(:require [clojure.tools.logging :as log]
[clojurewm.win :as win])
(:use [clojure.clr.pinvoke :only [dllimports]]
[clojure.set :only [difference]]
[clojurewm.util :only [gen-c-delegate defcommand commands get-command
new-linked-list]]
... |
929079191dcf73722c519fae94bf253dfa385d47c60fa98319951db9a1b418c1 | RedPRL/cooltt | ConcreteSyntax.ml | include ConcreteSyntaxData
| null | https://raw.githubusercontent.com/RedPRL/cooltt/8680becd4daf258d52d4a40924d8c9d3fb107030/src/frontend/ConcreteSyntax.ml | ocaml | include ConcreteSyntaxData
| |
1d01ef308de6bcb301a0b214cd60e7305b540ccb69cae4935c9751f9b4fb8282 | B-Lang-org/bsc | Pred.hs | # LANGUAGE CPP #
# LANGUAGE PatternGuards #
module Pred(
Qual(..), PredWithPositions(..), Pred(..), Class(..), Inst(..),
getInsts,
removePredPositions, getPredPositions, addPredPositions, mkPredWithPositions,
expandSyn, predToType, qualToType, mkInst,
Instanti... | null | https://raw.githubusercontent.com/B-Lang-org/bsc/bd141b505394edc5a4bdd3db442a9b0a8c101f0f/src/comp/Pred.hs | haskell | import Debug.Trace
import Util(traces)
Add position info to the predicates in a scheme, to allow position
info to carry on after type checking of implicitly typed definitions.
Schemes for other identifiers or purposes will contain empty lists.
---
Allow some Preds to be tagged with position information
---
----... | # LANGUAGE CPP #
# LANGUAGE PatternGuards #
module Pred(
Qual(..), PredWithPositions(..), Pred(..), Class(..), Inst(..),
getInsts,
removePredPositions, getPredPositions, addPredPositions, mkPredWithPositions,
expandSyn, predToType, qualToType, mkInst,
Instanti... |
b535de4fcea86e445b63a80a7d8e28d50a71cafa0994730035dd26767d951357 | haskell-compat/base-compat | Repl.hs | {-# LANGUAGE PackageImports #-}
# OPTIONS_GHC -fno - warn - dodgy - exports -fno - warn - unused - imports #
-- | Reexports "Data.Type.Equality.Compat"
-- from a globally unique namespace.
module Data.Type.Equality.Compat.Repl (
module Data.Type.Equality.Compat
) where
import "this" Data.Type.Equality.Compat
| null | https://raw.githubusercontent.com/haskell-compat/base-compat/847aa35c4142f529525ffc645cd035ddb23ce8ee/base-compat/src/Data/Type/Equality/Compat/Repl.hs | haskell | # LANGUAGE PackageImports #
| Reexports "Data.Type.Equality.Compat"
from a globally unique namespace. | # OPTIONS_GHC -fno - warn - dodgy - exports -fno - warn - unused - imports #
module Data.Type.Equality.Compat.Repl (
module Data.Type.Equality.Compat
) where
import "this" Data.Type.Equality.Compat
|
238ed3deb330011a08af6b0c4d41f362610359e75665720c746ad917929a8141 | haskell/ghcide | Protocol.hs | Copyright ( c ) 2019 The DAML Authors . All rights reserved .
SPDX - License - Identifier : Apache-2.0
# LANGUAGE PatternSynonyms #
module Development.IDE.LSP.Protocol
( pattern EventFileDiagnostics
) where
import Development.IDE.Types.Diagnostics
import Development.IDE.Types.Location
import Language.Hask... | null | https://raw.githubusercontent.com/haskell/ghcide/3ef4ef99c4b9cde867d29180c32586947df64b9e/src/Development/IDE/LSP/Protocol.hs | haskell | --------------------------------------------------------------------------------------------------
Pretty printing
--------------------------------------------------------------------------------------------------
| Pattern synonym to make it a bit more convenient to match on diagnostics
in things like damlc test. | Copyright ( c ) 2019 The DAML Authors . All rights reserved .
SPDX - License - Identifier : Apache-2.0
# LANGUAGE PatternSynonyms #
module Development.IDE.LSP.Protocol
( pattern EventFileDiagnostics
) where
import Development.IDE.Types.Diagnostics
import Development.IDE.Types.Location
import Language.Hask... |
49f98ad358a26abe6efa9fdbb335d46b8782436c411f12dd92e95c999c0cc169 | LexiFi/menhir | MySet.mli | (******************************************************************************)
(* *)
(* *)
... | null | https://raw.githubusercontent.com/LexiFi/menhir/794e64e7997d4d3f91d36dd49aaecc942ea858b7/src/MySet.mli | ocaml | ****************************************************************************
file LICEN... |
, Paris
, PPS , Université Paris Diderot
. All rights reserved . This file is distributed under the
terms of the GNU General Public License version 2 , as... |
845c6e69847814b9baee833b3a7d6ad24ba764053e5d4eaae1fd3a6b08095657 | masaomi-yamaguchi/synbit | Typing.hs | # LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PatternSynonyms #
# OPTIONS_GHC -fwarn - missing - signatures #
# OPTIONS_GHC -fwarn - incomplete - patterns #
-- module Typing (
defaultTyEnv , , ... | null | https://raw.githubusercontent.com/masaomi-yamaguchi/synbit/4553ae090dfcda4965a16b09130c1d6874b5a849/src/Typing.hs | haskell | module Typing (
) where
> TyList ( TyVar a ) ) )
-->
-->
> TyBool --> TyBool))
it only replace synonyms shallowly
always empty?
liftIO $ putStrLn $ "Unify var " ++ show m ++ " against " ++ show ty
liftIO $ putStrD $ "Checking " ++ show e ++ " against " ++ show expectedTy
... | # LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PatternSynonyms #
# OPTIONS_GHC -fwarn - missing - signatures #
# OPTIONS_GHC -fwarn - incomplete - patterns #
defaultTyEnv , , toTyEnv , TyEnv ( .... |
cc34c18a06645cdc3610d891f95fc3fe3f686ba05d86ad2d355b24bf5a1b51ba | docker-in-aws/docker-in-aws | labels.cljs | (ns swarmpit.component.service.info.labels
(:require [material.component.form :as form]
[material.component.list-table-auto :as alist]
[rum.core :as rum]))
(enable-console-print!)
(def headers ["Name" "Value"])
(def render-item-keys
[[:name] [:value]])
(defn render-item
[item]
(val i... | null | https://raw.githubusercontent.com/docker-in-aws/docker-in-aws/bfc7e82ac82ea158bfb03445da6aec167b1a14a3/ch16/swarmpit/src/cljs/swarmpit/component/service/info/labels.cljs | clojure | (ns swarmpit.component.service.info.labels
(:require [material.component.form :as form]
[material.component.list-table-auto :as alist]
[rum.core :as rum]))
(enable-console-print!)
(def headers ["Name" "Value"])
(def render-item-keys
[[:name] [:value]])
(defn render-item
[item]
(val i... | |
c28dde71aed2f3bb4e2686c48b80f574f7e877535cef19418d84b0568766105e | natefaubion/purescript-cst | Utils.hs | # LANGUAGE MonoLocalBinds #
module Language.PureScript.CST.Utils where
import Prelude
import Control.Monad (when)
import Data.Coerce (coerce)
import Data.Foldable (for_)
import Data.Functor (($>))
import qualified Data.List.NonEmpty as NE
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Text (Text)
... | null | https://raw.githubusercontent.com/natefaubion/purescript-cst/1df669eb45b36008d25b72b33627ede7fd47e345/src/Language/PureScript/CST/Utils.hs | haskell | # LANGUAGE MonoLocalBinds #
module Language.PureScript.CST.Utils where
import Prelude
import Control.Monad (when)
import Data.Coerce (coerce)
import Data.Foldable (for_)
import Data.Functor (($>))
import qualified Data.List.NonEmpty as NE
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Text (Text)
... | |
acbf162614807495fa4a6f39aa6e2ee2bec14a93b820e7fe152959dfd8b1f43c | yallop/fomega | jsmain.ml | open Format
open Support.Error
open Syntax
let output_buffer = Buffer.create 100
let print = Buffer.add_substring output_buffer
let flush () = ()
let () = set_formatter_output_functions print flush
let fomega s =
begin
try
let s = Js.to_string s in
Buffer.clear output_buffer;
let lexbuf = Le... | null | https://raw.githubusercontent.com/yallop/fomega/f0ba8efb4e40202203bc77652d2e768fdab9239c/src/jsmain.ml | ocaml | open Format
open Support.Error
open Syntax
let output_buffer = Buffer.create 100
let print = Buffer.add_substring output_buffer
let flush () = ()
let () = set_formatter_output_functions print flush
let fomega s =
begin
try
let s = Js.to_string s in
Buffer.clear output_buffer;
let lexbuf = Le... | |
fea106cc885e9a1d6fd41eaa5a76b848c261b52caa4707ac83a398af8a421272 | input-output-hk/cardano-sl | DB.hs | -- | Higher-level DB functionality.
module Pos.DB.DB
( initNodeDBs
, gsAdoptedBVDataDefault
) where
import Universum
import Pos.Chain.Block (genesisBlock0, headerHash)
import Pos.Chain.Genesis as Genesis (Config (..), configBlockVersionData)
import Pos.Cha... | null | https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/lib/src/Pos/DB/DB.hs | haskell | | Higher-level DB functionality.
--------------------------------------------------------------------------
MonadGState instance
-------------------------------------------------------------------------- |
module Pos.DB.DB
( initNodeDBs
, gsAdoptedBVDataDefault
) where
import Universum
import Pos.Chain.Block (genesisBlock0, headerHash)
import Pos.Chain.Genesis as Genesis (Config (..), configBlockVersionData)
import Pos.Chain.Lrc (genesisLeaders)
import ... |
88bd0fe5c3a9d0229e6c8f03cb12556e275de336efe37728eae6586a44026d9f | morpheusgraphql/morpheus-graphql | Apollo.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleInstances #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE NoImplicitPrelude #
module Data.Morpheus.Subscriptions.Apollo
( ApolloAction (..),
apolloFormat,
acceptApolloRequest,
toApolloResponse,
Validation,
ApolloSubscriptio... | null | https://raw.githubusercontent.com/morpheusgraphql/morpheus-graphql/cfaadc6f8491548bccab856757e95584946681b7/morpheus-graphql-subscriptions/src/Data/Morpheus/Subscriptions/Apollo.hs | haskell | # LANGUAGE OverloadedStrings #
-----------------------------------
------------------------------------------
-----------------------------------
----------------------------------- | # LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleInstances #
# LANGUAGE NamedFieldPuns #
# LANGUAGE NoImplicitPrelude #
module Data.Morpheus.Subscriptions.Apollo
( ApolloAction (..),
apolloFormat,
acceptApolloRequest,
toApolloResponse,
Validation,
ApolloSubscription (..),
)
where
import Control.A... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.