_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 |
|---|---|---|---|---|---|---|---|---|
07c5b05d5921cdaf24245de21bd0a1bdc1dfe903b62ad875890511a274b9844a | Bogdanp/racket-crontab | main.rkt | #lang racket/base
(require "crontab.rkt"
"schedule.rkt")
(provide (all-from-out "crontab.rkt"
"schedule.rkt"))
| null | https://raw.githubusercontent.com/Bogdanp/racket-crontab/83b81b8101b69deebd35cf9f979935ca7e7cb855/crontab-lib/main.rkt | racket | #lang racket/base
(require "crontab.rkt"
"schedule.rkt")
(provide (all-from-out "crontab.rkt"
"schedule.rkt"))
| |
2915895e97cf9835065daf751805a9e873ed311c51f999fa6e14c819031ae786 | ocaml/ocamlbuild | tags.mli | (***********************************************************************)
(* *)
(* ocamlbuild *)
(* *)
, , projet Galliu... | null | https://raw.githubusercontent.com/ocaml/ocamlbuild/792b7c8abdbc712c98ed7e69469ed354b87e125b/src/tags.mli | ocaml | *********************************************************************
ocamlbuild
... | , , projet Gallium , INRIA Rocquencourt
Copyright 2007 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
Original author :
include Signatures.TAGS
|
a4ee11aa5c0e5874fc482e77ba47c9c527e3bc859cfc154abcef6c9fcf79af21 | janestreet/hardcaml | mangler.ml | open Base
type t =
{ case_sensitive : bool
; table : (string, int) Hashtbl.t
}
[@@deriving sexp_of]
let create ~case_sensitive =
{ case_sensitive
; table =
Hashtbl.create
(if case_sensitive then (module String) else (module String.Caseless))
}
;;
let add_identifier t name = Hashtbl.add t.ta... | null | https://raw.githubusercontent.com/janestreet/hardcaml/4126f65f39048fef5853ba9b8d766143f678a9e4/src/mangler.ml | ocaml | open Base
type t =
{ case_sensitive : bool
; table : (string, int) Hashtbl.t
}
[@@deriving sexp_of]
let create ~case_sensitive =
{ case_sensitive
; table =
Hashtbl.create
(if case_sensitive then (module String) else (module String.Caseless))
}
;;
let add_identifier t name = Hashtbl.add t.ta... | |
b328ff755b25111c2091ee9030892be833e251563baeeeee9f950f007202a7cb | tsloughter/kuberl | kuberl_batch_v2alpha1_api.erl | -module(kuberl_batch_v2alpha1_api).
-export([create_namespaced_cron_job/3, create_namespaced_cron_job/4,
delete_collection_namespaced_cron_job/2, delete_collection_namespaced_cron_job/3,
delete_namespaced_cron_job/4, delete_namespaced_cron_job/5,
get_api_resources/1, get_api_resources/2,
... | null | https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_batch_v2alpha1_api.erl | erlang | @doc
@doc
@doc
@doc
get available resources
@doc
@doc
@doc
@doc
@doc
@doc
@doc
@doc | -module(kuberl_batch_v2alpha1_api).
-export([create_namespaced_cron_job/3, create_namespaced_cron_job/4,
delete_collection_namespaced_cron_job/2, delete_collection_namespaced_cron_job/3,
delete_namespaced_cron_job/4, delete_namespaced_cron_job/5,
get_api_resources/1, get_api_resources/2,
... |
12746001d141a415a7e64047502b3ffa0a5edd48200628e4e22ff85a50977f3c | tyehle/llvm-lambda | LLSpec.hs | module LLSpec (lowLevelTests) where
import qualified Data.Set as Set
import Test.Tasty
import Test.Tasty.HUnit
import LowLevel
import Parsing (parse)
emitLL :: String -> Prog
emitLL input = runConvert (either error id $ parse "test_input" input) Set.empty
checkLowLevel :: String -> Prog -> Assertion
checkLowLevel i... | null | https://raw.githubusercontent.com/tyehle/llvm-lambda/679a9e1cc1d288fc9731a6f43fc45714c455741b/test/LLSpec.hs | haskell | module LLSpec (lowLevelTests) where
import qualified Data.Set as Set
import Test.Tasty
import Test.Tasty.HUnit
import LowLevel
import Parsing (parse)
emitLL :: String -> Prog
emitLL input = runConvert (either error id $ parse "test_input" input) Set.empty
checkLowLevel :: String -> Prog -> Assertion
checkLowLevel i... | |
19d52e74e262624563ace2db023b245a1030f2e260c7d0dd1d422f76a2f0f22d | oliyh/superlifter | lacinia.clj | (ns superlifter.lacinia
(:require [superlifter.core :as s]
[superlifter.api :as api]
[io.pedestal.interceptor :refer [interceptor]]
[com.walmartlabs.lacinia.resolve :as resolve]
[promesa.core :as prom]))
(defn inject-superlifter [superlifter-args]
(interceptor
{:n... | null | https://raw.githubusercontent.com/oliyh/superlifter/d0baf9538f1dac712415323a2f2a6578c181bd97/src/superlifter/lacinia.clj | clojure | (ns superlifter.lacinia
(:require [superlifter.core :as s]
[superlifter.api :as api]
[io.pedestal.interceptor :refer [interceptor]]
[com.walmartlabs.lacinia.resolve :as resolve]
[promesa.core :as prom]))
(defn inject-superlifter [superlifter-args]
(interceptor
{:n... | |
ee4d6e4a35ae0da2829ed28270ffe4b4135f663a68f0c48925645a2ebdb1db19 | dhleong/wish | core.clj | (ns wish.core)
| null | https://raw.githubusercontent.com/dhleong/wish/9036f9da3706bfcc1e4b4736558b6f7309f53b7b/src/clj/wish/core.clj | clojure | (ns wish.core)
| |
1b78ff3a916243c4cf6385644b81562b391514183f2e93e647382fa034f1bf04 | triffon/fp-2022-23 | 02-power.rkt | #lang racket
(define (power base exp)
(define (helper exp accum)
(if (= 0 exp)
accum
(helper (- exp 1) (* accum base))))
(helper exp 1))
( power 5 3 ) =
( helper 3 1 ) =
( helper 2 5 ) =
( helper 1 25 ) =
( helper 0 125 ) =
125 | null | https://raw.githubusercontent.com/triffon/fp-2022-23/af48edbfc8a3697ee23bcccb3ae1ffc17c1fb7ff/exercises/inf2/02/02-power.rkt | racket | #lang racket
(define (power base exp)
(define (helper exp accum)
(if (= 0 exp)
accum
(helper (- exp 1) (* accum base))))
(helper exp 1))
( power 5 3 ) =
( helper 3 1 ) =
( helper 2 5 ) =
( helper 1 25 ) =
( helper 0 125 ) =
125 | |
a7d0ee5ec5ea564465307bfd51c80db176b3c5162d726e78a0280c46eb3e7ee0 | owickstrom/komposition | UserInterface.hs | # OPTIONS_GHC -fno - warn - unticked - promoted - constructors #
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
# LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RankNTypes #
# LANGUAGE ... | null | https://raw.githubusercontent.com/owickstrom/komposition/64893d50941b90f44d77fea0dc6d30c061464cf3/src/Komposition/UserInterface.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DataKinds #
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeInType #
# LANGUAGE TypeOperators #
Welcome Screen
Timeline
Import | # OPTIONS_GHC -fno - warn - unticked - promoted - constructors #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE RankNTypes #
# LANGUAGE StandaloneDeriving #
module Komposition.UserInterface where
import Komposition.Prelude hiding ( State )
import Contro... |
9a4c812250b0d7acc2f2a8bb4d076d9b0ef8cff75cd595eca13a50b19e5dcb4c | launchdarkly/haskell-server-sdk | Store.hs | -- | This module contains details for external store implementations.
module LaunchDarkly.Server.Store
( StoreResult
, FeatureKey
, FeatureNamespace
, PersistentDataStore (..)
, SerializedItemDescriptor (..)
, serializeWithPlaceholder
, byteStringToVersionedData
) where
import LaunchDar... | null | https://raw.githubusercontent.com/launchdarkly/haskell-server-sdk/b8642084591733e620dfc5c1598409be7cc40a63/src/LaunchDarkly/Server/Store.hs | haskell | | This module contains details for external store implementations. | module LaunchDarkly.Server.Store
( StoreResult
, FeatureKey
, FeatureNamespace
, PersistentDataStore (..)
, SerializedItemDescriptor (..)
, serializeWithPlaceholder
, byteStringToVersionedData
) where
import LaunchDarkly.Server.Store.Internal
|
1f6e05311d8e42e7dcbae7fda909fba707c7161b8b7b031b1d31ba26a094ef26 | racket/racket7 | liberal-def-ctx.rkt | #lang racket/base
(provide prop:liberal-define-context
(rename-out [has-liberal-define-context-property? liberal-define-context?])
make-liberal-define-context)
(define-values (prop:liberal-define-context has-liberal-define-context-property? liberal-define-context-value)
(make-struct-type-property ... | null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/expander/expand/liberal-def-ctx.rkt | racket | #lang racket/base
(provide prop:liberal-define-context
(rename-out [has-liberal-define-context-property? liberal-define-context?])
make-liberal-define-context)
(define-values (prop:liberal-define-context has-liberal-define-context-property? liberal-define-context-value)
(make-struct-type-property ... | |
f880c7eaa7a90c27035269fda876ef46247984cbc620cacc9ac9f9acb9be2976 | Tclv/HaskellBook | LookUps.hs | module LookUps where
import Control.Applicative
import Data.List (elemIndex)
1 .
added :: Maybe Integer
added = fmap (+3) (lookup 3 $ zip [1, 2, 3] [4, 5, 6])
2 .
y :: Maybe Integer
y = lookup 3 $ zip [1, 2, 3] [4, 5, 6]
z :: Maybe Integer
z = lookup 2 $ zip [1, 2, 3] [4, 5, 6]
tupled :: Maybe (Integer, Inte... | null | https://raw.githubusercontent.com/Tclv/HaskellBook/78eaa5c67579526b0f00f85a10be3156bc304c14/ch17/LookUps.hs | haskell | module LookUps where
import Control.Applicative
import Data.List (elemIndex)
1 .
added :: Maybe Integer
added = fmap (+3) (lookup 3 $ zip [1, 2, 3] [4, 5, 6])
2 .
y :: Maybe Integer
y = lookup 3 $ zip [1, 2, 3] [4, 5, 6]
z :: Maybe Integer
z = lookup 2 $ zip [1, 2, 3] [4, 5, 6]
tupled :: Maybe (Integer, Inte... | |
f9626806335623b801d9d4da7b32627fe6d6fcaaae3b690e3aa0c79d6f31a507 | hamler-lang/hamler | Error.erl | %%---------------------------------------------------------------------------
%% |
%% Module : Error
Copyright : ( c ) 2020 - 2021 EMQ Technologies Co. , Ltd.
%% License : BSD-style (see the LICENSE file)
%%
Maintainer : ,
,
%% Stability : experimental
%% Portability : ... | null | https://raw.githubusercontent.com/hamler-lang/hamler/df22edd4d7f2ded1bdb8863f0e075e0e1e35a905/lib/System/Error.erl | erlang | ---------------------------------------------------------------------------
|
Module : Error
License : BSD-style (see the LICENSE file)
Stability : experimental
Portability : portable
The Error FFI module.
--------------------------------------------------------------------------- | Copyright : ( c ) 2020 - 2021 EMQ Technologies Co. , Ltd.
Maintainer : ,
,
-module('Error').
-include("../Foreign.hrl").
-export([showErrorImpl/1]).
-export([ throwException/1
, catchException/2
, bracket/3
, bracketOnError/3
, finally/2
, o... |
ae1cc7675182bcb768755f48d600c58644218c0579362b84e2122fb529258f31 | TrustInSoft/tis-interpreter | project_skeleton.mli | (**************************************************************************)
(* *)
This file is part of Frama - C.
(* *)
Copyright ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/libraries/project/project_skeleton.mli | ocaml | ************************************************************************
alternatives)
... | This file is part of Frama - C.
Copyright ( C ) 2007 - 2015
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , v... |
f46c81cb08257d44bf742980a616289178b221f910e7526805d0d4f1979b8c4a | harpocrates/language-rust | Literals.hs | |
Module : Language . Rust . . Literals
Description : Parsing literals
Copyright : ( c ) , 2017 - 2018
License : BSD - style
Maintainer :
Stability : experimental
Portability : portable
Functions for parsing literals from valid literal tokens . Note the functions in this module f... | null | https://raw.githubusercontent.com/harpocrates/language-rust/9d509c450d009cc99f1180b3f2f30247dfb1cfce/src/Language/Rust/Parser/Literals.hs | haskell | into account escapes and unicode.
^ multi-line strings allowed
^ input string
into account escapes.
^ multi-line strings allowed
^ input string
NOTE: this is a bit hacky. Eventually, we might not do this and change the internal
representation of a float to a string (what language-c has opted to do).
| Try to r... | |
Module : Language . Rust . . Literals
Description : Parsing literals
Copyright : ( c ) , 2017 - 2018
License : BSD - style
Maintainer :
Stability : experimental
Portability : portable
Functions for parsing literals from valid literal tokens . Note the functions in this module f... |
c73ebe243b6f7299a7a870388079a8fe41f1924a65c6d2f42e4da97cf6bafddb | Shadytel/osmo_ss7 | isup_codec.erl | % ITU-T Q.76x ISUPcoding / decoding
( C ) 2011 by < >
%
% All Rights Reserved
%
% This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation ; either version 3 of the
% License, or (at your optio... | null | https://raw.githubusercontent.com/Shadytel/osmo_ss7/eef6ce439727436febc67692c145e07847cc4c89/src/isup_codec.erl | erlang | ITU-T Q.76x ISUPcoding / decoding
All Rights Reserved
This program is free software; you can redistribute it and/or modify
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABIL... |
( C ) 2011 by < >
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation ; either version 3 of the
You should have received a copy of the GNU Affero General Public License
Additional Permission under GNU AGPL version 3 section 7 :
If you modify this Prog... |
cfab83ea78c0051a242841605df21203fa58b270d495fced7e98c8a642fe4309 | alexbs01/OCaml | mylist3.ml | let hd l = match l with
| header::_ -> header
| [] -> raise(Failure "hd")
let tl l = match l with
| _::tail -> tail
| [] -> raise(Failure "tl")
let rec append l1 l2 =
if l1 = []
then l2
else (hd l1) :: (append(tl l1) l2)
let rec rev = function
[] -> []
| head::tail -> append (rev tail... | null | https://raw.githubusercontent.com/alexbs01/OCaml/92a28522a8467d8ed87ef380b6175f1c21616f85/p08/mylist3.ml | ocaml | let hd l = match l with
| header::_ -> header
| [] -> raise(Failure "hd")
let tl l = match l with
| _::tail -> tail
| [] -> raise(Failure "tl")
let rec append l1 l2 =
if l1 = []
then l2
else (hd l1) :: (append(tl l1) l2)
let rec rev = function
[] -> []
| head::tail -> append (rev tail... | |
2a5cf1e6249871c002dd19d2b5db8a314729f5101c72de477c6595fc07690bd5 | TerrorJack/ghc-alter | ioeGetFileName001.hs | -- !!! test ioeGetFileName
import System.IO
import System.IO.Error
main = do
h <- openFile "ioeGetFileName001.hs" ReadMode
hSeek h SeekFromEnd 0
(hGetChar h >> return ()) `catchIOError`
\e -> if isEOFError e
then print (ioeGetFileName e)
else putStrLn "failed."
| null | https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/boot-lib/base/tests/IO/ioeGetFileName001.hs | haskell | !!! test ioeGetFileName |
import System.IO
import System.IO.Error
main = do
h <- openFile "ioeGetFileName001.hs" ReadMode
hSeek h SeekFromEnd 0
(hGetChar h >> return ()) `catchIOError`
\e -> if isEOFError e
then print (ioeGetFileName e)
else putStrLn "failed."
|
348ce0bc0d5d4aa5097bdb801b549cb5f263c58974d36472ed04060c8ad66692 | macourtney/Dark-Exchange | offer.clj | (ns darkexchange.model.offer
(:require [clj-record.boot :as clj-record-boot]
[clojure.contrib.logging :as logging]
[darkexchange.model.currency :as currency]
[darkexchange.model.identity :as identity-model]
[darkexchange.model.payment-type :as payment-type]
... | null | https://raw.githubusercontent.com/macourtney/Dark-Exchange/1654d05cda0c81585da7b8e64f9ea3e2944b27f1/src/darkexchange/model/offer.clj | clojure | (ns darkexchange.model.offer
(:require [clj-record.boot :as clj-record-boot]
[clojure.contrib.logging :as logging]
[darkexchange.model.currency :as currency]
[darkexchange.model.identity :as identity-model]
[darkexchange.model.payment-type :as payment-type]
... | |
2804f2651a52146299de6ccaab5a530e3d35e9cbfb584bb111b80b8c9cc6f053 | keigoi/session-ocaml | lsession.ml | type 'a data = W of 'a
type ('pre, 'post, 'a) lmonad = 'pre -> 'post * 'a
type 'f lbind = 'f
type ('a,'b,'ss,'tt) slot = ('ss -> 'a) * ('ss -> 'b -> 'tt)
let _0 = (fun (a,_) -> a), (fun (_,ss) b -> (b,ss))
let _1 = (fun (_,(a,_)) -> a), (fun (s0,(_,ss)) b -> (s0,(b,ss)))
let _2 = (fun (_,(_,(a,_))) -> a), (fun (s0,(s... | null | https://raw.githubusercontent.com/keigoi/session-ocaml/f365456043b349874a5ce5444d313f365d5573c6/lib/lsession.ml | ocaml | type 'a data = W of 'a
type ('pre, 'post, 'a) lmonad = 'pre -> 'post * 'a
type 'f lbind = 'f
type ('a,'b,'ss,'tt) slot = ('ss -> 'a) * ('ss -> 'b -> 'tt)
let _0 = (fun (a,_) -> a), (fun (_,ss) b -> (b,ss))
let _1 = (fun (_,(a,_)) -> a), (fun (s0,(_,ss)) b -> (s0,(b,ss)))
let _2 = (fun (_,(_,(a,_))) -> a), (fun (s0,(s... | |
19753d8522d49d5d9b33e037f4f35ff4502cc96ae09facfbdbe41bd66e71d140 | melange-re/melange-compiler-libs | translprim.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/melange-re/melange-compiler-libs/83e3017d2e7a058385f71d1d9a4c4ab52dc1c008/lambda/translprim.mli | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
val event_before : Lambda.scoped_location -> Typedtree.expression
-> Lambda.lambda ->... |
e2a54c8e6a736af70a2da616803bff2e32df5018b7cff4ab4417b0b6c843e38f | Abhiroop/okasaki | BST.hs | module BST where
data BST a = Nil | Node a (BST a) (BST a) deriving (Show, Eq)
key :: BST a -> a
key Nil = undefined
key (Node a _ _) = a
left :: BST a -> BST a
left Nil = Nil
left (Node _ l _) = l
right :: BST a -> BST a
right Nil = Nil
right (Node _ _ r) = r
-- | Search returning boolean
search :: (Ord a) => BST... | null | https://raw.githubusercontent.com/Abhiroop/okasaki/b4e8b6261cf9c44b7b273116be3da6efde76232d/src/BST.hs | haskell | | Search returning boolean
| Search returning the tree
| In order traversal
| Preorder traversal
| Postorder traversal
| Minimum of a BST a
| Maximum of a BST a
| Find predecessor of an element
| Find successor of an element
| Insertion
| Deletion
This function finds the maximum and then deletes the node as... | module BST where
data BST a = Nil | Node a (BST a) (BST a) deriving (Show, Eq)
key :: BST a -> a
key Nil = undefined
key (Node a _ _) = a
left :: BST a -> BST a
left Nil = Nil
left (Node _ l _) = l
right :: BST a -> BST a
right Nil = Nil
right (Node _ _ r) = r
search :: (Ord a) => BST a -> a -> Bool
search Nil _ =... |
b28607c4068e0068208003d8021c1b26a009487b06a292dcb11fc9579c4c6a5a | gearnode/erl-oauth2c | oauth2_error_tests.erl | Copyright ( c ) 2022 < > .
Copyright ( c ) 2021 Exograd SAS .
Copyright ( c ) 2020 < > .
%%
%% Permission to use, copy, modify, and/or distribute this software for any
%% purpose with or without fee is hereby granted, provided that the above
%% copyright notice and this permission notice appear in all copie... | null | https://raw.githubusercontent.com/gearnode/erl-oauth2c/e5c00a0e27a775790ae8b56f1d6d3617ae92d05e/test/oauth2_error_tests.erl | erlang |
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVE... | Copyright ( c ) 2022 < > .
Copyright ( c ) 2021 Exograd SAS .
Copyright ( c ) 2020 < > .
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES
SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN... |
7306599846d55fe6f08c751ec24a4367d0a166c77f105c08153c077f637bd343 | bobzhang/fan | gfold.ml |
let sfold0 f e _entry _symbl psymb =
let rec fold accu = %parser{
| a = psymb; 's -> fold (f a accu) s
| -> accu } in
%parser{| a = fold e -> a}
let sfold1 f e _entry _symbl psymb =
let rec fold accu = %parser{
| a = psymb; 's -> fold (f a accu) s
| -> accu} in
%parser{
... | null | https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/main/gfold.ml | ocaml |
let sfold0 f e _entry _symbl psymb =
let rec fold accu = %parser{
| a = psymb; 's -> fold (f a accu) s
| -> accu } in
%parser{| a = fold e -> a}
let sfold1 f e _entry _symbl psymb =
let rec fold accu = %parser{
| a = psymb; 's -> fold (f a accu) s
| -> accu} in
%parser{
... | |
69682de144b3ab8584d087e43aa559b6d4f04c9b4665375c33f0a427c9c54d70 | cirfi/sicp-my-solutions | 1.11.scm | ;;; recursive
(define (f1 n)
(cond ((< n 3) n)
(else (+ (f1 (- n 1))
(* 2 (f1 (- n 2)))
(* 3 (f1 (- n 3)))))))
;;; interative
(define (f2 n)
(define (f2-iter i r1 r2 r3) ; r: result
(cond ((= i n) r1)
(else (f2-iter (+ i 1)
(+ r1
(* 2 r2)
(* 3 r3))
r1
r2))))
(cond ((< n 3) ... | null | https://raw.githubusercontent.com/cirfi/sicp-my-solutions/4b6cc17391aa2c8c033b42b076a663b23aa022de/ch1/1.11.scm | scheme | recursive
interative
r: result | (define (f1 n)
(cond ((< n 3) n)
(else (+ (f1 (- n 1))
(* 2 (f1 (- n 2)))
(* 3 (f1 (- n 3)))))))
(define (f2 n)
(cond ((= i n) r1)
(else (f2-iter (+ i 1)
(+ r1
(* 2 r2)
(* 3 r3))
r1
r2))))
(cond ((< n 3) n)
(else (f2-iter 2 2 1 0))))
|
f56ad04e9f5a0afdaf8069a20e8cc7a9f9da20eb0607a8f81214fef291497f66 | s-expressionists/Cleavir | condition-reporters-english.lisp | (in-package #:cleavir-bir)
(defmethod acclimation:report-condition
((condition unused-variable) stream (language acclimation:english))
(let ((v (variable condition)))
(format stream "The variable ~a is ~a but never used."
(name v)
(ecase (use-status v)
((nil) "defined")
... | null | https://raw.githubusercontent.com/s-expressionists/Cleavir/560dfb6b883d8d688872e1a37393ea2779879704/BIR/condition-reporters-english.lisp | lisp | ~:*~a~]
in ~s~]."
Group by subject. Also, put function problems before iblock problems, and
both before instruction problems.
please report it.
~@{~a~%~}~:>~]"
please report it.
~a~:>" | (in-package #:cleavir-bir)
(defmethod acclimation:report-condition
((condition unused-variable) stream (language acclimation:english))
(let ((v (variable condition)))
(format stream "The variable ~a is ~a but never used."
(name v)
(ecase (use-status v)
((nil) "defined")
... |
a01c38161286163f505a95f7ed0caef7ea271e8f0ba3d4df2407e93f21c148a1 | toddaaro/advanced-dan | ccbang.scm |
;; Why does the following run?
;; More specifically, how does x know that in the future it will point to a box?
(define run
(lambda ()
(x (call/cc (lambda (k)
(set! x (lambda (h) 120))
(k 'hukarz))))))
;; answer: evaluation-order dependent behavior
| null | https://raw.githubusercontent.com/toddaaro/advanced-dan/5d6c0762d998aa37774e0414a0f37404e804b536/scheme-questions/ccbang.scm | scheme | Why does the following run?
More specifically, how does x know that in the future it will point to a box?
answer: evaluation-order dependent behavior |
(define run
(lambda ()
(x (call/cc (lambda (k)
(set! x (lambda (h) 120))
(k 'hukarz))))))
|
064e02a575e0e5a816fa1670bbd11567b788ea47c88445f876766fb56afc2afd | brendanhay/terrafomo | Types.hs | -- This module was auto-generated. If it is modified, it will not be overwritten.
-- |
-- Module : Terrafomo.DigitalOcean.Types
Copyright : ( c ) 2017 - 2018
License : Mozilla Public License , v. 2.0 .
Maintainer : < brendan.g.hay+ >
-- Stability : auto-generated
Portability : non - portab... | null | https://raw.githubusercontent.com/brendanhay/terrafomo/387a0e9341fb9cd5543ef8332dea126f50f1070e/provider/terrafomo-digitalocean/src/Terrafomo/DigitalOcean/Types.hs | haskell | This module was auto-generated. If it is modified, it will not be overwritten.
|
Module : Terrafomo.DigitalOcean.Types
Stability : auto-generated
import Formatting (Format, (%)) |
Copyright : ( c ) 2017 - 2018
License : Mozilla Public License , v. 2.0 .
Maintainer : < brendan.g.hay+ >
Portability : non - portable ( GHC extensions )
module Terrafomo.DigitalOcean.Types where
import Data . Text ( Text )
import Terrafomo
import Terrafomo . DigitalOcean . Lens
impor... |
624f3bfc30ab4b2bcf7f637b2b5d02d285847a98eaab2bdd17989baa5a3578d0 | tek/ribosome | GithubActions.hs | module Ribosome.App.Templates.GithubActions where
import Exon (exon)
import Ribosome.App.Data (Branch (Branch), Cachix (Cachix), CachixKey (CachixKey), CachixName (CachixName), ProjectName (ProjectName), cachixName, cachixTek)
cachixStep :: CachixName -> Text
cachixStep (CachixName name) =
[exon|
- uses: cac... | null | https://raw.githubusercontent.com/tek/ribosome/a676b4f0085916777bfdacdcc761f82d933edb80/packages/app/lib/Ribosome/App/Templates/GithubActions.hs | haskell | - | module Ribosome.App.Templates.GithubActions where
import Exon (exon)
import Ribosome.App.Data (Branch (Branch), Cachix (Cachix), CachixKey (CachixKey), CachixName (CachixName), ProjectName (ProjectName), cachixName, cachixTek)
cachixStep :: CachixName -> Text
cachixStep (CachixName name) =
[exon|
- uses: cac... |
1b3ee6279b520eae41db55e88e97247cb0f6c2ce9942feeb4ffb8f5d15d1b667 | mythical-linux/rktfetch | shell.rkt | #!/usr/bin/env racket
#lang racket/base
(require
"helpers/basename.rkt"
)
(provide get-shell)
(define (get-shell)
(if (getenv "SHELL")
(string-upcase (basename (getenv "SHELL")))
"N/A (shell not set)"
)
)
| null | https://raw.githubusercontent.com/mythical-linux/rktfetch/ba4bcd57af954a23a1799fad7e01d828754ec6d1/rktfetch/private/get/shell.rkt | racket | #!/usr/bin/env racket
#lang racket/base
(require
"helpers/basename.rkt"
)
(provide get-shell)
(define (get-shell)
(if (getenv "SHELL")
(string-upcase (basename (getenv "SHELL")))
"N/A (shell not set)"
)
)
| |
874a2fa6d6c644c4370ca4e326bef3dde1c74c6983c99fb7d4ee6c5c3708c342 | heshrobe/joshua-dist | inspector.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Package : CLIM - ENV ; Base : 10 ; Lowercase : Yes -*-
Copyright ( c ) 1994 - 2000 , .
Copyright ( c ) 2001 - 2003 , and .
;;; All rights reserved. No warranty is expressed or implied.
;;; See COPYRIGHT for full copyright and terms of use.
(in-package :cl... | null | https://raw.githubusercontent.com/heshrobe/joshua-dist/f59f06303f9fabef3e945a920cf9a26d9c2fd55e/clim-env/portable-lisp-environment/inspector.lisp | lisp | Syntax : ANSI - Common - Lisp ; Package : CLIM - ENV ; Base : 10 ; Lowercase : Yes -*-
All rights reserved. No warranty is expressed or implied.
See COPYRIGHT for full copyright and terms of use.
Object browser
--- This should keep a history of inspected objects
--- Then there should be a menu bar item that naviga... |
Copyright ( c ) 1994 - 2000 , .
Copyright ( c ) 2001 - 2003 , and .
(in-package :clim-env)
(define-application-frame inspector-frame (selected-object-mixin)
((object :initarg :object :initform nil :accessor inspector-object)
(current-pane :initform nil))
(:command-definer define-inspector-comma... |
f29be8ce95edd8186b1854bf95e0a6290535405c3f5bbc5aaabbfd9d6501049f | tonsky/advent-of-code | day17_gui.clj | (ns advent-of-code.year2018.day17-gui
(:require
[advent-of-code.core :refer [cond+]]
[advent-of-code.year2018.day17 :as day17]
[clojure.java.io :as io]
[clojure.java.math :as math]
[clojure.string :as str]
[clojure.set :as set]
[io.github.humbleui.core :as hui]
[io.github.humbleui.window :as w... | null | https://raw.githubusercontent.com/tonsky/advent-of-code/3efb9627c7c8b0d1a3690f4ec0231198a44706fb/src/advent_of_code/year2018/day17_gui.clj | clojure | [advent_of_code.year2018.day17 Pos Unit Game]
(.setWindowPosition (window/jwm-window w) 2836 632)
(window/set-z-order w :floating) | (ns advent-of-code.year2018.day17-gui
(:require
[advent-of-code.core :refer [cond+]]
[advent-of-code.year2018.day17 :as day17]
[clojure.java.io :as io]
[clojure.java.math :as math]
[clojure.string :as str]
[clojure.set :as set]
[io.github.humbleui.core :as hui]
[io.github.humbleui.window :as w... |
6298ddf10ffb1abfefca1ee275e289854790b9785a1f7efd538eff3ce3bc7908 | shayne-fletcher/zen | factorion.ml | let string_of_list l = String.concat " " (List.map string_of_int l)
(*[fact n] computes the factorial of the natural number [n]*)
let rec factorial (n : int) : int = if n <= 1 then 1 else n * factorial (n - 1)
[ digits n ] computes a list of the base 10 digits of the natural
number n
number n*)
let digits n =
... | null | https://raw.githubusercontent.com/shayne-fletcher/zen/10a1d0b9bf261bb133918dd62fb1593c3d4d21cb/ocaml/binary_search/factorion.ml | ocaml | [fact n] computes the factorial of the natural number [n]
[range start until] computes the list of numbers from [start] up-to
but not including [until]
[insert n ns] adds [n] to [ns] if it isn't already there
Now, we consider each distinct element in turn and for each we
compute a list by filtering out the occure... | let string_of_list l = String.concat " " (List.map string_of_int l)
let rec factorial (n : int) : int = if n <= 1 then 1 else n * factorial (n - 1)
[ digits n ] computes a list of the base 10 digits of the natural
number n
number n*)
let digits n =
let rec loop acc k =
let k' = k / 10 in
let rem = k m... |
b764ecad6f98057bb5df8ac3cfe43ee13bbb4012c8abdf9003281601ad747336 | jabber-at/ejabberd | ejabberd_captcha.erl | %%%-------------------------------------------------------------------
%%% File : ejabberd_captcha.erl
Author : < >
%%% Purpose : CAPTCHA processing.
Created : 26 Apr 2008 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2018 ProcessOne
%%%
%%% This program is free software; you can redistribute it ... | null | https://raw.githubusercontent.com/jabber-at/ejabberd/7bfec36856eaa4df21b26e879d3ba90285bad1aa/src/ejabberd_captcha.erl | erlang | -------------------------------------------------------------------
File : ejabberd_captcha.erl
Purpose : CAPTCHA processing.
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WIT... | Author : < >
Created : 26 Apr 2008 by < >
ejabberd , Copyright ( C ) 2002 - 2018 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU General Public License along
... |
945886f475db491fe93eb783e6e080f841ba3978426e9751891249d348d37b3e | takikawa/racket-ppa | decompile.rkt | #lang racket/base
(require racket/linklet
compiler/zo-parse
compiler/zo-marshal
syntax/modcollapse
racket/port
racket/match
racket/list
racket/set
racket/path
ffi/unsafe/vm
(only-in '#%linklet compiled-position->primitive)
... | null | https://raw.githubusercontent.com/takikawa/racket-ppa/26d6ae74a1b19258c9789b7c14c074d867a4b56b/share/pkgs/compiler-lib/compiler/decompile.rkt | racket | ----------------------------------------
----------------------------------------
Main entry:
primitive
Make sure a single expression doesn't look like tail position:
----------------------------------------
Names for shared values:
Make mutable shells
Fill in mutable shells
Decode the construction of a muta... | #lang racket/base
(require racket/linklet
compiler/zo-parse
compiler/zo-marshal
syntax/modcollapse
racket/port
racket/match
racket/list
racket/set
racket/path
ffi/unsafe/vm
(only-in '#%linklet compiled-position->primitive)
... |
1832813f73b0ec11fa6c69d4718ba12483ceea91c23fccc03a0e81b78e05f9a7 | emillon/ocaml-noise | test_pattern.ml | open OUnit2
open Test_helpers.Infix
let test_of_string =
let should_be expected s ctxt =
let got = Noise.Pattern.of_string s in
assert_equal
~ctxt
~cmp:[%eq: (Noise.Pattern.t, string) result]
~printer:[%show: (Noise.Pattern.t, string) result]
expected
got
in
"of_string" >:::... | null | https://raw.githubusercontent.com/emillon/ocaml-noise/d5a3e0f634fba1f8d948a91c70a1dad6470722b0/test/unit/test_pattern.ml | ocaml | open OUnit2
open Test_helpers.Infix
let test_of_string =
let should_be expected s ctxt =
let got = Noise.Pattern.of_string s in
assert_equal
~ctxt
~cmp:[%eq: (Noise.Pattern.t, string) result]
~printer:[%show: (Noise.Pattern.t, string) result]
expected
got
in
"of_string" >:::... | |
8778f65f481a9723e60a3396763963936cdfad921e4451a8d240ab998995dcba | anoma/juvix | Base.hs | module Base
( module Test.Tasty,
module Test.Tasty.HUnit,
module Juvix.Prelude,
module Base,
module Juvix.Extra.Paths,
module Juvix.Prelude.Env,
)
where
import Control.Monad.Extra as Monad
import Data.Algorithm.Diff
import Data.Algorithm.DiffOutput
import Juvix.Extra.Paths
import Juvix.Prelude
... | null | https://raw.githubusercontent.com/anoma/juvix/764c6faa8097066687cdb0431b17bf43a94adab1/test/Base.hs | haskell | | relative to root | module Base
( module Test.Tasty,
module Test.Tasty.HUnit,
module Juvix.Prelude,
module Base,
module Juvix.Extra.Paths,
module Juvix.Prelude.Env,
)
where
import Control.Monad.Extra as Monad
import Data.Algorithm.Diff
import Data.Algorithm.DiffOutput
import Juvix.Extra.Paths
import Juvix.Prelude
... |
ff634147041fa8b8476733092312c4ccb7e516faf7d3c44c052de8801f11fe1d | cljfx/cljfx | component.clj | (ns cljfx.component
"Part of a public API")
(defprotocol Component
"Component is an immutable description of some (possibly mutable) object"
:extend-via-metadata true
(instance [this] "Returns (possibly mutable) object associated with this component"))
(extend-protocol Component
Object
(instance [this] th... | null | https://raw.githubusercontent.com/cljfx/cljfx/ec3c34e619b2408026b9f2e2ff8665bebf70bf56/src/cljfx/component.clj | clojure | (ns cljfx.component
"Part of a public API")
(defprotocol Component
"Component is an immutable description of some (possibly mutable) object"
:extend-via-metadata true
(instance [this] "Returns (possibly mutable) object associated with this component"))
(extend-protocol Component
Object
(instance [this] th... | |
beed1d619744a5e4af22c98135ded0dc0481d0ae1f1c3dee732eda3959978005 | owickstrom/komposition | FastLogger.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE TypeOperators #-}
{-# LAN... | null | https://raw.githubusercontent.com/owickstrom/komposition/64893d50941b90f44d77fea0dc6d30c061464cf3/src/Komposition/Logging/FastLogger.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
| A 'Log' interpreter that uses fast-logger. | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
module Komposition.Logging.FastLogger (runFastLoggerLog) where
import Kom... |
4edf773a21b10b4d043e537a6b17ce0f6b97d25a03ac24e99052ebd5d086331c | RichiH/git-repair | PosixFiles.hs | POSIX files ( and compatablity wrappers ) .
-
- This is like System . PosixCompat . Files , except with a fixed rename .
-
- Copyright 2014 < >
-
- License : BSD-2 - clause
-
- This is like System.PosixCompat.Files, except with a fixed rename.
-
- Copyright 2014 Joey Hess <>
-
- License:... | null | https://raw.githubusercontent.com/RichiH/git-repair/c61b677e7a67a286df34c0629c52aeae9be9299a/Utility/PosixFiles.hs | haskell | POSIX files ( and compatablity wrappers ) .
-
- This is like System . PosixCompat . Files , except with a fixed rename .
-
- Copyright 2014 < >
-
- License : BSD-2 - clause
-
- This is like System.PosixCompat.Files, except with a fixed rename.
-
- Copyright 2014 Joey Hess <>
-
- License:... | |
82e35c04fe83e084818f21e8d7fe328d064107f848289c1e3a9678f5babdbaa6 | flavioc/cl-hurd | fsys-set-options.lisp |
(in-package :hurd-translator)
(def-fsys-interface :fsys-set-options ((fsys port)
(reply port)
(reply-type msg-type-name)
(data :pointer)
(data-len msg-type-number... | null | https://raw.githubusercontent.com/flavioc/cl-hurd/982232f47d1a0ff4df5fde2edad03b9df871470a/translator/interfaces/fsys-set-options.lisp | lisp | Propagate options to children translators. |
(in-package :hurd-translator)
(def-fsys-interface :fsys-set-options ((fsys port)
(reply port)
(reply-type msg-type-name)
(data :pointer)
(data-len msg-type-number... |
2d0fc62ce7feadcb5baddbfbd51f8ebb7dddd748973f239046cb787bd1cdc612 | IBM/probzelus | listP.ml |
* Copyright 2018 - 2020 IBM Corporation
*
* 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 writin... | null | https://raw.githubusercontent.com/IBM/probzelus/3bdd60e3c4010452239bfe7bc79165802e5d941b/benchmarks/mtt/mttlib/listP.ml | ocaml |
* Copyright 2018 - 2020 IBM Corporation
*
* 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 writin... | |
e3043cca5a1140a9e4d5486713f93690319a0ad2c1c0681466a0e1756b582669 | erlang/sourcer | sourcer_analyse.erl | -module(sourcer_analyse).
-export([
analyse/1,
analyse_text/1,
merge/1
]).
-include("sourcer_model.hrl").
%%-define(DEBUG, true).
-include("debug.hrl").
merge([]) ->
#model{};
merge(L) when is_list(L) ->
lists:foldl(fun merge/2, #model{}, L);
merge(M) ->
merge([M]).
analyse_text(Text) ->
... | null | https://raw.githubusercontent.com/erlang/sourcer/27ea9c63998b9e694eb7b654dd05b831b989e69e/apps/sourcer/src/sourcer_analyse.erl | erlang | -define(DEBUG, true).
except macros - they can have multiple defs.
- remove doubles
TODO : if def and ref at same location, remove ref
we hope there are no mixed newlines | -module(sourcer_analyse).
-export([
analyse/1,
analyse_text/1,
merge/1
]).
-include("sourcer_model.hrl").
-include("debug.hrl").
merge([]) ->
#model{};
merge(L) when is_list(L) ->
lists:foldl(fun merge/2, #model{}, L);
merge(M) ->
merge([M]).
analyse_text(Text) ->
TText = unicode:chara... |
67ef994ecdccd83656cc37f6288e0ff432da1367d580d3d2b6d024ef7b7b01b3 | stereoknife/cowbot-hs | Bless.hs | {-# LANGUAGE DeriveGeneric #-}
# LANGUAGE TypeApplications #
# LANGUAGE FlexibleContexts #
# LANGUAGE DataKinds #
module Commands.Bless where
import Control.Monad.Catch (MonadThrow)
import Control.Monad.IO.Class (MonadIO (liftIO))
import Data.Aeson (FromJSON, decode)
imp... | null | https://raw.githubusercontent.com/stereoknife/cowbot-hs/50e80d6ef4b849f27692fad3a4bc2b7187848202/app/Commands/Bless.hs | haskell | # LANGUAGE DeriveGeneric # | # LANGUAGE TypeApplications #
# LANGUAGE FlexibleContexts #
# LANGUAGE DataKinds #
module Commands.Bless where
import Control.Monad.Catch (MonadThrow)
import Control.Monad.IO.Class (MonadIO (liftIO))
import Data.Aeson (FromJSON, decode)
import Data.Text ... |
bd5b40cd48c26f38e15dd338f88393d819b813198d809a2f033f8957e10397e6 | dwayne/eopl3 | ex2.26.test.rkt | #lang racket
(require "../ch1/ex1.31.rkt")
(require "./ex2.26.rkt")
(require rackunit)
(check-equal?
(mark-leaves-with-red-depth
(interior-node 'red
(interior-node 'bar
(leaf 26)
(leaf 12))
(interior-node 'red
... | null | https://raw.githubusercontent.com/dwayne/eopl3/9d5fdb2a8dafac3bc48852d49cda8b83e7a825cf/solutions/02-ch2/racket/ex2.26.test.rkt | racket | #lang racket
(require "../ch1/ex1.31.rkt")
(require "./ex2.26.rkt")
(require rackunit)
(check-equal?
(mark-leaves-with-red-depth
(interior-node 'red
(interior-node 'bar
(leaf 26)
(leaf 12))
(interior-node 'red
... | |
32d9ec0e425ef1a1955b2f93f23e6d2cca2b0666c2850958c4e464d521f54f7e | spurious/sagittarius-scheme-mirror | button.scm | -*- mode : scheme ; coding : utf-8 ; -*-
;;;
;;; win32/gui/button.scm - Win32 GUI button
;;;
Copyright ( c ) 2015 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; 1. Red... | null | https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/ext/ffi/win32/gui/button.scm | scheme | coding : utf-8 ; -*-
win32/gui/button.scm - Win32 GUI button
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list ... | Copyright ( c ) 2015 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
(library (win32 gui button)
(export <win32-butt... |
a995bed58a434b370a5b9698f246860f4184fa433e75ec08cfb8b1b8ad4c8380 | juspay/atlas | Environment.hs | # OPTIONS_GHC -Wno - orphans #
|
Copyright 2022 Juspay Technologies Pvt Ltd
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 agre... | null | https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/driver-offer-bpp/src/Environment.hs | haskell | # OPTIONS_GHC -Wno - orphans #
|
Copyright 2022 Juspay Technologies Pvt Ltd
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 agre... | |
24f860c0169e1d17e31a904325639945a283569c855673f383546edd93451978 | inria-parkas/sundialsml | cvsHessian_ASA_FSA.ml |
* -----------------------------------------------------------------
* $ Revision : 1.2 $
* $ Date : 2010/12/01 22:57:59 $
* -----------------------------------------------------------------
* Programmer(s ): @ LLNL
* -----------------------------------------------------------------
* OCaml port :... | null | https://raw.githubusercontent.com/inria-parkas/sundialsml/a1848318cac2e340c32ddfd42671bef07b1390db/examples/cvodes/serial/cvsHessian_ASA_FSA.ml | ocaml |
*--------------------------------------------------------------------
* FUNCTIONS CALLED BY CVODES
*--------------------------------------------------------------------
1st sensitivity RHS
1st sensitivity RHS
1st sensitivity RHS
lambda
mu
lambda
mu
lambda
mu
lambda
mu
*--------------------... |
* -----------------------------------------------------------------
* $ Revision : 1.2 $
* $ Date : 2010/12/01 22:57:59 $
* -----------------------------------------------------------------
* Programmer(s ): @ LLNL
* -----------------------------------------------------------------
* OCaml port :... |
e6fd7a5381f578d78f4e5488c268ab1936e59c344abe0d156efbd4df61a04c4d | Bike/sandalphon.lambda-list | parse.lisp | (in-package #:sandalphon.lambda-list)
(defun parse-lambda-list (lambda-list grammar-spec
&rest initargs &key (safe t))
"Given a lambda list, initargs for it, and a grammar specification, returns a LAMBDA-LIST object.
A grammar specification is a list of clause specifications. A clause specification is either a ... | null | https://raw.githubusercontent.com/Bike/sandalphon.lambda-list/db240cdcf2c066e220de0b49d441cecca941f1fb/parse.lisp | lisp | but it's easy to add any, at least for this function
grammar format = list of (ll-keywords object keywords)
keywords right now being :anywhere and :data-destructure
&environment can only be after
if this spec is after
the last spec.
we're in a proper position,
return the spec
fail
a destructure, probably
W... | (in-package #:sandalphon.lambda-list)
(defun parse-lambda-list (lambda-list grammar-spec
&rest initargs &key (safe t))
"Given a lambda list, initargs for it, and a grammar specification, returns a LAMBDA-LIST object.
A grammar specification is a list of clause specifications. A clause specification is either a ... |
ef6ceeae936829d6358cd87c3b9624b2ee02f6e919df294f7118217b56dbd3b1 | jgm/gitit | Cache.hs | # LANGUAGE CPP #
Copyright ( C ) 2008 < >
This program is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
( at your option ) any later version .
This program is... | null | https://raw.githubusercontent.com/jgm/gitit/b83bb4cd0278e1248954d009dc7ab8e97a3a8190/src/Network/Gitit/Cache.hs | haskell | Functions for maintaining user list and session state.
Returns () after deleting a file from the cache, fails if no cached file. | # LANGUAGE CPP #
Copyright ( C ) 2008 < >
This program is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
( at your option ) any later version .
This program is... |
523bddb15cb0c27754729e0af89297761ad5f09453f9b196b020c71eb67a4a84 | goblint/analyzer | myCheck.ml | open QCheck
let shrink arb = BatOption.default Shrink.nil arb.shrink
module Gen =
struct
let sequence (gens: 'a Gen.t list): 'a list Gen.t =
let open Gen in
let f gen acc = acc >>= (fun xs -> gen >|= (fun x -> x :: xs)) in
List.fold_right f gens (return [])
end
module Iter =
struct
let of_gen ~n gen ... | null | https://raw.githubusercontent.com/goblint/analyzer/69d12c316e89e66d10ad655cbc4e235e4d51bc69/src/domains/myCheck.ml | ocaml | -cube/qcheck/blob/e2c27723bbffd85b992355f91e2e2ba7dcd04f43/src/QCheck.ml#L330-L337
only divisions are fast enough
try some divisors
fast path
S TODO: how to generate this | open QCheck
let shrink arb = BatOption.default Shrink.nil arb.shrink
module Gen =
struct
let sequence (gens: 'a Gen.t list): 'a list Gen.t =
let open Gen in
let f gen acc = acc >>= (fun xs -> gen >|= (fun x -> x :: xs)) in
List.fold_right f gens (return [])
end
module Iter =
struct
let of_gen ~n gen ... |
129c3c8b8de83dcddee0755aea07ed2569d03dd3170978dcc494fe9ff26b5923 | alanz/ghc-exactprint | Utils2.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE StandaloneDeriving #
module Utils2 where
import Control.Applicative (Applicative(..))
import Control.Monad (when, liftM, ap)
import Control.Exception
import Data.Data
import Data.List
import Data.Maybe
import Data.Monoid
import Language . Haskell . GHC.ExactPrint . Utils
i... | null | https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc710/Utils2.hs | haskell | ---------------------------------------------------------------------
'[' nonBUG
']' BUG
'('
')'
'(#'
'#)'
'[:'
':]'
'('
For '(,,,)'
')'
temporary, for test | # LANGUAGE FlexibleInstances #
# LANGUAGE StandaloneDeriving #
module Utils2 where
import Control.Applicative (Applicative(..))
import Control.Monad (when, liftM, ap)
import Control.Exception
import Data.Data
import Data.List
import Data.Maybe
import Data.Monoid
import Language . Haskell . GHC.ExactPrint . Utils
i... |
aba10752ad61e54a4513a1f7176ea06d9f6e3d4c2db312811adda9cfe2b5ee4e | lambdaisland/harvest | walkthrough.clj | (ns notebooks.walkthrough
(:require [lambdaisland.harvest :as h]
[lambdaisland.faker :as faker :refer [fake]]
[lambdaisland.harvest.xtdb :as harvest-xt]
[xtdb.api :as xt]))
;; # 🧧 Factories for Fun and Profit. 恭喜發財
Harvest is a factory library for Clojure and ClojureScript , i... | null | https://raw.githubusercontent.com/lambdaisland/harvest/74a6b6e31cef0cead4d7aa970b4ee9452013155b/notebooks/walkthrough.clj | clojure | # 🧧 Factories for Fun and Profit. 恭喜發財
features that set it apart. In this walkthrough we'll build up your
understanding from bottom to top.
function. Build takes a _template_ or _factory_, and optionally a map of
options.
`build` returns a "result map", contained a _value_, and a map of _linked
entities_, whic... | (ns notebooks.walkthrough
(:require [lambdaisland.harvest :as h]
[lambdaisland.faker :as faker :refer [fake]]
[lambdaisland.harvest.xtdb :as harvest-xt]
[xtdb.api :as xt]))
Harvest is a factory library for Clojure and ClojureScript , inspired by the
likes of Factory Bot ( Rub... |
4f7c4223c1932d1aa25881b3faccc6f151e7cb8c5b77b6d9c6c02752ecfb1d9e | wdebeaum/step | vague.lisp | ;;;;
;;;; W::vague
;;;;
(define-words :pos W::adj :templ CENTRAL-ADJ-TEMPL
:words (
(W::vague
(wordfeats (W::morph (:FORMS (-er -LY))))
(SENSES
((meta-data :origin cardiac :entry-date 20080508 :change-date nil :comments LM-vocab)
(lf-parent ont::not-precise-val)
)
)
)
))
| null | https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/vague.lisp | lisp |
W::vague
|
(define-words :pos W::adj :templ CENTRAL-ADJ-TEMPL
:words (
(W::vague
(wordfeats (W::morph (:FORMS (-er -LY))))
(SENSES
((meta-data :origin cardiac :entry-date 20080508 :change-date nil :comments LM-vocab)
(lf-parent ont::not-precise-val)
)
)
)
))
|
3cb0287cb3a0a610f2501f1944f2529b3ff98005e39dd9b0efecaeecea02aa69 | janestreet/universe | expert1.mli | (** A module internal to Incremental. Users should see {!Incremental_intf}.
This module is almost the external interface of the [Expert], but
defunctorized, so it's easier to use from the inside of incremental. *)
module Dependency : sig
type 'a t [@@deriving sexp_of]
val create : ?on_change:('a -> unit... | null | https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/incremental/src/expert1.mli | ocaml | * A module internal to Incremental. Users should see {!Incremental_intf}.
This module is almost the external interface of the [Expert], but
defunctorized, so it's easier to use from the inside of incremental. |
module Dependency : sig
type 'a t [@@deriving sexp_of]
val create : ?on_change:('a -> unit) -> 'a Node.t -> 'a t
val value : 'a t -> 'a
end
module Node : sig
type 'a t [@@deriving sexp_of]
val create
: State.t
-> ?on_observability_change:(is_now_observable:bool -> unit)
-> (unit -> 'a)
->... |
d0737bf4a91202af34b5c7297a8540d89153656ab49b87bb254dfed43fb9f487 | walkie/academic-webpage | Main.hs |
module Main where
import System.Environment (getArgs,withArgs)
import Hakyll
import WebPage.Generate
import WebPage.Generate.Marburg
main = do
args <- getArgs
case args of
"marburg" : as -> withArgs as (hakyllWith marburgConfig marburgRules)
_ -> hakyllWith config rules
| null | https://raw.githubusercontent.com/walkie/academic-webpage/4c86e5d5c1559cde08440427fa39bab7d91e765d/haskell/Main.hs | haskell |
module Main where
import System.Environment (getArgs,withArgs)
import Hakyll
import WebPage.Generate
import WebPage.Generate.Marburg
main = do
args <- getArgs
case args of
"marburg" : as -> withArgs as (hakyllWith marburgConfig marburgRules)
_ -> hakyllWith config rules
| |
8272404502a6be8ccbbd7b1dc073074d4b038f32b37dea84e060455a1a97fae0 | namin/inc | tests-1.7-req.scm | (add-tests-with-string-output "procedures"
[(letrec () 12) => "12\n"]
[(letrec () (let ([x 5]) (fx+ x x))) => "10\n"]
[(letrec ([f (lambda () 5)]) 7) => "7\n"]
[(letrec ([f (lambda () 5)]) (let ([x 12]) x)) => "12\n"]
[(letrec ([f (lambda () 5)]) (f)) => "5\n"]
[(letrec ([f (lambda () 5)]) (let ([x (f)]) x)... | null | https://raw.githubusercontent.com/namin/inc/3f683935e290848485f8d4d165a4f727f6658d1d/src/tests-1.7-req.scm | scheme | (add-tests-with-string-output "procedures"
[(letrec () 12) => "12\n"]
[(letrec () (let ([x 5]) (fx+ x x))) => "10\n"]
[(letrec ([f (lambda () 5)]) 7) => "7\n"]
[(letrec ([f (lambda () 5)]) (let ([x 12]) x)) => "12\n"]
[(letrec ([f (lambda () 5)]) (f)) => "5\n"]
[(letrec ([f (lambda () 5)]) (let ([x (f)]) x)... | |
a0b3369bdff25d73056766b1cc2397ca9378f9e06627e9532f2056e0830fe6b5 | Bogdanp/racket-gui-extra | ffi.rkt | #lang racket/base
(require ffi/unsafe
ffi/unsafe/atomic
ffi/unsafe/nsalloc
ffi/unsafe/nsstring
ffi/unsafe/objc
mred/private/lock
mred/private/wx/cocoa/types
(only-in mred/private/wx/cocoa/utils
as-objc-allocation
as-objc... | null | https://raw.githubusercontent.com/Bogdanp/racket-gui-extra/0760650cc1968db396e175c042e97ca597927739/gui-extra-lib/gui/extra/private/cocoa/ffi.rkt | racket | #lang racket/base
(require ffi/unsafe
ffi/unsafe/atomic
ffi/unsafe/nsalloc
ffi/unsafe/nsstring
ffi/unsafe/objc
mred/private/lock
mred/private/wx/cocoa/types
(only-in mred/private/wx/cocoa/utils
as-objc-allocation
as-objc... | |
4af3b123e6001eac6470d93ec026ab076a9cddaeeb678e2c186bed398817f34f | mstksg/functor-combinators | Tensor.hs | # OPTIONS_GHC -Wno - orphans #
-- |
-- Module : Data.HBifunctor.Tensor
Copyright : ( c ) 2019
-- License : BSD3
--
Maintainer :
-- Stability : experimental
-- Portability : non-portable
--
-- This module provides tools for working with binary functor combinators.
--
" Data . Functor . HFunctor... | null | https://raw.githubusercontent.com/mstksg/functor-combinators/3e1ab9fc4c4fe756ba05d348cd9ba0342201c611/src/Data/HBifunctor/Tensor.hs | haskell | |
Module : Data.HBifunctor.Tensor
License : BSD3
Stability : experimental
Portability : non-portable
This module provides tools for working with binary functor combinators.
(transforming a single functor). This module provides tools for working
The binary analog of 'HFunctor' is 'HBifunctor': we... | # OPTIONS_GHC -Wno - orphans #
Copyright : ( c ) 2019
Maintainer :
" Data . Functor . HFunctor " deals with /single/ functor combinators
with combinators that combine and mix two functors " together " .
The binary analog of ' Interpret ' is ' ' . If your combinator @t@
and target functor is an ... |
c59a3e17f31d289b75ec8f2a3c5feb216e5c88f4a77a66c8cc3f4354ffe2017c | apache/couchdb-mochiweb | mochitemp.erl | @author < >
@copyright 2010 Mochi Media , Inc.
%%
%% 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, modif... | null | https://raw.githubusercontent.com/apache/couchdb-mochiweb/d3c47a9e8833cd878c9227093e30a2341ee32900/src/mochitemp.erl | erlang |
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
the rights to use, copy, modify, merge, publish, distribute, sublicense,
Software is furnished to do so, subject to the following conditions:
The above copyright noti... | @author < >
@copyright 2010 Mochi Media , Inc.
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF AN... |
4ef53af7766ff6d62f51a5f02949bb1b67a60566ab97e8c64307d20514048db1 | bmeurer/ocamljit2 | array.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/stdlib/array.ml | ocaml | *********************************************************************
Objective Caml
... | , 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 GNU Library General Public License , with
$ Id$
external length : 'a array ->... |
a7ea3e11bd3ab0b2a7ad1518e71dd139547bb2c1da011f86e331fe9e4986cf8c | SovereignShop/codenames | game.cljs | (ns ^:figwheel-always codenames.views.game
(:require
[codenames.subs.game :as game-subs]
[codenames.subs.session :as session-subs]
[codenames.subs.stats :as stat-subs]
[codenames.constants.ui-idents :as idents]
[codenames.constants.ui-tabs :as tabs]
[codenames.events.game :as game-events]
[codena... | null | https://raw.githubusercontent.com/SovereignShop/codenames/0a3d5f52b0a704341801bb7125b054a4323bcf19/src/cljs/codenames/views/game.cljs | clojure | (ns ^:figwheel-always codenames.views.game
(:require
[codenames.subs.game :as game-subs]
[codenames.subs.session :as session-subs]
[codenames.subs.stats :as stat-subs]
[codenames.constants.ui-idents :as idents]
[codenames.constants.ui-tabs :as tabs]
[codenames.events.game :as game-events]
[codena... | |
3c797e3cf82c1e09ac880624e2c673cc0a9a56604fdc6a932e52c9b9768c7103 | sbcl/sbcl | braid.lisp | ;;;; bootstrapping the meta-braid
;;;;
;;;; The code in this file takes the early definitions that have been
;;;; saved up and actually builds those class objects. This work is
;;;; largely driven off of those class definitions, but the fact that
;;;; STANDARD-CLASS is the class of all metaclasses in the braid is
;;;; ... | null | https://raw.githubusercontent.com/sbcl/sbcl/cacbb24d03cbc1309447bfcd72a5cd17dd2d0e8b/src/pcl/braid.lisp | lisp | bootstrapping the meta-braid
The code in this file takes the early definitions that have been
saved up and actually builds those class objects. This work is
largely driven off of those class definitions, but the fact that
STANDARD-CLASS is the class of all metaclasses in the braid is
built into this code pretty ... |
This software is part of the SBCL system . See the README file for
This software is derived from software originally released by Xerox
copyright information from original PCL sources :
Copyright ( c ) 1985 , 1986 , 1987 , 1988 , 1989 , 1990 Xerox Corporation .
derivative works must comply with all applicab... |
2f5aa2b4b4d33edfd03214469a4aa3994a00de284349ceabe597451529da3c1f | ktakashi/sagittarius-scheme | ecdsa_brainpoolP224r1_sha224_p1363_test.scm | (test-signature/testvector
"ecdsa_brainpoolP224r1_sha224_p1363_test"
:algorithm
"ECDSA"
:digest
"SHA-224"
:public-key
#vu8(48 82 48 20 6 7 42 134 72 206 61 2 1 6 9 43 36 3 3 2 8 1 1 5 3 58 0 4 87 46 171 115 118 208 82 223 196 9 35 219 37 52 46 169 203 252 228 184 88 30 16 74 76 143 55 201 74 112 14 197 22... | null | https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/8d3be98032133507b87d6c0466d60f982ebf9b15/ext/crypto/tests/testvectors/signature/ecdsa_brainpoolP224r1_sha224_p1363_test.scm | scheme | (test-signature/testvector
"ecdsa_brainpoolP224r1_sha224_p1363_test"
:algorithm
"ECDSA"
:digest
"SHA-224"
:public-key
#vu8(48 82 48 20 6 7 42 134 72 206 61 2 1 6 9 43 36 3 3 2 8 1 1 5 3 58 0 4 87 46 171 115 118 208 82 223 196 9 35 219 37 52 46 169 203 252 228 184 88 30 16 74 76 143 55 201 74 112 14 197 22... | |
d51605803abf3e30cf44d870d3384e1976ad2bb891274e7f0ceb1b5e7e98171b | footprintanalytics/footprint-web | session.clj | (ns metabase.models.session
(:require [buddy.core.codecs :as codecs]
[buddy.core.nonce :as nonce]
[metabase.server.middleware.misc :as mw.misc]
[metabase.server.request.util :as request.u]
[metabase.util :as u]
[schema.core :as s]
[toucan.models ... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/src/metabase/models/session.clj | clojure | (ns metabase.models.session
(:require [buddy.core.codecs :as codecs]
[buddy.core.nonce :as nonce]
[metabase.server.middleware.misc :as mw.misc]
[metabase.server.request.util :as request.u]
[metabase.util :as u]
[schema.core :as s]
[toucan.models ... | |
731a785113ac0f51daeac2821f2d065b02ea77f3ff91f8c48ba910ce52d16c6f | BekaValentine/SimpleFP | REPL.hs | module Record.Unification.REPL where
import Control.Monad.Reader (runReaderT)
import System.IO
import Env
import Eval
import Record.Core.ConSig
import Record.Core.Evaluation
import Record.Core.Parser
import Record.Core.Term
import Record.Unification.Elaboration
import Record.Unification.TypeChecking
flushStr :: St... | null | https://raw.githubusercontent.com/BekaValentine/SimpleFP/3cff456be9f0b99509e5cbe809be1055009b32df/src/Record/Unification/REPL.hs | haskell | module Record.Unification.REPL where
import Control.Monad.Reader (runReaderT)
import System.IO
import Env
import Eval
import Record.Core.ConSig
import Record.Core.Evaluation
import Record.Core.Parser
import Record.Core.Term
import Record.Unification.Elaboration
import Record.Unification.TypeChecking
flushStr :: St... | |
25da55f5a701b20db6b0183694c9cc013378937b440c46a9c7080d5a21e33753 | 2049foundation/clickhouse-haskell | Pool.hs | Copyright ( c ) 2020 - present , EMQX , Inc.
-- All rights reserved.
--
This source code is distributed under the terms of a MIT license ,
-- found in the LICENSE file.
-------------------------------------------------------------------------------
-- This module provides implementation of Connection pool for TCP n... | null | https://raw.githubusercontent.com/2049foundation/clickhouse-haskell/43a1714e344984e032b68f1c6d622d6b17721c5b/src/Database/ClickHouseDriver/Pool.hs | haskell | All rights reserved.
found in the LICENSE file.
-----------------------------------------------------------------------------
This module provides implementation of Connection pool for TCP network
| default connection parameters (settings)
| Create connection pool
^ parameters for basic connection.
^ number of... | Copyright ( c ) 2020 - present , EMQX , Inc.
This source code is distributed under the terms of a MIT license ,
# LANGUAGE BlockArguments #
# LANGUAGE NamedFieldPuns #
module Database.ClickHouseDriver.Pool
(
createConnectionPool
) where
import Database.ClickHouseDriver.Connection ( tcpConnect )
import Database.... |
167085600a6ce3a381835d29c7dc1b98ecd88def9d6b338573a351a9d3ec16b3 | spawnfest/eep49ers | ssh_io.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2005 - 2017 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/ssh/src/ssh_io.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 2005 - 2017 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(ssh_io).
-export([yes_no/2, read_password/2, read_line/2, format/2]).
-include("ssh.hrl").
read_line(Pro... |
8cd3ae8c462071ce5233711cedf85869f06d07c5b436e52155f1792d2ece8b26 | yi-editor/yi | IReader.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
{-# OPTIONS_HADDOCK show-extensions #-}
-- |
Module : . IReader
-- License : GPL-2
-- Maintainer :
-- Stability : experimental
-- Portability : portable... | null | https://raw.githubusercontent.com/yi-editor/yi/58c239e3a77cef8f4f77e94677bd6a295f585f5f/yi-ireader/src/Yi/IReader.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE OverloadedStrings #
# OPTIONS_HADDOCK show-extensions #
|
License : GPL-2
Maintainer :
Stability : experimental
Portability : portable
This module defines a list type and operations on it; it further
provides functions which write in and out the list. The g... | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE ScopedTypeVariables #
Module : . IReader
module Yi.IReader where
import Control.Exception (SomeException, catch)
import Control.Monad (join, void)
import Data.Binary (Binary, decode, encod... |
236f2489b9bbb0f956696c63f6047cd87a1066604640c2c9cebe74344fcec18b | MarchLiu/market | core.clj | (ns matcher.core)
(defn foo
"I don't do a whole lot."
[x]
(println x "Hello, World!"))
| null | https://raw.githubusercontent.com/MarchLiu/market/7a7daf6c04b41e0f8494be6740da8d54785c5e77/matcher/src/matcher/core.clj | clojure | (ns matcher.core)
(defn foo
"I don't do a whole lot."
[x]
(println x "Hello, World!"))
| |
c0b91205dc0c7521e4126424368d3ca9a8b7d7dbd2d5ea9a2009225da2ced070 | jpmonettas/flow-storm-debugger | api.cljs | (ns flow-storm.api
(:require [flow-storm.json-serializer :as serializer]
[flow-storm.remote-websocket-client :as remote-websocket-client]
[flow-storm.runtime.taps :as rt-taps]
[flow-storm.runtime.events :as rt-events]
[flow-storm.runtime.indexes.api :as indexes-api]
... | null | https://raw.githubusercontent.com/jpmonettas/flow-storm-debugger/c4419e6d18a4710b12dce93111f0ad37da1722f5/src-inst/flow_storm/api.cljs | clojure | connect to the remote websocket
push all events thru the websocket | (ns flow-storm.api
(:require [flow-storm.json-serializer :as serializer]
[flow-storm.remote-websocket-client :as remote-websocket-client]
[flow-storm.runtime.taps :as rt-taps]
[flow-storm.runtime.events :as rt-events]
[flow-storm.runtime.indexes.api :as indexes-api]
... |
5d4aa3c09f3a45d69444110fd33c9aec3b8a394ef076798bcfc4c464379abc2f | soegaard/urlang | info.rkt | #lang info
This file describes the contents of the Urlang package .
;;; The information is used by the Racket package system.
The Urlang package contains multiple collections ( urlang , urlang - doc , compiler etc )
(define collection "urlang-examples")
;;; Version number
(define version "1.0")
;;; Dependenci... | null | https://raw.githubusercontent.com/soegaard/urlang/086622e2306e72731016c7108aca3328e5082aee/urlang-examples/info.rkt | racket | The information is used by the Racket package system.
Version number
Dependencies declared here will need source
Dependencies here can be installed as binaries (i.e. zo-files) | #lang info
This file describes the contents of the Urlang package .
The Urlang package contains multiple collections ( urlang , urlang - doc , compiler etc )
(define collection "urlang-examples")
(define version "1.0")
(define deps '())
(define build-deps '("base"
"html-writing"
... |
7d3256995720daacdac9379b25a51d449c56cfe5d44961da972ff7ca42fbf260 | DavidAlphaFox/aihtml | aihtml_app.erl | -module(aihtml_app).
-behaviour(application).
-export([start/2]).
-export([stop/1]).
start(_Type, _Args) ->
application:start(crypto),
application:start(ailib),
aihtml_sup:start_link().
stop(_State) ->
ok.
| null | https://raw.githubusercontent.com/DavidAlphaFox/aihtml/82c01eb4cd39ccbef5ac32c58febcec3ac49b4af/src/aihtml_app.erl | erlang | -module(aihtml_app).
-behaviour(application).
-export([start/2]).
-export([stop/1]).
start(_Type, _Args) ->
application:start(crypto),
application:start(ailib),
aihtml_sup:start_link().
stop(_State) ->
ok.
| |
4b5fcdedc6f71ec723d0cf5bfa203bec758233bbc7c5952b5efcc67f7186c400 | roman01la/virtual.list | core.cljs | (ns example.core
(:require [rum.core :as rum]
[goog.dom :as gdom]
[sablono.core :refer-macros [html]]
[virtual.list :refer [v-list]]))
(rum/defc Avatar [label color]
[:div {:style {:background-color color
:color "#fff"
:width ... | null | https://raw.githubusercontent.com/roman01la/virtual.list/90dc1b6126ccfa368864a65d9c13a0618d2b5eb6/examples/example/core.cljs | clojure | (ns example.core
(:require [rum.core :as rum]
[goog.dom :as gdom]
[sablono.core :refer-macros [html]]
[virtual.list :refer [v-list]]))
(rum/defc Avatar [label color]
[:div {:style {:background-color color
:color "#fff"
:width ... | |
edf296f0388065dbec70c3d473cb374adbb2694bb61a5a5898b24b891ef68a80 | marick/Midje | open_protocols.clj | (ns ^{:doc "Macros for using protocols in prerequisites.
The strategy for open protocols is to rewrite each function defined in the
deftype/defrecord so that it checks whether its corresponding symbol is
currently faked out. If so, it uses that function definition instead of
continuing on with its own implemen... | null | https://raw.githubusercontent.com/marick/Midje/2b9bcb117442d3bd2d16446b47540888d683c717/src/midje/open_protocols.clj | clojure | (ns ^{:doc "Macros for using protocols in prerequisites.
The strategy for open protocols is to rewrite each function defined in the
deftype/defrecord so that it checks whether its corresponding symbol is
currently faked out. If so, it uses that function definition instead of
continuing on with its own implemen... | |
d1ac58d6d2056e70ace1bf42c15a6c7ee6dfb3e23b615a6ea367df974d14f2cb | serokell/importify | 05-RecordWildCardUsed.hs | # LANGUAGE RecordWildCards #
module RecordWildCardUsed where
import Language.Haskell.Names (Symbol (Value, symbolName))
foo Value{..} = symbolName
| null | https://raw.githubusercontent.com/serokell/importify/09f31d851b2152ae6ce880b81abc3554ade29f37/test/test-data/haskell-names%40records/05-RecordWildCardUsed.hs | haskell | # LANGUAGE RecordWildCards #
module RecordWildCardUsed where
import Language.Haskell.Names (Symbol (Value, symbolName))
foo Value{..} = symbolName
| |
cdfe982249ea60e945b433cc76ca5a79b63726bef33ef34734b16a7e5d2464ff | valderman/selda | Types.hs | # OPTIONS_GHC -fno - warn - unused - binds #
# LANGUAGE GADTs , TypeOperators , TypeFamilies , FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving , MultiParamTypeClasses #
# LANGUAGE UndecidableInstances , DeriveGeneric , OverloadedStrings #
# LANGUAGE CPP #
-- | Basic Selda types.
module Database.Selda.Types
... | null | https://raw.githubusercontent.com/valderman/selda/c270f354caaa733d10b79d5c0ba05f98f56fa4b6/selda/src/Database/Selda/Types.hs | haskell | | Basic Selda types.
| Name of a database column.
| Name of a database table.
| Modify the given column name using the given function.
| Add a prefix to a column name.
| Add a suffix to a column name.
| Convert a column name into a string, with quotes.
| Convert column names into a string, without quotes, inter... | # OPTIONS_GHC -fno - warn - unused - binds #
# LANGUAGE GADTs , TypeOperators , TypeFamilies , FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving , MultiParamTypeClasses #
# LANGUAGE UndecidableInstances , DeriveGeneric , OverloadedStrings #
# LANGUAGE CPP #
module Database.Selda.Types
( (:*:)(..), Head, Tup (... |
85d807611b64cca908233f24b5bb3bbd2617adad4e7ae9657671551bd5c190ea | commercialhaskell/stack | build-stack-installer.hs | {- stack script
--resolver nightly-2022-11-14
--install-ghc
--package nsis
-}
{-# LANGUAGE OverloadedStrings #-}
import Data.String
import System.Environment
import Development.NSIS
import Development.NSIS.Plugins.EnvVarUpdate
Note that it is * required * to use a NSIS compiler that supports long strin... | null | https://raw.githubusercontent.com/commercialhaskell/stack/dafb4cdace8603837abe9d7c344a40c04fc7824c/etc/scripts/build-stack-installer.hs | haskell | stack script
--resolver nightly-2022-11-14
--install-ghc
--package nsis
# LANGUAGE OverloadedStrings #
to avoid corrupting the user's $PATH.
Write the installation path into the registry
Write the uninstall keys for Windows
uninstallation option.)
will not remove if not empty
The description text is... |
import Data.String
import System.Environment
import Development.NSIS
import Development.NSIS.Plugins.EnvVarUpdate
Note that it is * required * to use a NSIS compiler that supports long strings ,
main :: IO ()
main = do
[srcPath, execPath, nsiPath, stackVersionStr] <- getArgs
writeFile (fromString nsiPath) $ ... |
7b2eb85c591499b611c978de62c5e90fb290b2bc762dd9d25f7f9e3207cf6500 | paurkedal/episql | error.mli | Copyright ( C ) 2021 - -2023 Petter A. Urkedal < >
*
* This library is free software ; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or ( at your
* option ) any la... | null | https://raw.githubusercontent.com/paurkedal/episql/bd1cf8399af9073d39c21437d963ea4d498f2816/caqti-persist/lib/error.mli | ocaml | Copyright ( C ) 2021 - -2023 Petter A. Urkedal < >
*
* This library is free software ; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or ( at your
* option ) any la... | |
49112389d93646e1453c119712ec94176e71f6d77c8dbf7e17d3d870f9bdc2fb | haroldcarr/learn-haskell-coq-ml-etc | HMF.hs | {-# OPTIONS_GHC -Wno-unused-do-bind #-}
# OPTIONS_GHC -fno - warn - missing - signatures #
# OPTIONS_GHC -Wno - missing - pattern - synonym - signatures #
# LANGUAGE DeriveFunctor #
# LANGUAGE ExistentialQuantification #
{-# LANGUAGE GADTs #-}
# LANGUAGE... | null | https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/topic/fix-free/2016-01-benjamin-hodgson-parsing-to-free-monads/HMF.hs | haskell | # OPTIONS_GHC -Wno-unused-do-bind #
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE PatternSynonyms #
# LANGUAGE TypeOperators #
----------------------------------------------------------------------------
| runtime representation of ty... | # OPTIONS_GHC -fno - warn - missing - signatures #
# OPTIONS_GHC -Wno - missing - pattern - synonym - signatures #
# LANGUAGE DeriveFunctor #
# LANGUAGE ExistentialQuantification #
# LANGUAGE LambdaCase #
module HMF where
import Common
import Control.Appli... |
21c244eedfb637656f4783080a0a36e563e430842cb7065e2a17e57d0441a1ce | cdepillabout/servant-checked-exceptions | EnvelopeT.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE DataKinds #
# LANGUAGE EmptyCase #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE InstanceSigs #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PolyKinds #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE... | null | https://raw.githubusercontent.com/cdepillabout/servant-checked-exceptions/8ec4e831e45e51f3404790496f036a42c7349afa/servant-checked-exceptions/example/EnvelopeT.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
'EnvelopeT' instead of just 'Envelope'.
| This is the handler for 'Api.ApiStrictSearch'.
of greetings.)
Otherwise, throw an envelope error 'BadSearchTermErr'.
Note that this function says that it might also ret... | # LANGUAGE DataKinds #
# LANGUAGE EmptyCase #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE InstanceSigs #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
| This... |
0b549d31fcf9cfe12acbc549217e7168e5dbcaa085219a2f714e267f7b559a60 | rixed/ramen | raql_value.ml | (* Manually written impostor to raql_value, converting from/to Ramen's internal
* value types. *)
open Stdint
open DessserOCamlBackEndHelpers
module Wire = Raql_value_wire.DessserGen
(* Stdint types are implemented as custom blocks, therefore are slower than
* ints. But we do not care as we merely represents code ... | null | https://raw.githubusercontent.com/rixed/ramen/7a166362f7a290d6852b2db948cc949d7bcb157c/src/raql_value.ml | ocaml | Manually written impostor to raql_value, converting from/to Ramen's internal
* value types.
Stdint types are implemented as custom blocks, therefore are slower than
* ints. But we do not care as we merely represents code here, we do not run
* the operators.
* For NULL values we are doomed to loose the type info... | open Stdint
open DessserOCamlBackEndHelpers
module Wire = Raql_value_wire.DessserGen
Refined from Raql_value because of our IP type . FIXME .
type t =
| VNull
| VUnit
| VFloat of float
| VString of string
| VBool of bool
| VChar of char
| VU8 of uint8
| VU16 of uint16
| VU24 of uint24
| VU32 of ... |
512fb807a8b3ab6d9fc9048dabe3fac916be7ec7de90e87ea0bc0fcf094b9f66 | larcenists/larceny | 16seq3.scm | (bits 16)
(text
(begin (nop)
(nop)
(seq (nop)
(nop)
z!
(nop)
(inv z!)
(nop))
(nop)))
00000000 90 nop
00000001 90 nop
00000002 90 nop
00000003 90 nop
00000004 7504 jnz 0xa
00000006 90... | null | https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/src/Lib/Sassy/tests/prims16/16seq3.scm | scheme | (bits 16)
(text
(begin (nop)
(nop)
(seq (nop)
(nop)
z!
(nop)
(inv z!)
(nop))
(nop)))
00000000 90 nop
00000001 90 nop
00000002 90 nop
00000003 90 nop
00000004 7504 jnz 0xa
00000006 90... | |
20ed435c890b1221636aa2d2959ca6ac6b74dbe02298367b750f72b0db8f29cb | whamtet/ctmx | config.cljc | (ns ctmx.config)
(def default-param-method :simple)
(defn set-param-method! [method]
{:pre [(contains? #{:simple :path} method)]}
#?(:clj (alter-var-root #'default-param-method (constantly method))
:cljs (set! default-param-method method)))
(def render-style? true)
(def render-hs? true)
(def render-class? tr... | null | https://raw.githubusercontent.com/whamtet/ctmx/9ea5677dfe5196f8fbff88d05ea6b020169ccdc8/src/ctmx/config.cljc | clojure | (ns ctmx.config)
(def default-param-method :simple)
(defn set-param-method! [method]
{:pre [(contains? #{:simple :path} method)]}
#?(:clj (alter-var-root #'default-param-method (constantly method))
:cljs (set! default-param-method method)))
(def render-style? true)
(def render-hs? true)
(def render-class? tr... | |
b52f213555a2ff92d3eb83a97868db2cee486deb85fd9c7a7da3ea17e252b4f7 | lowasser/TrieMap | Traversable.hs | # LANGUAGE CPP , BangPatterns , ViewPatterns , FlexibleInstances #
module Data.TrieMap.RadixTrie.Traversable () where
import Data.TrieMap.RadixTrie.Base
import Data.Functor.Immoral
import Prelude hiding (foldl, foldr)
#define V(f) f (VVector) (k)
#define U(f) f (PVector) (Word)
#define EDGE(args) (!(eView -> Edge ar... | null | https://raw.githubusercontent.com/lowasser/TrieMap/1ab52b8d83469974a629f2aa577a85de3f9e867a/Data/TrieMap/RadixTrie/Traversable.hs | haskell | # LANGUAGE CPP , BangPatterns , ViewPatterns , FlexibleInstances #
module Data.TrieMap.RadixTrie.Traversable () where
import Data.TrieMap.RadixTrie.Base
import Data.Functor.Immoral
import Prelude hiding (foldl, foldr)
#define V(f) f (VVector) (k)
#define U(f) f (PVector) (Word)
#define EDGE(args) (!(eView -> Edge ar... | |
7f4c58f11004a790d559f5ad655d4e3b55bd308c1d37b06f3ecac1073b61d39d | simonmichael/hledger | unittest.hs |
Run the hledger package 's unit tests using the tasty test runner
( by running the test command limited to Hledger . Cli tests ) .
Run the hledger package's unit tests using the tasty test runner
(by running the test command limited to Hledger.Cli tests).
-}
cabal missing - home - modules workaround from hledg... | null | https://raw.githubusercontent.com/simonmichael/hledger/55772cbd9b88dfbe120811f8639b5b63640dac19/hledger/test/unittest.hs | haskell | {-# LANGUAGE PackageImports #-}
import "hledger" Hledger.Cli (tests_Hledger_Cli)
helps the above |
Run the hledger package 's unit tests using the tasty test runner
( by running the test command limited to Hledger . Cli tests ) .
Run the hledger package's unit tests using the tasty test runner
(by running the test command limited to Hledger.Cli tests).
-}
cabal missing - home - modules workaround from hledg... |
573bd64c4bdb3ce3a92cba5c143bd81a605ee33846ac8bf1a492821301031d21 | raystubbs/FkCSS | render.cljc | (ns fkcss.render
(:require
[clojure.string :as str]
[fkcss.misc :refer [panic]]))
(declare ^:dynamic ^:private *context*)
(def default-property-handlers
"Custom property handling, includes vendor prefixing."
{:margin-x
(fn [v]
{:props
{:margin-left v :margin-right v}})
:margin-y
(fn... | null | https://raw.githubusercontent.com/raystubbs/FkCSS/c77478b0f7c664e110942b11bb6dc14f641895f9/src/fkcss/render.cljc | clojure | rules with queries come after to ensure correct precedence | (ns fkcss.render
(:require
[clojure.string :as str]
[fkcss.misc :refer [panic]]))
(declare ^:dynamic ^:private *context*)
(def default-property-handlers
"Custom property handling, includes vendor prefixing."
{:margin-x
(fn [v]
{:props
{:margin-left v :margin-right v}})
:margin-y
(fn... |
1172d8e6a4ec53aad2758301c8ec0bcbb9192474ac675e514414498d8e70aa40 | pichi/epexercises | db.erl | -module(db).
-export([new/0, destroy/1, write/3, delete/2, read/2, match/2]).
-export([test/0]).
% db:new() ⇒ Db.
% db:destroy(Db) ⇒ ok.
% db:write(Key, Element, Db) ⇒ NewDb.
db : delete(Key , Db ) ⇒ NewDb .
db : read(Key , Db ) ⇒{ok , Element } | { error , instance } .
db : match(Element , Db ) ⇒ [ Key1 , ...... | null | https://raw.githubusercontent.com/pichi/epexercises/d6383ad334bd6cf684b16225bffd33d6c3d2746f/Exercise3-7/db.erl | erlang | db:new() ⇒ Db.
db:destroy(Db) ⇒ ok.
db:write(Key, Element, Db) ⇒ NewDb. | -module(db).
-export([new/0, destroy/1, write/3, delete/2, read/2, match/2]).
-export([test/0]).
db : delete(Key , Db ) ⇒ NewDb .
db : read(Key , Db ) ⇒{ok , Element } | { error , instance } .
db : match(Element , Db ) ⇒ [ Key1 , ... , KeyN ] .
new() -> [].
destroy(X) when is_list(X) -> ok.
write(Key, Eleme... |
fc6fbf3acecfd8d72c033c798a02f212ca140e4102c2135523266b4acf2d2e85 | TyGuS/hoogle_plus | GHCCheckerSpec.hs | module HooglePlus.GHCCheckerSpec (spec) where
import HooglePlus.GHCChecker
import Synquid.Parser
import Synquid.Pretty () -- Instances
import Types.Type
import Types.Program
import Synquid.Type
import Synquid.Logic
import Database.Util
import Test.Hspec
import Text.Pretty.Simple
import Text.Parsec.Pos
import Control.... | null | https://raw.githubusercontent.com/TyGuS/hoogle_plus/d02a1466d98f872e78ddb2fb612cb67d4bd0ca18/test/HooglePlus/GHCCheckerSpec.hs | haskell | Instances | module HooglePlus.GHCCheckerSpec (spec) where
import HooglePlus.GHCChecker
import Synquid.Parser
import Types.Type
import Types.Program
import Synquid.Type
import Synquid.Logic
import Database.Util
import Test.Hspec
import Text.Pretty.Simple
import Text.Parsec.Pos
import Control.Monad.State
import Text.Parsec.Indent
... |
ec78f49e1795d661efc1eef10369b7b54033bc00a3d658d3f3c2369e12519d80 | themattchan/haskell-tiger | Gensym.hs | # LANGUAGE DeriveFunctor , GeneralizedNewtypeDeriving , FlexibleContexts ,
FlexibleInstances , MultiParamTypeClasses , FunctionalDependencies #
FlexibleInstances, MultiParamTypeClasses, FunctionalDependencies #-}
module Language.Tiger.Gensym
do NOT export genzero and
, Gensym(..)
,
, GensymT(..)
, run... | null | https://raw.githubusercontent.com/themattchan/haskell-tiger/cdf439a45e51783b3d2023c261426abdd7cd1067/src/Language/Tiger/Gensym.hs | haskell | state = GensymT . state
class Gensym s m where | # LANGUAGE DeriveFunctor , GeneralizedNewtypeDeriving , FlexibleContexts ,
FlexibleInstances , MultiParamTypeClasses , FunctionalDependencies #
FlexibleInstances, MultiParamTypeClasses, FunctionalDependencies #-}
module Language.Tiger.Gensym
do NOT export genzero and
, Gensym(..)
,
, GensymT(..)
, run... |
595379351630fc885fb0204e2816a2eac035188626a57e978dac9648a03cc1f3 | MinaProtocol/mina | sgn.ml | [%%import "/src/config.mlh"]
open Core_kernel
open Snark_params.Tick
[%%versioned
module Stable = struct
module V1 = struct
type t = Sgn_type.Sgn.Stable.V1.t = Pos | Neg
[@@deriving sexp, hash, compare, equal, yojson]
let to_latest = Fn.id
end
end]
let gen =
Quickcheck.Generator.map Bool.quickchec... | null | https://raw.githubusercontent.com/MinaProtocol/mina/c3900e233a58127c00c26f7eb2ebf468581cbd07/src/lib/sgn/sgn.ml | ocaml | [%%import "/src/config.mlh"]
open Core_kernel
open Snark_params.Tick
[%%versioned
module Stable = struct
module V1 = struct
type t = Sgn_type.Sgn.Stable.V1.t = Pos | Neg
[@@deriving sexp, hash, compare, equal, yojson]
let to_latest = Fn.id
end
end]
let gen =
Quickcheck.Generator.map Bool.quickchec... | |
53a9e50a9b5aacf45fc6d0059b6d58c6c64e57e090783d29bfbe77a94bc53b72 | jamesdbrock/replace-megaparsec | TestByteString.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeFamilies #
# LANGUAGE CPP #
module TestByteString ( tests ) where
import Distribution.TestSuite as TestSuite
import Replace.Megaparsec
import Text.Megaparsec
import Text.Megaparsec.Byte
import Text.Megaparsec.Byte.Lexer
import Data.Void
i... | null | https://raw.githubusercontent.com/jamesdbrock/replace-megaparsec/eeabfbdd482a22d96cee9ca2a19bf194f1d5d610/tests/TestByteString.hs | haskell | # LANGUAGE OverloadedStrings #
and succeeds.
This won't parse mantissas that contain a decimal point,
but if we use the Text.Megaparsec.Byte.Lexer.float, then it consumes
the "E" and the exponent. Whatever, doesn't really matter for this test. | # LANGUAGE FlexibleContexts #
# LANGUAGE TypeFamilies #
# LANGUAGE CPP #
module TestByteString ( tests ) where
import Distribution.TestSuite as TestSuite
import Replace.Megaparsec
import Text.Megaparsec
import Text.Megaparsec.Byte
import Text.Megaparsec.Byte.Lexer
import Data.Void
import qualified Data.ByteString as ... |
96f4c423b38cff5390e262b123d82a7499a03a9f996a5e12941b65da9d88f8e4 | Martoon-00/toy-compiler | Exp.hs | -- | Keeps expressions related datatypes and utils
# OPTIONS_GHC -F -pgmF autoexporter #
| null | https://raw.githubusercontent.com/Martoon-00/toy-compiler/a325d56c367bbb673608d283197fcd51cf5960fa/src/Toy/Exp.hs | haskell | | Keeps expressions related datatypes and utils |
# OPTIONS_GHC -F -pgmF autoexporter #
|
e15d3b2fd4d89b6a61dc10d459af339662b04b4e91623a92caa7fb0146f1f490 | ocaml/ocaml | pr6993_bad.ml | (* TEST
* expect
*)
type (_, _) eqp = Y : ('a, 'a) eqp | N : string -> ('a, 'b) eqp
let f : ('a list, 'a) eqp -> unit = function N s -> print_string s;;
module rec A : sig type t = B.t list end =
struct type t = B.t list end
and B : sig type t val eq : (B.t list, t) eqp end =
struct
type t = A.t
let ... | null | https://raw.githubusercontent.com/ocaml/ocaml/d71ea3d089ae3c338b8b6e2fb7beb08908076c7a/testsuite/tests/typing-gadts/pr6993_bad.ml | ocaml | TEST
* expect
|
type (_, _) eqp = Y : ('a, 'a) eqp | N : string -> ('a, 'b) eqp
let f : ('a list, 'a) eqp -> unit = function N s -> print_string s;;
module rec A : sig type t = B.t list end =
struct type t = B.t list end
and B : sig type t val eq : (B.t list, t) eqp end =
struct
type t = A.t
let eq = Y
end;;
f B.eq;... |
351bec0b5e391783623cabfa75e4690409ff3e3aad7a0de88b3072169e999bb2 | appleshan/cl-http | cl-http-70-206.lisp | -*- Mode : LISP ; Syntax : Ansi - common - lisp ; Package : HTTP ; Base : 10 ; Patch - File : T -*-
Patch file for CL - HTTP version 70.206
;;; Reason: Make STANDARDIZE-LINE-BREAKS work on the lisp machine.
;;;
Function ( FLAVOR : METHOD TCP::ASCII - OUTPUT - MODE SI : BUFFERED - OUTPUT - CHARACTER - STREAM ): ... | null | https://raw.githubusercontent.com/appleshan/cl-http/a7ec6bf51e260e9bb69d8e180a103daf49aa0ac2/lispm/server/patch/cl-http-70/cl-http-70-206.lisp | lisp | Syntax : Ansi - common - lisp ; Package : HTTP ; Base : 10 ; Patch - File : T -*-
Reason: Make STANDARDIZE-LINE-BREAKS work on the lisp machine.
breaks to work on the lisp machine.
Function WWW-UTILS::%PATHNAME-DIRECTORY-P: -
Function WWW-UTILS:PATHNAME-DIRECTORY-P: update
Function HTML4.0::%NOTE-IMAGE: -
F... | Patch file for CL - HTTP version 70.206
Function ( FLAVOR : METHOD TCP::ASCII - OUTPUT - MODE SI : BUFFERED - OUTPUT - CHARACTER - STREAM ): Required for standardize line
Function ( CLOS : METHOD HTTP::STANDARDIZE - LINE - BREAKS ( FS : LMFS - PATHNAME ) : AROUND ): expunge LMFS directories .
Function ( CLO... |
e1259fe5f4690f81ff52908d5bf6ae0a768d4755f100b91d220fabd517a85f04 | nedap/formatting-stack | background.clj | (ns formatting-stack.background
"This file live in a distinct source-paths so it's not affected by the Reloaded workflow,
while developing formatting-stack itself.")
(defonce workload (atom nil))
(defonce ^Thread
^{:doc "The runner for 'background' execution. Can be stopped via the thread interruption mechanism... | null | https://raw.githubusercontent.com/nedap/formatting-stack/c43e74d5409e9338f208457bb8928ce437381a3f/worker/formatting_stack/background.clj | clojure | (We exercise this implicitly via `lein eastwood` in CI) | (ns formatting-stack.background
"This file live in a distinct source-paths so it's not affected by the Reloaded workflow,
while developing formatting-stack itself.")
(defonce workload (atom nil))
(defonce ^Thread
^{:doc "The runner for 'background' execution. Can be stopped via the thread interruption mechanism... |
71916651445d88b7c8cce709742d64d81200ff793e8fbd491ec6e068f958e259 | ppelleti/normalization-insensitive | bench.hs | # LANGUAGE CPP #
# OPTIONS_GHC -fno - warn - orphans #
module Main ( main) where
import Criterion.Main ( defaultMain, bench, nf )
import qualified Data.ByteString as B ( readFile )
import qualified Data.Unicode.NormalizationInsensitive as NI ( mk )
import qualified NoClass as ... | null | https://raw.githubusercontent.com/ppelleti/normalization-insensitive/5f18e8a6a5261405e15fd418ca279da62f96e54e/bench/bench.hs | haskell | # LANGUAGE CPP #
# OPTIONS_GHC -fno - warn - orphans #
module Main ( main) where
import Criterion.Main ( defaultMain, bench, nf )
import qualified Data.ByteString as B ( readFile )
import qualified Data.Unicode.NormalizationInsensitive as NI ( mk )
import qualified NoClass as ... | |
388b39d8b92e25b960f53a5b5e75f49fd59e707a350f1458f63116dc418dabbe | twosigma/waiter | process_request_test.clj | ;;
Copyright ( c ) Two Sigma Open Source , LLC
;;
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... | null | https://raw.githubusercontent.com/twosigma/waiter/fa1d028f61f92c8be15ddb45cfa743b92eeb4058/waiter/test/waiter/process_request_test.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 permi... | Copyright ( c ) Two Sigma Open Source , LLC
distributed under the License is distributed on an " AS IS " BASIS ,
(ns waiter.process-request-test
(:require [clj-time.core :as t]
[clojure.core.async :as async]
[clojure.string :as str]
[clojure.test :refer :all]
[metri... |
6251c0eab71067d37761485409102c5977db82c849d5a72453db6a0274c0bcf9 | fumieval/deriving-aeson | test.hs | # LANGUAGE DerivingVia ,
# LANGUAGE DeriveGeneric #
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Data.Aeson
import Deriving.Aeson
import Deriving.Aeson.Stock
import System.Exit (die)
import qualified Data.ByteString.Lazy.Char8 as BL
data User = User
{ userId :: Int
, userName :: String
, userA... | null | https://raw.githubusercontent.com/fumieval/deriving-aeson/817b71499b6dd3174c92cbe6377f0edbdaba485b/tests/test.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE DerivingVia ,
# LANGUAGE DeriveGeneric #
module Main where
import Data.Aeson
import Deriving.Aeson
import Deriving.Aeson.Stock
import System.Exit (die)
import qualified Data.ByteString.Lazy.Char8 as BL
data User = User
{ userId :: Int
, userName :: String
, userAPIToken :: Maybe String
, userTyp... |
50a90012469adb6c1a906c1ebf517c2f62e53c54da230bbdced2d0dbeaf0a924 | darwin/blender-clojure | pyv8.cljs | (ns bcljs.tests.suites.pyv8
(:require [cljs.test :refer-macros [deftest is testing run-tests]]
[goog.object :as gobj]))
(deftest symbol-property-access
; this was crashing
;
(let [prop-name (.-iterator js/Symbol)
pyobj (js/test.get_simple_python_sequence)]
(is (= ::null (gobj/get pyobj... | null | https://raw.githubusercontent.com/darwin/blender-clojure/bbdb5071d3f4a33ccbdb5a67818df58ae6767716/tests/e2e/src/main/bcljs/tests/suites/pyv8.cljs | clojure | this was crashing
| (ns bcljs.tests.suites.pyv8
(:require [cljs.test :refer-macros [deftest is testing run-tests]]
[goog.object :as gobj]))
(deftest symbol-property-access
(let [prop-name (.-iterator js/Symbol)
pyobj (js/test.get_simple_python_sequence)]
(is (= ::null (gobj/get pyobj prop-name ::null)))))
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.