_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 |
|---|---|---|---|---|---|---|---|---|
c7bb1173eb365d06167de05596a8769e0b79235f08b33e4c2b6bf31f5e9d3386 | fulcro-legacy/fulcro-todomvc | en_US.cljs | (ns fulcro-todomvc.i18n.en-US (:require fulcro.i18n) (:import goog.module.ModuleManager))
This file was generated by fulcro 's i18n leiningen plugin .
(def translations {})
(swap!
fulcro.i18n/*loaded-translations*
(fn [x] (assoc x "en-US" translations)))
(try
(-> goog.module.ModuleManager .getInstance (.setLoa... | null | https://raw.githubusercontent.com/fulcro-legacy/fulcro-todomvc/928ec1f5bf790e83093bfb595667d895f319068e/src/main/fulcro_todomvc/i18n/en_US.cljs | clojure | (ns fulcro-todomvc.i18n.en-US (:require fulcro.i18n) (:import goog.module.ModuleManager))
This file was generated by fulcro 's i18n leiningen plugin .
(def translations {})
(swap!
fulcro.i18n/*loaded-translations*
(fn [x] (assoc x "en-US" translations)))
(try
(-> goog.module.ModuleManager .getInstance (.setLoa... | |
d21d7a37edd51db95b1e17c99a656bd9de69fe5beee59882eb2f85407c390806 | Nutr1t07/wl-bot | Json.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE RankNTypes #-}
module Utils.Json where
import Data.Aeson
import Data.Aeson.Types
import GHC.Generics
dropToJSON
:: forall a . (Generic a, GToJSON Zero (Rep a)) => Int -> a -> Value
dropToJSON prefix = genericToJSON defaultOptions
{ fie... | null | https://raw.githubusercontent.com/Nutr1t07/wl-bot/4d9db61613a3819d0addbc7e04d77bb2f57892f0/src/Utils/Json.hs | haskell | # LANGUAGE RankNTypes # | # LANGUAGE FlexibleContexts #
module Utils.Json where
import Data.Aeson
import Data.Aeson.Types
import GHC.Generics
dropToJSON
:: forall a . (Generic a, GToJSON Zero (Rep a)) => Int -> a -> Value
dropToJSON prefix = genericToJSON defaultOptions
{ fieldLabelModifier = drop prefix
, ... |
8d382b12b5255d30e1b22c7e87cb6b10964cd5d5330a16cd9409c1dd238af970 | marick/Midje | t_one_seven.clj | (ns midje.util.t-one-seven
(:require [midje.sweet :refer :all]
[midje.util
[laziness :refer :all]
[thread-safe-var-nesting :refer :all]]
[midje.test-util :refer :all]))
;; Justification for use of eagerly
(def counter (atom :needs-to-be-initialized))
(def #^:dynamic ... | null | https://raw.githubusercontent.com/marick/Midje/2b9bcb117442d3bd2d16446b47540888d683c717/test/midje/util/t_one_seven.clj | clojure | Justification for use of eagerly
(midje.checking.facts/creation-time-check
(midje.data.compendium/record-fact-existence!
(clojure.core/fn
[]
(midje.parsing.util.wrapping/midje-wrapped
(mock-use)
(midje.parsing.util.wrapping/midje-wrapped
(midje.checking.checkables/check-one
... | (ns midje.util.t-one-seven
(:require [midje.sweet :refer :all]
[midje.util
[laziness :refer :all]
[thread-safe-var-nesting :refer :all]]
[midje.test-util :refer :all]))
(def counter (atom :needs-to-be-initialized))
(def #^:dynamic *mocked-function-produces-next-eleme... |
0acd72a66a749b708cbcbb3dcfe9549316330716c56899f1314bc2280014d8bf | cpichard/filesequence | Padding.hs | module System.FileSequence.Padding where
import System.FileSequence.FrameList (FrameNumber)
-- | Store Padding information
We consider 2 cases :
-- * PaddingFixed:
when the padding is fixed and we know it because the number is prefixed with zeroes
like 010 , 00010 , etc .
* :
-- when we... | null | https://raw.githubusercontent.com/cpichard/filesequence/39cd8eb7dd0bc494c181c5b04fc9ff2fae5202d0/src/System/FileSequence/Padding.hs | haskell | | Store Padding information
* PaddingFixed:
when we are not sure the padding is fixed
however it can't be superior to the number of digits
| Paddings can be merged if they are compatible.
To be compatible, they should be able to restitute the frame string
with a printf("%0xd")
same fixed paddin... | module System.FileSequence.Padding where
import System.FileSequence.FrameList (FrameNumber)
We consider 2 cases :
when the padding is fixed and we know it because the number is prefixed with zeroes
like 010 , 00010 , etc .
* :
like 677 100 400
data Padding = PaddingFixed Int
... |
b969c32e4ed7e6bd3165779ec579de6e8dd7e1c26c04945a0961d591336a3aab | oscoin/oscoin | Lenient.hs | | A version of the ' Nakamoto ' consensus more lenient on the validation
-- aspect , and suitable for development .
-- aspect, and suitable for development.
-}
module Oscoin.Consensus.Nakamoto.Lenient
( nakamotoConsensusLenient
, validateLenient
, mineLenient
) where
import Oscoin.Prel... | null | https://raw.githubusercontent.com/oscoin/oscoin/2eb5652c9999dd0f30c70b3ba6b638156c74cdb1/src/Oscoin/Consensus/Nakamoto/Lenient.hs | haskell | aspect , and suitable for development .
aspect, and suitable for development.
| Like 'nakamotoConsensus', but uses a looser validation function, more
suitable for development.
| A more lenient validation function, where the \"age\" of block with
respect to the parent is not checked.
| Modify mining behaviour wh... | | A version of the ' Nakamoto ' consensus more lenient on the validation
-}
module Oscoin.Consensus.Nakamoto.Lenient
( nakamotoConsensusLenient
, validateLenient
, mineLenient
) where
import Oscoin.Prelude
import Oscoin.Consensus.Nakamoto
( PoW
... |
71e950b6e2725bce59277c120df51dedacbea8eeb3cc928d86e37f0e88a52cad | GaloisInc/what4 | ExprBuilderSMTLib2.hs | # LANGUAGE DataKinds #
# LANGUAGE ExistentialQuantification #
{-# LANGUAGE ExplicitForAll #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE RecordWildCards... | null | https://raw.githubusercontent.com/GaloisInc/what4/79ad25c3a207503c8da36dd3ce9e8618f2704a60/what4/test/ExprBuilderSMTLib2.hs | haskell | # LANGUAGE ExplicitForAll #
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
debugOutputFiles = True
exists y . (x + 2.0) + (x + 2.0) < y
Floating point literal: 2.0
work out... it would probably be significant work to make it do so.
bv == bv2 @? "syntactic equality"
Outside the scope of i... | # LANGUAGE DataKinds #
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplic... |
d0309562488c7c21458351241036cac9ee73fee9d4f55f6b9323e6f6203cd39f | williamleferrand/accretio | ys_graph.ml |
* Accretio is an API , a sandbox and a runtime for social playbooks
*
* Copyright ( C ) 2015
*
* 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 o... | null | https://raw.githubusercontent.com/williamleferrand/accretio/394f855e9c2a6a18f0c2da35058d5a01aacf6586/library/server/ys_graph.ml | ocaml |
* Accretio is an API , a sandbox and a runtime for social playbooks
*
* Copyright ( C ) 2015
*
* 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 o... | |
1f4691c3eea750a5610db821c6c659e5efb0aad91dacbc6daa4e6e51f986146e | facebookincubator/hsthrift | Strict.hs | Copyright ( c ) Facebook , Inc. and its affiliates .
module Util.HashMap.Strict
( mapKeys
) where
import Control.Arrow (first)
import Data.Hashable
import Data.HashMap.Strict (HashMap)
import qualified Data.HashMap.Strict as HashMap
| Transform a HashMap by applying a function to every key .
mapKeys :: (Eq b... | null | https://raw.githubusercontent.com/facebookincubator/hsthrift/d3ff75d487e9d0c2904d18327373b603456e7a01/common/util/Util/HashMap/Strict.hs | haskell | Copyright ( c ) Facebook , Inc. and its affiliates .
module Util.HashMap.Strict
( mapKeys
) where
import Control.Arrow (first)
import Data.Hashable
import Data.HashMap.Strict (HashMap)
import qualified Data.HashMap.Strict as HashMap
| Transform a HashMap by applying a function to every key .
mapKeys :: (Eq b... | |
9d9c4304b465b93178c3fd14740f71c52728656ad36c69bfe833e078cb1189b6 | ku-fpg/hermit | Dictionary.hs | # LANGUAGE ScopedTypeVariables #
module HERMIT.Shell.Dictionary
( mkDictionary
, addToDictionary
, pp_dictionary
) where
import Data.Dynamic
import Data.List
import Data.Map (Map, fromList, toList, fromListWith)
import HERMIT.External
import HERMIT.PrettyPrinter.Common
import qualified HERMIT.PrettyP... | null | https://raw.githubusercontent.com/ku-fpg/hermit/3e7be430fae74a9e3860b8b574f36efbf9648dec/src/HERMIT/Shell/Dictionary.hs | haskell | ------------------------------------------------------------------------
can be multiple 'Dynamic's with the same name.
| Build a 'Data.Map' from names to 'Dynamic' values.
------------------------------------------------------------------------
| The pretty-printing dictionaries.
---------------------------------... | # LANGUAGE ScopedTypeVariables #
module HERMIT.Shell.Dictionary
( mkDictionary
, addToDictionary
, pp_dictionary
) where
import Data.Dynamic
import Data.List
import Data.Map (Map, fromList, toList, fromListWith)
import HERMIT.External
import HERMIT.PrettyPrinter.Common
import qualified HERMIT.PrettyP... |
e568b36f8200bf15eeb6f426b8df1f4dc656d936554f64e77d73800cf00102d6 | vonzhou/LearnYouHaskellForGreatGood | example.hs | import Data.List
isIn :: (Eq a) => [a] -> [a] -> Bool
needle `isIn` haystack = any (needle `isPrefixOf`) (tails haystack)
| null | https://raw.githubusercontent.com/vonzhou/LearnYouHaskellForGreatGood/439d848deac53ef6da6df433078b7f1dcf54d18d/chapter6/example.hs | haskell | import Data.List
isIn :: (Eq a) => [a] -> [a] -> Bool
needle `isIn` haystack = any (needle `isPrefixOf`) (tails haystack)
| |
7ca6d3e09f37773b643e20eba2f462e45579cc3322681631e35cb784eecf7fdd | typelead/eta | tc069.hs | module ShouldSucceed where
x = 'a'
(y:ys) = ['a','b','c'] where p = x
| null | https://raw.githubusercontent.com/typelead/eta/97ee2251bbc52294efbf60fa4342ce6f52c0d25c/tests/suite/typecheck/compile/tc069.hs | haskell | module ShouldSucceed where
x = 'a'
(y:ys) = ['a','b','c'] where p = x
| |
76108a97370b4171994f7ec6120709cf26930188d4917733758b1e577e85e190 | ksrky/Plato | SrcToPs.hs | module Plato.Transl.SrcToPs where
import Plato.Types.Error
import Plato.Types.Fixity
import Plato.Types.Location
import Plato.Types.Monad
import Plato.Types.Name
import Plato.Types.Name.Global
import Plato.Types.Name.Reader
import Plato.Parsing.FixResol
import Plato.Parsing.Monad
import Plato.Parsing.Parser
import Pl... | null | https://raw.githubusercontent.com/ksrky/Plato/02b1a043efa92cf2093ff7d721a607d8abe9d876/src/Plato/Transl/SrcToPs.hs | haskell | module Plato.Transl.SrcToPs where
import Plato.Types.Error
import Plato.Types.Fixity
import Plato.Types.Location
import Plato.Types.Monad
import Plato.Types.Name
import Plato.Types.Name.Global
import Plato.Types.Name.Reader
import Plato.Parsing.FixResol
import Plato.Parsing.Monad
import Plato.Parsing.Parser
import Pl... | |
a53f356473dbdb7d7aefd9c540760450e88e734db7ab3035ddefbe7e5b39789a | emina/rosette | itunes100_4.rkt | #lang rosette
(require (only-in racket/runtime-path define-runtime-path))
(require "../dom.rkt")
(require "../websynth.rkt")
(require "../websynthlib.rkt")
(define-runtime-path html (build-path ".." "html/itunes_top100_v2.html"))
(define dom (read-DOMNode html))
(define-tags (tags dom))
(define max_zpath_depth (depth... | null | https://raw.githubusercontent.com/emina/rosette/a64e2bccfe5876c5daaf4a17c5a28a49e2fbd501/sdsl/websynth/benchmarks/itunes100_4.rkt | racket | Record 0 fields
Record 1 fields
Record 2 fields
Record 3 fields
Cross-record Mask
Record 0 zpath asserts
Record 1 zpath asserts
Record 2 zpath asserts
Record 3 zpath asserts
Record 0 Field Mask Generation
Record 1 Field Mask Generation
Record 2 Field Mask Generation
Record 3 Field Mask Generation
Record M... | #lang rosette
(require (only-in racket/runtime-path define-runtime-path))
(require "../dom.rkt")
(require "../websynth.rkt")
(require "../websynthlib.rkt")
(define-runtime-path html (build-path ".." "html/itunes_top100_v2.html"))
(define dom (read-DOMNode html))
(define-tags (tags dom))
(define max_zpath_depth (depth... |
da7f853cdc013f0484d6a55dde272daf5d10d641c5de6ebb46781973f883c3db | sharplispers/linedit | complete.lisp | Copyright ( c ) 2003 , 2004 Nikodemus Siivola ,
;;;;
;;;; 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, c... | null | https://raw.githubusercontent.com/sharplispers/linedit/0561c97dfca2f5854fcc66558a567a9875ddcb8f/complete.lisp | lisp |
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
without limitation the rights to use, copy, modify, merge, publish,
the following conditions:
The above copyright notice and this permission notice shall be included
EXPRESS OR ... | Copyright ( c ) 2003 , 2004 Nikodemus Siivola ,
" Software " ) , to deal in the Software without restriction , including
distribute , sublicense , and/or sell copies of the Software , and to
permit persons to whom the Software is furnished to do so , subject to
in all copies or substantial portions of the S... |
4bd274a5e78a25f5f8f0b079a98ba33431e6e8411cbf23d76497f6729502cbc2 | yrashk/erlang | ex_slider.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public Lic... | null | https://raw.githubusercontent.com/yrashk/erlang/e1282325ed75e52a98d58f5bd9fb0fa27896173f/lib/wx/examples/demo/ex_slider.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(ex_slider).
-behavoiur(wx_object).
-exp... |
e8a52bce71bf26d32cf36fea4b3acfa502899a58d8ef0b640984b31a1b7484cc | gregtatcam/imaplet-lwt | response.ml |
* Copyright ( c ) 2013 - 2014 < >
*
* Permission to use , copy , modify , and 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 .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND... | null | https://raw.githubusercontent.com/gregtatcam/imaplet-lwt/d7b51253e79cffa97e98ab899ed833cd7cb44bb6/lib/commands/response.ml | ocaml |
* Copyright ( c ) 2013 - 2014 < >
*
* Permission to use , copy , modify , and 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 .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND... | |
8a2a7321ebf67201a53dc129130b7ca58fc798fdd6c9f98a88fd854154c319ae | onyx-platform/onyx | liveness.clj | (ns onyx.peer.liveness
(:require [onyx.protocol.task-state :as t :refer [evict-peer! get-messenger]]
[onyx.messaging.protocols.status-publisher :as status-pub]
[onyx.messaging.protocols.subscriber :as sub]
[onyx.messaging.protocols.publisher :as pub]))
(defn upstream-timed-out-pee... | null | https://raw.githubusercontent.com/onyx-platform/onyx/74f9ae58cdbcfcb1163464595f1e6ae6444c9782/src/onyx/peer/liveness.clj | clojure | (ns onyx.peer.liveness
(:require [onyx.protocol.task-state :as t :refer [evict-peer! get-messenger]]
[onyx.messaging.protocols.status-publisher :as status-pub]
[onyx.messaging.protocols.subscriber :as sub]
[onyx.messaging.protocols.publisher :as pub]))
(defn upstream-timed-out-pee... | |
e6866dc974877450aef23f76f875d7afbaff7194d92c85f4fc272d3d8bb0c132 | NorfairKing/hastory | Cli.hs | # LANGUAGE FlexibleContexts #
module Hastory.Cli
( hastoryCli,
)
where
import Control.Monad.IO.Unlift (MonadUnliftIO)
import Control.Monad.Reader
import Hastory.Cli.Commands.ChangeDir (change)
import Hastory.Cli.Commands.Gather (gather)
import Hastory.Cli.Commands.GenChangeWrapper (genChangeWrapperScript)
import ... | null | https://raw.githubusercontent.com/NorfairKing/hastory/35abbc79155bc7c5a0f6e0f3618c8b8bcd3889a1/hastory-cli/src/Hastory/Cli.hs | haskell | # LANGUAGE FlexibleContexts #
module Hastory.Cli
( hastoryCli,
)
where
import Control.Monad.IO.Unlift (MonadUnliftIO)
import Control.Monad.Reader
import Hastory.Cli.Commands.ChangeDir (change)
import Hastory.Cli.Commands.Gather (gather)
import Hastory.Cli.Commands.GenChangeWrapper (genChangeWrapperScript)
import ... | |
6eef3fbb0fa0370b4b58ad2e952d93b4ee399bcf83bdd97f310e488ee8135db0 | ocsigen/ocaml-eliom | test_nats.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
, ... | null | https://raw.githubusercontent.com/ocsigen/ocaml-eliom/497c6707f477cb3086dc6d8124384e74a8c379ae/testsuite/tests/lib-num/test_nats.ml | 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
open Test;;
open Nat;;
Can compare nats less than 2**32
let equal_nat n1 n2 =
eq_nat n1 0 (num_digits_nat n1 0 ... |
2233e70b89edbd1246c2da77525632cc74e0da44e46895ad0dc6c3488b3742b4 | gas2serra/mcclim-desktop | application.lisp | (in-package :desktop-internals)
;;;;
;;;; Global Variables
;;;;
(defvar *application* nil
"The current application")
;;;;
;;;; Application Classes
;;;;
;;;
;;; Application
;;;
(defclass application ()
((name :initarg :name
:reader application-name)
(pretty-name :initarg :pretty-name
:accessor applicatio... | null | https://raw.githubusercontent.com/gas2serra/mcclim-desktop/f85d19c57d76322ae3c05f98ae43bfc8c0d0a554/Core/src/application.lisp | lisp |
Global Variables
Application Classes
Application
Application protocols
protocol: launch/running
protocol: configure
initialize
print-object
protocols
protocol: running
protocol: config
protocol: loading
protocol: installing
McClim Application
Link/Alias/Proxy Applications
| (in-package :desktop-internals)
(defvar *application* nil
"The current application")
(defclass application ()
((name :initarg :name
:reader application-name)
(pretty-name :initarg :pretty-name
:accessor application-pretty-name
:initform nil)
(icon :initarg :icon
:accessor application-icon
:init... |
043c701ecda52e74a11ccb08246a33505fa2b29fc74a709bf513ce286e468dba | avik-das/garlic | argv.scm | ; While it would be possible to create a system where test programs are called
; with certain command line arguments, that's a lot of complexity for little
; benefit. Instead, just check that the `*argv*` variable exists.
;
; The name of the executable is constant, so we can rely on that.
(define (shadow-args)
(let ... | null | https://raw.githubusercontent.com/avik-das/garlic/5545f5a70f33c2ff9ec449ef66e6acc7881419dc/test/success/argv.scm | scheme | While it would be possible to create a system where test programs are called
with certain command line arguments, that's a lot of complexity for little
benefit. Instead, just check that the `*argv*` variable exists.
The name of the executable is constant, so we can rely on that. |
(define (shadow-args)
(let ((*argv* 'argv))
(display *argv*) (newline) ))
(display *argv*) (newline)
(shadow-args)
(display *argv*) (newline)
|
964187f12c1b91829ac6419af33e38cd399136ca75a954c209eaede4b431a2dd | tonyg/rmacs | topsort.rkt | #lang racket/base
(provide topsort)
(require racket/match)
(define (topsort edges
#:comparison [comparison equal?])
(define hash-ctor (cond [(eq? comparison equal?) hash]
[(eq? comparison eq?) hasheq]
[else (error 'topsort "Invalid comparison ~v"... | null | https://raw.githubusercontent.com/tonyg/rmacs/8c99dd5dfa22f1f34707bbe957de268dc6a7a632/rmacs/topsort.rkt | racket | no nodes at all
no nodes without incoming edges -> cycle
cycle | #lang racket/base
(provide topsort)
(require racket/match)
(define (topsort edges
#:comparison [comparison equal?])
(define hash-ctor (cond [(eq? comparison equal?) hash]
[(eq? comparison eq?) hasheq]
[else (error 'topsort "Invalid comparison ~v"... |
4bf46be32faa31d270567db399a4ec7a896ee2d91762bbfd4ec407d8a0bed165 | haskell-mafia/boris | Queue.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
module Boris.Http.Resource.Queue (
collection
) where
import Airship (Resource (..), defaultResource)
import Boris.Http.Airship
import Boris.Http.Representation.Queue
import Boris.Http.Version
import ... | null | https://raw.githubusercontent.com/haskell-mafia/boris/fb670071600e8b2d8dbb9191fcf6bf8488f83f5a/boris-http/src/Boris/Http/Resource/Queue.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE NoImplicitPrelude #
module Boris.Http.Resource.Queue (
collection
) where
import Airship (Resource (..), defaultResource)
import Boris.Http.Airship
import Boris.Http.Representation.Queue
import Boris.Http.Version
import Boris.Queue (BuildQueue (..))
... |
b1372f05845d249c53eb40e6a202e7a769cfc2818c9d86e2cdf934179bf127da | peak6/mmd_core | service_locations.erl | -module(service_locations).
-export([start_link/0]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2, code_change/3]).
-behaviour(gen_server2).
-define(SERVER,?MODULE).
-define(SERVICE,'service.locations').
-include("mmd.hrl").
%%%=====================================================... | null | https://raw.githubusercontent.com/peak6/mmd_core/f90469ea9eac8cd607aa6ec5b9ad6ff003a35572/src/service_locations.erl | erlang | ===================================================================
gen_server2 callbacks
=================================================================== | -module(service_locations).
-export([start_link/0]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2, code_change/3]).
-behaviour(gen_server2).
-define(SERVER,?MODULE).
-define(SERVICE,'service.locations').
-include("mmd.hrl").
start_link() ->
gen_server:start_link({local,?SERVER... |
39158d7ed8706e305d9fa5e5ed42a9a90a43818f4d338c5bc15696a99c6465db | roglo/mlrogue | init.mli | $ I d : init.mli , v 1.14 2010/04/27 10:15:30 deraugla Exp $
open Rogue;
open Rfield;
type init = [ NewGame of game | RestoreGame of string | ScoreOnly ];
value f :
array string ->
(string * init * option (player_species * bool) * option (string * int) *
bool * bool * bool)
;
| null | https://raw.githubusercontent.com/roglo/mlrogue/b73238bbbc8cd88c83579c3b72772a8c418020e5/init.mli | ocaml | $ I d : init.mli , v 1.14 2010/04/27 10:15:30 deraugla Exp $
open Rogue;
open Rfield;
type init = [ NewGame of game | RestoreGame of string | ScoreOnly ];
value f :
array string ->
(string * init * option (player_species * bool) * option (string * int) *
bool * bool * bool)
;
| |
fd77bfb62f60b4f8ca68f955f89b95c2257739e61368b118fe21a25f847124fc | gsakkas/rite | 3563.ml |
let rec clone x n = if n > 0 then x :: (clone x (n - 1)) else [];;
let padZero l1 l2 =
if (List.length l1) > (List.length l2)
then (l1, (List.append (clone 0 ((List.length l1) - (List.length l2))) l2))
else ((List.append (clone 0 ((List.length l2) - (List.length l1))) l1), l2);;
let rec removeZero l = match l ... | null | https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/data/sp14_min/3563.ml | ocaml |
let rec clone x n = if n > 0 then x :: (clone x (n - 1)) else [];;
let padZero l1 l2 =
if (List.length l1) > (List.length l2)
then (l1, (List.append (clone 0 ((List.length l1) - (List.length l2))) l2))
else ((List.append (clone 0 ((List.length l2) - (List.length l1))) l1), l2);;
let rec removeZero l = match l ... | |
e752b2dccbb639eb4b980353bdc9861101cf7c0e81c8a03e6cd7218f574ef876 | FreeProving/free-compiler | Scanner.hs | -- | This module contains a scanner for the intermediate language that takes
-- the source code and converts it into a token stream.
--
-- We convert the source code to a token stream such that
" FreeC.Frontend . IR.Parser " does not have to handle whitespace explicitly .
module FreeC.Frontend.IR.Scanner ( Toke... | null | https://raw.githubusercontent.com/FreeProving/free-compiler/6931b9ca652a185a92dd824373f092823aea4ea9/src/lib/FreeC/Frontend/IR/Scanner.hs | haskell | | This module contains a scanner for the intermediate language that takes
the source code and converts it into a token stream.
We convert the source code to a token stream such that
-----------------------------------------------------------------------------
Type Synonyms ... | " FreeC.Frontend . IR.Parser " does not have to handle whitespace explicitly .
module FreeC.Frontend.IR.Scanner ( TokenWithPos(..), scan ) where
import Data.Char ( isNumber, isPunctuation, isSymbol )
import Text.Parsec ( (<|>), Parsec )
import qualified Text.Parsec ... |
3dd8370ab17bca009f8299f051dfeb68a8f01a39796ee7443affeae413ff2fa4 | jumarko/clojure-experiments | ch08_macros.clj | (ns clojure-experiments.books.joy-of-clojure.ch08-macros
(:require [clojure.walk :as walk]
[clojure.xml :as xml])
(:import [java.io BufferedReader InputStreamReader]
java.net.URL))
eval ( p. 175 )
(eval 42)
= > 42
(eval '(list 1 2))
= > ( 1 2 )
;; This will fail with ClassCastExcept... | null | https://raw.githubusercontent.com/jumarko/clojure-experiments/01e9957749e5b2355c5d55203ece8ea1daed82c6/src/clojure_experiments/books/joy_of_clojure/ch08_macros.clj | clojure | This will fail with ClassCastException
Now something more exciting - evaluate a condition that is a function call
it may help to see that this returns the list
=> (+ 1 2)
contextual-eval -> local bindings
to mitigate issues with `eval` which uses global bindings
This is also used in ch17 - section 17.4.2 (`break... | (ns clojure-experiments.books.joy-of-clojure.ch08-macros
(:require [clojure.walk :as walk]
[clojure.xml :as xml])
(:import [java.io BufferedReader InputStreamReader]
java.net.URL))
eval ( p. 175 )
(eval 42)
= > 42
(eval '(list 1 2))
= > ( 1 2 )
#_(eval (list 1 2))
(eval (list (sym... |
fc4ed4af79e9a100942589503669d18e0171c49d76015918196a387a7b276e22 | B-Lang-org/bsc | MakeOctalChars.hs | the program used to generate OctalChars.bsv
-- should it need to be changed
redirect stdout to OctalChars.bsv
showOct num = show first ++ show middle ++ show last
where (rest, last) = quotRem num 8
(first, middle) = quotRem rest 8
nums = [0..255]
display_num num = putStrLn ("$display(\"\\" ++ (showOct ... | null | https://raw.githubusercontent.com/B-Lang-org/bsc/bd141b505394edc5a4bdd3db442a9b0a8c101f0f/testsuite/bsc.syntax/bsv05/strings/MakeOctalChars.hs | haskell | should it need to be changed | the program used to generate OctalChars.bsv
redirect stdout to OctalChars.bsv
showOct num = show first ++ show middle ++ show last
where (rest, last) = quotRem num 8
(first, middle) = quotRem rest 8
nums = [0..255]
display_num num = putStrLn ("$display(\"\\" ++ (showOct num) ++ "\");")
main = do
put... |
57a490a238fb2c8f8b689fbc2190f684b733b1c4a74e8c738b2573e12b378da8 | elastic/eui-cljs | icon_logo_kafka.cljs | (ns eui.icon-logo-kafka
(:require ["@elastic/eui/lib/components/icon/assets/logo_kafka.js" :as eui]))
(def logoKafka eui/icon)
| null | https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/icon_logo_kafka.cljs | clojure | (ns eui.icon-logo-kafka
(:require ["@elastic/eui/lib/components/icon/assets/logo_kafka.js" :as eui]))
(def logoKafka eui/icon)
| |
3ec29c47fe37868d8e5434de413f6c4d5d8609a0a26c783f2374b8dc61034403 | larcenists/larceny | 16label3.scm | (bits 16)
(text
(with-win-lose foo bar
(zero? ax))
(nop)
(nop)
(nop)
(seq (label bar
(inv (iter (seq (dec ax)
(inc cx)
(>= ax 0)))))
(label foo (push cx))))
00000000 85C0 test ax , ax
00000002 0F840D00 jz near 0x13
00000006 E90300 jmp ... | null | https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/src/Lib/Sassy/tests/prims16/16label3.scm | scheme | (bits 16)
(text
(with-win-lose foo bar
(zero? ax))
(nop)
(nop)
(nop)
(seq (label bar
(inv (iter (seq (dec ax)
(inc cx)
(>= ax 0)))))
(label foo (push cx))))
00000000 85C0 test ax , ax
00000002 0F840D00 jz near 0x13
00000006 E90300 jmp ... | |
67bfe337c1aecd3bf0c9aa6e82bf74db454698d7e4835b8485d973bf38b6e7f2 | haskell/aeson | BigProduct.hs | # LANGUAGE DeriveGeneric #
module Auto.G.BigProduct where
import Control.DeepSeq
import Data.Aeson
import GHC.Generics (Generic)
import Options
data BigProduct = BigProduct
!Int !Int !Int !Int !Int
!Int !Int !Int !Int !Int
!Int !Int !Int !Int !Int
!Int !Int !Int !Int !Int
!Int !Int !Int !Int !Int... | null | https://raw.githubusercontent.com/haskell/aeson/d711df76b826942f4a9e791712512c6b19b8c1c8/benchmarks/bench/Auto/G/BigProduct.hs | haskell | # LANGUAGE DeriveGeneric #
module Auto.G.BigProduct where
import Control.DeepSeq
import Data.Aeson
import GHC.Generics (Generic)
import Options
data BigProduct = BigProduct
!Int !Int !Int !Int !Int
!Int !Int !Int !Int !Int
!Int !Int !Int !Int !Int
!Int !Int !Int !Int !Int
!Int !Int !Int !Int !Int... | |
f08e4d93f0a3bd9a33d16037c919b009bc031cdecb7e3db5f55db622f638bdbf | whamtet/dogfort | session.cljs | (ns dogfort.middleware.session
"Middleware for maintaining browser sessions using cookies.
Sessions are stored using types that adhere to the
dogfort.middleware.session.store/SessionStore protocol.
Ring comes with two stores included:
dogfort.middleware.session.memory/memory-store
dogfort.middleware.s... | null | https://raw.githubusercontent.com/whamtet/dogfort/75c2908355cc18bf350a5b761d2906e013ee9f94/src/dogfort/middleware/session.cljs | clojure | (ns dogfort.middleware.session
"Middleware for maintaining browser sessions using cookies.
Sessions are stored using types that adhere to the
dogfort.middleware.session.store/SessionStore protocol.
Ring comes with two stores included:
dogfort.middleware.session.memory/memory-store
dogfort.middleware.s... | |
7682a3a2ea9a131c94605e203889eab0dc51553fc162875235ae2d4831f7a248 | slyrus/cl-bio | defpackage.lisp |
(in-package #:cl-user)
(defpackage #:bio-entrez
(:nicknames #:entrez)
(:use #:cl)
(:export #:*entrez-dictionary*
#:*entrez-xml-dictionary*
#:entrez-fetch
#:entrez-search
#:gb-set-get-gb-seqs
#:gb-seg-get-sequence
#:gb-seq-sequence-get-residues
... | null | https://raw.githubusercontent.com/slyrus/cl-bio/e6de2bc7f4accaa11466902407e43fae3184973f/entrez/defpackage.lisp | lisp |
(in-package #:cl-user)
(defpackage #:bio-entrez
(:nicknames #:entrez)
(:use #:cl)
(:export #:*entrez-dictionary*
#:*entrez-xml-dictionary*
#:entrez-fetch
#:entrez-search
#:gb-set-get-gb-seqs
#:gb-seg-get-sequence
#:gb-seq-sequence-get-residues
... | |
4339c2ca464bcac4e32b28e4d7ce78d4d9129cf94342fa61b8f71e8b486e0747 | hyperfiddle/electric | analyzer.cljc | (ns dustin.analyzer
(:require [clojure.tools.analyzer :as ana]
[clojure.tools.analyzer.env :as env]
[clojure.tools.analyzer.jvm :as clj]
[clojure.tools.analyzer.ast :as ast]
[clojure.tools.analyzer.passes.jvm.emit-form :as e]
[hyperfiddle.rcf :refer [tests]]... | null | https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/scratch/dustin/y2021/analyzer.cljc | clojure |
#L9006 | (ns dustin.analyzer
(:require [clojure.tools.analyzer :as ana]
[clojure.tools.analyzer.env :as env]
[clojure.tools.analyzer.jvm :as clj]
[clojure.tools.analyzer.ast :as ast]
[clojure.tools.analyzer.passes.jvm.emit-form :as e]
[hyperfiddle.rcf :refer [tests]]... |
2310d5d701f035e22c435630c855f0304c99bbfb28d1bbd0df96f226aeb7aae0 | haskell-tools/haskell-tools | GADTsChecker.hs | {-# LANGUAGE MultiWayIf #-}
module Language.Haskell.Tools.Refactor.Builtin.ExtensionOrganizer.Checkers.GADTsChecker where
import Control.Reference ((^.), (&))
import Control.Monad.Trans.Maybe (MaybeT(..))
import Language.Haskell.Tools.AST
import Language.Haskell.Tools.Refactor
import Language.Haskell.Tools.Refactor.... | null | https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/builtin-refactorings/Language/Haskell/Tools/Refactor/Builtin/ExtensionOrganizer/Checkers/GADTsChecker.hs | haskell | # LANGUAGE MultiWayIf #
(there is no separate checker for that extension)
, then only GADTSyntax is needed. If any constructor's lookup fails |
module Language.Haskell.Tools.Refactor.Builtin.ExtensionOrganizer.Checkers.GADTsChecker where
import Control.Reference ((^.), (&))
import Control.Monad.Trans.Maybe (MaybeT(..))
import Language.Haskell.Tools.AST
import Language.Haskell.Tools.Refactor
import Language.Haskell.Tools.Refactor.Builtin.ExtensionOrganizer.E... |
61b040e4e41edc94ede0c3b0523a13ca59d066adde528784efa1a691d479b803 | ijp/guildhall | hash-utils.scm | ;;; hash-utils.scm ---
Copyright ( C ) 2009 < >
Author : < >
;; This program is free software, you can redistribute it and/or
modify it under the terms of the new - style BSD license .
You should have received a copy of the BSD license along with this
;; program. If not, see <>.
;;; Commentary:
;;;... | null | https://raw.githubusercontent.com/ijp/guildhall/2fe2cc539f4b811bbcd69e58738db03eb5a2b778/guildhall/spells/hash-utils.scm | scheme | hash-utils.scm ---
This program is free software, you can redistribute it and/or
program. If not, see <>.
Commentary:
Code: |
Copyright ( C ) 2009 < >
Author : < >
modify it under the terms of the new - style BSD license .
You should have received a copy of the BSD license along with this
#!r6rs
(library (guildhall spells hash-utils)
(export hash-combine
hash-fold)
(import (rnrs base)
(rnrs arithme... |
88fa68f92e5b03ad57e88c0d7a0244d3e6cb4eceab11bf6944a91b22d9346d86 | HunterYIboHu/htdp2-solution | ex183-list-to-cons.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname ex183-list-to-cons) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor rep... | null | https://raw.githubusercontent.com/HunterYIboHu/htdp2-solution/6182b4c2ef650ac7059f3c143f639d09cd708516/Chapter2/Section12-design-by-composed/ex183-list-to-cons.rkt | racket | about the language level of this file in a form that our tools can easily process.
only use cons expr
only use list expr | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname ex183-list-to-cons) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(check-expect (cons "a" (list 0 #false))
... |
4781c2651745d4595feddf79f42603f053043ba85081991f56b615bb5bd2daa0 | orbitz/scow | scow_server_state.mli | open Core.Std
open Async.Std
module Make :
functor (Statem : Scow_statem.S) ->
functor (Log : Scow_log.S) ->
functor (Store : Scow_store.S) ->
functor (Transport : Scow_transport.S with type Node.t = Store.node) ->
sig
type msg = Scow_server_msg.Make(Statem)(Log)(Transport).t
type op = Scow_se... | null | https://raw.githubusercontent.com/orbitz/scow/feb633ef94824f44f0ffc679a548f97288c8ae48/lib/scow/scow_server_state.mli | ocaml | open Core.Std
open Async.Std
module Make :
functor (Statem : Scow_statem.S) ->
functor (Log : Scow_log.S) ->
functor (Store : Scow_store.S) ->
functor (Transport : Scow_transport.S with type Node.t = Store.node) ->
sig
type msg = Scow_server_msg.Make(Statem)(Log)(Transport).t
type op = Scow_se... | |
371a8d413e740a28dfa570153c805bcc2b9d123cadaba65a515eccd4d294f430 | diagrams/diagrams-contrib | CirclePacking.hs | # LANGUAGE FlexibleContexts #
-----------------------------------------------------------------------------
-- |
-- Module : Diagrams.TwoD.Layout.CirclePacking
Copyright : ( c ) 2012
-- License : BSD-style (see LICENSE)
-- Maintainer :
--
-- A method for laying out diagrams using a circle packin... | null | https://raw.githubusercontent.com/diagrams/diagrams-contrib/63f2aec4c070d1f558a5fcefd67b5315d64faaf5/src/Diagrams/TwoD/Layout/CirclePacking.hs | haskell | ---------------------------------------------------------------------------
|
Module : Diagrams.TwoD.Layout.CirclePacking
License : BSD-style (see LICENSE)
Maintainer :
A method for laying out diagrams using a circle packing algorithm. For
details on the algorithm, see "Optimisation.CirclePacking" ... | # LANGUAGE FlexibleContexts #
Copyright : ( c ) 2012
> cycle [ red , blue , yellow , magenta , cyan , bisque , firebrick , indigo ]
> [ decagon r | r < - [ 0.1,0.2 .. 0.7 ] ]
> radiusApproximation o = maximum [ radius ( e ( alpha @@ turn ) ) o | alpha < - [ 0,0.1 .. 1.0 ] ]
> packCircle... |
ac6d84327a8ba4fa53abb0c96c2b1d7ade90bf34f7d950b15b6e7871f7050255 | basho/riak_test | riak_kv_eleveldb_backend_intercepts.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2015 Basho Technologies , Inc.
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the Li... | null | https://raw.githubusercontent.com/basho/riak_test/8170137b283061ba94bc85bf42575021e26c929d/intercepts/riak_kv_eleveldb_backend_intercepts.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2015 Basho Technologies , Inc.
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(riak_kv_eleveldb_backen... |
dd4613461cf942a7b08726096e5ba49731d4a8e39c3e816a88fa4a3edc731451 | ocaml-multicore/tezos | node_wrapper.ml | module Lib = struct
type version = string
type t = Hacl of version | Secp256k1 of version
let to_string = function Hacl _ -> "hacl" | Secp256k1 _ -> "secp256k1"
let to_js_lib = function
| Hacl _ -> "hacl-wasm"
| Secp256k1 _ -> "@nomadic-labs/secp256k1wasm"
let version = function Hacl v | Secp256k1... | null | https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/tooling/node_wrapper.ml | ocaml | module Lib = struct
type version = string
type t = Hacl of version | Secp256k1 of version
let to_string = function Hacl _ -> "hacl" | Secp256k1 _ -> "secp256k1"
let to_js_lib = function
| Hacl _ -> "hacl-wasm"
| Secp256k1 _ -> "@nomadic-labs/secp256k1wasm"
let version = function Hacl v | Secp256k1... | |
04ba4b3f371728cbe245fa11dfd8058a526b472b29e03e6e13946fc0e740d67c | GlideAngle/flare-timing | Rational.hs | module Internal.Ellipsoid.PointToPoint.Rational
( distance
, inverse
, azimuthFwd
, azimuthRev
) where
import Data.UnitsOfMeasure (u)
import Data.UnitsOfMeasure.Internal (Quantity(..))
import Flight.LatLng (LatLng(..), AzimuthFwd, AzimuthRev)
import Flight.LatLng.Rational (Epsilon(..))
import Flig... | null | https://raw.githubusercontent.com/GlideAngle/flare-timing/27bd34c1943496987382091441a1c2516c169263/lang-haskell/earth/library/Internal/Ellipsoid/PointToPoint/Rational.hs | haskell | module Internal.Ellipsoid.PointToPoint.Rational
( distance
, inverse
, azimuthFwd
, azimuthRev
) where
import Data.UnitsOfMeasure (u)
import Data.UnitsOfMeasure.Internal (Quantity(..))
import Flight.LatLng (LatLng(..), AzimuthFwd, AzimuthRev)
import Flight.LatLng.Rational (Epsilon(..))
import Flig... | |
45954892bb9bd3adcb25dd38503ebeb4d02c74d4fcee12fe870726180bd73587 | aelve/guide | Routes.hs | module Guide.Routes
(
addRoute,
adminRoute,
authRoute,
deleteRoute,
haskellRoute,
feedRoute,
moveRoute,
renderRoute,
setRoute,
) where
import Web.Routing.Combinators (PathState (Open))
import Web.Spock (Path, (<//>))
haskellRoute :: Path '[] 'Open
haskellRoute = "haskell"
authRoute :: Path '[] 'O... | null | https://raw.githubusercontent.com/aelve/guide/96a338d61976344d2405a16b11567e5464820a9e/back/src/Guide/Routes.hs | haskell | module Guide.Routes
(
addRoute,
adminRoute,
authRoute,
deleteRoute,
haskellRoute,
feedRoute,
moveRoute,
renderRoute,
setRoute,
) where
import Web.Routing.Combinators (PathState (Open))
import Web.Spock (Path, (<//>))
haskellRoute :: Path '[] 'Open
haskellRoute = "haskell"
authRoute :: Path '[] 'O... | |
4e5a6396924c84f8bbcf3139451bec201584858159f64b51e01bb69c8e4a05af | seagreen/unison-code-explorer | Search.hs | module UCE.UI.Search where
import Concur.Core (Widget)
import Concur.Replica (HTML)
import qualified Concur.Replica.DOM as H
import qualified Concur.Replica.DOM.Events as P
import qualified Concur.Replica.DOM.Props as P
import qualified Data.Map.Strict as Map
import qualified Data.Set as Set
import qualified Data.Text... | null | https://raw.githubusercontent.com/seagreen/unison-code-explorer/9183f7ed4ee5d72a464ed5e3a041cd4733ccd353/src/UCE/UI/Search.hs | haskell | module UCE.UI.Search where
import Concur.Core (Widget)
import Concur.Replica (HTML)
import qualified Concur.Replica.DOM as H
import qualified Concur.Replica.DOM.Events as P
import qualified Concur.Replica.DOM.Props as P
import qualified Data.Map.Strict as Map
import qualified Data.Set as Set
import qualified Data.Text... | |
efdc684c7b4af5bb0c3fd733b89221fdf792b0a03578b09893dfbaae702fe1ed | Kakadu/fp2022 | demoParse.ml | * Copyright 2021 - 2022 ,
* SPDX - License - Identifier : CC0 - 1.0
open Bash_lib
let () =
let input = Stdio.In_channel.input_all Caml.stdin in
match Parser.parse input with
| Result.Ok ast -> Format.printf "%a\n%!" Ast.pp_script ast
| Error m -> Format.printf "Parse error %a\n%!" Parser.pp_error m
;;
| null | https://raw.githubusercontent.com/Kakadu/fp2022/6013a5ef227f41324295009a5a4d9d64f716723e/Bash/demos/demoParse.ml | ocaml | * Copyright 2021 - 2022 ,
* SPDX - License - Identifier : CC0 - 1.0
open Bash_lib
let () =
let input = Stdio.In_channel.input_all Caml.stdin in
match Parser.parse input with
| Result.Ok ast -> Format.printf "%a\n%!" Ast.pp_script ast
| Error m -> Format.printf "Parse error %a\n%!" Parser.pp_error m
;;
| |
60ed48cb36a1543a3c0f2465f998beafd2ba5e5a78fd09b838f1f4f6bb580f1e | roterski/syncrate-fulcro | comment_form.cljs | (ns app.comments.ui.comment-form
(:require
[app.comments.validations]
[app.ui.components :refer [field]]
[app.auth.ui.session :refer [Session]]
[goog.object :as gobj]
[com.fulcrologic.fulcro.dom :as dom :refer [div ul li p h1 h3 button]]
[com.fulcrologic.fulcro.dom.events :as evt]
[com.ful... | null | https://raw.githubusercontent.com/roterski/syncrate-fulcro/3fda40b12973e64c7ff976174498ec512b411323/src/main/app/comments/ui/comment_form.cljs | clojure | (ns app.comments.ui.comment-form
(:require
[app.comments.validations]
[app.ui.components :refer [field]]
[app.auth.ui.session :refer [Session]]
[goog.object :as gobj]
[com.fulcrologic.fulcro.dom :as dom :refer [div ul li p h1 h3 button]]
[com.fulcrologic.fulcro.dom.events :as evt]
[com.ful... | |
32b87adf36af930ce37db2ad95298c8554be0294cc615414921eb5598475da05 | gadfly361/reagent-figwheel | app_state.cljs | (ns {{ns-name}}.app-state
(:require
[reagent.core :as reagent]))
(defonce main
(reagent/atom
{:app {:debug? ^boolean js/goog.DEBUG}}))
| null | https://raw.githubusercontent.com/gadfly361/reagent-figwheel/4c40657b31a2b358be5697add2e96e8cac6f8535/src/leiningen/new/reagent_figwheel/gadfly/src/app/app_state.cljs | clojure | (ns {{ns-name}}.app-state
(:require
[reagent.core :as reagent]))
(defonce main
(reagent/atom
{:app {:debug? ^boolean js/goog.DEBUG}}))
| |
b02ac0fb678a16d75f42a21bbee0c3e99276dc7fe117653187ff212528a8a5e6 | dcos/dcos-net | dcos_rest_sup.erl | -module(dcos_rest_sup).
-behaviour(supervisor).
-export([start_link/1, init/1]).
start_link(Enabled) ->
supervisor:start_link({local, ?MODULE}, ?MODULE, [Enabled]).
init([false]) ->
{ok, {#{}, []}};
init([true]) ->
setup_cowboy(),
{ok, {#{}, []}}.
setup_cowboy() ->
Dispatch = cowboy_router:compil... | null | https://raw.githubusercontent.com/dcos/dcos-net/7bd01ac237ff4b9a12a020ed443e71c45f7063f4/apps/dcos_rest/src/dcos_rest_sup.erl | erlang | -module(dcos_rest_sup).
-behaviour(supervisor).
-export([start_link/1, init/1]).
start_link(Enabled) ->
supervisor:start_link({local, ?MODULE}, ?MODULE, [Enabled]).
init([false]) ->
{ok, {#{}, []}};
init([true]) ->
setup_cowboy(),
{ok, {#{}, []}}.
setup_cowboy() ->
Dispatch = cowboy_router:compil... | |
8c7be81df221eff3caadc2097192721afed2f14614bd7f1601a9a348b97902c8 | mcapodici/badlanguage | Parser.hs | {-# LANGUAGE OverloadedStrings #-}
module Parser.Parser (program) where
import Parser.FloatParser
import Text.Parsec.Text
import Text.Parsec.Prim (try)
import Text.ParserCombinators.Parsec.Char
import Text.Parsec.Combinator
import Parser.Data
import Control.Applicative
program :: Parser Expression
program = pr... | null | https://raw.githubusercontent.com/mcapodici/badlanguage/dcf4662907671a9eb00ba5c0be98de9e81c7d8da/src/Parser/Parser.hs | haskell | # LANGUAGE OverloadedStrings # |
module Parser.Parser (program) where
import Parser.FloatParser
import Text.Parsec.Text
import Text.Parsec.Prim (try)
import Text.ParserCombinators.Parsec.Char
import Text.Parsec.Combinator
import Parser.Data
import Control.Applicative
program :: Parser Expression
program = program' <* eof
program' :: Parser Exp... |
ac79bae7626d7e97ef380a8d8f74f34dcf2e6788f0ea94ab5559347365b224dd | gbwey/predicate-typed | Iterator.hs | # LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeApplications #
# LANGUAGE DataKinds #
{-# LANGUAGE GADTs #-}
# LANGUAGE TypeFamilies #
# LANGUAGE PolyKinds #
# LANGUAGE ScopedTypeVariables #
{-# L... | null | https://raw.githubusercontent.com/gbwey/predicate-typed/51f8d51f662722e1109d2ff35644aea1e0371b42/src/Predicate/Data/Iterator.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes #
# LANGUAGE OverloadedStrings #
# LANGUAGE ConstraintKinds #
# LANGUAGE EmptyDataDeriving #
| promoted iterator functions
** functions
** type families
$setup
>>> import Predicate
>>> :set -XDataKinds
>>> :set -XTypeApplications
>>> :set -XTypeOperators
>>> :set -XAllo... | # LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeApplications #
# LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE PolyKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE NoStarIsType #
mo... |
a9517f09d1acdc941dff572af00061ae2c118c4603a60b24390e25ff65f4613c | anuragsoni/shuttle | client.mli | open! Core
open! Async
module Address : sig
type t [@@deriving sexp, equal, compare, hash]
include Comparable.S with type t := t
include Hashable.S with type t := t
val of_host_and_port : Host_and_port.t -> t
val of_unix_domain_socket : Filename.t -> t
end
module Ssl_options : sig
type t [@@deriving sex... | null | https://raw.githubusercontent.com/anuragsoni/shuttle/4b6b477cc9cc811ad717e9ac663b4c4e7346f4b6/http11/src/client.mli | ocaml | * HTTP/1.1 client that supports keep-alives. A client entity can be created once with an
{{!Shuttle_http.Client.Address.t} address} and re-used for multiple requests. The
client is closed either when a user explicitly {{!Shuttle_http.Client.close} closes}
it, or if there is an exception when performing a HT... | open! Core
open! Async
module Address : sig
type t [@@deriving sexp, equal, compare, hash]
include Comparable.S with type t := t
include Hashable.S with type t := t
val of_host_and_port : Host_and_port.t -> t
val of_unix_domain_socket : Filename.t -> t
end
module Ssl_options : sig
type t [@@deriving sex... |
615c326488e17aff07e2295689c7cf16ce4a93534429933419365c7c0c4454d7 | dparis/gen-phzr | camera.cljs | (ns phzr.camera
(:require [phzr.impl.utils.core :refer [clj->phaser phaser->clj]]
[phzr.impl.extend :as ex]
[cljsjs.phaser])
(:refer-clojure :exclude [update]))
(defn ->Camera
"A Camera is your view into the game world. It has a position and size and renders only those objects within its ... | null | https://raw.githubusercontent.com/dparis/gen-phzr/e4c7b272e225ac343718dc15fc84f5f0dce68023/out/camera.cljs | clojure | (ns phzr.camera
(:require [phzr.impl.utils.core :refer [clj->phaser phaser->clj]]
[phzr.impl.extend :as ex]
[cljsjs.phaser])
(:refer-clojure :exclude [update]))
(defn ->Camera
"A Camera is your view into the game world. It has a position and size and renders only those objects within its ... | |
9fdcca722bdbfbab25025b1ca172d0e915ad6839dcf6c043283d88b320cdd483 | fractalide/racket2nix | dump-catalogs.rkt | #lang racket
(require net/url-string)
(require pkg/lib)
(require (prefix-in pkg-private: pkg/private/params))
(require (only-in "racket2nix.rkt" pretty-write-sorted-hash))
(command-line
#:args catalogs
(pkg-private:current-pkg-catalogs (map string->url catalogs))
(pretty-write-sorted-hash (get-all-pkg-details-f... | null | https://raw.githubusercontent.com/fractalide/racket2nix/c245240574b9a4c8b23e9f476c7f085522c907ba/nix/dump-catalogs.rkt | racket | #lang racket
(require net/url-string)
(require pkg/lib)
(require (prefix-in pkg-private: pkg/private/params))
(require (only-in "racket2nix.rkt" pretty-write-sorted-hash))
(command-line
#:args catalogs
(pkg-private:current-pkg-catalogs (map string->url catalogs))
(pretty-write-sorted-hash (get-all-pkg-details-f... | |
c3f985a67a59f3da5ac5c72ee044f39539d485bb441397428b5668e6e52aa591 | mpickering/ghcide-reflex | Documentation.hs | Copyright ( c ) 2019 The DAML Authors . All rights reserved .
SPDX - License - Identifier : Apache-2.0
# LANGUAGE CPP #
#include "ghc-api-version.h"
module Development.IDE.Spans.Documentation (
getDocumentation
, getDocumentationTryGhc
) where
import Control.Monad
import Data.List.Ext... | null | https://raw.githubusercontent.com/mpickering/ghcide-reflex/67ddebf0c1d4728e850057b9bd7c6852c0d96350/src/Development/IDE/Spans/Documentation.hs | haskell | ^ All of the possible modules it could be defined in.
^ The name you want documentation for.
This finds any documentation between the name you want
documentation for and the one before it. This is only an
approximately correct algorithm and there are easily constructed
cases where it will be wrong (if so then usu... | Copyright ( c ) 2019 The DAML Authors . All rights reserved .
SPDX - License - Identifier : Apache-2.0
# LANGUAGE CPP #
#include "ghc-api-version.h"
module Development.IDE.Spans.Documentation (
getDocumentation
, getDocumentationTryGhc
) where
import Control.Monad
import Data.List.Ext... |
1c0b9f81f6411587e5a102c4c48e5467785d91dc8239865356c9cffb2565bc12 | mirage/ocaml-vchan | vchan_xen.ml |
* Copyright ( c ) 2014 Citrix Systems Inc
*
* Permission to use , copy , modify , and 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 .
*
* THE SOFTWARE IS PROVIDED " AS IS ... | null | https://raw.githubusercontent.com/mirage/ocaml-vchan/cb116c1d79b97f1271189924ddbee73fa5a49456/xen/vchan_xen.ml | ocaml |
* Copyright ( c ) 2014 Citrix Systems Inc
*
* Permission to use , copy , modify , and 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 .
*
* THE SOFTWARE IS PROVIDED " AS IS ... | |
dba128873dd967977f7f4bc62c2845903bd9703aa144306d8436572b28226bd7 | gerritjvv/kafka-fast | cmd_consume.clj | (ns
^{:doc "Consume command "}
kafka-clj.apputils.cmd-consume
(:require [kafka-clj.apputils.util :as app-util]
[kafka-clj.consumer.node :as node]))
(comment
(def)
(def node (create-node! consumer-conf ["ping"]))
(read-msg! node))
(defn consume [topic brokers redis-host]
(let [brokers' (ap... | null | https://raw.githubusercontent.com/gerritjvv/kafka-fast/fd149d8744c8100b2a8f4d09f1a251812e7baf6a/kafka-clj/src/kafka_clj/apputils/cmd_consume.clj | clojure |
public | (ns
^{:doc "Consume command "}
kafka-clj.apputils.cmd-consume
(:require [kafka-clj.apputils.util :as app-util]
[kafka-clj.consumer.node :as node]))
(comment
(def)
(def node (create-node! consumer-conf ["ping"]))
(read-msg! node))
(defn consume [topic brokers redis-host]
(let [brokers' (ap... |
a2f5c7b86e2b00754b6cc4e1a14821a7f74934998452827d78f4069f10209573 | aws-beam/aws-erlang | aws_forecast.erl | %% WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
See -beam/aws-codegen for more details .
@doc Provides APIs for creating and managing Amazon Forecast resources .
-module(aws_forecast).
-export([create_auto_predictor/2,
create_auto_predictor/3,
create_dataset/2,
create_dataset/3,
... | null | https://raw.githubusercontent.com/aws-beam/aws-erlang/699287cee7dfc9dc8c08ced5f090dcc192c9cba8/src/aws_forecast.erl | erlang | WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
====================================================================
API
====================================================================
@doc Creates an Amazon Forecast predictor.
applying the optimal combination of algorithms to each time series in your
datasets. Y... | See -beam/aws-codegen for more details .
@doc Provides APIs for creating and managing Amazon Forecast resources .
-module(aws_forecast).
-export([create_auto_predictor/2,
create_auto_predictor/3,
create_dataset/2,
create_dataset/3,
create_dataset_group/2,
create_datase... |
bf128bfeb84b974dc513d874f899343785cf54addfc8f2f044d6c276d48f5428 | mumuki/mulang | Interpreter.hs | # LANGUAGE ScopedTypeVariables #
module Language.Mulang.Interpreter (
defaultContext,
dereference,
dereference',
eval,
eval',
evalExpr,
evalRaising,
nullRef,
ExecutionContext(..),
Value(..)
) where
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
import Data... | null | https://raw.githubusercontent.com/mumuki/mulang/aee5d3d8aba787698862ca0deb6ad54623baaa13/src/Language/Mulang/Interpreter.hs | haskell | if function has no name we avoid registering it
the callback above should never allow this to execute | # LANGUAGE ScopedTypeVariables #
module Language.Mulang.Interpreter (
defaultContext,
dereference,
dereference',
eval,
eval',
evalExpr,
evalRaising,
nullRef,
ExecutionContext(..),
Value(..)
) where
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
import Data... |
f276434a25fe89c8fa9335327c6a20357711baccd9ad688e52b38db448734c5d | argp/bap | batInt.mli |
* BatInt - Extended operations on integers
* Copyright ( C ) 2008
* 2008
*
* 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 2.... | null | https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/batteries/src/batInt.mli | ocaml | * An alias for the type of integers.
* The integer [0].
* The integer [-1].
* Unary negation.
* Addition.
* Addition.
* Subtraction.
* Subtraction.
* Multiplication.
* Multiplication.
* [modulo a b] computes the remainder of the integer
division of [a] by [b]. This is defined only if [b <> 0].
The re... |
* BatInt - Extended operations on integers
* Copyright ( C ) 2008
* 2008
*
* 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 2.... |
7cde7ceee91c4d4a51d545d8c6e3d3af7875770b7d8b299ce8c43aad4ac4bb57 | MaartenFaddegon/Hoed | Interpreter.hs | module Interpreter(obey) where
import Syntax
import Behaviour
import Value
type Env = [(Name,Value)]
obey :: Command -> Trace Value
obey p = fst (run p [])
look :: Name -> Env -> Value
look x s = maybe Wrong id (lookup x s)
update :: [Name] -> [Value] -> Env -> Env
update xs vs s = zip xs vs ++ filter (\(y,_)->y `... | null | https://raw.githubusercontent.com/MaartenFaddegon/Hoed/8769d69e309928aab439b22bc3f3dbf5452acc77/examples/afp02Exercises/Compiler/parassign/Interpreter.hs | haskell | module Interpreter(obey) where
import Syntax
import Behaviour
import Value
type Env = [(Name,Value)]
obey :: Command -> Trace Value
obey p = fst (run p [])
look :: Name -> Env -> Value
look x s = maybe Wrong id (lookup x s)
update :: [Name] -> [Value] -> Env -> Env
update xs vs s = zip xs vs ++ filter (\(y,_)->y `... | |
e19fb96e96d6e9ed9ca70e413e4f71e9c7e51bce40e269157e3f0c3acb140e31 | bartavelle/language-puppet | SizeSpec.hs | # LANGUAGE OverloadedLists #
module Interpreter.Function.SizeSpec (spec, main) where
import Helpers
main :: IO ()
main = hspec spec
evalArgs :: InterpreterMonad PValue -> Either PrettyError Scientific
evalArgs = dummyEval
>=> \pv -> case pv of
PNumber s -> return s
... | null | https://raw.githubusercontent.com/bartavelle/language-puppet/6af7458e094440816c8b9b7b387050612e87a70f/tests/Interpreter/Function/SizeSpec.hs | haskell | Not conformant:
it "should error with numerical arguments" (checkError ["1"] "size(): Expects ") | # LANGUAGE OverloadedLists #
module Interpreter.Function.SizeSpec (spec, main) where
import Helpers
main :: IO ()
main = hspec spec
evalArgs :: InterpreterMonad PValue -> Either PrettyError Scientific
evalArgs = dummyEval
>=> \pv -> case pv of
PNumber s -> return s
... |
890be39aa0df159b4869df40618ed7b145342d551ddd644690c32a20d930fb9e | archaelus/erms | erms_inject_mo.erl | %%%-------------------------------------------------------------------
@copyright Catalyst IT Ltd ( )
%%%
@author nt < >
%% @version {@vsn}, {@date} {@time}
@doc YAWS appmod for MO submission
%% @end
%%%-------------------------------------------------------------------
-module(erms_inject_mo).
-include_lib(... | null | https://raw.githubusercontent.com/archaelus/erms/5dbe5e79516a16e461e7a2a345dd80fbf92ef6fa/src/erms_inject_mo.erl | erlang | -------------------------------------------------------------------
@version {@vsn}, {@date} {@time}
@end
-------------------------------------------------------------------
API
====================================================================
API
================================================================... | @copyright Catalyst IT Ltd ( )
@author nt < >
@doc YAWS appmod for MO submission
-module(erms_inject_mo).
-include_lib("logging.hrl").
-include_lib("mnesia_model.hrl").
-include_lib("yaws_api.hrl").
-import(yaws_api, [queryvar/2]).
-export([out/1]).
out(Arg) when is_record(Arg, arg) ->
case (Arg#arg.... |
462f0802d61bf76b305c68984d2fddebf05b5f762b34078d181b860ba686ed5d | ghc/testsuite | TcCoercibleFailSafe.hs | # LANGUAGE RoleAnnotations , RankNTypes , ScopedTypeVariables , Safe #
import GHC.Prim (coerce, Coercible)
import Data.Ord (Down)
newtype Age = Age Int deriving Show
foo1 :: (Down Age -> Down Int)
foo1 = coerce
main = return ()
| null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_fail/TcCoercibleFailSafe.hs | haskell | # LANGUAGE RoleAnnotations , RankNTypes , ScopedTypeVariables , Safe #
import GHC.Prim (coerce, Coercible)
import Data.Ord (Down)
newtype Age = Age Int deriving Show
foo1 :: (Down Age -> Down Int)
foo1 = coerce
main = return ()
| |
2128dfbfb9ebe6e618ec9b70d8fb74cdf8107a8c870cfcf27ec5114c4a39466e | ekmett/sparse | AppleBlas.hs |
module AppleBlas(blasMMult) where
import Foreign hiding (unsafePerformIO)
import Foreign.C.Types
import Unsafe.Coerce
import Prelude hiding (replicate)
import Data . Storable
import System.IO.Unsafe
import Data.Vector.Storable.Mutable
import GHC.Ptr (castPtr)
import Numerics.Simple.Util
foreign import ccall uns... | null | https://raw.githubusercontent.com/ekmett/sparse/8de744d4c1f3520b84b0e841f7b24178f9a1ea2f/benchmarks/AppleBlas.hs | haskell |
module AppleBlas(blasMMult) where
import Foreign hiding (unsafePerformIO)
import Foreign.C.Types
import Unsafe.Coerce
import Prelude hiding (replicate)
import Data . Storable
import System.IO.Unsafe
import Data.Vector.Storable.Mutable
import GHC.Ptr (castPtr)
import Numerics.Simple.Util
foreign import ccall uns... | |
97c4d033eaaca2f79c6ed921530569a6c2d1f9484d4588c48f2b3cb9ce691034 | robert-strandh/Cluffer | edit-protocol-implementation.lisp | (cl:in-package #:cluffer-standard-line)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
Method on CURSOR - ATTACHED - P.
(defmethod cluffer:cursor-attached-p ((cursor cursor))
(not (null (line cursor))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Methods on ITEM-COUNT.
... | null | https://raw.githubusercontent.com/robert-strandh/Cluffer/5b612e66cd85b69de4feeae2fffea00c7e184e31/Standard-line/edit-protocol-implementation.lisp | lisp |
Methods on ITEM-COUNT.
Methods on ITEMS.
line. While this way of doing it might seem wasteful, it probably
is not that bad. When the items are asked for, the reason is
probably that those items are going to be displayed or used to
drive a parser, or something else that will imply some significant
work fo... | (cl:in-package #:cluffer-standard-line)
Method on CURSOR - ATTACHED - P.
(defmethod cluffer:cursor-attached-p ((cursor cursor))
(not (null (line cursor))))
(defmethod cluffer:item-count ((line open-line))
(- (length (contents line)) (- (gap-end line) (gap-start line))))
(defmethod cluffer:item-count ((line c... |
64ee058d9780f164aea86ade340da5ce9264ab27f65364051470777eb3cfdf16 | startalkIM/ejabberd | mod_http_upload_quota.erl | %%%----------------------------------------------------------------------
%%% File : mod_http_upload_quota.erl
Author : < >
%%% Purpose : Quota management for HTTP File Upload (XEP-0363)
Created : 15 Oct 2015 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2015 - 2016 ProcessOne
%%%
%%% This program is fr... | null | https://raw.githubusercontent.com/startalkIM/ejabberd/718d86cd2f5681099fad14dab5f2541ddc612c8b/src/mod_http_upload_quota.erl | erlang | ----------------------------------------------------------------------
File : mod_http_upload_quota.erl
Purpose : Quota management for HTTP File Upload (XEP-0363)
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 ... | Author : < >
Created : 15 Oct 2015 by < >
ejabberd , Copyright ( C ) 2015 - 2016 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
... |
20a5c322dc8916d481d0324d90c202bebebdb8e1c80de5b8cf62a7c33879c8de | nedap/speced.def | def_with_doc.cljc | (ns nedap.speced.def.impl.def-with-doc
(:require
[clojure.core.protocols]
#?(:cljs [cljs.repl])
#?(:clj [clojure.spec.alpha :as spec] :cljs [cljs.spec.alpha :as spec])
[nedap.utils.spec.api :refer [check!]])
#?(:cljs (:require-macros [nedap.speced.def.impl.def-with-doc]))
#?(:clj (:import (java.io Wri... | null | https://raw.githubusercontent.com/nedap/speced.def/55053e53e749f77753294f3ee8d4639470840f8c/src/nedap/speced/def/impl/def_with_doc.cljc | clojure | (ns nedap.speced.def.impl.def-with-doc
(:require
[clojure.core.protocols]
#?(:cljs [cljs.repl])
#?(:clj [clojure.spec.alpha :as spec] :cljs [cljs.spec.alpha :as spec])
[nedap.utils.spec.api :refer [check!]])
#?(:cljs (:require-macros [nedap.speced.def.impl.def-with-doc]))
#?(:clj (:import (java.io Wri... | |
fcfd8a907e867f469b94d3ddd503b20ba049b1ba01065f3b0b29052a97459142 | tiensonqin/lymchat | pgpass.clj | (ns api.pg.pgpass
"Logic for matching passwords ~/.pgpass passwords to db specs."
(:require [clojure.java.io :as io]
[clojure.string :as str]))
(defn parse-pgpass-line
"The .pgpass files has lines of format: hostname:port:database:username:password
Return a map of fields {:pg-hostname \"*\" ...}"
... | null | https://raw.githubusercontent.com/tiensonqin/lymchat/824026607d30c12bc50afb06f677d1fa95ff1f2f/api/src/api/pg/pgpass.clj | clojure | (ns api.pg.pgpass
"Logic for matching passwords ~/.pgpass passwords to db specs."
(:require [clojure.java.io :as io]
[clojure.string :as str]))
(defn parse-pgpass-line
"The .pgpass files has lines of format: hostname:port:database:username:password
Return a map of fields {:pg-hostname \"*\" ...}"
... | |
cc2e1e0b8689a1128edac01affa66a74fbbf9752d8025b58d9f2ea9d892d7524 | marcin-rzeznicki/stackcollapse-ghc | Format.hs | stackcollapse - ghc - fold GHC prof files into flamegraph input
Copyright ( C ) 2020
This program is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , o... | null | https://raw.githubusercontent.com/marcin-rzeznicki/stackcollapse-ghc/6ff9b8d526dbeccb68aab02bec7cd7b2e53515ef/src/Format.hs | haskell | # LANGUAGE OverloadedStrings # | stackcollapse - ghc - fold GHC prof files into flamegraph input
Copyright ( C ) 2020
This program is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , o... |
aeb69433cf81f0cf4755c351833b8a447c8958daa935bf5db3070d74be1f6967 | OCamlPro/ocaml-benchs | sequence_cps.ml | type ('s,'a) unfolder =
{unfold :
'r.
's
-> on_done:'r
-> on_skip:('s -> 'r)
-> on_yield:('s -> 'a -> 'r)
-> 'r}
type _ t =
| Sequence : ('s * ('s,'a) unfolder) -> 'a t
let map (Sequence(s,{unfold})) ~f =
Sequence(s, {unfold =
fun s ~on_done ~on_skip ~on_yield -... | null | https://raw.githubusercontent.com/OCamlPro/ocaml-benchs/98047e112574e6bf55137dd8058f227a9f40281b/sequence/sequence_cps.ml | ocaml | type ('s,'a) unfolder =
{unfold :
'r.
's
-> on_done:'r
-> on_skip:('s -> 'r)
-> on_yield:('s -> 'a -> 'r)
-> 'r}
type _ t =
| Sequence : ('s * ('s,'a) unfolder) -> 'a t
let map (Sequence(s,{unfold})) ~f =
Sequence(s, {unfold =
fun s ~on_done ~on_skip ~on_yield -... | |
44f393c80aebc21a9c0d30db0b3f67ea0be8c5ace40d31aaba0ab0f2733c7733 | plumatic/grab-bag | core.clj | (ns kinesis.core
"Shared utils between publisher and client, such as message framing / schemas."
(:use plumbing.core)
(:require
[plumbing.serialize :as serialize])
(:import
[java.nio ByteBuffer]))
(set! *warn-on-reflection* true)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;... | null | https://raw.githubusercontent.com/plumatic/grab-bag/a15e943322fbbf6f00790ce5614ba6f90de1a9b5/lib/kinesis/src/kinesis/core.clj | clojure |
Encoding and decoding messages into records. | (ns kinesis.core
"Shared utils between publisher and client, such as message framing / schemas."
(:use plumbing.core)
(:require
[plumbing.serialize :as serialize])
(:import
[java.nio ByteBuffer]))
(set! *warn-on-reflection* true)
(defn- prepend-timestamp [^bytes b]
(let [bb (ByteBuffer/allocate (+ 8 ... |
9c887e92b83f7ad069b18523800726895fef439492ddd24db031d7e72b82977c | phoe-trash/gateway | protocol.lisp | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; GATEWAY
" phoe " Herda 2016
gateway.lisp
(in-package #:gateway)
(defaccessors sender recipient date-of contents
id name player avatar gender species colors shard
id name messages personas shard
dimensions x-dimension y-d... | null | https://raw.githubusercontent.com/phoe-trash/gateway/a8d579ccbafcaee8678caf59d365ec2eab0b1a7e/_old/__old/old/old_/protocol.lisp | lisp |
GATEWAY
done
done <3
done
chat.lisp
done
done
done
done
done
done
done
done
done
done
done
done
done
done
done
player.lisp
done
done
done
done
done
done
done
done
server protocol
shard.lisp
connection.lisp
done
done <3
done
SEXPABLE protocol
MESSAGABLE protocol
MESSAGE protoco... | " phoe " Herda 2016
gateway.lisp
(in-package #:gateway)
(defaccessors sender recipient date-of contents
id name player avatar gender species colors shard
id name messages personas shard
dimensions x-dimension y-dimension
id username password email personas connection
id name world-map jewel personas c... |
6144479aa75526c34693d7d1bbd0ddc8fbe75310951866b5ae5f65ad95059a6b | dwayne/haskell-programming | DetermineTheType.hs | # LANGUAGE NoMonomorphismRestriction #
-- Toggle to see how the type of example changes
module DetermineTheType where
-- simple example
example = 1
| null | https://raw.githubusercontent.com/dwayne/haskell-programming/d08679e76cfd39985fa2ee3cd89d55c9aedfb531/ch5/DetermineTheType.hs | haskell | Toggle to see how the type of example changes
simple example | # LANGUAGE NoMonomorphismRestriction #
module DetermineTheType where
example = 1
|
9dc4fe355b11263f1037e9358549f7ce0c67136630cf1bb0e88796df77081194 | 8c6794b6/guile-tjit | command.scm | Repl commands
Copyright ( C ) 2001 , 2009 , 2010 , 2011 , 2012 , 2013 Free Software Foundation , Inc.
;; 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 Li... | null | https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/module/system/repl/command.scm | scheme | This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
either
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 PURPOSE. See ... | Repl commands
Copyright ( C ) 2001 , 2009 , 2010 , 2011 , 2012 , 2013 Free Software Foundation , Inc.
version 3 of the License , or ( at your option ) any later version .
You should have received a copy of the GNU Lesser General Public
Foundation , Inc. , 51 Franklin Street , Fifth Floor , Boston , MA
021... |
d9f7234a554f8eee030cfab059c35890a3ad28ba30cf51d7e1761f0f58ce8c56 | JacquesCarette/Drasil | Derivations.hs | module Drasil.GamePhysics.Derivations where
import Language.Drasil (eqSymb, ModelExprC(..), ExprC(..), ModelExpr, LiteralC(..))
import Drasil.GamePhysics.Unitals (timeT, time_1, time_2, velo_1, velo_2)
import qualified Data.Drasil.Quantities.Physics as QP (force, time, velocity,
acceleration, chgInVelocity)
impor... | null | https://raw.githubusercontent.com/JacquesCarette/Drasil/d9d9e7ac87131ccaae889029481cd34e0c0ad773/code/drasil-example/gamephysics/lib/Drasil/GamePhysics/Derivations.hs | haskell | TODO: Why does defint take a symbol as an argument? Shouldn't it be a UID? | module Drasil.GamePhysics.Derivations where
import Language.Drasil (eqSymb, ModelExprC(..), ExprC(..), ModelExpr, LiteralC(..))
import Drasil.GamePhysics.Unitals (timeT, time_1, time_2, velo_1, velo_2)
import qualified Data.Drasil.Quantities.Physics as QP (force, time, velocity,
acceleration, chgInVelocity)
impor... |
2243ce524c0e91bdb5c8a00e2e2b2e5a1544bf13bed41a2d161904eb819b178e | hasktorch/hasktorch | StdArray.hs |
# LANGUAGE DataKinds #
# LANGUAGE PolyKinds #
# LANGUAGE TemplateHaskell #
# LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleInstances #
module Torch.Internal.Unmanaged.Type.StdArray where
import qualified Language.C.Inline.Cpp ... | null | https://raw.githubusercontent.com/hasktorch/hasktorch/6233c173e1dd9fd7218fd13b104da15fc457f67e/libtorch-ffi/src/Torch/Internal/Unmanaged/Type/StdArray.hs | haskell | # LANGUAGE OverloadedStrings # |
# LANGUAGE DataKinds #
# LANGUAGE PolyKinds #
# LANGUAGE TemplateHaskell #
# LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleInstances #
module Torch.Internal.Unmanaged.Type.StdArray where
import qualified Language.C.Inline.Cpp as C
import qualified Language.C.In... |
1438627d122dde0c4b20f0276a9cc635e9eedf284bd63b216d67035b635650d3 | nmunro/mtg-api | subtypes.lisp | (defpackage mtg-api/subtypes
(:use :cl)
(:export #:fetch
#:make-subtypes-api))
(in-package :mtg-api/subtypes)
(defclass subtypes-api-v1 (mtg-api/base:api-v1)
((resource :initarg :formats :initform "subtypes" :reader resource))
(:documentation "Represents a list of subtypes using V1 of the API"))
(d... | null | https://raw.githubusercontent.com/nmunro/mtg-api/f796794cde8a483278f22d7ac7e6c46302685ec1/src/types/subtypes.lisp | lisp | (defpackage mtg-api/subtypes
(:use :cl)
(:export #:fetch
#:make-subtypes-api))
(in-package :mtg-api/subtypes)
(defclass subtypes-api-v1 (mtg-api/base:api-v1)
((resource :initarg :formats :initform "subtypes" :reader resource))
(:documentation "Represents a list of subtypes using V1 of the API"))
(d... | |
243d45f7500effcf7a4b4cc84156b62949ee729d4a692d2091d2d89dbdeb7b3e | charlieg/Sparser | status-printer.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
copyright ( c ) 1995 -- all rights reserved
;;;
;;; File: "status printer"
Module : " : titles : "
version : February 1995
initiated 2/28/95
(in-package :sparser)
(define-special-printing-routine-for-category qualified-title
:fu... | null | https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/grammar/model/core/titles/status-printer.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
File: "status printer" | copyright ( c ) 1995 -- all rights reserved
Module : " : titles : "
version : February 1995
initiated 2/28/95
(in-package :sparser)
(define-special-printing-routine-for-category qualified-title
:full ((format stream "#<qualified-title ~A,~A>"
(string/title (value-of 'title... |
8be1af35fab408482ad88c94cafa21715be02e9170de7d4d355306ceff1e04bd | well-typed-lightbulbs/ocaml-esp32 | morematch.ml | (* TEST
include testing
*)
(**************************************************************)
(* This suite tests the pattern-matching compiler *)
(* it should just compile and run. *)
(* While compiling the following messages are normal: *)
(****************************... | null | https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/testsuite/tests/basic-more/morematch.ml | ocaml | TEST
include testing
************************************************************
This suite tests the pattern-matching compiler
it should just compile and run.
While compiling the following messages are normal:
**************************************************... |
let test msg f arg r =
if f arg <> r then begin
prerr_endline msg ;
failwith "Malaise"
end
;;
type t = A | B | C | D | E | F
;;
let f x = match x with
| A | B | C -> 1
| D | E -> 2
| F -> 3;;
test "un" f C 1 ;
test "un" f D 2 ;
test "un" f F 3 ; ()
;;
let g x = match x with
1 -> 1
| 2 -> 2
| 3 -> ... |
05d23493fe42747884dbf2265d023a4596934037e8801d8fd8bdd075d3788843 | chaoxu/fancy-walks | 95.hs |
import Data.List hiding (union)
import Data.Ord
minus (x:xs) (y:ys) = case (compare x y) of
LT -> x : minus xs (y:ys)
EQ -> minus xs ys
GT -> minus (x:xs) ys
minus xs _ = xs
union (x:xs) (y:ys) = case (compare x y) of
LT -> x : union xs (y:ys)
... | null | https://raw.githubusercontent.com/chaoxu/fancy-walks/952fcc345883181144131f839aa61e36f488998d/projecteuler.net/95.hs | haskell |
import Data.List hiding (union)
import Data.Ord
minus (x:xs) (y:ys) = case (compare x y) of
LT -> x : minus xs (y:ys)
EQ -> minus xs ys
GT -> minus (x:xs) ys
minus xs _ = xs
union (x:xs) (y:ys) = case (compare x y) of
LT -> x : union xs (y:ys)
... | |
a967a57e304383d8cad6f3f76f3a8b165db71760d7765e5dec09aff599ab636f | nubank/midje-nrepl | inhibit_tests.clj | (ns midje-nrepl.middleware.inhibit-tests
(:require [clojure.test :refer [*load-tests*]]
[nrepl.transport :as transport :refer [Transport]]))
(defn- done? [{:keys [status]}]
(contains? status :done))
(defn- transport-proxy [transport load-tests?]
(reify Transport
(recv [_]
(transport/recv t... | null | https://raw.githubusercontent.com/nubank/midje-nrepl/b4d505f346114db88ad5b5c6b3c8f0af4e0136fc/src/midje_nrepl/middleware/inhibit_tests.clj | clojure | (ns midje-nrepl.middleware.inhibit-tests
(:require [clojure.test :refer [*load-tests*]]
[nrepl.transport :as transport :refer [Transport]]))
(defn- done? [{:keys [status]}]
(contains? status :done))
(defn- transport-proxy [transport load-tests?]
(reify Transport
(recv [_]
(transport/recv t... | |
ac2a30d58e8b9c45dc2994f7b3cb16a8ce06453f4d4b25c8a925370556d647a0 | mondemand/mondemand-server | mondemand_server_config.erl | -module (mondemand_server_config).
-export ([ all/0,
listener_config/1,
num_dispatchers/1,
dispatch_config/1,
backends_to_start/1,
applications_to_start/1,
web_config/1,
backend_config/2,
mappings_config/1
]).
-include_li... | null | https://raw.githubusercontent.com/mondemand/mondemand-server/88e57ef8ece8a0069a747620f4585104cb560840/src/mondemand_server_config.erl | erlang | the application needs to be loaded in order to see the variables for
some reason
determine the unique list of modules to start from the dispatch list
--------------------------------------------------------------------
--------------------------------------------------------------------
functions to order a webmach... | -module (mondemand_server_config).
-export ([ all/0,
listener_config/1,
num_dispatchers/1,
dispatch_config/1,
backends_to_start/1,
applications_to_start/1,
web_config/1,
backend_config/2,
mappings_config/1
]).
-include_li... |
411c38d3b34643c74bf6e3cd2e7ff6caf0d4e1e6e5eaa07807660b5b30353095 | returntocorp/ocaml-tree-sitter-core | Src_file.mli | (*
Representation of an input file.
*)
type info = {
path to the file or to an informal descriptor
such as ' < stdin > '
such as '<stdin>' *)
path: string option; (* path to the file, if applicable *)
}
type t = private {
info: info;
Lines represent the contents... | null | https://raw.githubusercontent.com/returntocorp/ocaml-tree-sitter-core/b2404ed27e053f23745f7b2335405134dcb087ab/src/run/lib/Src_file.mli | ocaml |
Representation of an input file.
path to the file, if applicable
Return the number of lines (O(1))
Load an input file. It gets resolved into lines and columns.
Load source code from a string. The optional 'src_file' is for
pointing to the source file in error messages.
If 'src_file' is unspecifi... |
type info = {
path to the file or to an informal descriptor
such as ' < stdin > '
such as '<stdin>' *)
}
type t = private {
info: info;
Lines represent the contents of the input split after the line
terminator ' \n ' .
If the input ends with ' \n ' , th... |
6d735039b9f42a9432c9191ebfebac8c2cf5213142b885c99f7cd57c85870a22 | GaloisInc/daedalus | ErrorTrie.hs | module Daedalus.Interp.ErrorTrie where
import Data.Map(Map)
import qualified Data.Map as Map
import Data.ByteString.Short(fromShort)
import qualified RTS.ParseError as RTS
import qualified Daedalus.RTS.HasInputs as RTS
import Daedalus.RTS.Input
import Daedalus.RTS.JSON
import Daedalus.Interp.DebugAnnot
import Daedal... | null | https://raw.githubusercontent.com/GaloisInc/daedalus/3f180d29441960e35386654ec79a2b205bddc157/src/Daedalus/Interp/ErrorTrie.hs | haskell | module Daedalus.Interp.ErrorTrie where
import Data.Map(Map)
import qualified Data.Map as Map
import Data.ByteString.Short(fromShort)
import qualified RTS.ParseError as RTS
import qualified Daedalus.RTS.HasInputs as RTS
import Daedalus.RTS.Input
import Daedalus.RTS.JSON
import Daedalus.Interp.DebugAnnot
import Daedal... | |
5be7a40d63668bcd453220f42d571cbed2368ab88255d1e4b8d89c5eec7e33f1 | scymtym/clim.flamegraph | repaint-based-pane.lisp | (cl:in-package #:clim.flamegraph.view.timeline)
(defclass timeline-pane (clim:application-pane)
((%dx :accessor dx)
(%dy :accessor dy))
(:default-initargs
:display-time nil))
(defmethod clim:compose-space ((pane timeline-pane) &key width height)
(clim:make-space-requirement :width 3000 :height 3000))
(de... | null | https://raw.githubusercontent.com/scymtym/clim.flamegraph/03b5e4f08b53af86a98afa975a8e7a29d0ddd3a7/src/view/timeline/repaint-based-pane.lisp | lisp | (cl:in-package #:clim.flamegraph.view.timeline)
(defclass timeline-pane (clim:application-pane)
((%dx :accessor dx)
(%dy :accessor dy))
(:default-initargs
:display-time nil))
(defmethod clim:compose-space ((pane timeline-pane) &key width height)
(clim:make-space-requirement :width 3000 :height 3000))
(de... | |
5324295b66a96f6744710978a7b6aad19fc38c9301dc8e568a184782a076f6c1 | igorhvr/bedlam | macros.scm | (module iasylum/macros
(code->macroexpanded-code file->macroexpanded-code)
;;; FIXXXME Will fail badly in many cases. Handling if namespaces is irresponsible to say the least, but it is still useful in some cases.
(define code->macroexpanded-code
(lambda* (code (warn-me-that-this-is-really-unsafe: warn-me-th... | null | https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/iasylum/macros.scm | scheme | FIXXXME Will fail badly in many cases. Handling if namespaces is irresponsible to say the least, but it is still useful in some cases. | (module iasylum/macros
(code->macroexpanded-code file->macroexpanded-code)
(define code->macroexpanded-code
(lambda* (code (warn-me-that-this-is-really-unsafe: warn-me-that-this-is-really-unsafe #t) (kill-namespaces: kill-namespaces #f))
(when warn-me-that-this-is-really-unsafe
(log... |
feaf0652b406060d1bde62b6cb0ba5d3c4fb14cceea9aacf8592235bab7e758b | simonmichael/hledger | Account.hs | # LANGUAGE CPP #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
{-|
An 'Account' has a name, a list of subaccounts, an optional parent
account, and subaccounting-excluding and -including balances.
-}
module Hledger.Data.Account
( nullacct
, accountsFromPostings
, accountTree
, sho... | null | https://raw.githubusercontent.com/simonmichael/hledger/b46cb8a7f77df569373d0b2b12bba5e97eff76c7/hledger-lib/Hledger/Data/Account.hs | haskell | # LANGUAGE OverloadedStrings #
|
An 'Account' has a name, a list of subaccounts, an optional parent
account, and subaccounting-excluding and -including balances.
deriving instance Show Account
quick equality test for speed
and
[ aname a == aname b
, aparent a = = aparent b -- avoid infinite recursion
, asub... | # LANGUAGE CPP #
# LANGUAGE RecordWildCards #
module Hledger.Data.Account
( nullacct
, accountsFromPostings
, accountTree
, showAccounts
, showAccountsBoringFlag
, printAccounts
, lookupAccount
, parentAccounts
, accountsLevels
, mapAccounts
, anyAccounts
, filterAccounts
, sumAccounts
, clipAccounts... |
3b1fe1bd85ae994ed55bd5abd59016c77a9f35f9477a67993a61574f408e5db0 | MastodonC/kixi.hecuba | projects.clj | (ns kixi.hecuba.api.projects
(:require
[clojure.core.match :refer (match)]
[cheshire.core :as json]
[clojure.tools.logging :as log]
[kixi.hecuba.security :refer (has-admin? has-programme-manager? has-project-manager? has-user?) :as sec]
[kixi.hecuba.api :refer (decode-body authorized?) :as api]
[lib... | null | https://raw.githubusercontent.com/MastodonC/kixi.hecuba/467400bbe670e74420a2711f7d49e869ab2b3e21/src/clj/kixi/hecuba/api/projects.clj | clojure | Specific project
All projects for a programme-id
All projects
Index
FIXME: Should return programmes/%s/projects/%s
| (ns kixi.hecuba.api.projects
(:require
[clojure.core.match :refer (match)]
[cheshire.core :as json]
[clojure.tools.logging :as log]
[kixi.hecuba.security :refer (has-admin? has-programme-manager? has-project-manager? has-user?) :as sec]
[kixi.hecuba.api :refer (decode-body authorized?) :as api]
[lib... |
13401a3c2fc3af786d0fcca227f7ce89d8c9340f78e4ad776842133f43275190 | ztmr/egtm | egtm_util.erl | %%
%% $Id: $
%%
%% Module: egtm_util -- description
Created : 07 - APR-2012 15:31
%% Author: tmr
%%
Copyright 2012 , IDEA Systems .
%%
%% 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
Foun... | null | https://raw.githubusercontent.com/ztmr/egtm/06f4be66cef2ff702c579d9d9ad30cf23e95076d/src/egtm_util.erl | erlang |
$Id: $
Module: egtm_util -- description
Author: tmr
This program is free software: you can redistribute
it and/or modify it under the terms of the GNU Affero
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 ... | Created : 07 - APR-2012 15:31
Copyright 2012 , IDEA Systems .
General Public License as published by the Free Software
Foundation , either version 3 of the License ,
@doc EGTM Utilities .
-module (egtm_util).
-export ([
stringify/1,
gforeach/0, gforeach/1,
foreach/3, foreach/2,
set_term/1, transact... |
4307fc12e7216e2b6f4a6304f9408d602b49edbc665c0dca4a57f448634e325f | racket/web-server | cookie-parse.rkt | #lang racket/base
(require web-server/http/request-structs
net/cookies/common
net/cookies/server
web-server/private/util
racket/match
racket/contract)
(provide (contract-out
[struct client-cookie
([name (and/c string? cookie-name?)]
[val... | null | https://raw.githubusercontent.com/racket/web-server/f718800b5b3f407f7935adf85dfa663c4bba1651/web-server-lib/web-server/http/cookie-parse.rkt | racket | #lang racket/base
(require web-server/http/request-structs
net/cookies/common
net/cookies/server
web-server/private/util
racket/match
racket/contract)
(provide (contract-out
[struct client-cookie
([name (and/c string? cookie-name?)]
[val... | |
7e6d50367b888673166e730907b92316aaa5184d056619ce82e642c058bed62d | maximedenes/native-coq | nametab.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/library/nametab.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
Kinds of global names
The visibil... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Errors
open Util
open Co... |
dd2bab3e3367bb45399f75e621186f5a1c0b6b169b6c472d0931630ed5fc042c | input-output-hk/goblins | test.hs | import Control.Monad (unless)
import Hedgehog
import System.Exit (exitFailure)
import System.IO (hSetEncoding, stderr, stdout, utf8)
import Test.Goblin.Properties
-- | Main testing action
main :: IO ()
main = runTests $ checkSequential <$>
[ Test.Goblin.Properties.tests
]
-- Lifted from `cardano-prelude`:
-- -ou... | null | https://raw.githubusercontent.com/input-output-hk/goblins/cde90a2b27f79187ca8310b6549331e59595e7ba/test/test.hs | haskell | | Main testing action
Lifted from `cardano-prelude`:
-output-hk/cardano-prelude/blob/d2a4f06827bfa11c021ce719285e8d0bb6ac8e44/test/Test/Cardano/Prelude/Tripping.hs#L141 | import Control.Monad (unless)
import Hedgehog
import System.Exit (exitFailure)
import System.IO (hSetEncoding, stderr, stdout, utf8)
import Test.Goblin.Properties
main :: IO ()
main = runTests $ checkSequential <$>
[ Test.Goblin.Properties.tests
]
runTests :: [IO Bool] -> IO ()
runTests tests' = do
ensure UTF-... |
610cead05abbd8fac172d7b7ae456475bcac259b29a7f909a72f2aab8da982ed | camlp4/camlp4 | EmptyPrinter.mli | (****************************************************************************)
(* *)
(* OCaml *)
(* *)
(* ... | null | https://raw.githubusercontent.com/camlp4/camlp4/9b3314ea63288decb857239bd94f0c3342136844/camlp4/Camlp4/Struct/EmptyPrinter.mli | ocaml | **************************************************************************
OCaml
... | Copyright 2006 - 2006 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 the special
Authors :
* - : initial version
* - Nicolas Pouillard: initial version
*... |
5505bfb6dacc64bcd8123e4af187dddbffccbd1fe08d5258db79a9d8e576fb95 | passy/rss-markdown-proxy | Metrics.hs | module Lib.Metrics
( getMetricsMiddleware
) where
import Lib.Types (Metrics, Port)
import Network.Wai (Middleware)
getMetricsMiddleware :: Port Metrics -> IO Middleware
getMetricsMiddleware = const $ return id
| null | https://raw.githubusercontent.com/passy/rss-markdown-proxy/71f08e8eda84701b23e369affbe59da3d9f5d53d/metrics-noop/Lib/Metrics.hs | haskell | module Lib.Metrics
( getMetricsMiddleware
) where
import Lib.Types (Metrics, Port)
import Network.Wai (Middleware)
getMetricsMiddleware :: Port Metrics -> IO Middleware
getMetricsMiddleware = const $ return id
| |
3a50d8192c11094a770827f9d01aa8151235cf63ffe87be139e706408c8ee491 | zoomhub/zoomhub | APIUser.hs | module ZoomHub.Types.APIUser
( APIUser (..),
)
where
import Data.Text (Text)
data APIUser = APIUser
{ username :: Text,
password :: Text
}
| null | https://raw.githubusercontent.com/zoomhub/zoomhub/6b397f7dbb5abcdbd1c97f7c4a7460326e1498d8/src/ZoomHub/Types/APIUser.hs | haskell | module ZoomHub.Types.APIUser
( APIUser (..),
)
where
import Data.Text (Text)
data APIUser = APIUser
{ username :: Text,
password :: Text
}
| |
e0c1cc66ac9a80ada1e2cafbcc346c3c9dd0fa4ee42c2efe6542be5da0544788 | grin-compiler/ghc-grin | showGHCStg.hs | # LANGUAGE RecordWildCards #
module Main where
import Control.Monad
import Control.Monad.IO.Class
import System.Environment
import Stg.Util
import Stg.ToStg
import qualified GHC.Stg.Syntax as GHC
import qualified GHC.Utils.Outputable as GHC
import qualified GHC.Driver.Session as GHC
import GHC.Paths ( libd... | null | https://raw.githubusercontent.com/grin-compiler/ghc-grin/ebc4dca2e1f5b3581d4b84726730564ce909d786/patched-lambda-to-ghc-stg/mini-ghc-grin/app/showGHCStg.hs | haskell | # LANGUAGE RecordWildCards #
module Main where
import Control.Monad
import Control.Monad.IO.Class
import System.Environment
import Stg.Util
import Stg.ToStg
import qualified GHC.Stg.Syntax as GHC
import qualified GHC.Utils.Outputable as GHC
import qualified GHC.Driver.Session as GHC
import GHC.Paths ( libd... | |
46507165d0ae7442860c18f4d50a9217f5570c429ce64ac6df8c23a51851ac55 | kloimhardt/babashka-scittle-guestbook | guestbook.clj | (require '[clojure.edn :as edn]
'[clojure.java.browse :as browse]
'[clojure.java.io :as io]
'[cognitect.transit :as transit]
'[org.httpkit.server :as srv]
'[hiccup.core :as hp])
(import 'java.io.ByteArrayOutputStream)
(def port 8083)
(def filename "messages.txt")
(defn h... | null | https://raw.githubusercontent.com/kloimhardt/babashka-scittle-guestbook/08fc6700cf0023780cc9ae67b2e49a578c7793e2/guestbook.clj | clojure | (require '[clojure.edn :as edn]
'[clojure.java.browse :as browse]
'[clojure.java.io :as io]
'[cognitect.transit :as transit]
'[org.httpkit.server :as srv]
'[hiccup.core :as hp])
(import 'java.io.ByteArrayOutputStream)
(def port 8083)
(def filename "messages.txt")
(defn h... | |
0fa12ed8b0738e874af3c3efe2c8549f894e41d0318595a865ac4dbfc577dba7 | RichiH/git-annex | DropKey.hs | git - annex command
-
- Copyright 2010,2016 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2010,2016 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Command.DropKey where
import Command
import qualified Annex
import Logs.Location
import Annex... | null | https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Command/DropKey.hs | haskell | git - annex command
-
- Copyright 2010,2016 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2010,2016 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Command.DropKey where
import Command
import qualified Annex
import Logs.Location
import Annex... | |
4aa873a1ef360822f4b6832548c8b2c348d84e332d764f1d6c51698e9991c15a | wireless-net/erlang-nommu | erl_expand_records.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2005 - 2012 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Publi... | null | https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/stdlib/src/erl_expand_records.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitatio... | Copyright Ericsson AB 2005 - 2012 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
language there is code included in patte... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.