_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 |
|---|---|---|---|---|---|---|---|---|
e15a850b27c4fbcfded80527d1a0940f2a2650650567fdd6a8c40996f1970137 | lambduli/frea | Evaluate.hs | module Compiler.TypeAnalyzer.Type.Evaluate where
import qualified Data.Map.Strict as Map
import qualified Data.Set as Set
import Control.Monad.Reader
import Control.Monad.State
import Compiler.Syntax.Type
import Compiler.TypeAnalyzer.Substituable
import Compiler.TypeAnalyzer.Analyze
import Compiler.TypeAnalyzer.An... | null | https://raw.githubusercontent.com/lambduli/frea/f240a1a4a57996dcc2ab685e2bd499ad0cdb5dfc/src/Compiler/TypeAnalyzer/Type/Evaluate.hs | haskell | module Compiler.TypeAnalyzer.Type.Evaluate where
import qualified Data.Map.Strict as Map
import qualified Data.Set as Set
import Control.Monad.Reader
import Control.Monad.State
import Compiler.Syntax.Type
import Compiler.TypeAnalyzer.Substituable
import Compiler.TypeAnalyzer.Analyze
import Compiler.TypeAnalyzer.An... | |
e5f19bf4e58347b6813dadac4db5e9433f3d4ef0fa9f3ff296b92cce2d2dfe34 | threatgrid/ctim | campaign.cljc | (ns ctim.schemas.campaign
(:require [ctim.schemas.common :as c]
[ctim.schemas.relationship :as rel]
[ctim.schemas.vocabularies :as v]
#?(:clj [flanders.core :as f :refer [def-entity-type def-eq]]
:cljs [flanders.core :as f :refer-macros [def-entity-type def-eq]])))
... | null | https://raw.githubusercontent.com/threatgrid/ctim/2ecae70682e69495cc3a12fd58a474d4ea57ae9c/src/ctim/schemas/campaign.cljc | clojure | Not provided: Handling
Not provided: related_packages (deprecated) | (ns ctim.schemas.campaign
(:require [ctim.schemas.common :as c]
[ctim.schemas.relationship :as rel]
[ctim.schemas.vocabularies :as v]
#?(:clj [flanders.core :as f :refer [def-entity-type def-eq]]
:cljs [flanders.core :as f :refer-macros [def-entity-type def-eq]])))
... |
5067f30d7da070c7653511790d3c226afe16f3483d52e2b079d9b6f2466292b5 | McCLIM/McCLIM | ex1.lisp | (in-package :common-lisp-user)
(defpackage :my-first-app
Imports the appropriate CLIM library
(:use :clim :clim-lisp)
;; The package will only export a function to run the app
(:export run-my-first-app))
;; Good practice
(in-package :my-first-app)
;; Definition of the structure of a minimum app
(define-appl... | null | https://raw.githubusercontent.com/McCLIM/McCLIM/c079691b0913f8306ceff2620b045b6e24e2f745/Documentation/Manual/examples/ex1.lisp | lisp | The package will only export a function to run the app
Good practice
Definition of the structure of a minimum app
:layouts section describes how the pane is positioned inside
the application frame.
Now that the structure of the app is defined, need a function
to launch an instance of this app. (The user could ru... | (in-package :common-lisp-user)
(defpackage :my-first-app
Imports the appropriate CLIM library
(:use :clim :clim-lisp)
(:export run-my-first-app))
(in-package :my-first-app)
(define-application-frame my-first-clim-app ()
()
This app only has 1 pane
(:panes
(my-interactor :interactor
... |
3625baf66d098695743a758a49d4984712c77f62f67f0d161580bf8054509944 | Wizek/hs-di | Common.hs | # OPTIONS_GHC -fno - warn - missing - fields #
module Common
( module Common
) where
import ComposeLTR as Common
import Text.InterpolatedString.Perl6 as Common
import Language.Haskell.TH.Quote
import Data.String.Interpolate.Util
qx = QuasiQuoter{quoteExp = unindent .> quoteExp qc}
| null | https://raw.githubusercontent.com/Wizek/hs-di/4e7d11f4341a155667cb856b6f231d7b6af2c935/Common.hs | haskell | # OPTIONS_GHC -fno - warn - missing - fields #
module Common
( module Common
) where
import ComposeLTR as Common
import Text.InterpolatedString.Perl6 as Common
import Language.Haskell.TH.Quote
import Data.String.Interpolate.Util
qx = QuasiQuoter{quoteExp = unindent .> quoteExp qc}
| |
4786c1abf73e8c043055d9c52cca40ec2bd9a9484bbdcc5e0210a926fc211c5b | sir4ur0n/blog | LoggingSpec.hs | -- | Test interpreters
module PolysemyTestsLogging.LoggingSpec where
import Polysemy
import Polysemy.Writer
import PolysemyTestsLogging.Logging
logToSilence :: Sem (Log ': r) a -> Sem r a
logToSilence = interpret (\(LogInfo _) -> pure ())
logToRecord :: Member (Writer [String]) r => Sem (Log ': r) a -> Sem r a
logT... | null | https://raw.githubusercontent.com/sir4ur0n/blog/789d695ae266f953952fb19f1b85098d588bd793/code-examples/src/PolysemyTestsLogging/LoggingSpec.hs | haskell | | Test interpreters | module PolysemyTestsLogging.LoggingSpec where
import Polysemy
import Polysemy.Writer
import PolysemyTestsLogging.Logging
logToSilence :: Sem (Log ': r) a -> Sem r a
logToSilence = interpret (\(LogInfo _) -> pure ())
logToRecord :: Member (Writer [String]) r => Sem (Log ': r) a -> Sem r a
logToRecord = interpret (\(... |
9984b2cbf940d3585c768a12122166cf7f4cde61f7b348e7cbed312bcf82904e | nervous-systems/cljs-lambda | zip_tedium.clj | (ns leiningen.cljs-lambda.zip-tedium
(:require [leiningen.cljs-lambda.logging :refer [log]]
[clojure.java.io :as io])
(:import [java.io File]
[java.nio.file Files LinkOption]
[java.nio.file.attribute PosixFilePermission]
[org.apache.commons.compress.archivers.zip
... | null | https://raw.githubusercontent.com/nervous-systems/cljs-lambda/ecd74ec7046e619b3c097c222124fea4b9973241/plugin/src/leiningen/cljs_lambda/zip_tedium.clj | clojure | I don't have time to explain | (ns leiningen.cljs-lambda.zip-tedium
(:require [leiningen.cljs-lambda.logging :refer [log]]
[clojure.java.io :as io])
(:import [java.io File]
[java.nio.file Files LinkOption]
[java.nio.file.attribute PosixFilePermission]
[org.apache.commons.compress.archivers.zip
... |
1cda6d37546f9423b8e5a9589aca5cb479491183b1fc2d35073dc0ac93abfa44 | wdebeaum/DeepSemLex | terrifically.lisp | ;;;;
;;;; W::terrifically
;;;;
(define-words :pos W::adv :templ PRED-VP-TEMPL
:words (
(W::terrifically
(SENSES
((lf-parent ont::awful-val)
(TEMPL ADJ-OPERATOR-TEMPL)
(example "his ankles are terrifically swollen" "he is terrifically ill")
(SEM (f::gradability +) (f::orientation f::pos)... | null | https://raw.githubusercontent.com/wdebeaum/DeepSemLex/ce0e7523dd2b1ebd42b9e88ffbcfdb0fd339aaee/trips/src/LexiconManager/Data/new/terrifically.lisp | lisp |
W::terrifically
|
(define-words :pos W::adv :templ PRED-VP-TEMPL
:words (
(W::terrifically
(SENSES
((lf-parent ont::awful-val)
(TEMPL ADJ-OPERATOR-TEMPL)
(example "his ankles are terrifically swollen" "he is terrifically ill")
(SEM (f::gradability +) (f::orientation f::pos) (f::intensity ONT::hi))
(... |
2f1ba05b3bfc429e0b8c8cc843aa94543bfcc812a2c300990373dd59308deeab | chaoxu/fancy-walks | 123.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/123.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)
... | |
0755588fdfec7dd87b32aa173c9c071aef6dfec01cb8799c64412624f1e75eb6 | JPMoresmau/dbIDE | PackagesTest.hs | {-# LANGUAGE OverloadedStrings #-}
module Language.Haskell.ASBrowser.Operations.PackagesTest where
import Language.Haskell.ASBrowser.Database
import Language.Haskell.ASBrowser.Operations.Packages
import Language.Haskell.ASBrowser.Types
import Language.Haskell.ASBrowser.TestHarness
import Test.Tasty
import Test.Tasty... | null | https://raw.githubusercontent.com/JPMoresmau/dbIDE/dae37edf67fbe55660e7e22c9c5356d0ada47c61/as-browser/test/Language/Haskell/ASBrowser/Operations/PackagesTest.hs | haskell | # LANGUAGE OverloadedStrings # | module Language.Haskell.ASBrowser.Operations.PackagesTest where
import Language.Haskell.ASBrowser.Database
import Language.Haskell.ASBrowser.Operations.Packages
import Language.Haskell.ASBrowser.Types
import Language.Haskell.ASBrowser.TestHarness
import Test.Tasty
import Test.Tasty.HUnit
import Data.Acid
import Dat... |
f30de842e4411b59d7c39b91b08b1f43a585c0819e4155c1c41331ee58bb1814 | janestreet/memtrace_viewer_with_deps | ppx_bin_prot_nopervasives.ml | open Core
module M = struct
type t =
{ a: float
; b: float
} [@@deriving bin_io]
end
| null | https://raw.githubusercontent.com/janestreet/memtrace_viewer_with_deps/5a9e1f927f5f8333e2d71c8d3ca03a45587422c4/vendor/ppx_bin_prot/test/nopervasives/ppx_bin_prot_nopervasives.ml | ocaml | open Core
module M = struct
type t =
{ a: float
; b: float
} [@@deriving bin_io]
end
| |
54a205e7aed61ffa444dc51198c2598aeedaf742ea12949d58fbf66d676d2a93 | Piervit/gufo | gufo_lexing.ml |
This file is part of .
is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
( at your option ) any later version .
is distributed in the hop... | null | https://raw.githubusercontent.com/Piervit/gufo/cb9b4f88d6e887ccfe50ea3bc7214486f2df3078/src/gufo_lexing.ml | ocaml | generic
or DEF
_
:
=
->
also array rilated
also array rilated
file/dir shortcut
userdir
command rilated
>
>>
>&
<
mathematic
==
!=
gt
gte
lt
lte
array rilated
[
]
condition
type
others
; |
This file is part of .
is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
( at your option ) any later version .
is distributed in the hop... |
9614e5803ba785e98bd0bed01652094ae6c40c7b22919018af37633ec7ff4fbe | alexandergunnarson/quantum | substance.cljc | (ns quantum.measure.substance
(:require
[quantum.measure.core :refer [defunits-of]]))
#_(defunits-of substance [:mol #{:moles}]
; The amount of substance of a system which contains as many
elementary entities as there are atoms in 0.012 kg of
carbon 12 . The elementary entities must be specified and
; ... | null | https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/src/quantum/measure/substance.cljc | clojure | The amount of substance of a system which contains as many
may be atoms, molecules, ions, electrons, or other
particles or groups of particles. It is understood that
state, are referred to. | (ns quantum.measure.substance
(:require
[quantum.measure.core :refer [defunits-of]]))
#_(defunits-of substance [:mol #{:moles}]
elementary entities as there are atoms in 0.012 kg of
carbon 12 . The elementary entities must be specified and
unbound atoms of carbon 12 , at rest and in the ground
)
#?(:c... |
df30f333977a8bd7b9fda85ac685307f584ae84b80d96aafb8b3a36d0c7c1ed1 | zwizwa/rai | slv2.rkt | #lang racket/base
(require ffi/unsafe
ffi/unsafe/define
"lv2.rkt")
(define-ffi-definer define-slv2 (ffi-lib "libslv2" "9"))
(provide (all-defined-out))
;; HACK: preload for swh-lv2
(define-ffi-definer define-fftw (ffi-lib "libfftw" "2"))
API doc is here :
;; /
;;
;; Other info:
;; /
Check ... | null | https://raw.githubusercontent.com/zwizwa/rai/6bcacb7da4172971816027fd88a0209adbd60e30/slv2/slv2.rkt | racket | HACK: preload for swh-lv2
/
Other info:
/
the ownership
rules are ad-hoc. | #lang racket/base
(require ffi/unsafe
ffi/unsafe/define
"lv2.rkt")
(define-ffi-definer define-slv2 (ffi-lib "libslv2" "9"))
(provide (all-defined-out))
(define-ffi-definer define-fftw (ffi-lib "libfftw" "2"))
API doc is here :
The SLV2PluginInstance functions are static inline , so are
... |
ebbeabd7ff96455e0825634297692951187527fe42b4f062bfa296193f8474b6 | vim-scripts/slimv.vim | swank-allegro.lisp | ;;;; -*- indent-tabs-mode: nil; outline-regexp: ";;;;;* "; -*-
;;;
swank-allegro.lisp --- Allegro CL specific code for SLIME .
;;;
Created 2003
;;;
;;; This code has been placed in the Public Domain. All warranties
;;; are disclaimed.
;;;
(in-package :swank-backend)
(eval-when (:compile-toplev... | null | https://raw.githubusercontent.com/vim-scripts/slimv.vim/61ce81ff6b1a05314a6d750a32a1c7379f35a5dc/slime/swank-allegro.lisp | lisp | -*- indent-tabs-mode: nil; outline-regexp: ";;;;;* "; -*-
This code has been placed in the Public Domain. All warranties
are disclaimed.
swank-mop
UTF8
TCP Server
Unix signals
Misc
Debugger
:print-before is kind of mis-used but we just want to stuff our
:after methods, which need spec... | swank-allegro.lisp --- Allegro CL specific code for SLIME .
Created 2003
(in-package :swank-backend)
(eval-when (:compile-toplevel :load-toplevel :execute)
(require :sock)
(require :process)
#+(version>= 8 2)
(require 'lldb)
)
(import-from :excl *gray-stream-symbols* :swank-backend)
(import-swank-mop... |
bd6ca82f809750ea129414798057ca517067705311ad2e72db2ba2f441d914a6 | heyoka/faxe | http_manager.erl | %%%-------------------------------------------------------------------
@author
( C ) 2021 , < COMPANY >
%%% @doc
%%% manages cowboy instances for http_listen nodes
%%% @end
%%%-------------------------------------------------------------------
-module(http_manager).
-behaviour(gen_server).
-export([start_link/0... | null | https://raw.githubusercontent.com/heyoka/faxe/09e0422f3701c8b1d8a4947ac2b4e64aec4be751/apps/faxe/src/lib/http_manager.erl | erlang | -------------------------------------------------------------------
@doc
manages cowboy instances for http_listen nodes
@end
-------------------------------------------------------------------
===================================================================
Spawning and gen_server implementation
================... | @author
( C ) 2021 , < COMPANY >
-module(http_manager).
-behaviour(gen_server).
-export([start_link/0, reg/1]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2,
code_change/3]).
-define(SERVER, ?MODULE).
-define(NUM_ACCEPTORS, 2).
-define(MAX_CONNECTIONS, 15).
-record(state, {
c... |
b0f69cf28ac2e84e10c375eb9baae463d9a503b5713ddaef9a08340fedaa28a6 | emezeske/lein-cljsbuild | hello.cljs | (ns example.test.hello
(:use [example.hello :only [add-some-numbers]]))
(defn run []
(assert (= (add-some-numbers 2 2) 4))
(assert (= (add-some-numbers 1 2 3) 6))
(assert (= (add-some-numbers 4 5 6) 15)))
| null | https://raw.githubusercontent.com/emezeske/lein-cljsbuild/089193c74e362c143d30dfca21a21e95c7ca112a/example-projects/advanced/test-cljs/example/test/hello.cljs | clojure | (ns example.test.hello
(:use [example.hello :only [add-some-numbers]]))
(defn run []
(assert (= (add-some-numbers 2 2) 4))
(assert (= (add-some-numbers 1 2 3) 6))
(assert (= (add-some-numbers 4 5 6) 15)))
| |
8dc6c8daf98130151d7ac05eca8d494019c92a5ab7f67dcdf9f08a7dd71c3ebb | songyahui/AlgebraicEffect | test_unhandle.ml |
effect Exc : int
let safediv x y () =
if y == 0
then perform Exc
else x / y
let catch action =
match action () with
| n -> n
let zerodiv x y =
catch
(safediv x y)
let main =
let res = zerodiv 4 0 in
print_string (string_of_int res^"\n")
| null | https://raw.githubusercontent.com/songyahui/AlgebraicEffect/27688952b598a101a27523be796e8011d70b02de/src/test/test_unhandle.ml | ocaml |
effect Exc : int
let safediv x y () =
if y == 0
then perform Exc
else x / y
let catch action =
match action () with
| n -> n
let zerodiv x y =
catch
(safediv x y)
let main =
let res = zerodiv 4 0 in
print_string (string_of_int res^"\n")
| |
1bd33318ee32f26607e42fc3aa95b4eb5898e2d37b0fb07aa7d475a2ad19f934 | MyDataFlow/ttalk-server | acceptor_SUITE.erl | Copyright ( c ) 2011 - 2012 , < >
%%
%% Permission to use, copy, modify, and/or distribute this software for any
%% purpose with or without fee is hereby granted, provided that the above
%% copyright notice and this permission notice appear in all copies.
%%
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISC... | null | https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/deps/ranch/test/acceptor_SUITE.erl | erlang |
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVE... | Copyright ( c ) 2011 - 2012 , < >
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES
ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN
-module(acceptor_SUITE).
-include_lib("common_test/i... |
ca82720c9858f2a52d0879a42e63baf3664b87c519dda85ca495a57df8fe58be | BitGameEN/bitgamex | lager_default_formatter.erl | Copyright ( c ) 2011 - 2012 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the License at
%%
%% -2.0
%%
%% Unless required... | null | https://raw.githubusercontent.com/BitGameEN/bitgamex/151ba70a481615379f9648581a5d459b503abe19/src/deps/lager/src/lager_default_formatter.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 permissions and limitations
under the License.
Include files
Exported Fun... | Copyright ( c ) 2011 - 2012 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
... |
3ff066186c44f474ce16c442d61b3e779b52ed08643bf9ca4667d36d99eaaf62 | cl-axon/cl-paip | search.lisp | ;;;; -*- Mode: Lisp; Syntax: Common-Lisp -*-
Code from Paradigms of AI Programming
Copyright ( c ) 1991
search.lisp : Search routines from section 6.4
(defun tree-search (states goal-p successors combiner)
"Find a state that satisfies goal-p. Start with states,
and search according to successors and comb... | null | https://raw.githubusercontent.com/cl-axon/cl-paip/5922be8e3aae00197779bad4a05afa8ea1f6b8c9/search.lisp | lisp | -*- Mode: Lisp; Syntax: Common-Lisp -*-
The length of the subtending arc is given by:
the new successors of STATE:
Finally, call A* again with the updated path lists:
MERGE is a built-in function
Be careful: this can lead to an infinite loop. | Code from Paradigms of AI Programming
Copyright ( c ) 1991
search.lisp : Search routines from section 6.4
(defun tree-search (states goal-p successors combiner)
"Find a state that satisfies goal-p. Start with states,
and search according to successors and combiner."
(dbg :search "~&;; Search: ~a" state... |
e849b46c161ebf128920d28b884aaf75408c46f7048ab1345a5b2f42a4b0e1a3 | mainland/nikola | Implementation.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE RebindableSyntax #
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE TypeSynonymInstances #-}
module Mandelbrot.NikolaV4.Implementation where
import qualified Prelude as P
import Prelude hiding (iterate, map, zipWith)
import Data.Array.Nikola.Backend.CUDA
import Data.Array.Nikol... | null | https://raw.githubusercontent.com/mainland/nikola/d86398888c0a76f8ad1556a269a708de9dd92644/examples/mandelbrot/Mandelbrot/NikolaV4/Implementation.hs | haskell | # LANGUAGE TypeSynonymInstances # | # LANGUAGE FlexibleInstances #
# LANGUAGE RebindableSyntax #
# LANGUAGE ScopedTypeVariables #
module Mandelbrot.NikolaV4.Implementation where
import qualified Prelude as P
import Prelude hiding (iterate, map, zipWith)
import Data.Array.Nikola.Backend.CUDA
import Data.Array.Nikola.Combinators
import Data.Array.Nikola... |
9fc079777a3e3582e427af62cc10f77349153c27de6a1a80f23bf6f86cfd647c | racket/compatibility | dns-sig.rkt | #lang racket/signature
dns-get-address
dns-get-name
dns-get-mail-exchanger
dns-find-nameserver
| null | https://raw.githubusercontent.com/racket/compatibility/492030dac6f095045ce8a13dca75204dd5f34e32/compatibility-lib/net/dns-sig.rkt | racket | #lang racket/signature
dns-get-address
dns-get-name
dns-get-mail-exchanger
dns-find-nameserver
| |
f41ed1d80a85ef460c69b3f3aee4f21e9705365a53d265c96b938c23688ebca1 | haskell-tools/haskell-tools | AutoNaming.hs | module Refactor.InlineBinding.Simplest where
b = a
a x = x
x1 = () | null | https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/builtin-refactorings/examples/Refactor/InlineBinding/AutoNaming.hs | haskell | module Refactor.InlineBinding.Simplest where
b = a
a x = x
x1 = () | |
73949a54c76a6e7e134429dcd7b258e78ec82eb4afc3dab0fbe95079cfb713f8 | fission-codes/fission | UTF8.hs | -- | UTF8 text helpers
module Fission.Internal.UTF8
( Textable (..)
, putText
, putTextLn
, putNewline
, displayLazyBS
, fromRawBytes
, toBase58Text
, textShow
, wrapIn
, module Web.UCAN.Internal.UTF8
) where
import Data.Binary hiding (encode)
import RIO
import qua... | null | https://raw.githubusercontent.com/fission-codes/fission/ae177407dccc20be67948a901956b99f40d37ac8/fission-core/library/Fission/Internal/UTF8.hs | haskell | | UTF8 text helpers
| Show text.
| Helper for printing 'Text' to a console
| Helper for printing Text' to a console with a newline at the end
| Wrap text with some other piece of text | module Fission.Internal.UTF8
( Textable (..)
, putText
, putTextLn
, putNewline
, displayLazyBS
, fromRawBytes
, toBase58Text
, textShow
, wrapIn
, module Web.UCAN.Internal.UTF8
) where
import Data.Binary hiding (encode)
import RIO
import qualified RIO.ByteString ... |
7c5662e83b97c164c80de27e7c8e49e8cab1dff57866ad3898a98bb74906ae1e | sbcl/sbcl | support.lisp | ;;;; the machine-specific support routines needed by the file assembler
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
;;;; public domain. The so... | null | https://raw.githubusercontent.com/sbcl/sbcl/0ea31c088bd0d5cf984ba6b0bf5711d613d4c808/src/assembly/ppc64/support.lisp | lisp | the machine-specific support routines needed by the file assembler
more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information. |
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB-VM")
(defun generate-call-sequence (name style vop options)
(declare (ignore options))
(ecase style
... |
54d3abab05be9f45cc0645cfe2f54a7eec8d27c04adc3f66a6d25fa2645874a8 | grin-compiler/ghc-wpc-sample-programs | TypeDefs.hs | # LANGUAGE MultiParamTypeClasses , FunctionalDependencies #
{-# OPTIONS -fno-warn-orphans #-}
-- ------------------------------------------------------------
|
Module : Data . Tree . . Zipper . TypeDefs
Copyright : Copyright ( C ) 2010
License : MIT
Maintainer : ( uwe\@fh-wedel.... | null | https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/hxt-9.3.1.18/src/Data/Tree/NTree/Zipper/TypeDefs.hs | haskell | # OPTIONS -fno-warn-orphans #
------------------------------------------------------------
------------------------------------------------------------
------------------------------------------------------------
| Zipper for rose trees
A zipper consist of the current tree and the branches on the way back to the ... | # LANGUAGE MultiParamTypeClasses , FunctionalDependencies #
|
Module : Data . Tree . . Zipper . TypeDefs
Copyright : Copyright ( C ) 2010
License : MIT
Maintainer : ( uwe\@fh-wedel.de )
Stability : stable
Portability : portable
Implementation of navigateble tre... |
40c089bbd19f4152436980f8fed1302e64e8c71f08c70201044c5b6fe6af9d5f | swlkr/majestic-web | http.clj | (ns {{name}}.http
(:require [compojure.core :refer [defroutes GET POST wrap-routes]]
[compojure.route :as compojure.route]
[{{name}}.users.http :as users.http]
[{{name}}.sessions.http :as sessions.http]
[{{name}}.home.http :as home.http]
[{{name}}.html :as h... | null | https://raw.githubusercontent.com/swlkr/majestic-web/3d247f6b5ccc4ff3662a64544a4ca27beada971b/resources/leiningen/new/majestic_web/http.clj | clojure | (ns {{name}}.http
(:require [compojure.core :refer [defroutes GET POST wrap-routes]]
[compojure.route :as compojure.route]
[{{name}}.users.http :as users.http]
[{{name}}.sessions.http :as sessions.http]
[{{name}}.home.http :as home.http]
[{{name}}.html :as h... | |
1ce3921a5ecba4bc8127ce198bcbfd02b2ec2333e5b5934f24bb94bf45f5fcca | input-output-hk/cardano-addresses | Script.hs | # LANGUAGE FlexibleContexts #
{-# OPTIONS_HADDOCK hide #-}
module Options.Applicative.Script
(
-- ** Applicative Parser
scriptArg
, scriptReader
, scriptHashArg
, scriptHashReader
, levelOpt
, scriptTemplateReader
, scriptTemplateSpendingArg
, scriptTemplateStakingArg
) w... | null | https://raw.githubusercontent.com/input-output-hk/cardano-addresses/b33e0f365550bd9d329bdbb0a0d2dfe2b23a3dcf/command-line/lib/Options/Applicative/Script.hs | haskell | # OPTIONS_HADDOCK hide #
** Applicative Parser
TODO: Provides a bigger help text explaining how to construct a script
address. | # LANGUAGE FlexibleContexts #
module Options.Applicative.Script
(
scriptArg
, scriptReader
, scriptHashArg
, scriptHashReader
, levelOpt
, scriptTemplateReader
, scriptTemplateSpendingArg
, scriptTemplateStakingArg
) where
import Prelude
import Cardano.Address.Script
( ... |
7154e7c70ed51b1fdc51bcec7bf9d0d0bcfd33933ef151ee50ed21aba047f738 | xvw/preface | contravariant.mli | * [ ] is a " functor " . In other word , [ Contravariant ]
is the dual of a { ! module : Functor } .
is the dual of a {!module:Functor}.*)
* { 2 Laws }
To have a predictable behaviour , the instance of [ ] must obey
some laws .
+ [ contramap i d = i d ]
+ [ ( f ) % ( ) = ( g ... | null | https://raw.githubusercontent.com/xvw/preface/51892a7ce2ddfef69de963265da3617968cdb7ad/lib/preface_specs/contravariant.mli | ocaml | * Mapping over from ['a] to ['b] over ['b t] to ['a t].
* {1 Structure anatomy}
* Basis operations.
* Additional operations.
* Replace all locations in the output with the same value.
* Infix operators.
* Right-associative version of [>$].
* Right-associative version of [$<].
* Right-associative version of [>$<]... | * [ ] is a " functor " . In other word , [ Contravariant ]
is the dual of a { ! module : Functor } .
is the dual of a {!module:Functor}.*)
* { 2 Laws }
To have a predictable behaviour , the instance of [ ] must obey
some laws .
+ [ contramap i d = i d ]
+ [ ( f ) % ( ) = ( g ... |
02af533e0189a3d064d2f0ee1a962ee39b52e488f8bf9e3c633be6fc37b96ac6 | snapframework/cufp2011 | Types.hs | # LANGUAGE BangPatterns #
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE OverloadedStrings #-}
module Snap.Chat.Internal.Types where
------------------------------------------------------------------------------
import Control.Applica... | null | https://raw.githubusercontent.com/snapframework/cufp2011/6519513ef80d561efc9846847860b50a19c7b9f6/sample-implementation/Snap/Chat/Internal/Types.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE OverloadedStrings #
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
---------... | # LANGUAGE BangPatterns #
# LANGUAGE GeneralizedNewtypeDeriving #
module Snap.Chat.Internal.Types where
import Control.Applicative
import Control.Concurrent.MVar
import Control.Concurrent.STM
import Data.Aeson
import qualified Data.Aeson.Types as A
import ... |
df26d3c90ee3e7fc1b28c61e7195ec349f05bd3e912a738ac1fca5b10d706108 | morloc-project/morloc | Morloc.hs | module Morloc
( writeProgram
, typecheck
, typecheckFrontend
) where
import Morloc.Namespace
import qualified Morloc.Frontend.API as F
import Morloc.CodeGenerator.Namespace (TypeP)
import Morloc.Frontend.Desugar (desugar)
import Morloc.CodeGenerator.Generate (realityCheck, generate)
import Morloc.ProgramBuil... | null | https://raw.githubusercontent.com/morloc-project/morloc/eb2ca1a4214c0b504ed3463c3f9306aa21cf1f3e/library/Morloc.hs | haskell | Maybe Path -> Text -> [Module]
parse code into unannotated modules
resolve type aliases and such
add type annotations to sub-expressions and raise type errors
| Build a program as a local executable
^ source code filename (for debugging messages)
^ source code text
prepare scripts
(Script, [Script]) -> IO ()
... | module Morloc
( writeProgram
, typecheck
, typecheckFrontend
) where
import Morloc.Namespace
import qualified Morloc.Frontend.API as F
import Morloc.CodeGenerator.Namespace (TypeP)
import Morloc.Frontend.Desugar (desugar)
import Morloc.CodeGenerator.Generate (realityCheck, generate)
import Morloc.ProgramBuil... |
1882ebc2470ca6e332cb4c782f2ae2e7ff64012c93c0c0436bd20d25163104ee | haskell-opengl/OpenGL | Histogram.hs | --------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.GL.PixelRectangles.Histogram
Copyright : ( c ) 2002 - 2019
-- License : BSD3
--
Maintainer : < >
-- Stability : stable
-- Portability : portable
--
This module c... | null | https://raw.githubusercontent.com/haskell-opengl/OpenGL/f7af8fe04b0f19c260a85c9ebcad612737cd7c8c/src/Graphics/Rendering/OpenGL/GL/PixelRectangles/Histogram.hs | haskell | ------------------------------------------------------------------------------
|
Module : Graphics.Rendering.OpenGL.GL.PixelRectangles.Histogram
License : BSD3
Stability : stable
Portability : portable
------------------------------------------------------------------------------
----------------... | Copyright : ( c ) 2002 - 2019
Maintainer : < >
This module corresponds to a part of section 3.6.1 ( Pixel Storage Modes ) of
the OpenGL 2.1 specs .
module Graphics.Rendering.OpenGL.GL.PixelRectangles.Histogram (
Sink(..), histogram, Reset(..), getHistogram, resetHistogram,
histogramRGBASize... |
2beb99f7a8ae7fe2a4f788ade228894e252ee8a74cce287af08a2224f4abfc7d | uwplse/PUMPKIN-PATCH | evaluation.ml | --- Evaluation , which is lazy ( takes one step ) ---
open Constr
open Environ
open Evd
open Proofcat
open Proofcatterms
open Utilities
open Names
open Debruijn
open Declarations
open Indutils
open Contextutils
open Stateutils
open Inference
(*
* Note: Evar discipline is not good yet, but should wait until after
... | null | https://raw.githubusercontent.com/uwplse/PUMPKIN-PATCH/73fd77ba49388fdc72702a252a8fa8f071a8e1ea/plugin/src/compilation/evaluation.ml | ocaml |
* Note: Evar discipline is not good yet, but should wait until after
* the major refactor, since this will change a lot.
Evaluate an arrow as a proof
--- Induction ---
* Get the induction principle tree divided by constructors
*
* When we test this, we should see if the unfolding limitation
* we have righ... | --- Evaluation , which is lazy ( takes one step ) ---
open Constr
open Environ
open Evd
open Proofcat
open Proofcatterms
open Utilities
open Names
open Debruijn
open Declarations
open Indutils
open Contextutils
open Stateutils
open Inference
* Evaluate typ one step in env
* Then bind the single anonymous arr... |
4bff0a324ec38229ab74a0d285b53a233c8fdc437d838a0d4690fc01bc34b2e3 | footprintanalytics/footprint-web | notify_test.clj | (ns metabase.api.notify-test
(:require [clj-http.client :as http]
[clojure.test :refer :all]
[metabase.api.notify :as api.notify]
[metabase.http-client :as client]
[metabase.models.database :as database]
[metabase.server.middleware.util :as mw.util]
... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/test/metabase/api/notify_test.clj | clojure | (ns metabase.api.notify-test
(:require [clj-http.client :as http]
[clojure.test :refer :all]
[metabase.api.notify :as api.notify]
[metabase.http-client :as client]
[metabase.models.database :as database]
[metabase.server.middleware.util :as mw.util]
... | |
d54a2f46e23b514be5a6aad0b70b4a5a24e5e88a28be56193324c31922ed6e45 | Risto-Stevcev/bastet | Infix.ml | open Interface
module Magma (M : MAGMA) = struct
let ( <:> ) = M.append
end
module Magma_Any (M : MAGMA_ANY) = struct
let ( <:> ) = M.append
end
module Functor (F : FUNCTOR) = struct
let ( <$> ) = F.map
and ( <@> ) f x = F.map x f
end
module Apply (A : APPLY) = struct
include Functor (A)
let ( <*> ) =... | null | https://raw.githubusercontent.com/Risto-Stevcev/bastet/030db286f57d2e316897f0600d40b34777eabba6/bastet/src/Infix.ml | ocaml | open Interface
module Magma (M : MAGMA) = struct
let ( <:> ) = M.append
end
module Magma_Any (M : MAGMA_ANY) = struct
let ( <:> ) = M.append
end
module Functor (F : FUNCTOR) = struct
let ( <$> ) = F.map
and ( <@> ) f x = F.map x f
end
module Apply (A : APPLY) = struct
include Functor (A)
let ( <*> ) =... | |
2b7bddad872de0a03a1d934179e1a57b1d07954c6710f9a8e7f1a0362bac1a15 | strint/sicpAns | 1007_sqrt_big_number.scm | (define (xysqrt in count)
(sqrt-iter 1.0 in count))
(define (sqrt-iter guess x count)
(begin (display count) (newline) (display guess) (newline) (display (- (square guess) x)) (newline) (newline)
(if (good-enough? guess x)
guess
(sqrt-iter (improve guess x) x (+ count 1))... | null | https://raw.githubusercontent.com/strint/sicpAns/efc4bdfaab7583117d42f2141d4b3b9e12792b79/1.1.7-8_SquareRoot/1007_sqrt_big_number.scm | scheme | (define (xysqrt in count)
(sqrt-iter 1.0 in count))
(define (sqrt-iter guess x count)
(begin (display count) (newline) (display guess) (newline) (display (- (square guess) x)) (newline) (newline)
(if (good-enough? guess x)
guess
(sqrt-iter (improve guess x) x (+ count 1))... | |
3f98311aec3e6fd491e35ef6f6b9e89d7b295ca9d0dff2bd4165931eef2aa71c | hexlet-basics/exercises-clojure | test-helper.clj | (ns test-helper
(:require [clojure.test :refer [deftest run-tests is successful?]]
[clojure.string :as s]))
(defn- run-test []
(when-not (successful? (run-tests 'test-helper)) (System/exit 1)))
(defn ^:export assert-output [expected]
(deftest output-test
(let [out (s/trim (with-out-str (load-fil... | null | https://raw.githubusercontent.com/hexlet-basics/exercises-clojure/5dad714b05886f2ea8eec89e644edcd806825c3d/src/test-helper.clj | clojure | (ns test-helper
(:require [clojure.test :refer [deftest run-tests is successful?]]
[clojure.string :as s]))
(defn- run-test []
(when-not (successful? (run-tests 'test-helper)) (System/exit 1)))
(defn ^:export assert-output [expected]
(deftest output-test
(let [out (s/trim (with-out-str (load-fil... | |
87728a6ed574242b221304f9daf8d42dd319e8b11b0c4ed49df65b2b025efa1e | crockeo/spice | Engine.hs | {-|
This module contains all of the functions to create and start the engine. The
only exposed function is @'startEngine'@ seeing as every other function is to
be used solely internally within the module.
-}
module FRP.Spice.Internal.Engine ( startEngine
, startEngineDefault
... | null | https://raw.githubusercontent.com/crockeo/spice/9c8e5144da2999914042861030c80936fa37062b/src/FRP/Spice/Internal/Engine.hs | haskell | |
This module contains all of the functions to create and start the engine. The
only exposed function is @'startEngine'@ seeing as every other function is to
be used solely internally within the module.
------------------
Global Imports --
-----------------
Local Imports --
--------
Code --
|
The callback f... | module FRP.Spice.Internal.Engine ( startEngine
, startEngineDefault
) where
import Graphics.Rendering.OpenGL
import Graphics.UI.GLFW as GLFW
import FRP.Elerea.Param
import Data.Default
import Data.IORef
import FRP.Spice.Internal.Assets
import FRP.Spice... |
50a2bb77008c5842e13852efc049fa0e81012575495da463d7a77e0b544701db | motemen/jusk | Parser.hs | {-
Parser.hs
構文パーザ
/~oz-07ams/prog/ecma262r3/11_Expressions.html
/~oz-07ams/prog/ecma262r3/12_Statements.html
-}
module Parser (module Parser, Text.ParserCombinators.Parsec.ParseError) where
import Text.ParserCombinators.Parsec hiding(Parser)
import Control.Monad
import Data.List
import Data.Char (isDi... | null | https://raw.githubusercontent.com/motemen/jusk/4975915b8550aa09c452fb89dcad7bfcb1037c39/src/Parser.hs | haskell |
Parser.hs
構文パーザ
/~oz-07ams/prog/ecma262r3/11_Expressions.html
/~oz-07ams/prog/ecma262r3/12_Statements.html
Literals {{{
/~oz-07ams/prog/ecma262r3/7_Lexical_Conventions.html
- Identifiers
Literals
- Null Literals
- Boolean Literals
- Numeric Literals
- String Literals
XXX not in spec
Not specified... |
module Parser (module Parser, Text.ParserCombinators.Parsec.ParseError) where
import Text.ParserCombinators.Parsec hiding(Parser)
import Control.Monad
import Data.List
import Data.Char (isDigit,digitToInt)
import DataTypes
import ParserUtil
parse :: String -> Either ParseError JavaScriptProgram
parse = runLex progra... |
3ae941c36156bf9f24775882183c13ba2acf52c2e65739093ecb61d1565a943d | uim/uim | generic-custom.scm | ;;; generic-custom.scm: Customization variables for generic.scm
;;;
Copyright ( c ) 2003 - 2013 uim Project
;;;
;;; All rights reserved.
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
1 . Redistributions... | null | https://raw.githubusercontent.com/uim/uim/d1ac9d9315ff8c57c713b502544fef9b3a83b3e5/scm/generic-custom.scm | scheme | generic-custom.scm: Customization variables for generic.scm
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
notice, this list of conditions and the following disclaimer.
notice, this list ... | Copyright ( c ) 2003 - 2013 uim Project
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
3 . Neither the name of authors nor the names of its contributors
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTOR... |
7057a84f239f9efe0c44e390594a94e117d5cbde5bae8417b07aa2901f815a68 | ANSSI-FR/xsvgen | generator.ml | (***********************************************************************)
(* *)
(* XML Schema Validator Generator *)
(* *)
( SafeRive... | null | https://raw.githubusercontent.com/ANSSI-FR/xsvgen/3c2b5e43e7adcb856a3a2aa01bfc039bf3c6459b/generator/generator.ml | ocaml | *********************************************************************
XML Schema Validator Generator
... | ( SafeRiver )
Copyright 2012 , ANSSI and SafeRiver .
$ I d : generator.ml 1711 2012 - 06 - 04 18:07:56Z maarek $
* { 1 XSD validator generator }
let version = String.copy "0.2"
let read_commandline () =
let generator_basename = Sy... |
b677bc98740b853350b00718fee140f80c27badcf13cf8ffecfdf4cbebca706d | marick/specter-book-code | select_pred.clj | (ns book-code.ch1.select-pred
(:use midje.sweet commons.clojure.core))
(defn select-pred [selector candidate]
(if (empty? selector)
(vector candidate)
(if ( (first selector) candidate)
(select-pred (rest selector) candidate)
nil)))
(fact "our implementation matches Specter's"
(select-pred [o... | null | https://raw.githubusercontent.com/marick/specter-book-code/e416d4ce8164084057d36d29d89b17d114d1ab28/src/book_code/ch1/select_pred.clj | clojure | That is:
(= [1 2 3] '(1 2 3)) => true
a specific type test. | (ns book-code.ch1.select-pred
(:use midje.sweet commons.clojure.core))
(defn select-pred [selector candidate]
(if (empty? selector)
(vector candidate)
(if ( (first selector) candidate)
(select-pred (rest selector) candidate)
nil)))
(fact "our implementation matches Specter's"
(select-pred [o... |
0047423c10502ef8e70381863198b45d0a8eaecbcdd0c3463bc9ddfbc93b0896 | facebookarchive/pfff | class_funcobj.ml |
class foo = object
method with_target x = {< targets = x >}
end
| null | https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/tests/ml/parsing/class_funcobj.ml | ocaml |
class foo = object
method with_target x = {< targets = x >}
end
| |
3e6d8530f8a02855eb77e5d231f80bd079f3d980c35b66411fdd700e2003817c | zadean/xqerl | fn_current_time_SUITE.erl | -module('fn_current_time_SUITE').
-include_lib("common_test/include/ct.hrl").
-export([
all/0,
groups/0,
suite/0
]).
-export([
init_per_suite/1,
init_per_group/2,
end_per_group/2,
end_per_suite/1
]).
-export(['fn-current-time-1'/1]).
-export(['fn-current-time-2'/1]).
-export(['fn-current... | null | https://raw.githubusercontent.com/zadean/xqerl/1a94833e996435495922346010ce918b4b0717f2/test/fn/fn_current_time_SUITE.erl | erlang | -module('fn_current_time_SUITE').
-include_lib("common_test/include/ct.hrl").
-export([
all/0,
groups/0,
suite/0
]).
-export([
init_per_suite/1,
init_per_group/2,
end_per_group/2,
end_per_suite/1
]).
-export(['fn-current-time-1'/1]).
-export(['fn-current-time-2'/1]).
-export(['fn-current... | |
1e0e51d583eff11421120532ed78f1b552ca003ac28ef67693c6e3966884ecb9 | noinia/hgeometry | Content.hs | # LANGUAGE TemplateHaskell #
# LANGUAGE UndecidableInstances #
module Ipe.Content(
Image(Image), imageData, rect
, TextLabel(..)
, MiniPage(..), width
, IpeSymbol(Symbol), symbolPoint, symbolName
, Path(Path), pathSegments
, PathSegment(..)
, Group(Group), groupItems
, IpeObject(..), _IpeGroup, _... | null | https://raw.githubusercontent.com/noinia/hgeometry/89cd3d3109ec68f877bf8e34dc34b6df337a4ec1/hgeometry-ipe/src/Ipe/Content.hs | haskell | ------------------------------------------------------------------------------
| Image Objects
------------------------------------------------------------------------------
| Text Objects
------------------------------------------------------------------------------
| Ipe Symbols, i.e. Points
| A symbol (point) in... | # LANGUAGE TemplateHaskell #
# LANGUAGE UndecidableInstances #
module Ipe.Content(
Image(Image), imageData, rect
, TextLabel(..)
, MiniPage(..), width
, IpeSymbol(Symbol), symbolPoint, symbolName
, Path(Path), pathSegments
, PathSegment(..)
, Group(Group), groupItems
, IpeObject(..), _IpeGroup, _... |
a78e057522baa9516adb1530d97279a6c56018ad8d38715b5451af5c66c80691 | argp/bap | bench.ml | (**************************************************************************)
(* *)
: a generic graph library for OCaml
Copyright ( C ) 2004 - 2007
, and
(* ... | null | https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/ocamlgraph/tests/bench.ml | ocaml | ************************************************************************
This software is free software; you can redistribute it and/or
described in file LICENSE.... | : a generic graph library for OCaml
Copyright ( C ) 2004 - 2007
, and
modify it under the terms of the GNU Library General Public
License version 2 , with the special exception on linking
open Form... |
49a19c7776f66d64f6dd1fabb74d3c777d3378a39ac6eb6380db62028a1fbf39 | pasberth/binal1 | Gen.hs | module Language.Binal.Util.Gen where
indent :: Int -> String -> String
indent n = init . unlines . map (replicate n ' ' ++) . lines
| null | https://raw.githubusercontent.com/pasberth/binal1/4dca66a337082e3ceec110fe57abb97981b6a2c1/Language/Binal/Util/Gen.hs | haskell | module Language.Binal.Util.Gen where
indent :: Int -> String -> String
indent n = init . unlines . map (replicate n ' ' ++) . lines
| |
69386464a6dcc8ef1e6a303052323eda457502911824aa655bcd831335d1f5d4 | sile/taomp-sbcl | coarse-list.lisp | (defpackage coarse-list
(:use :common-lisp :util)
(:shadow :common-lisp remove)
(:export make
add
remove
contains?))
(in-package :coarse-list)
(defstruct node
(key 0 :type fixnum)
(item t :type t)
(next nil :type (or null node)))
(defstruct @set
(head t :type node)
(lo... | null | https://raw.githubusercontent.com/sile/taomp-sbcl/6216891346160e613fae3bb73491bc8c8fbad1c4/c9/coarse-list.lisp | lisp | (defpackage coarse-list
(:use :common-lisp :util)
(:shadow :common-lisp remove)
(:export make
add
remove
contains?))
(in-package :coarse-list)
(defstruct node
(key 0 :type fixnum)
(item t :type t)
(next nil :type (or null node)))
(defstruct @set
(head t :type node)
(lo... | |
e2270af3fa23736679d9574535c92c20f9cec77940b52c86a24d408b99c6bd33 | oofp/Beseder | ControlData.hs |
module Beseder.Base.ControlData
( newRes
, invoke
, nextEv
, nextEv'
, clear
, clearResources
, try
, on
, onOrElse
, opRes
, gets
, (>>)
, (>>=)
, return
, skipAll
, skipTo
, noop
, label
, whatNext
--, whatNames
, liftIO
, op
, p... | null | https://raw.githubusercontent.com/oofp/Beseder/a0f5c5e3138938b6fa18811d646535ee6df1a4f4/src/Beseder/Base/ControlData.hs | haskell | , whatNames
, module Beseder.Base.Internal.STransProc |
module Beseder.Base.ControlData
( newRes
, invoke
, nextEv
, nextEv'
, clear
, clearResources
, try
, on
, onOrElse
, opRes
, gets
, (>>)
, (>>=)
, return
, skipAll
, skipTo
, noop
, label
, whatNext
, liftIO
, op
, prop
, forever
... |
3cac8bea041473bfed046343953bc20720d025dfad2387a8f152877676cafdfd | elaforge/karya | Internal.hs | Copyright 2013
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
-- | Internal Cmds, that keep bits of Cmd.State up to date that everyone else
-- relies on.
module Cmd.Internal (
cmd_record_keys
, record_focus
, cmd_record_ui_updates
, ... | null | https://raw.githubusercontent.com/elaforge/karya/39e43d8fac9c6387e093c060823f534f54ff2ad0/Cmd/Internal.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt
| Internal Cmds, that keep bits of Cmd.State up to date that everyone else
relies on.
* record keys
other modifiers take downs and ups and incrementally modify the state.
has left the app.
whenJust mb_mod ... | Copyright 2013
module Cmd.Internal (
cmd_record_keys
, record_focus
, cmd_record_ui_updates
, update_ui_state
, set_style
, sync_status
, default_selection_hooks
, sync_zoom_status
, can_checkpoint
) where
import qualified Data.Map as Map
import qualified Data.Maybe as Maybe
imp... |
cfd9414dfe2143194ab7be2cf7bc79af6302558baaef8cfdf885a2618d499cef | Frama-C/Frama-C-snapshot | warn.mli | (**************************************************************************)
(* *)
This file is part of Frama - C.
(* *)
Copyright ... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/value/domains/cvalue/warn.mli | ocaml | ************************************************************************
alternatives)
... | This file is part of Frama - C.
Copyright ( C ) 2007 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , v... |
d9da88c7cdef54c80ba38f2159de5bc607e6a18cbe66c554d0d8787d64513cc3 | lspitzner/brittany | Test362.hs | -- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft }
func :: (a -> a) -> a
| null | https://raw.githubusercontent.com/lspitzner/brittany/a15eed5f3608bf1fa7084fcf008c6ecb79542562/data/Test362.hs | haskell | brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } | func :: (a -> a) -> a
|
198ff3c214bbfbbcb149db6f7882836b1002913a9f762b40cf7868a65c307bab | jhickner/cljs-multitouch | core.clj | (ns cljs-multitouch.test.core
(:use [cljs-multitouch.core])
(:use [clojure.test]))
(deftest replace-me ;; FIXME: write
(is false "No tests have been written."))
| null | https://raw.githubusercontent.com/jhickner/cljs-multitouch/b55b8ddcc914b234d20f5b470c29d34d4feea559/test/cljs_multitouch/test/core.clj | clojure | FIXME: write | (ns cljs-multitouch.test.core
(:use [cljs-multitouch.core])
(:use [clojure.test]))
(is false "No tests have been written."))
|
6053f8fa904e353a1996226b793f72548ac7d9f70ba51f6ff65d6f40df158238 | input-output-hk/ouroboros-network | Query.hs | TODO : provide a corrss platform network bindings using ` network ` or
` Win32 - network ` , to get rid of CPP .
# LANGUAGE CPP #
{-# LANGUAGE DeriveFoldable #-}
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE NumericUnderscores #-}
# LANGUAGE ScopedTypeVari... | null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/d55a4848787f33de2b9883c0343a095387759ef5/ntp-client/src/Network/NTP/Client/Query.hs | haskell | # LANGUAGE DeriveFoldable #
# LANGUAGE NumericUnderscores #
* Logging
^ Minimum number of results to compute the offset, this should be less
^ Timeout for receiving a response from an @ntp@ server.
abused.
lost, or dns lookups did not return at least `ntpRequiredNumberOfResults`
addresses.
| The differe... | TODO : provide a corrss platform network bindings using ` network ` or
` Win32 - network ` , to get rid of CPP .
# LANGUAGE CPP #
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
# LANGUAGE ScopedTypeVariables #
module Network.NTP.Client.Query (
NtpSettings(..)
, NtpStat... |
701d9eb546e6e682ce4d87d2663e2b3c005f5807a31b9b34e8ffc3c5207d7a2e | Opetushallitus/ataru | subs.cljs | (ns ataru.virkailija.editor.subs
(:require [ataru.util :as util :refer [collect-ids]]
[re-frame.core :as re-frame]
[ataru.cljs-util :as cu]
[clojure.set :as cset]
[clojure.string :as string]
[ataru.translations.translation-util :as translations]
... | null | https://raw.githubusercontent.com/Opetushallitus/ataru/02a412028ace5de35c451effdc4666c8b5ded129/src/cljs/ataru/virkailija/editor/subs.cljs | clojure | (ns ataru.virkailija.editor.subs
(:require [ataru.util :as util :refer [collect-ids]]
[re-frame.core :as re-frame]
[ataru.cljs-util :as cu]
[clojure.set :as cset]
[clojure.string :as string]
[ataru.translations.translation-util :as translations]
... | |
590d0c061e82b683380e8f6030b904a0efc94672761e753684c8d35d0545aba2 | sealchain-project/sealchain | Patterns.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternSynonyms #-}
# LANGUAGE Rank2Types #
{-# LANGUAGE ViewPatterns #-}
-- | Pattern synonym definitions for translation from typechecked 'AST' to
-- 'Term'.
module Pact.Analyze.Patterns where
import Control.Lens ((^?))
import ... | null | https://raw.githubusercontent.com/sealchain-project/sealchain/e97b4bac865fb147979cb14723a12c716a62e51e/pact/src/Pact/Analyze/Patterns.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE PatternSynonyms #
# LANGUAGE ViewPatterns #
| Pattern synonym definitions for translation from typechecked 'AST' to
'Term'.
helper patterns
compileNode's Patterns
pattern RawTableName :: Text -> AST Node
pattern RawTableName t <- Table (Node (TcId _ t _) _) _ | # LANGUAGE Rank2Types #
module Pact.Analyze.Patterns where
import Control.Lens ((^?))
import Data.Maybe (isJust)
import Data.Text (Text)
import qualified Pact.Types.Lang as Lang
import Pact.Types.Runtime (Literal (LString))
import ... |
322315d60e95e708c0ea18a8caf320141cf3d84e939b9e8d7b0dfdd5591891f0 | Rotaerk/vulkanTest | Queue.hs | module Graphics.VulkanAux.Queue where
import Prelude.Local
import Control.Monad.IO.Class
import Data.Function
import Data.Reflection
import Foreign.Marshal.Array
import Graphics.Vulkan.Core_1_0
import Graphics.Vulkan.Marshal.Create
import Graphics.Vulkan.Ext.VK_KHR_swapchain
import Graphics.VulkanAux.Getter
import Gr... | null | https://raw.githubusercontent.com/Rotaerk/vulkanTest/beafd3cc27ba60561b9e76cd0058e30949a5affb/sandbox/sandbox/src/Graphics/VulkanAux/Queue.hs | haskell | module Graphics.VulkanAux.Queue where
import Prelude.Local
import Control.Monad.IO.Class
import Data.Function
import Data.Reflection
import Foreign.Marshal.Array
import Graphics.Vulkan.Core_1_0
import Graphics.Vulkan.Marshal.Create
import Graphics.Vulkan.Ext.VK_KHR_swapchain
import Graphics.VulkanAux.Getter
import Gr... | |
32b9e19e5d7be6e1d91148c9a1970bc65faf06f45115a93fb0ab1ccede3a0292 | ucsd-progsys/liquidhaskell | Qsloop.hs | {-@ LIQUID "--expect-any-error" @-}
module Qsloop where
quickSort [] = []
quickSort xs@(x:_) = lts ++ gts
where
lts = quickSort [y | y <- xs, y < x]
gts = quickSort [z | z <- xs, z >= x]
| null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/terminate/neg/Qsloop.hs | haskell | @ LIQUID "--expect-any-error" @ | module Qsloop where
quickSort [] = []
quickSort xs@(x:_) = lts ++ gts
where
lts = quickSort [y | y <- xs, y < x]
gts = quickSort [z | z <- xs, z >= x]
|
2458a020a9f83e98704cfe4d2059b11f011c8c9a7b65c7a338d3f9e0bae09922 | inhabitedtype/ocaml-aws | listAllowedNodeTypeModifications.ml | open Types
open Aws
type input = ListAllowedNodeTypeModificationsMessage.t
type output = AllowedNodeTypeModificationsMessage.t
type error = Errors_internal.t
let service = "elasticache"
let signature_version = Request.V4
let to_http service region req =
let uri =
Uri.add_query_params
(Uri.of_string (A... | null | https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/b6d5554c5d201202b5de8d0b0253871f7b66dab6/libraries/elasticache/lib/listAllowedNodeTypeModifications.ml | ocaml | open Types
open Aws
type input = ListAllowedNodeTypeModificationsMessage.t
type output = AllowedNodeTypeModificationsMessage.t
type error = Errors_internal.t
let service = "elasticache"
let signature_version = Request.V4
let to_http service region req =
let uri =
Uri.add_query_params
(Uri.of_string (A... | |
3c9a2f4e167a69b94a11606684d3a12097333958c461bfdac4a13f1702fcd4db | Incubaid/arakoon | multi_paxos_test.ml |
Copyright ( 2010 - 2014 ) INCUBAID BVBA
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
distribut... | null | https://raw.githubusercontent.com/Incubaid/arakoon/43a8d0b26e4876ef91d9657149f105c7e57e0cb0/src/paxos/multi_paxos_test.ml | ocaml | "c1_nak" >:: w (test_simulation c1_nak); |
Copyright ( 2010 - 2014 ) INCUBAID BVBA
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
distribut... |
eced75cfa3bb26dfeb5936a525f0e3fc08f5e7218827d652e13c51b1a5d3a7f9 | onedata/op-worker | atm_list_store_container_iterator.erl | %%%-------------------------------------------------------------------
@author
( C ) 2021 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%-------------------------------------------------------------------
%%% @doc
%%% This module provides `atm_store_co... | null | https://raw.githubusercontent.com/onedata/op-worker/f26f212f7c7ca54647c3c4e1afef851ab0660847/src/modules/automation/store/container/list/atm_list_store_container_iterator.erl | erlang | -------------------------------------------------------------------
@end
-------------------------------------------------------------------
@doc
This module provides `atm_store_container_iterator` functionality for
@end
-------------------------------------------------------------------
API
atm_store_container_i... | @author
( C ) 2021 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
` atm_list_store_container ` .
-module(atm_list_store_container_iterator).
-author("Michal Stanisz").
-behaviour(atm_store_container_iterator).
-behaviour(persistent_record).
-include_lib("ctool... |
6e93aa4b577d5f1802ea3f0ce52f3c98db3e0739c650459dbcd613452c332307 | ucsd-progsys/liquidhaskell | Deppair0.hs | {-@ LIQUID "--expect-any-error" @-}
module Deppair0 () where
import Language.Haskell.Liquid.Prelude
incr x = x + 1
baz x = (x, incr x)
prop :: Bool
prop = chk $ baz n
where n = choose 100
chk (x, y) = liquidAssertB (x > y)
| null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/absref/neg/Deppair0.hs | haskell | @ LIQUID "--expect-any-error" @ | module Deppair0 () where
import Language.Haskell.Liquid.Prelude
incr x = x + 1
baz x = (x, incr x)
prop :: Bool
prop = chk $ baz n
where n = choose 100
chk (x, y) = liquidAssertB (x > y)
|
3174c023af38ac314a959cef72a013ae719577078a19dd32e5d691224b86af4e | V-Wong/COMP3141 | isPalindrome.hs | module Main where
isPalindrome1 :: Eq a => [a] -> Bool
isPalindrome1 l = l == reverse l
isPalindrome2 :: Eq a => [a] -> Bool
isPalindrome2 [] = True
isPalindrome2 [a] = True
isPalindrome2 xs | head xs /= last xs = False
| otherwise = isPalindrome2 (tail (init xs))
isPalindrome3 :: Eq a => [a] -> Boo... | null | https://raw.githubusercontent.com/V-Wong/COMP3141/f5a92e5833d2bb0a08e68cb2d025e38c8c875563/Random%20Code/isPalindrome.hs | haskell | module Main where
isPalindrome1 :: Eq a => [a] -> Bool
isPalindrome1 l = l == reverse l
isPalindrome2 :: Eq a => [a] -> Bool
isPalindrome2 [] = True
isPalindrome2 [a] = True
isPalindrome2 xs | head xs /= last xs = False
| otherwise = isPalindrome2 (tail (init xs))
isPalindrome3 :: Eq a => [a] -> Boo... | |
bdbfeeeb4e3bee4d88d95eeace60e0e7cfb39742d7f9dd1b2e6c9e91edda3ad6 | clojure-interop/google-cloud-clients | StorageOptions.clj | (ns com.google.cloud.storage.StorageOptions
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.storage StorageOptions]))
(defn *get-default-http-transport-options
"returns: `com.google.cloud.http.HttpTransportOptions`"
(^com.google.cloud.http.HttpTransportOptions []
(StorageOptions... | null | https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.storage/src/com/google/cloud/storage/StorageOptions.clj | clojure | (ns com.google.cloud.storage.StorageOptions
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.storage StorageOptions]))
(defn *get-default-http-transport-options
"returns: `com.google.cloud.http.HttpTransportOptions`"
(^com.google.cloud.http.HttpTransportOptions []
(StorageOptions... | |
731cc9355454057e3ce07f9a0feba4d97915471288b5f6c6254cc447384ab815 | ngorogiannis/cyclist | tpreds.ml | open Lib
open Symbols
open Generic
open MParser
include Multiset.Make (Tpred)
let subst theta elts = map (Tpred.subst theta) elts
let terms inds =
Term.Set.union_of_list (Blist.map Tpred.terms (elements inds))
let vars inds = Term.filter_vars (terms inds)
let idents inds =
map_to Predsym.MSet.add Predsym.M... | null | https://raw.githubusercontent.com/ngorogiannis/cyclist/c93a168d586b308ab2a2c730cd1b2375ab263167/src/seplog/tpreds.ml | ocaml | open Lib
open Symbols
open Generic
open MParser
include Multiset.Make (Tpred)
let subst theta elts = map (Tpred.subst theta) elts
let terms inds =
Term.Set.union_of_list (Blist.map Tpred.terms (elements inds))
let vars inds = Term.filter_vars (terms inds)
let idents inds =
map_to Predsym.MSet.add Predsym.M... | |
705f6558fce302f81c23909547da09b5aae9bdd8479386ffe5b8a82b9813cd8d | mirage/ocaml-xenstore-server | domains.mli |
* Copyright ( C ) Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking described in file LI... | null | https://raw.githubusercontent.com/mirage/ocaml-xenstore-server/2a8ae397d2f9291107b5d9e9cfc6085fde8c0982/userspace/domains.mli | ocaml | * [map_fd fd size] memory maps [size] bytes from the open file [fd]
* unique id for a given domain
* the domain is being cleaned up
* the domain has stopped running
* The state of a domain
* [list ()] returns a list of known domains |
* Copyright ( C ) Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking described in file LI... |
302354fff48e397ef5e2dab82e4a108d3d46aaee58ea924b2167bbf54549a8b8 | glossopoeia/glossolalia | tokenize-only.rkt | #lang racket
(require brag/support "tokenizer.rkt")
(require br/syntax br/define)
(define (read-syntax path port)
(define tokens (apply-tokenizer make-tokenizer port))
(datum->syntax #f
`(module glossolalia-tokens-mod glossolalia/tokenize-only ,tokens)))
(module+ reader (provide read-syntax))
(define-macro (t... | null | https://raw.githubusercontent.com/glossopoeia/glossolalia/2f7d6c2865267aaee4709ca6640243b89ecf6c6d/tokenize-only.rkt | racket | #lang racket
(require brag/support "tokenizer.rkt")
(require br/syntax br/define)
(define (read-syntax path port)
(define tokens (apply-tokenizer make-tokenizer port))
(datum->syntax #f
`(module glossolalia-tokens-mod glossolalia/tokenize-only ,tokens)))
(module+ reader (provide read-syntax))
(define-macro (t... | |
a6be5d6cccb6778af54f61ef4be000696fdbb22c70ed04fec59528531f5a5a2c | caradoc-org/caradoc | cleanupcs.ml | (*****************************************************************************)
(* Caradoc: a PDF parser and validator *)
Copyright ( C ) 2016 - 2017
(* *)
(* This program ... | null | https://raw.githubusercontent.com/caradoc-org/caradoc/100f53bc55ef682049e10fabf24869bc019dc6ce/src/tools/cleanupcs.ml | ocaml | ***************************************************************************
Caradoc: a PDF parser and validator
This program is free software; you can redistribute it and/or modify
... | Copyright ( C ) 2016 - 2017
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation .
You should have received a copy of the GNU General Public License along
with this program ; if... |
1d299002edddc9f57c5c20b21ca536a6ffbe71cdc698e8d37f8958e03353ddc3 | Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library | PaymentIntentPaymentMethodOptionsEps.hs | {-# LANGUAGE MultiWayIf #-}
CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
{-# LANGUAGE OverloadedStrings #-}
-- | Contains the types generated from the schema PaymentIntentPaymentMethodOptionsEps
module StripeAPI.Types.PaymentIntentPa... | null | https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Types/PaymentIntentPaymentMethodOptionsEps.hs | haskell | # LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
| Contains the types generated from the schema PaymentIntentPaymentMethodOptionsEps
| setup_future_usage: Indicates that you intend to make future payments with this PaymentIntent\'s payment method.
| Create a new 'PaymentIntentPaymentMethodOptionsEps' with al... | CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
module StripeAPI.Types.PaymentIntentPaymentMethodOptionsEps where
import qualified Control.Monad.Fail
import qualified Data.Aeson
import qualified Data.Aeson as Data.Aeson.Encoding.Intern... |
7998a63c1b9b9a4370ef4ada8eb4d133d43458fc9b47d5b56ffc927181d21fbf | jubnzv/moonsmith | util.mli | * Randomly chooses one element from the list .
val choose_one_exn : 'a list -> 'a
val choose_lazy_exn : ('a lazy_t) list -> 'a
val choose : (bool * 'a lazy_t) list -> 'a lazy_t -> 'a
(** Replaces element in the given list. *)
val replace : 'a list -> int -> 'a -> 'a list
val endswith : string -> string -> bool
| null | https://raw.githubusercontent.com/jubnzv/moonsmith/1bc64fd9f01b84b2c943e6edc28c590bba01184c/src/util.mli | ocaml | * Replaces element in the given list. | * Randomly chooses one element from the list .
val choose_one_exn : 'a list -> 'a
val choose_lazy_exn : ('a lazy_t) list -> 'a
val choose : (bool * 'a lazy_t) list -> 'a lazy_t -> 'a
val replace : 'a list -> int -> 'a -> 'a list
val endswith : string -> string -> bool
|
43e67a39147985275e66efa403bc6c612f8c702b2c66bed96f5282df4014ce8d | cmsc430/www | random.rkt | #lang racket
(provide (all-defined-out))
;; Randomly generate an expression
;; Note: this will often generate programs with type errors
(define (random-expr)
(close (random-open-expr)))
;; Randomly generate an expression (often with free variables)
(define (random-open-expr)
(contract-random-generate
(flat-rec... | null | https://raw.githubusercontent.com/cmsc430/www/0809867532b8ef516029ac38093a145db5b424ea/langs/hustle/random.rkt | racket | Randomly generate an expression
Note: this will often generate programs with type errors
Randomly generate an expression (often with free variables)
Take an expression and close it (randomly)
Replace any variable with a randomly chosen bound variable (if any)
otherwise replace with a random let- and var-free expr... | #lang racket
(provide (all-defined-out))
(define (random-expr)
(close (random-open-expr)))
(define (random-open-expr)
(contract-random-generate
(flat-rec-contract e
#t
#f
''()
simple-symbol/c
(integer-... |
b512f55aff930c037a2d6b4fcaff2a31645d9071f02f073a49cc0ebff866d653 | tonyvanriet/lunch-bot | template.clj | (ns lunch-bot.command.template
(:require [clj-time.core :as time]))
(defn command-template->element-keys
[template]
(map #(first %) template))
(defmulti command-template->command #'command-template->element-keys)
(defmethod command-template->command :default [_]
nil)
(defmethod command-template->command [... | null | https://raw.githubusercontent.com/tonyvanriet/lunch-bot/14e9ab3eb3d6ab913e27df7967a470a594e1b5c3/src/lunch_bot/command/template.clj | clojure |
show templates
paid templates
borrowed/owe templates
bought templates
cost templates
| (ns lunch-bot.command.template
(:require [clj-time.core :as time]))
(defn command-template->element-keys
[template]
(map #(first %) template))
(defmulti command-template->command #'command-template->element-keys)
(defmethod command-template->command :default [_]
nil)
(defmethod command-template->command [... |
028fe69b641dd6a94541fcd99b2fcddf02bb040123e6ea368deb8cc6867173d8 | jeltsch/incremental-computing | Incremental.hs | module Data.Sequence.Incremental (
-- * Transformations
concat,
reverse,
-- * Core operations
type CoreOps (CoreOps, empty, singleton, onSlice, onElem)
) where
-- Prelude
import Prelude hiding (concat, reverse)
Control
import Control.Applicative
-- Data
import Data.Kind (Type)... | null | https://raw.githubusercontent.com/jeltsch/incremental-computing/f06c00b4062740746ca4a6f867b935e7959b0049/src/library/Data/Sequence/Incremental.hs | haskell | * Transformations
* Core operations
Prelude
Data
* Transformations
FIXME: Check strictness of tuples.
NOTE:
Once we have type application patterns, we can get rid of the helper
variables opsConv0, opsConv1, etc.
** Concatenation
** Reversal
FIXME: Use lengthOps.
* Operations
* Data | module Data.Sequence.Incremental (
concat,
reverse,
type CoreOps (CoreOps, empty, singleton, onSlice, onElem)
) where
import Prelude hiding (concat, reverse)
Control
import Control.Applicative
import Data.Kind (Type)
import Data.Type.Equality ((:~~:) (HRefl))
import ... |
b08c1b6267a5aa94fda4556ec94b3ba2fabc90f14cbb5d8fc89e743b7411edde | puppetlabs/puppetserver | project.clj | (def ps-version "7.9.6-SNAPSHOT")
(defn deploy-info
[url]
{ :url url
:username :env/nexus_jenkins_username
:password :env/nexus_jenkins_password
:sign-releases false})
(def heap-size-from-profile-clj
(let [profile-clj (io/file (System/getenv "HOME") ".lein" "profiles.clj")]
(if (.exists profile-... | null | https://raw.githubusercontent.com/puppetlabs/puppetserver/3dab9d0b55ed1eda2df1f54338aef23fc7076455/project.clj | clojure | We do not currently use this dependency directly, but
we have documentation that shows how users can use it to
send their logs to logstash, so we include it in the jar.
We have to have this, and it needs to agree with clj-parent
until/unless you can have managed plugin dependencies.
By declaring a classifier here... | (def ps-version "7.9.6-SNAPSHOT")
(defn deploy-info
[url]
{ :url url
:username :env/nexus_jenkins_username
:password :env/nexus_jenkins_password
:sign-releases false})
(def heap-size-from-profile-clj
(let [profile-clj (io/file (System/getenv "HOME") ".lein" "profiles.clj")]
(if (.exists profile-... |
3012dd466933df59b1c4df83f137e3d11f3a8d665cf0df2642f560d579680f3e | pjones/openid-connect | Auth.hs | {-|
Copyright:
This file is part of the package openid-connect. It is subject to
the license terms in the LICENSE file found in the top-level
directory of this distribution and at:
-connect
No part of this package, including this file, may be copied,
modified, propagated, or distributed except accord... | null | https://raw.githubusercontent.com/pjones/openid-connect/23b03940613a1b0a633747b5fecaf61b3fbd8a09/example/Auth.hs | haskell | |
Copyright:
This file is part of the package openid-connect. It is subject to
the license terms in the LICENSE file found in the top-level
directory of this distribution and at:
-connect
No part of this package, including this file, may be copied,
modified, propagated, or distributed except accordin... | module Auth (app) where
import Control.Monad.Except
import Data.ByteString (ByteString)
import Data.ByteString.Builder (toLazyByteString)
import qualified Data.ByteString.Char8 as Char8
import qualified Data.ByteString.Lazy.Char8 as LChar8
import Data.Proxy
import Data.Text (Text)
import Data.Text.Encoding as Text
imp... |
a5c995285cc5e54b39f89d3fcde6bb2d9c3f9072342f98a95baae36a6a9d7463 | rubenbarroso/EOPL | 5-3.scm | ;^;; 5-3.scm: basis for OOP interps
(let ((time-stamp "Time-stamp: <2001-05-10 16:18:14 dfried>"))
(eopl:printf "5-3.scm - basis for OOP interps ~a~%"
(substring time-stamp 13 29)))
;;;;;;;;;;;;;;;; top level and tests ;;;;;;;;;;;;;;;;
(define run
(lambda (string)
(eval-program (scan&parse string))))
(d... | null | https://raw.githubusercontent.com/rubenbarroso/EOPL/f9b3c03c2fcbaddf64694ee3243d54be95bfe31d/src/interps/5-3.scm | scheme | ^;; 5-3.scm: basis for OOP interps
top level and tests ;;;;;;;;;;;;;;;;
needed for testing
^;;;;;;;;;;;;;;; grammatical specification ;;;;;;;;;;;;;;;;
^;;;;;;;;;;;;;;; new productions for oop ;;;;;;;;;;;;;;;;
method ids
^;;;;;;;;;;;;;;; end new productions for oop ;;;;;;;;;;;;;;;;
^;;;;;;;;;;;;;;; the interpreter ;;... |
(let ((time-stamp "Time-stamp: <2001-05-10 16:18:14 dfried>"))
(eopl:printf "5-3.scm - basis for OOP interps ~a~%"
(substring time-stamp 13 29)))
(define run
(lambda (string)
(eval-program (scan&parse string))))
(define functional-groups '(lang3-5 lang3-6 lang3-7))
(define oop-groups '(oop))
(define r... |
92eac5e432f669ee01a3e83a8a4f46c67cad7b3a34674c3b7714521a643d2a7a | haskell/haskell-language-server | Stats.hs | # LANGUAGE CPP #
# LANGUAGE ScopedTypeVariables #
#ifdef STM_STATS
{-# LANGUAGE RecordWildCards #-}
#endif
module Control.Concurrent.STM.Stats
( atomicallyNamed
, atomically
, getSTMStats
, dumpSTMStats
, module Control.Concurrent.STM
) where
import Control.Concur... | null | https://raw.githubusercontent.com/haskell/haskell-language-server/5d56aa70a84807d7659e72eacd4d91fee08dbdbb/hls-graph/src/Control/Concurrent/STM/Stats.hs | haskell | # LANGUAGE RecordWildCards #
| Global state, seems to be unavoidable here.
| For the most general transaction tracking function, 'trackSTMConf', all
count, a warning is issued at runtime. If set to @Nothing@, disables the warnings completely.
this count, a warning is issued. If set to @Nothing@, disables the
w... | # LANGUAGE CPP #
# LANGUAGE ScopedTypeVariables #
#ifdef STM_STATS
#endif
module Control.Concurrent.STM.Stats
( atomicallyNamed
, atomically
, getSTMStats
, dumpSTMStats
, module Control.Concurrent.STM
) where
import Control.Concurrent.STM hiding (atomically)
import q... |
28c13176fe3d0447d1fac60cea9081707c0ae7ff6a74abe76fe2e50ad18ce87f | ckruse/irckerl | irc_parser.erl | Copyright ( C ) 2011 by < >
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%% of this software and associated documentation files (the "Software"), to deal
in the Software without restriction , including without limitation the rights
%% to use, copy, modify, merge, publish, dist... | null | https://raw.githubusercontent.com/ckruse/irckerl/2fd47c79a74b580d2d1448d15c5e9e2271e58daa/src/irc_parser.erl | erlang | Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
furnished to do so, subject to the following conditions:
The above copyright notice an... | Copyright ( C ) 2011 by < >
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit persons to whom the Software is
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRES... |
1c0b13e1eb5b06ff338cbb76b4d91cdd21fede1ac73a3afaf59553f7abb92b10 | haskell-compat/base-compat | Batteries.hs | {-# LANGUAGE PackageImports #-}
# OPTIONS_GHC -fno - warn - dodgy - exports -fno - warn - unused - imports #
| Reexports " System . IO.Compat "
-- from a globally unique namespace.
module System.IO.Compat.Repl.Batteries (
module System.IO.Compat
) where
import "this" System.IO.Compat
| null | https://raw.githubusercontent.com/haskell-compat/base-compat/847aa35c4142f529525ffc645cd035ddb23ce8ee/base-compat-batteries/src/System/IO/Compat/Repl/Batteries.hs | haskell | # LANGUAGE PackageImports #
from a globally unique namespace. | # OPTIONS_GHC -fno - warn - dodgy - exports -fno - warn - unused - imports #
| Reexports " System . IO.Compat "
module System.IO.Compat.Repl.Batteries (
module System.IO.Compat
) where
import "this" System.IO.Compat
|
9c9ff38a0756d1b4142a7615c117a431a152938a7538372eb7bb6b4f44937e26 | DerGuteMoritz/clj-oauth2 | ring.clj | (ns clj-oauth2.ring
(:require [clj-oauth2.client :as oauth2]
[ring.util.codec :as codec]
[clojure.string :as string]))
;; Random mixed case alphanumeric
(defn- random-string [length]
(let [ascii-codes (concat (range 48 58) (range 65 91) (range 97 123))]
(apply str (repeatedly length #(c... | null | https://raw.githubusercontent.com/DerGuteMoritz/clj-oauth2/b7fa4279cb8a20f979489452d27b5760697e56e3/src/clj_oauth2/ring.clj | clojure | Random mixed case alphanumeric
requires ring.middleware.session/wrap-session
Parameter handling code shamelessly plundered from ring.middleware.
token for all but a set of explicitly excluded URLs. The response from
Requires ring.middleware.params/wrap-params and
first.
We should have an authorization code - ge... | (ns clj-oauth2.ring
(:require [clj-oauth2.client :as oauth2]
[ring.util.codec :as codec]
[clojure.string :as string]))
(defn- random-string [length]
(let [ascii-codes (concat (range 48 58) (range 65 91) (range 97 123))]
(apply str (repeatedly length #(char (rand-nth ascii-codes))))))
(... |
1e5b5f7e88f25c23e5734af36851399e2be224b42e910be4bf19941610cc316c | kitlang/kit | Ir.hs | module Kit.Ir (
module Kit.Ir.IrBundle,
module Kit.Ir.IrStmt,
module Kit.Ir.IrExpr,
module Kit.Ir.IrModule
) where
import Kit.Ir.IrBundle
import Kit.Ir.IrStmt
import Kit.Ir.IrExpr
import Kit.Ir.IrModule
| null | https://raw.githubusercontent.com/kitlang/kit/2769a7a8e51fe4466c50439d1a1ebdad0fb79710/src/Kit/Ir.hs | haskell | module Kit.Ir (
module Kit.Ir.IrBundle,
module Kit.Ir.IrStmt,
module Kit.Ir.IrExpr,
module Kit.Ir.IrModule
) where
import Kit.Ir.IrBundle
import Kit.Ir.IrStmt
import Kit.Ir.IrExpr
import Kit.Ir.IrModule
| |
753d47986ddbcd3f0b7532a21064efe8e12968c9d9dae8f00cff963092c774e9 | xtdb/xtdb | lucene.clj | (ns xtdb.lucene
(:require [clojure.spec.alpha :as s]
[clojure.tools.logging :as log]
[xtdb.api :as xt]
[xtdb.checkpoint :as cp]
[xtdb.codec :as c]
[xtdb.db :as db]
[xtdb.io :as xio]
[xtdb.query :as q]
[xtdb.system :as sys]... | null | https://raw.githubusercontent.com/xtdb/xtdb/e1f00847fb20cb85477bf166c85aed8d267e954c/modules/lucene/src/xtdb/lucene.clj | clojure | To search for triples by e-a-v for deduping
The actual term, which will be tokenized
Used for wildcard searches
Used for eviction
Used for wildcard searches | (ns xtdb.lucene
(:require [clojure.spec.alpha :as s]
[clojure.tools.logging :as log]
[xtdb.api :as xt]
[xtdb.checkpoint :as cp]
[xtdb.codec :as c]
[xtdb.db :as db]
[xtdb.io :as xio]
[xtdb.query :as q]
[xtdb.system :as sys]... |
2d2e110fb1a30e1fc23d4843682b901250c5d30529b5f73d4bb922c16a30a0d2 | johnwhitington/ocamli | exercise05.ml | let array_sum a =
let sum = ref 0 in
for x = 0 to Array.length a - 1 do
sum := !sum + a.(x)
done;
!sum
| null | https://raw.githubusercontent.com/johnwhitington/ocamli/28da5d87478a51583a6cb792bf3a8ee44b990e9f/OCaml%20from%20the%20Very%20Beginning/Chapter%2013/exercise05.ml | ocaml | let array_sum a =
let sum = ref 0 in
for x = 0 to Array.length a - 1 do
sum := !sum + a.(x)
done;
!sum
| |
9104905995487105daf40e9d5df06a1babd6cb1c6a5caeb0b59e0d0442f0a800 | veniversum/fractal-haskell | generateFrame.hs | import Codec.Picture.Types
import Coloring
import ImageOutput
import Mbrot hiding (main)
import System.Environment (getArgs)
main :: IO()
main = do
args <- getArgs
-- Zooming animation at fixed point
( " frame"++(head args : : String)++".png " )... | null | https://raw.githubusercontent.com/veniversum/fractal-haskell/64fba58f15909c578a8a410ff1c5cea80363f0e5/src/generateFrame.hs | haskell | Zooming animation at fixed point
Zooming animation focused at moving point | import Codec.Picture.Types
import Coloring
import ImageOutput
import Mbrot hiding (main)
import System.Environment (getArgs)
main :: IO()
main = do
args <- getArgs
( " frame"++(head args : : String)++".png " ) size ( drawColorZoom ( 1.1**var ) ( -0.... |
a85e924e6326b52742f10849a1a1b15cbf686acbc16f0caae1daa64c05b612db | schibsted/spid-tech-docs | seq_diagrams.clj | (ns spid-docs.seq-diagrams
(:require [clojure.java.io :as io]
[clojure.java.shell :refer [sh]]
[digest :refer [md5]]))
(def npm-install
"Install npm dependencies"
(delay
(let [result (sh "npm" "install"
:dir "seq-diagrams/")]
(if (= 0 (:exit result))
... | null | https://raw.githubusercontent.com/schibsted/spid-tech-docs/ee6a4394e9732572e97fc3a55506b2d6b9a9fe2b/src/spid_docs/seq_diagrams.clj | clojure | (ns spid-docs.seq-diagrams
(:require [clojure.java.io :as io]
[clojure.java.shell :refer [sh]]
[digest :refer [md5]]))
(def npm-install
"Install npm dependencies"
(delay
(let [result (sh "npm" "install"
:dir "seq-diagrams/")]
(if (= 0 (:exit result))
... | |
a3aab563e2bc3331180c4be764102bbc84a80716c8ccd6d8820b2fc00f3e98cb | babashka/babashka | binary_test.clj | (ns io.aviso.binary-test
"Tests for the io.aviso.binary namespace."
(:use io.aviso.binary
clojure.test)
(:import (java.nio ByteBuffer)))
(defn ^:private format-string-as-byte-array [str]
(format-binary (.getBytes str)))
(deftest format-byte-array-test
(are [input expected]
(= expected (format-s... | null | https://raw.githubusercontent.com/babashka/babashka/665ae4dd97535bf72a5ce34a19d624e74e5c4fe8/test-resources/lib_tests/io/aviso/binary_test.clj | clojure | (ns io.aviso.binary-test
"Tests for the io.aviso.binary namespace."
(:use io.aviso.binary
clojure.test)
(:import (java.nio ByteBuffer)))
(defn ^:private format-string-as-byte-array [str]
(format-binary (.getBytes str)))
(deftest format-byte-array-test
(are [input expected]
(= expected (format-s... | |
886bd1e925676449a6732c3ead1a8fae68e6ffdf50d938cf5df0fc97693542bf | GaloisInc/jvm-verifier | SHA384.hs | |
Module : Tests . SHA384
Description :
License : BSD3
Stability : provisional
Point - of - contact : atomb
Module : Tests.SHA384
Description :
License : BSD3
Stability : provisional
Point-of-contact : atomb
-}
{-# LANGUAGE ConstraintKinds... | null | https://raw.githubusercontent.com/GaloisInc/jvm-verifier/3905dda18d0bdd5c595eef49804780f4a48c22f5/test/src/Tests/SHA384.hs | haskell | # LANGUAGE ConstraintKinds #
run $ putStrLn "Running SHA-384 test..."
run $ putStrLn "Running SHA-384 test..."
| Word-level inputs
| Boolean inputs to evalAig
dbugM' 2 "SHA384 simulation finished"
_ignore_nouse :: a
_ignore_nouse = undefined main
main :: IO ()
main = defaultMain [sha384Tests] | |
Module : Tests . SHA384
Description :
License : BSD3
Stability : provisional
Point - of - contact : atomb
Module : Tests.SHA384
Description :
License : BSD3
Stability : provisional
Point-of-contact : atomb
-}
# LANGUAGE CPP #
module Tes... |
14612257594b12c1bd7d700cb504aafada950aaad571f6f9731a72981a5b02cf | Dasudian/DSDIN | dsdso_parser.erl | %%% File : dsdso_parser.erl
Author :
%%% Description :
Created : 1 Mar 2018 by
-module(dsdso_parser).
-export([string/1]).
-include("dsdso_parse_lib.hrl").
-spec string(string()) -> {ok, [dsdso_syntax:decl()]} | {error, {dsdso_parse_lib:pos(), atom(), term()}}.
string(String) ->
parse_and... | null | https://raw.githubusercontent.com/Dasudian/DSDIN/b27a437d8deecae68613604fffcbb9804a6f1729/apps/dsdsophia/src/dsdso_parser.erl | erlang | File : dsdso_parser.erl
Description :
-- Parsing rules ----------------------------------------------------------
Contract declaration
Function declarations
-- Type declarations ------------------------------------------------------
-- Let declarations -----------------------------------------------------... | Author :
Created : 1 Mar 2018 by
-module(dsdso_parser).
-export([string/1]).
-include("dsdso_parse_lib.hrl").
-spec string(string()) -> {ok, [dsdso_syntax:decl()]} | {error, {dsdso_parse_lib:pos(), atom(), term()}}.
string(String) ->
parse_and_scan(file(), String).
parse_and_scan(P, S) ->
cas... |
63d2ebc501fc6ac25fc81033629f4286534f9f83e7dac0b0b16af7054d677096 | fumieval/monad-skeleton | Internal.hs | # LANGUAGE PolyKinds #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE Trustworthy #
module Control.Monad.Skeleton.Internal (Cat(..), transCat, (|>), viewL, transKleisli) where
import Control.Arrow
import Unsafe.Coerce
-- | Type-aligned catenable queue
data Cat k a b whe... | null | https://raw.githubusercontent.com/fumieval/monad-skeleton/897938a5b52c4b2cfcc10236c9d2a2be2410854b/src/Control/Monad/Skeleton/Internal.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes #
| Type-aligned catenable queue
# INLINE transCat #
# INLINE (|>) #
| Match on the leftmost element. It gradually rotates the nodes so that following calls to 'viewL' is faster. | # LANGUAGE PolyKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE Trustworthy #
module Control.Monad.Skeleton.Internal (Cat(..), transCat, (|>), viewL, transKleisli) where
import Control.Arrow
import Unsafe.Coerce
data Cat k a b where
Leaf :: k a b -> Cat k a b
Tree :: Cat k a b -> Cat k b c -> Cat k a c
transC... |
e1ff3631d6b632522cbae1e87e3a9f5bb6c88768983da2acca4987499c6b5672 | effectai/neo-clojure-clr | util.clj | (ns neo-clj.util
(:import [System Convert Environment]))
(defn hex-str-to-byte-arr
"Utility function to convert a hex-decimal string to a byte array"
[hex]
(let [len (.Length hex)
ba (make-array Byte (/ len 2))]
(loop [i 0 arr ba]
(if (< i len)
(recur (+ i 2)
(do
... | null | https://raw.githubusercontent.com/effectai/neo-clojure-clr/a3a9b2352dae2b8b127fe9aa72ffd4e3bde35107/src/neo_clj/util.clj | clojure | (ns neo-clj.util
(:import [System Convert Environment]))
(defn hex-str-to-byte-arr
"Utility function to convert a hex-decimal string to a byte array"
[hex]
(let [len (.Length hex)
ba (make-array Byte (/ len 2))]
(loop [i 0 arr ba]
(if (< i len)
(recur (+ i 2)
(do
... | |
7553352c261e6233c78ee1225f4705377d0dd57973589f5529c52a07a32e9760 | startalkIM/ejabberd | node_buddy.erl | %%%----------------------------------------------------------------------
%%% File : node_buddy.erl
Author :
%%% Purpose :
Created : 1 Dec 2007 by
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2016 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
modify it under ... | null | https://raw.githubusercontent.com/startalkIM/ejabberd/718d86cd2f5681099fad14dab5f2541ddc612c8b/src/node_buddy.erl | erlang | ----------------------------------------------------------------------
File : node_buddy.erl
Purpose :
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; wit... | Author :
Created : 1 Dec 2007 by
ejabberd , Copyright ( C ) 2002 - 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
wit... |
efe01b525a723608bf68b64a93f2333cf7f4620d8fd9cde4e70750d6d16236b7 | ChicagoBoss/ChicagoBoss | boss_session_mock_sup.erl | %%-------------------------------------------------------------------
@author
ChicagoBoss Team and contributors , see file in root directory
%% @end
This file is part of ChicagoBoss project .
See file in root directory
%% for license information, see LICENSE file in root directory
%% @end
%... | null | https://raw.githubusercontent.com/ChicagoBoss/ChicagoBoss/113bac70c2f835c1e99c757170fd38abf09f5da2/src/boss/boss_session_mock_sup.erl | erlang | -------------------------------------------------------------------
@end
for license information, see LICENSE file in root directory
@end
@doc
------------------------------------------------------------------- | @author
ChicagoBoss Team and contributors , see file in root directory
This file is part of ChicagoBoss project .
See file in root directory
-module(boss_session_mock_sup).
-behaviour(supervisor).
-export([start_link/0, start_link/1]).
-export([init/1]).
start_link() ->
start_link([]).... |
7692b333efeb5d6a6bc0e68cbdf3309105c387be03e3081d60f7e055e2f45651 | GrammaticalFramework/gf-core | Multi.hs | module GF.Compile.Multi (readMulti) where
import Data.List
import Data.Char
AR 29 November 2010
-- quick way of writing a multilingual lexicon and (with some more work) a grammar
also several modules in one file
file suffix .gfm ( GF Multi )
-- This multi - line comment is a possible file in the format .
... | null | https://raw.githubusercontent.com/GrammaticalFramework/gf-core/9b4f2dd18b64b770aaebfa1885085e8e3447f119/src/compiler/GF/Compile/Multi.hs | haskell | quick way of writing a multilingual lexicon and (with some more work) a grammar
This multi - line comment is a possible file in the format .
comments are as in GF , one - liners
always start by declaring lang names as follows
baseline rules : semicolon - separated line - by - line entries update abs and , addi... | module GF.Compile.Multi (readMulti) where
import Data.List
import Data.Char
AR 29 November 2010
also several modules in one file
file suffix .gfm ( GF Multi )
> langs
cheers ; skål ; terveydeksi
cheers ; skål ; terveydeksi ,
> abs cat Drink ;
> abs fun drink : Drink - > S ;
> Eng , = "... |
ef3eb8546aeb8f9604422d251a4114a643385ff8787e23a18a51c145a9b08fe1 | dongcarl/guix | swh.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2019 , 2020 , 2021 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version... | null | https://raw.githubusercontent.com/dongcarl/guix/82543e9649da2da9a5285ede4ec4f718fd740fcb/tests/swh.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2019 , 2020 , 2021 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (test-swh)
#:use-module (guix swh)
#:use-module (guix tests http)
#:use-module ... |
fe330967fdf837de1d14d875034683f9908276dd792aba6ef7361a5d88f25e22 | karlhof26/gimp-scheme | elsamuko-difference-layers.scm | ; The GIMP -- an image manipulation program
Copyright ( C ) 1995 and
;
; This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 3 of the License , or
; (at your option) any later v... | null | https://raw.githubusercontent.com/karlhof26/gimp-scheme/bd8c74d19772675781f89b3e007d14092653b27a/elsamuko-difference-layers.scm | scheme | The GIMP -- an image manipulation program
This program is free software; you can redistribute it and/or modify
either version 3 of the License , or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of... | Copyright ( C ) 1995 and
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
Foundation , Inc. , 675 Mass Ave , Cambridge , , USA .
Copyright ( C ) 2009 elsamuko < >
Version 0.1 - Creates two difference layers as a bas... |
8b5dbcd5222b25c33f7c386e0cb5cba51fd4b0c87bbaa3d67276ee3b44c4b015 | alphagov/govuk-guix | start.scm | (define-module (gds scripts govuk system start)
#:use-module (ice-9 format)
#:use-module (srfi srfi-1)
#:use-module (gds scripts govuk system)
#:export (start))
(define (start opts)
(define (sudo-path)
(find
file-exists?
'("/run/setuid-programs/sudo"
"/usr/bin/sudo")))
(define* (run a... | null | https://raw.githubusercontent.com/alphagov/govuk-guix/dea8c26d2ae882d0278be5c745e23abb25d4a4e2/gds/scripts/govuk/system/start.scm | scheme | (define-module (gds scripts govuk system start)
#:use-module (ice-9 format)
#:use-module (srfi srfi-1)
#:use-module (gds scripts govuk system)
#:export (start))
(define (start opts)
(define (sudo-path)
(find
file-exists?
'("/run/setuid-programs/sudo"
"/usr/bin/sudo")))
(define* (run a... | |
6599e20d10ceb5ffab374d38da2b7f05b2c848fe4d4cb4a8395cdb894594c42c | juspay/atlas | RentalQuote.hs | # LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE QuasiQuotes #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -Wno - orphans #
|
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you m... | null | https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/atlas-transport/src/Storage/Tabular/Quote/RentalQuote.hs | haskell | FIXME quoteId should be QuoteTId, but I made it Text to avoid cyclic dependencies | # LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE QuasiQuotes #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -Wno - orphans #
|
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you m... |
6c5a6bb15030de962925faebf02a35dd777b3c77582e7b91043e7d3d2bcec9a5 | igrishaev/dynamodb | util.clj | (ns dynamodb.util
(:refer-clojure :exclude [update-vals
update-keys]))
(defn update-vals [m f]
(persistent!
(reduce-kv
(fn [acc! k v]
(assoc! acc! k (f v)))
(transient {})
m)))
(defn update-keys [m f]
(persistent!
(reduce-kv
(fn [acc! k v]
(assoc! ... | null | https://raw.githubusercontent.com/igrishaev/dynamodb/d67501d5cb147eb3f5d422633396337d5e7882ce/src/dynamodb/util.clj | clojure | (ns dynamodb.util
(:refer-clojure :exclude [update-vals
update-keys]))
(defn update-vals [m f]
(persistent!
(reduce-kv
(fn [acc! k v]
(assoc! acc! k (f v)))
(transient {})
m)))
(defn update-keys [m f]
(persistent!
(reduce-kv
(fn [acc! k v]
(assoc! ... | |
1042dd702debc042a6c3b1a1f53df40a55f801a2e48a0558873a163493caddda | rodrigosetti/stamps | info.rkt | #lang info
(define collection "stamps")
(define deps '("base"
"data-lib"
"draw-lib"
"math-lib"
"rackunit-lib"
"typed-racket-lib"
"typed-racket-more"))
(define build-deps '("rackunit-lib"
"rackunit-typed"
... | null | https://raw.githubusercontent.com/rodrigosetti/stamps/958938dd71fdaa64041ea13f1b491bda628bda9c/info.rkt | racket | #lang info
(define collection "stamps")
(define deps '("base"
"data-lib"
"draw-lib"
"math-lib"
"rackunit-lib"
"typed-racket-lib"
"typed-racket-more"))
(define build-deps '("rackunit-lib"
"rackunit-typed"
... | |
10600e2d36d03c3c5cd3aa54856a1a36e2f9b22dea8a6046f1b7f09b51a2e265 | lamdu/hypertypes | Syntax.hs | -- | Common programming language syntax ingredients
module Hyper.Syntax
( module X
) where
import Hyper.Syntax.App as X
import Hyper.Syntax.FuncType as X
import Hyper.Syntax.Lam as X
import Hyper.Syntax.Let as X
import Hyper.Syntax.TypeSig as X
import Hyper.Syntax.TypedLam as X
import Hyper.Syntax.Var as X
| null | https://raw.githubusercontent.com/lamdu/hypertypes/161142e0d9f503194b85fb6f5b2a5907a1ae3783/src/Hyper/Syntax.hs | haskell | | Common programming language syntax ingredients | module Hyper.Syntax
( module X
) where
import Hyper.Syntax.App as X
import Hyper.Syntax.FuncType as X
import Hyper.Syntax.Lam as X
import Hyper.Syntax.Let as X
import Hyper.Syntax.TypeSig as X
import Hyper.Syntax.TypedLam as X
import Hyper.Syntax.Var as X
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.