_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 |
|---|---|---|---|---|---|---|---|---|
69f16566ed5615abd43c9db1534ab85514bc742c71502df40e3f8355b8e93372 | khibino/haskell-relational-record | Oracle.hs | module Database.HDBC.Schema.Oracle
# DEPRECATED " import Database . Schema . " #
module Database.Schema.HDBC.Oracle
) where
import Database.Schema.HDBC.Oracle
| null | https://raw.githubusercontent.com/khibino/haskell-relational-record/759b3d7cea207e64d2bd1cf195125182f73d2a52/relational-query-HDBC/src/Database/HDBC/Schema/Oracle.hs | haskell | module Database.HDBC.Schema.Oracle
# DEPRECATED " import Database . Schema . " #
module Database.Schema.HDBC.Oracle
) where
import Database.Schema.HDBC.Oracle
| |
968f12898b46d461cf92e35289b0f16509a0c281830179c75798b530aa97a5e2 | larcenists/larceny | srfi-101-test.sps | #!r6rs
SRFI 101 : Purely Functional Random - Access Pairs and Lists
Copyright ( c ) 2009 . All Rights Reserved .
;; 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 rest... | null | https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/lib/SRFI/test/srfi-101-test.sps | scheme | Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation
including without limitation the rights to use, copy, modify, merge,
subject to the following conditions:
The above copyright notice and this permission notice shall be
EXPRESS OR IMPLIED, IN... | #!r6rs
SRFI 101 : Purely Functional Random - Access Pairs and Lists
Copyright ( c ) 2009 . All Rights Reserved .
files ( the " Software " ) , to deal in the Software without restriction ,
publish , distribute , sublicense , and/or sell copies of the Software ,
and to permit persons to whom the Software... |
8b6411271bccf7c337b219fa5e4ffe8141cdd47b74d4422451507dab6b5b7a8f | jasonstolaruk/CurryMUD | Digester.hs | {-# LANGUAGE OverloadedStrings #-}
module Mud.Threads.Digester ( runDigesterAsync
, startNpcDigesters
, stopNpcDigesters
, throwWaitDigester ) where
import Mud.Data.Misc
import Mud.Data.State.MudData
import ... | null | https://raw.githubusercontent.com/jasonstolaruk/CurryMUD/f9775fb3ede08610f33f27bb1fb5fc0565e98266/lib/Mud/Threads/Digester.hs | haskell | # LANGUAGE OverloadedStrings #
==================================================
--- |
module Mud.Threads.Digester ( runDigesterAsync
, startNpcDigesters
, stopNpcDigesters
, throwWaitDigester ) where
import Mud.Data.Misc
import Mud.Data.State.MudData
import Mud.Data.State.Util.Calc
import ... |
040467f7bfeca8c3fc663af1a6791d0761b6df888bf8e67d9743b84c2e3fd733 | aowens-21/puzzler | renderer.rkt | #lang racket/base
(require racket/class)
(define puzzler-renderer%
(class object%
(field [window-size 800] ; The actual size of the window on the GUI
[margin 25] ; The space between grid squares
[grid-size void] ; The number of rows/cols in the grid
[block-size void] ; The size ... | null | https://raw.githubusercontent.com/aowens-21/puzzler/be84df0049795acddf4eee0cc0225f0659df0445/expander-helpers/renderer.rkt | racket | The actual size of the window on the GUI
The space between grid squares
The number of rows/cols in the grid
The size in pixels of each block (square) in the grid
The positions in pixels to draw the squares for the grid outline
Called by the expander macros to set up the different fields for the renderer
Draws th... | #lang racket/base
(require racket/class)
(define puzzler-renderer%
(class object%
(define/public (set-grid-size! new-grid-size)
(set-field! grid-size this new-grid-size))
(define/public (set-block-size! new-block-size)
(set-field! block-size this new-block-size))
(define/public (set-block-po... |
1e1de04ba35bcca964cad4902258799f33088e77491ffabf83f58062c3122fd8 | coingaming/lnd-client | Log.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
module LndClient.Log
( SecretRpc,
katipAddLndSecret,
katipAddLndPublic,
katipAddLndLoc,
rpcRunning,
rpcFailed,
rpcSucceeded,
newSeverity,
newSev,
)
where
import qu... | null | https://raw.githubusercontent.com/coingaming/lnd-client/4c9d8db4dab60513bac0ceba9e5ea98d53d7b81c/src/LndClient/Log.hs | haskell |
Sub
| # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
module LndClient.Log
( SecretRpc,
katipAddLndSecret,
katipAddLndPublic,
katipAddLndLoc,
rpcRunning,
rpcFailed,
rpcSucceeded,
newSeverity,
newSev,
)
where
import qu... |
2e2de121daa5ebbd0a7d7631e2990c394bbb987891bca47e7b1c4d981eb9fb57 | CloudI/CloudI | proper_sa.erl | -*- coding : utf-8 -*-
-*- erlang - indent - level : 2 -*-
%%% -------------------------------------------------------------------
Copyright ( c ) 2017 , < >
and < >
%%%
This file is part of PropEr .
%%%
%%% PropEr is free software: you can redistribute it and/or modify
it under the t... | null | https://raw.githubusercontent.com/CloudI/CloudI/3e45031c7ee3e974ead2612ea7dd06c9edf973c9/src/external/proper/src/proper_sa.erl | erlang | -------------------------------------------------------------------
PropEr is free software: you can redistribute it and/or modify
(at your option) any later version.
PropEr is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITN... | -*- coding : utf-8 -*-
-*- erlang - indent - level : 2 -*-
Copyright ( c ) 2017 , < >
and < >
This file is part of PropEr .
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have rece... |
df82a6921cc88a451142cbfd07027671d0c88df1f42b599dd9fcff036179e495 | tcsprojects/mlsolver | ctlmodelcheckinggame.mli | val register: unit -> unit | null | https://raw.githubusercontent.com/tcsprojects/mlsolver/fdd1d7550aa57a42886160ae1e8336c1111b7d94/src/automata/ctl/ctlmodelcheckinggame.mli | ocaml | val register: unit -> unit | |
fd32380957bef2d7724fe863f7b521b1c065f40498fd7df7291b8f91b14b229e | xh4/web-toolkit | xchacha.lisp | ;;;; -*- mode: lisp; indent-tabs-mode: nil -*-
xchacha.lisp -- implementation of the XChacha stream cipher
(in-package :crypto)
(defclass xchacha (chacha)
())
(defclass xchacha/12 (xchacha)
()
(:default-initargs :core-function #'chacha/12-core))
(defclass xchacha/8 (xchacha)
()
(:default-initargs :core-... | null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/vendor/ironclad-v0.47/src/ciphers/xchacha.lisp | lisp | -*- mode: lisp; indent-tabs-mode: nil -*- | xchacha.lisp -- implementation of the XChacha stream cipher
(in-package :crypto)
(defclass xchacha (chacha)
())
(defclass xchacha/12 (xchacha)
()
(:default-initargs :core-function #'chacha/12-core))
(defclass xchacha/8 (xchacha)
()
(:default-initargs :core-function #'chacha/8-core))
(defmethod shared-i... |
41b5470e088924de36b5027b78e9c0793fea72c6402e9854e8f98d0ada0bb5c5 | well-typed/large-records | R040.hs | #if PROFILE_CORESIZE
{-# OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #-}
#endif
#if PROFILE_TIMING
{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-}
#endif
module Experiment.Generics_SOP.Sized.R040 where
import Data.Aeson (Value)
import Bench.HList
import Experiment.Generics_SOP
import Common... | null | https://raw.githubusercontent.com/well-typed/large-records/551f265845fbe56346988a6b484dca40ef380609/large-records-benchmarks/bench/experiments/Experiment/Generics_SOP/Sized/R040.hs | haskell | # OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #
# OPTIONS_GHC -ddump-to-file -ddump-timings # | #if PROFILE_CORESIZE
#endif
#if PROFILE_TIMING
#endif
module Experiment.Generics_SOP.Sized.R040 where
import Data.Aeson (Value)
import Bench.HList
import Experiment.Generics_SOP
import Common.HListOfSize.HL040
hlistToJSON :: HList ExampleFields -> Value
hlistToJSON = gtoJSON |
32861d90f2c95b4d9b157af4ed0c876c03314a872f160cc6cad72a89323f6495 | digital-asset/daml-finance | DataDependencies.hs | Copyright ( c ) 2023 Digital Asset ( Switzerland ) GmbH and/or its affiliates . All rights reserved .
SPDX - License - Identifier : Apache-2.0
module Options.DataDependencies (
DataDependenciesCommand(..)
) where
-- | Commands for data-dependencies.
data DataDependenciesCommand
= Update
| Validate
... | null | https://raw.githubusercontent.com/digital-asset/daml-finance/30b0690c7b7d21d655e38f774ea3ae78be539e12/tools/packell/src/main/haskell/Options/DataDependencies.hs | haskell | | Commands for data-dependencies. | Copyright ( c ) 2023 Digital Asset ( Switzerland ) GmbH and/or its affiliates . All rights reserved .
SPDX - License - Identifier : Apache-2.0
module Options.DataDependencies (
DataDependenciesCommand(..)
) where
data DataDependenciesCommand
= Update
| Validate
| DryRun
deriving (Show)
|
871d56fd9449f278d1bd68654d33454bdb568a0a9d6321f82efe4b8d5ae5edd3 | cbd/edis | edis_vclock.erl | %% -------------------------------------------------------------------
%%
%% riak_core: Core Riak Application
%%
Copyright ( c ) 2007 - 2010 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... | null | https://raw.githubusercontent.com/cbd/edis/aad89352f25a7f3737242ddc9bc913def75a517a/src/edis_vclock.erl | erlang | -------------------------------------------------------------------
riak_core: Core Riak Application
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
sp... | Copyright ( c ) 2007 - 2010 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
... |
9c128e55d25554835d837267c741a70be1339939eafe9d1643c275806dafd972 | moderninterpreters/markup | stream.lisp | (uiop:define-package #:markup/stream
(:use :cl)
(:export #:wrap-stream))
(in-package #:markup/stream)
(defclass markup-stream (trivial-gray-streams:fundamental-character-stream)
((delegate
:initarg :delegate
:reader stream-delegate)
(unread-char
:initform nil
:accessor %unread-char)
(hist... | null | https://raw.githubusercontent.com/moderninterpreters/markup/b32095cc33411e462079fbed80d44e86d89fee8d/stream.lisp | lisp | get-output-stream-string clears up the stream so let's write it
back | (uiop:define-package #:markup/stream
(:use :cl)
(:export #:wrap-stream))
(in-package #:markup/stream)
(defclass markup-stream (trivial-gray-streams:fundamental-character-stream)
((delegate
:initarg :delegate
:reader stream-delegate)
(unread-char
:initform nil
:accessor %unread-char)
(hist... |
dbc2fef39eb4da63560395312f668a6d3c71ff20620c7f7dab809f060aa342b3 | MLanguage/mlang | bir_number.mli | Copyright ( C ) 2019 - 2021 Inria , contributor :
< >
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
... | null | https://raw.githubusercontent.com/MLanguage/mlang/e6df03f8945380d3fc974f351509dcaabb61805f/src/mlang/backend_ir/bir_number.mli | ocaml | Copyright ( C ) 2019 - 2021 Inria , contributor :
< >
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
... | |
b7b7fc6bca98448fe84f0305f85ebabf0af82834ac6141c90a136ead79c56e38 | eudoxia0/asdf-linguist | js.lisp | (in-package :asdf-linguist)
;;; CoffeeScript
(define-component coffee
:input-type "coffee"
:output-type "js"
:compile-function (lambda (input-pathname output-pathname)
(declare (ignore output-pathname))
(inferior-shell:run `("coffee" "-c" ,input-pathname)
... | null | https://raw.githubusercontent.com/eudoxia0/asdf-linguist/f15de19287a5c2ca0e453b105be0c6f143339441/src/www/js.lisp | lisp | CoffeeScript | (in-package :asdf-linguist)
(define-component coffee
:input-type "coffee"
:output-type "js"
:compile-function (lambda (input-pathname output-pathname)
(declare (ignore output-pathname))
(inferior-shell:run `("coffee" "-c" ,input-pathname)
... |
3d6203984f35c900499ec044d6afec649db8321f4dde2eb9d0bdebf40ee8b528 | ucsd-progsys/nate | OCamlr.mli | (****************************************************************************)
(* *)
(* Objective Caml *)
(* *)
(* ... | null | https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/camlp4/Camlp4/Printers/OCamlr.mli | ocaml | **************************************************************************
Objective Caml
... | Copyright 2006 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed under
the terms of the GNU Library General Public License , with the special
Authors :
* - : initial version
* - Nicolas Pouillard: initial version
... |
8561e8d8466f421fb143274af504aed7b2e3145f5e99d7f030d44e781a574fb0 | benoitc/inet_cidr | inet_cidr.erl | %%% -*- erlang -*-
This file is part of nat - pmp released under the MIT license .
%%% See the NOTICE for more information.
%%%
Copyright ( c ) 2016 - 2017
-module(inet_cidr).
-export([parse/1, parse/2]).
-export([address_count/2]).
-export([contains/2]).
-export([usort_cidrs/1]).
-export([merge_cidrs/1]).
-exp... | null | https://raw.githubusercontent.com/benoitc/inet_cidr/c4522208c836a32fe32ff88a1bd13d401fc3cd39/src/inet_cidr.erl | erlang | -*- erlang -*-
See the NOTICE for more information.
@doc parses S as a CIDR notation IP address and mask
@doc parses S as a CIDR notation IP address and mask.
If Adjust = `true', allow the IP to contain values beyond the mask and
silently ignore them. Otherwise, enforce that the IP address is fully inside
the s... | This file is part of nat - pmp released under the MIT license .
Copyright ( c ) 2016 - 2017
-module(inet_cidr).
-export([parse/1, parse/2]).
-export([address_count/2]).
-export([contains/2]).
-export([usort_cidrs/1]).
-export([merge_cidrs/1]).
-export([to_string/1]).
-export([to_binary/1]).
-export([is_ipv4/1])... |
aac127aa7b78e18764da541d74fb894144b2b696c75f7ec14eeaef5c2242ab95 | frp-arduino/frp-arduino | Library.hs | Copyright ( c ) 2014 Contributors as noted in the file
--
-- This file is part of frp-arduino.
--
-- frp-arduino 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 ... | null | https://raw.githubusercontent.com/frp-arduino/frp-arduino/7489ada012efc404086043ee55a9933029647121/src/Arduino/Library.hs | haskell |
This file is part of frp-arduino.
frp-arduino is free software: you can redistribute it and/or modify
(at your option) any later version.
frp-arduino is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR... | Copyright ( c ) 2014 Contributors as noted in the file
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
module Arduino.Library
(
module Arduino.Li... |
f822b3b6ff46bd99790a69c4054bb4475e48d4d54ab180cdc0d425f7b3bf36f0 | processone/ejabberd | mod_http_api_opt.erl | %% Generated automatically
%% DO NOT EDIT: run `make options` instead
-module(mod_http_api_opt).
-export([admin_ip_access/1]).
-spec admin_ip_access(gen_mod:opts() | global | binary()) -> 'none' | acl:acl().
admin_ip_access(Opts) when is_map(Opts) ->
gen_mod:get_opt(admin_ip_access, Opts);
admin_ip_access(Host) ... | null | https://raw.githubusercontent.com/processone/ejabberd/b860a25c82515ba51b044e13ea4e040e3b9bbc41/src/mod_http_api_opt.erl | erlang | Generated automatically
DO NOT EDIT: run `make options` instead |
-module(mod_http_api_opt).
-export([admin_ip_access/1]).
-spec admin_ip_access(gen_mod:opts() | global | binary()) -> 'none' | acl:acl().
admin_ip_access(Opts) when is_map(Opts) ->
gen_mod:get_opt(admin_ip_access, Opts);
admin_ip_access(Host) ->
gen_mod:get_module_opt(Host, mod_http_api, admin_ip_access).
|
5861ea956076059beaddf34ea2b56829c7dc9979d09a1b1c0a732ce8d0e4a286 | heyoka/faxe | dfs_to_graph.erl | %%%-------------------------------------------------------------------
@author
( C ) 2020 , < COMPANY >
%%% @doc
%%%
%%% @end
Created : 01 . Sep 2020 09:52
%%%-------------------------------------------------------------------
-module(dfs_to_graph).
-author("heyoka").
-include_lib("eunit/include/eunit.hrl").
... | null | https://raw.githubusercontent.com/heyoka/faxe/76e1f223619fa75314982653c3b0d46c3b1e2d85/apps/faxe/test/dfs_to_graph.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
batch_test() ->
Expected = #{edges =>
[{<<"value_emitter1">>,1,<<"batch2">>,1,[]},
{<<"batch2">>,1,<<"debug3">>,1,[]}],
nodes =>
[{<<"debug3">>,esp_debug... | @author
( C ) 2020 , < COMPANY >
Created : 01 . Sep 2020 09:52
-module(dfs_to_graph).
-author("heyoka").
-include_lib("eunit/include/eunit.hrl").
compile_helper(DfsScriptFile) ->
{_, GraphMap} = faxe_dfs:file(DfsScriptFile, []),
GraphMap.
unknown_opt_test() ->
application:set_env(faxe, dfs, [{script_pa... |
cd4150d55fc88802f4df9ae94b0441f639d563ea89ffe17e03911abad1a341e8 | jdreaver/eventful | cafe-main.hs | module Main where
import Cafe
main :: IO ()
main = cliMain
| null | https://raw.githubusercontent.com/jdreaver/eventful/3f0c604e5bb2dcf5bacf0a2e01edf6a5e9c5e22e/examples/cafe/app/cafe-main.hs | haskell | module Main where
import Cafe
main :: IO ()
main = cliMain
| |
f894ecb88232452f0d2d3cc708cdb8eeb20de277237032df86c2bc5bba32ea50 | konn/sake | Hamlet.hs | {-# LANGUAGE TypeSynonymInstances #-}
# OPTIONS_GHC -Wno - orphans #
-- | Provides @'Templatable'@ instance and utility functions for @'HamletTemplate'@,
which is mainly used by Pandoc .
module Web.Sake.Template.Hamlet
( applyAsHamlet, loadAndApplyHamlet, HamletTemplate,
module Web.Sake.Template
... | null | https://raw.githubusercontent.com/konn/sake/749eea7de99c8d5041c9f795d594d7d293c92b59/src/Web/Sake/Template/Hamlet.hs | haskell | # LANGUAGE TypeSynonymInstances #
| Provides @'Templatable'@ instance and utility functions for @'HamletTemplate'@,
| Accepts any JSON value but @'Object'@ type. | # OPTIONS_GHC -Wno - orphans #
which is mainly used by Pandoc .
module Web.Sake.Template.Hamlet
( applyAsHamlet, loadAndApplyHamlet, HamletTemplate,
module Web.Sake.Template
) where
import Web.Sake.Class
import Web.Sake.Item
import Web.Sake.Template
import Control.Arrow ... |
7ebad88491cc172914b792cc893828d8c00ce9056d395f175a5b5abca1cec5c4 | dizengrong/erlang_game | mysql.erl | %%%-------------------------------------------------------------------
%%% File : mysql.erl
Author : < >
. : MySQL client .
%%%
Created : 4 Aug 2005 by < >
%%%
Copyright ( c ) 2001 - 2004 Kungliga Tekniska
%%% See the file COPYING
%%%
%%% Usage:
%%%
%%%
Call one of the start - functions before a... | null | https://raw.githubusercontent.com/dizengrong/erlang_game/4598f97daa9ca5eecff292ac401dd8f903eea867/gerl/lib/amnesia/src/drivers/mysql/mysql.erl | erlang | -------------------------------------------------------------------
File : mysql.erl
See the file COPYING
Usage:
start_link(Id, Host, User, Password, Database)
start_link(Id, Host, Port, User, Password, Database)
Id is a connection group identifier. If you want to have more
than one connection to a... | Author : < >
. : MySQL client .
Created : 4 Aug 2005 by < >
Copyright ( c ) 2001 - 2004 Kungliga Tekniska
Call one of the start - functions before any call to fetch/2
start_link(Id , Host , User , Password , Database , )
start_link(Id , Host , Port , User , Password , Database , )
con... |
54a326f783278dcca4462e5f6cab77067659511d206a978c615f4ac0d8605ac6 | frasertweedale/hs-jose | JWS.hs | Copyright ( C ) 2013 Fraser Tweedale
--
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
d... | null | https://raw.githubusercontent.com/frasertweedale/hs-jose/ea33a544bb8af526aae28a0e866f49e20cf7b06b/src/Crypto/JOSE/JWA/JWS.hs | haskell |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing per... | Copyright ( C ) 2013 Fraser Tweedale
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
# LANGUAGE TemplateHaskell #
|
JSON Web Signature algorithms .
JSON Web Signature algorithms.
-}
module Crypto.JOSE.JWA.JWS
... |
0f78193292617979cd11fedb45cd1220524ae78bdcc001a94cb419614135f956 | kitnil/dotfiles | backup.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2021 , 2022 < >
;;;
;;; 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 3 of t... | null | https://raw.githubusercontent.com/kitnil/dotfiles/55000d4f42db1e81be47ef31c72d746763670370/dotfiles/guixsd/modules/services/backup.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 © 2021 , 2022 < >
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 (services backup)
#:use-module (gnu packages base)
#:use-module (gnu packages backup)
... |
7b6252ad5f81a7dec67dda36fcfd264c22de4314a625de426c57611738759eeb | alanz/ghc-exactprint | PragmaSpans.hs | {-# LANGUAGE GADTs #-}
module PragmaSpans where
-- The following pragma gets the wrong previous span.
-- See /-/issues/20720
# LANGUAGE TypeFamilies #
| null | https://raw.githubusercontent.com/alanz/ghc-exactprint/309efa8689e1ce2407523ba2ebe058b97757ba8b/tests/examples/ghc92/PragmaSpans.hs | haskell | # LANGUAGE GADTs #
The following pragma gets the wrong previous span.
See /-/issues/20720 | module PragmaSpans where
# LANGUAGE TypeFamilies #
|
2dc45a14e855c359148247f4be7f7a2d3aa110825901ed8a53fa184c4046bf41 | spurious/sagittarius-scheme-mirror | jmespath.scm | -*- mode : scheme ; coding : utf-8 ; -*-
;;;
;;; text/json/jmespath.scm - JMESPath evaluator
;;;
Copyright ( c ) 2018 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; 1. Redistr... | null | https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/sitelib/text/json/jmespath.scm | scheme | coding : utf-8 ; -*-
text/json/jmespath.scm - JMESPath evaluator
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of c... | Copyright ( c ) 2018 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
(library (text json jmespath)
(export jmespath
... |
3889fcd38fd6b98ba4147b0880ca9b8fb27321d638d6459b80d13d80b85b3a07 | xh4/web-toolkit | test-condition.lisp | -*- Mode : LISP ; Base : 10 ; Syntax : ANSI - Common - lisp ; Package : USOCKET - TEST -*-
;;;; See LICENSE for licensing information.
(in-package :usocket-test)
(deftest ns-host-not-found-error.1
(with-caught-conditions (usocket:ns-host-not-found-error nil)
(usocket:socket-connect "xxx" 123)
t)
nil)
(... | null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/vendor/usocket-0.8.3/test/test-condition.lisp | lisp | Base : 10 ; Syntax : ANSI - Common - lisp ; Package : USOCKET - TEST -*-
See LICENSE for licensing information. |
(in-package :usocket-test)
(deftest ns-host-not-found-error.1
(with-caught-conditions (usocket:ns-host-not-found-error nil)
(usocket:socket-connect "xxx" 123)
t)
nil)
(deftest timeout-error.1
(with-caught-conditions (usocket:timeout-error nil)
(usocket:socket-connect "common-lisp.net" 81 :timeout 0... |
643b35b7458c88f1ed4f889dc0789721e150fd77070f3dd17d8079e580eae513 | mfoemmel/erlang-otp | snmpm_user.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2004 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pu... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/snmp/src/manager/snmpm_user.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limit... | Copyright Ericsson AB 2004 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(snmpm_user).
-export([behaviour_i... |
f05be8ba89ccd357269c2a5e81390db2c9110228ed3df920941e95e01cc59a94 | ocaml-multicore/multicoretests | lin_tests_domain.ml | open Lin_tests_common
(** This is a driver of the negative tests over the Domain module *)
;;
QCheck_base_runner.run_tests_main
(let count = 15000 in
[RT_int_domain.neg_lin_test ~count ~name:"Lin ref int test with Domain";
RT_int64_domain.neg_lin_test ~count ~name:"Lin ref int64 test with Domain";
CL... | null | https://raw.githubusercontent.com/ocaml-multicore/multicoretests/3e0f2ceb72eaf334e97252140ae5d40bf6461b96/src/neg_tests/lin_tests_domain.ml | ocaml | * This is a driver of the negative tests over the Domain module | open Lin_tests_common
;;
QCheck_base_runner.run_tests_main
(let count = 15000 in
[RT_int_domain.neg_lin_test ~count ~name:"Lin ref int test with Domain";
RT_int64_domain.neg_lin_test ~count ~name:"Lin ref int64 test with Domain";
CLT_int_domain.neg_lin_test ~count ~name:"Lin CList int test with Dom... |
1dd41eba306fc64a1dd5ba371d47c22bc6a9d035c30e007517beb2f50fa50532 | cedlemo/OCaml-GI-ctypes-bindings-generator | Statusbar_accessible_private.ml | open Ctypes
open Foreign
type t
let t_typ : t structure typ = structure "Statusbar_accessible_private"
| null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Statusbar_accessible_private.ml | ocaml | open Ctypes
open Foreign
type t
let t_typ : t structure typ = structure "Statusbar_accessible_private"
| |
7954965ca00beabbea3058d13373e8653ed97fd82676719dfe99a777e5f9e7f7 | marick/Midje | t_lazy_evaluation_cases.clj | (ns behaviors.t-lazy-evaluation-cases
(:require [midje.sweet :refer :all]
[midje.util
[laziness :refer :all]
[thread-safe-var-nesting :refer :all]]
[midje.test-util :refer :all]))
(unfinished triple)
(defn triple-sequence [n]
(map triple (range n)))
(fact "triple... | null | https://raw.githubusercontent.com/marick/Midje/2b9bcb117442d3bd2d16446b47540888d683c717/test/behaviors/t_lazy_evaluation_cases.clj | clojure | These cases explore lazy sequences with side effects
Exceptions generated by realizing lazy sequence. | (ns behaviors.t-lazy-evaluation-cases
(:require [midje.sweet :refer :all]
[midje.util
[laziness :refer :all]
[thread-safe-var-nesting :refer :all]]
[midje.test-util :refer :all]))
(unfinished triple)
(defn triple-sequence [n]
(map triple (range n)))
(fact "triple... |
7f751b65f520eccbfa1d7d2b9f42a1ac0e68c3bcb32aa0baf44ecd7533e64968 | ghc/testsuite | T4170.hs | # LANGUAGE TemplateHaskell #
module T4170 where
import Language.Haskell.TH
class LOL a
lol :: Q [Dec]
lol = [d|
instance LOL Int
|]
instance LOL Int
| null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/th/T4170.hs | haskell | # LANGUAGE TemplateHaskell #
module T4170 where
import Language.Haskell.TH
class LOL a
lol :: Q [Dec]
lol = [d|
instance LOL Int
|]
instance LOL Int
| |
a56ee78664ea1c900ec65e4dab5c5b8cb4ce5a0d280e8da05703c6ab91a28ebf | shayan-najd/NativeMetaprogramming | TcNullaryTCFail.hs | # LANGUAGE MultiParamTypeClasses #
module TcNullaryTCFail where
class A
instance A
instance A
| null | https://raw.githubusercontent.com/shayan-najd/NativeMetaprogramming/24e5f85990642d3f0b0044be4327b8f52fce2ba3/testsuite/tests/typecheck/should_fail/TcNullaryTCFail.hs | haskell | # LANGUAGE MultiParamTypeClasses #
module TcNullaryTCFail where
class A
instance A
instance A
| |
5bf4bec5ab30b46d493a66c69b2bb47d4f4fb011abf9c520e5e890f0d0783795 | sbcl/sbcl | fixup.lisp | fixups , extracted from codegen.lisp by WHN 19990227 in order
;;;; to help with cross-compiling bootstrapping
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 rele... | null | https://raw.githubusercontent.com/sbcl/sbcl/9bb057ba50597c9983f8154035cf95c4a5e41d7f/src/compiler/fixup.lisp | lisp | to help with cross-compiling bootstrapping
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.
a fixup of some kind
the name and flavor of the fixup. The assembler makes no
assumptions about t... | fixups , extracted from codegen.lisp by WHN 19990227 in order
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-C")
(defstruct (fixup
(:construc... |
b37a47180a2b4c2f181e06b00cf6bb33f7a513b9ff5487afb4d9ce7ce672b48e | clckwrks/clckwrks | Server.hs | # LANGUAGE FlexibleContexts , OverloadedStrings , RankNTypes , RecordWildCards #
module Clckwrks.Server where
import Clckwrks
import Clckwrks.Admin.Route (routeAdmin)
import Clckwrks.Monad (ClckwrksConfig(..), TLSSettings(..), calcBaseURI, calcTLSBaseURI, initialClckPluginsSt)
import . Page . ... | null | https://raw.githubusercontent.com/clckwrks/clckwrks/22a08e5b835ba5b3b14e236d06a2698d85e9f7f1/Clckwrks/Server.hs | haskell | , currentPage = PageId 0
FIXME: get redirect location from database
if https:// is available, then force it to be used.
we figure out which plugin to call by looking at the
before we can figure out what the path segment is, we
need to rewrite the URL.
FIXME: Somewhat a... | # LANGUAGE FlexibleContexts , OverloadedStrings , RankNTypes , RecordWildCards #
module Clckwrks.Server where
import Clckwrks
import Clckwrks.Admin.Route (routeAdmin)
import Clckwrks.Monad (ClckwrksConfig(..), TLSSettings(..), calcBaseURI, calcTLSBaseURI, initialClckPluginsSt)
import . Page . ... |
c7071c2f205477e757e04c18fa67360b794ecc99f13b30eb84bfaf02c66acfd8 | exercism/scheme | test.scm | (load "test-util.ss")
(define test-cases
`((test-success "can not attack" eq? attacking?
'((2 4) (6 6)) #f)
(test-success "can attack on same row" eq? attacking?
'((2 4) (2 6)) #t)
(test-success "can attack on same column" eq? attacking?
'((4 5) (2 5)) #t)
(test-success "can attack... | null | https://raw.githubusercontent.com/exercism/scheme/2064dd5e5d5a03a06417d28c33c5349bec97dad7/exercises/practice/queen-attack/test.scm | scheme | (load "test-util.ss")
(define test-cases
`((test-success "can not attack" eq? attacking?
'((2 4) (6 6)) #f)
(test-success "can attack on same row" eq? attacking?
'((2 4) (2 6)) #t)
(test-success "can attack on same column" eq? attacking?
'((4 5) (2 5)) #t)
(test-success "can attack... | |
63d62398bb37516618914e657dcae4dc9381f54a7ce2fb119174f37ff995bc48 | stuarthalloway/programming-clojure | trampoline.clj | (ns examples.test.trampoline
(:use clojure.test examples.trampoline))
(def ten-fibs [0 1 1 2 3 5 8 13 21 34])
(deftest test-tail-fibo
(is (= ten-fibs
(map (partial trampoline trampoline-fibo) (range 0 10)))))
(deftest test-my-odd
(is (= [false true false true false]
(map (partial trampoline my-odd?) (rang... | null | https://raw.githubusercontent.com/stuarthalloway/programming-clojure/192e2f28d797fd70e50778aabd031b3ff55bd2b9/test/examples/test/trampoline.clj | clojure | (ns examples.test.trampoline
(:use clojure.test examples.trampoline))
(def ten-fibs [0 1 1 2 3 5 8 13 21 34])
(deftest test-tail-fibo
(is (= ten-fibs
(map (partial trampoline trampoline-fibo) (range 0 10)))))
(deftest test-my-odd
(is (= [false true false true false]
(map (partial trampoline my-odd?) (rang... | |
6f5e06e06127735e3d6f1069d8415ea269dedd1224cfcce4b143fe540f7e84b0 | hdbc/convertible | Text.hs | # LANGUAGE CPP #
|
Module : Data . Convertible . Instances . Text
Copyright : Copyright ( C ) 2011 MailRank , Inc.
License : LGPL
Maintainer : < >
Stability : provisional
Portability : portable
Text instances for Convertible .
Copyright ( C ) 2011 MailRank , Inc. ... | null | https://raw.githubusercontent.com/hdbc/convertible/c3829311b810f12f1fffe9d97085e405ab5598f1/Data/Convertible/Instances/Text.hs | haskell | # LANGUAGE CPP #
|
Module : Data . Convertible . Instances . Text
Copyright : Copyright ( C ) 2011 MailRank , Inc.
License : LGPL
Maintainer : < >
Stability : provisional
Portability : portable
Text instances for Convertible .
Copyright ( C ) 2011 MailRank , Inc. ... | |
c280a8a8af6449c8ed1fb486bc25a7c4d2e491b0d45dc6af39c41f5cbbf27750 | nomeata/haskell-candid | Candid.hs | |
This module provides Haskell support for decoding and encoding the _ _ Candid _ _ data format . See < > for the official Candid specification .
This module provides Haskell support for decoding and encoding the __Candid__ data format. See <> for the official Candid specification.
-}
# LANGUAGE CPP #
module... | null | https://raw.githubusercontent.com/nomeata/haskell-candid/87a4f01eb9cb93c827a0a7f5f29af0ee19135308/src/Codec/Candid.hs | haskell | * Tutorial
$haskell_types
** Custom types
** Generic types
$generic
** Candid services
$services
** Importing Candid
$import
$import2
$import3
** Dynamic use
$dynamic
** Missing features
* Reference
** Encoding and decoding
** Type classes
** Special types
** Generics
** Candid services
** Meta-pro... | |
This module provides Haskell support for decoding and encoding the _ _ Candid _ _ data format . See < > for the official Candid specification .
This module provides Haskell support for decoding and encoding the __Candid__ data format. See <> for the official Candid specification.
-}
# LANGUAGE CPP #
module... |
c89746410ca05133c71024574465e73fb250d0a549dc3807a4fa5b91eb25285f | argp/bap | batDeque.mli |
* Deque -- functional double - ended queues
* Copyright ( C ) 2011 Batteries Included Development Team
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation ; either
* ... | null | https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/batteries/src/batDeque.mli | ocaml | * Functional double-ended queues
* The type of double-ended queues
* A synonym for convenience
* {6 Construction}
* The empty deque.
* {6 Deconstruction}
* [front dq] returns [Some (x, dq')] iff [x] is at the front of
[dq] and [dq'] is the rest of [dq] excluding [x], and [None] if
[dq] has no elements. O(... |
* Deque -- functional double - ended queues
* Copyright ( C ) 2011 Batteries Included Development Team
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation ; either
* ... |
a85e2ad354d3de6d5e102356ba989a887ed6120ea8091cf84129672b5a900da8 | freizl/dive-into-haskell | Model.hs | # LANGUAGE QuasiQuotes , TypeFamilies , GeneralizedNewtypeDeriving , TemplateHaskell #
module Model where
import Yesod
import Data.Text (Text)
-- You can define all of your database entities in the entities file.
-- You can find more information on persistent and how to declare entities
-- at:
-- /
share [mkPersist, ... | null | https://raw.githubusercontent.com/freizl/dive-into-haskell/b18a6bfe212db6c3a5d707b4a640170b8bcf9330/codes/web/yesod/helloyesod/Model.hs | haskell | You can define all of your database entities in the entities file.
You can find more information on persistent and how to declare entities
at:
/ | # LANGUAGE QuasiQuotes , TypeFamilies , GeneralizedNewtypeDeriving , TemplateHaskell #
module Model where
import Yesod
import Data.Text (Text)
share [mkPersist, mkMigrate "migrateAll"] $(persistFile "config/models")
|
c46366f554d51c30d90f725b483499c55b87b25ed136b60254451c6e24398039 | sifbiri/project-resources-operations | model.cljc | (ns com.fluxym.model
(:require
[com.fluxym.model.account :as account]
[com.fluxym.model.item :as item]
;[com.example.model.invoice :as invoice]
[com.fluxym.model.line-item :as line-item] ;
[ com.example.model.address : as address ]
;
[com.fulcrologic.rad.attrib... | null | https://raw.githubusercontent.com/sifbiri/project-resources-operations/b08adb09ef03f123ca7ad19ec1c2bdc070a66291/src/main/com/fluxym/model.cljc | clojure | [com.example.model.invoice :as invoice]
address/attributes
invoice/attributes
| (ns com.fluxym.model
(:require
[com.fluxym.model.account :as account]
[com.fluxym.model.item :as item]
[ com.example.model.address : as address ]
[com.fulcrologic.rad.attributes :as attr]))
(def all-attributes (vec (concat
account/attributes
... |
6f10885cb3a5e5014225ba25c52e2622389f5676c3d78f82adee778c80b0c1f8 | yetanalytics/datasim | alignments.clj | (ns com.yetanalytics.datasim.input.alignments
(:require [clojure.spec.alpha :as s]
[clojure.walk :as w]
[com.yetanalytics.datasim.protocols :as p]
[com.yetanalytics.pan.objects.profile :as profile]
[com.yetanalytics.datasim.iri :as iri]
[com.yetanalytics.dat... | null | https://raw.githubusercontent.com/yetanalytics/datasim/bc8c19c036c3003f3b04d73d466f10d28235a7ae/src/main/com/yetanalytics/datasim/input/alignments.clj | clojure | Alignment: Map of Component, Weight, and Object Override properties
Actor-Alignment: Map of Actor ID, Actor Type, and collection of Alignments
"Group" and "Role"
Alignment-vector: Collection of Actor-Alignment
Alignment input | (ns com.yetanalytics.datasim.input.alignments
(:require [clojure.spec.alpha :as s]
[clojure.walk :as w]
[com.yetanalytics.datasim.protocols :as p]
[com.yetanalytics.pan.objects.profile :as profile]
[com.yetanalytics.datasim.iri :as iri]
[com.yetanalytics.dat... |
a48f05a4f93461377a2589687d5cadf13626158fdbaa51354aa9be6147d264c3 | haroldcarr/learn-haskell-coq-ml-etc | X03.hs | # LANGUAGE DataKinds #
{-# LANGUAGE KindSignatures #-}
# LANGUAGE NoImplicitPrelude #
{-# LANGUAGE TypeOperators #-}
module X03 where
import GHC.TypeLits
import Protolude
import Test.Hspec
/#typelevel-strings
Typelevel Strings
Since GHC 8.0 .
Typelevel strings... | null | https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/topic/phantoms/hc-phantom/src/X03.hs | haskell | # LANGUAGE KindSignatures #
# LANGUAGE TypeOperators #
sum : : ( Foldable t , a ) = > t a - > a
No instance for ( ( Tagged " m " Double ) )
sum :: (Foldable t, Num a) => t a -> a
No instance for (Num (Tagged "m" Double)) | # LANGUAGE DataKinds #
# LANGUAGE NoImplicitPrelude #
module X03 where
import GHC.TypeLits
import Protolude
import Test.Hspec
/#typelevel-strings
Typelevel Strings
Since GHC 8.0 .
Typelevel strings : Symbol with kind Symbol .
GHC.TypeLits : typeclases for
- lift... |
7dd8da2eadb3a8e70cbe4a0c53c9ba2577dcd30edefdec4f7b1c819b4ba42532 | gvannest/piscine_OCaml | Backend.ml | module Utility : sig
type intOption = Some of int | None
val switchUser : Board.Cell.symbol -> Board.Cell.symbol
val safeConvToInt : string -> intOption
val setCoor : int -> int -> Board.Cell.point
val getValueIntOption : intOption -> int
end = struct
type intOption = Some of int | None
... | null | https://raw.githubusercontent.com/gvannest/piscine_OCaml/2533c6152cfb46c637d48a6d0718f7c7262b3ba6/r00/Backend.ml | ocaml | module Utility : sig
type intOption = Some of int | None
val switchUser : Board.Cell.symbol -> Board.Cell.symbol
val safeConvToInt : string -> intOption
val setCoor : int -> int -> Board.Cell.point
val getValueIntOption : intOption -> int
end = struct
type intOption = Some of int | None
... | |
742bfbaf2523a0f49df38b6037f98278b875936a427238333a876cac808d2b2f | default-kramer/plisqin | _null.rkt | #lang racket
(provide nullchecker nullchecker/tail nulltrack<%> nulltrack?
nullability nullability? yes no maybe
fallback fallback? /void /minval /maxval /any fallback-symbol)
(module+ more
; try to use nulltrack<%> instead
(provide gen:custom-nullability))
(require (only-in "_core.rkt" tuple? ... | null | https://raw.githubusercontent.com/default-kramer/plisqin/26421c7c42656c873c4e0a4fc7f48c0a3ed7770f/plisqin-lib/private2/_null.rkt | racket | try to use nulltrack<%> instead
This is a quick workaround, prefer to use nulltrack<%>
(-> this nullability?)
(-> this (or/c #f fallback?))
a tuple is never null
It might be cleaner to make join implement nulltrack<%>, but this works
nullcheck-core
Infers nullability by iterating over the arglist.
If an argumen... | #lang racket
(provide nullchecker nullchecker/tail nulltrack<%> nulltrack?
nullability nullability? yes no maybe
fallback fallback? /void /minval /maxval /any fallback-symbol)
(module+ more
(provide gen:custom-nullability))
(require (only-in "_core.rkt" tuple? join? get-join-type safe-write)
... |
f3cb3370e9b34944d85e3a50946f75ebf0d939ef72095bb5cc53d0d696508e26 | sgbj/MaximaSharp | simplifying.lisp |
Package to allow Maxima - level user - defined simplifying functions
;;;
;;; For example, suppose we want to write a step function stepfn(x)
which is 0 for x<- and 1 for .
;;;
;;; /* Define simplifying function */
;;; simp_stepfn(x):=
;;; block([prederror:false],
;;; if is(x<=0)=true then 0
elseif i... | null | https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/share/contrib/simplifying.lisp | lisp |
For example, suppose we want to write a step function stepfn(x)
/* Define simplifying function */
simp_stepfn(x):=
block([prederror:false],
if is(x<=0)=true then 0
/* Declare stepfn to be simplifying */
simplifying('stepfn,'simp_stepfn)$
/* Test simple cases */
/ * 0 * /
/ * 1 * /
/ *... |
Package to allow Maxima - level user - defined simplifying functions
which is 0 for x<- and 1 for .
elseif is(x>0)=true then 1
else simpfuncall('stepfn , x))$
forget(x>0)$
Utilities
(defun defined-functionp (ex)
(cond ((null ex) nil)
((symbolp ex)
(if (or (fboundp ex)
(safe-mgetl ex '(... |
d4fecdd3c9d883c42963ddcbd0f19b645a6448c3a5ae39fbb8486d3fb9521979 | Netflix/PigPen | join_test.clj | ;;
;;
Copyright 2013 - 2015 Netflix , Inc.
;;
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 ... | null | https://raw.githubusercontent.com/Netflix/PigPen/18d461d9b2ee6c1bb7eee7324889d32757fc7513/pigpen-core/src/test/clojure/pigpen/functional/join_test.clj | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the speci... | Copyright 2013 - 2015 Netflix , Inc.
distributed under the License is distributed on an " AS IS " BASIS ,
(ns pigpen.functional.join-test
(:require [pigpen.functional-test :as t]
[pigpen.extensions.test :refer [test-diff]]
[pigpen.join :as pig-join]
[pigpen.fold :as fold]... |
2da65f0ccc0488775926a0563ab0a08c1dc1baae731b571cd6db31e2a4cc4f4d | runtimeverification/bn128-ml | bn128Test.ml | open BN128Elements
open BN128Curve
open BN128Pairing
let z i = Z.of_int i
let fq i = FQ.create (z i)
let fq2 i j = FQP.create_fq2 [|z i;z j|]
let fq12 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 = FQP.create_fq12 [|z x1; z x2; z x3; z x4; z x5; z x6; z x7; z x8; z x9; z x10; z x11; z x12|]
let () =
assert (Z.powm (z 2) ... | null | https://raw.githubusercontent.com/runtimeverification/bn128-ml/81cc166891e12da73bc0edec2da5499d36bca882/bn128Test.ml | ocaml | open BN128Elements
open BN128Curve
open BN128Pairing
let z i = Z.of_int i
let fq i = FQ.create (z i)
let fq2 i j = FQP.create_fq2 [|z i;z j|]
let fq12 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 = FQP.create_fq12 [|z x1; z x2; z x3; z x4; z x5; z x6; z x7; z x8; z x9; z x10; z x11; z x12|]
let () =
assert (Z.powm (z 2) ... | |
b900f4e56c4f3614d42656ade459f5c26f11ad1f4857a7dedcea452790a26cfd | cljfx/cljfx | e24_concurrency.clj | (ns e24-concurrency
(:require [cljfx.api :as fx]))
(def *state
(atom 0))
(def renderer
(fx/create-renderer
:middleware
(fx/wrap-map-desc
(fn [i]
{:fx/type :stage
:showing true
:scene {:fx/type :scene
:root {:fx/type :v-box
:padding... | null | https://raw.githubusercontent.com/cljfx/cljfx/ec3c34e619b2408026b9f2e2ff8665bebf70bf56/examples/e24_concurrency.clj | clojure | component updates to at most 1 per JavaFX frame | (ns e24-concurrency
(:require [cljfx.api :as fx]))
(def *state
(atom 0))
(def renderer
(fx/create-renderer
:middleware
(fx/wrap-map-desc
(fn [i]
{:fx/type :stage
:showing true
:scene {:fx/type :scene
:root {:fx/type :v-box
:padding... |
e53e24b1e314fc4964f80bc7b4520ab506153f058e8868d66281c70fea3c84de | coq/coq | instances.ml | (************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * *... | null | https://raw.githubusercontent.com/coq/coq/3fd1aa43a8d3c0173b97a2db3a7c3bd799e33e74/plugins/firstorder/instances.ml | ocaml | **********************************************************************
* The Coq Proof Assistant / The Coq Development Team
// * This file is distributed under the terms of the
* (see LICENSE file for the text of the license)
************************************... | v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* GNU Lesser Gener... |
f7a3bf0f94e1be066e4d162948230cb8648132e960c9dc63b693a9fd3489a301 | dgtized/shimmers | ripples.cljs | (ns shimmers.sketches.ripples
"Based on -2d-water-ripple.html"
(:require
[quil.core :as q :include-macros true]
[quil.middleware :as m]
[shimmers.common.framerate :as framerate]
[shimmers.macros.loop :as loop :include-macros true]
[shimmers.sketch :as sketch :include-macros true]
[thi.ng.ndarray.c... | null | https://raw.githubusercontent.com/dgtized/shimmers/f096c20d7ebcb9796c7830efcd7e3f24767a46db/src/shimmers/sketches/ripples.cljs | clojure | (ns shimmers.sketches.ripples
"Based on -2d-water-ripple.html"
(:require
[quil.core :as q :include-macros true]
[quil.middleware :as m]
[shimmers.common.framerate :as framerate]
[shimmers.macros.loop :as loop :include-macros true]
[shimmers.sketch :as sketch :include-macros true]
[thi.ng.ndarray.c... | |
c8db634f33b7f1772415423d37df576865df2fa52f16dc813b155a82da131db9 | databrary/databrary | Activity.hs | # LANGUAGE OverloadedStrings , TemplateHaskell , RecordWildCards , DataKinds #
module Model.Activity
( lookupPartyActivity
, lookupVolumeActivity
, lookupContainerActivity
, activityJSON
, mergeBy
) where
import Control.Applicative ((<|>), empty, pure)
import Control.Arrow ((&&&))
import Control.Monad (for... | null | https://raw.githubusercontent.com/databrary/databrary/685f3c625b960268f5d9b04e3d7c6146bea5afda/src/Model/Activity.hs | haskell | this could be done much more simply since passwords are never going to repeat in practice
unqual: include logins
EDIT permission assumed for all
False assumes edit level on volume for activity route
False assumes edit | # LANGUAGE OverloadedStrings , TemplateHaskell , RecordWildCards , DataKinds #
module Model.Activity
( lookupPartyActivity
, lookupVolumeActivity
, lookupContainerActivity
, activityJSON
, mergeBy
) where
import Control.Applicative ((<|>), empty, pure)
import Control.Arrow ((&&&))
import Control.Monad (for... |
089d148e7d4aa711e677fff021c7f0269cd7f77978a21bbbc71be6ce532589b1 | dyzsr/ocaml-selectml | t251-pushoffsetclosurem2.ml | TEST
include tool - ocaml - lib
flags = " -w -a "
ocaml_script_as_argument = " true "
* setup - ocaml - build - env
* *
include tool-ocaml-lib
flags = "-w -a"
ocaml_script_as_argument = "true"
* setup-ocaml-build-env
** ocaml
*)
open Lib;;
let rec f _ = 4
and g _ = f 2
in
if g 5 <> 4 then raise Not_f... | null | https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/testsuite/tests/tool-ocaml/t251-pushoffsetclosurem2.ml | ocaml | TEST
include tool - ocaml - lib
flags = " -w -a "
ocaml_script_as_argument = " true "
* setup - ocaml - build - env
* *
include tool-ocaml-lib
flags = "-w -a"
ocaml_script_as_argument = "true"
* setup-ocaml-build-env
** ocaml
*)
open Lib;;
let rec f _ = 4
and g _ = f 2
in
if g 5 <> 4 then raise Not_f... | |
5cf73b57409daa38029e510dada6b0d4e93330c118c169bde931959dce2de2a1 | xandkar/tiger.ml | tiger_translate.mli | module Level : sig
type t
val init : t
* " outermost " in Applel 's code
val next : t -> name:Tiger_temp.Label.t -> formals:bool list -> t
* " newLevel " in 's code
end
type gen_stm =
(Tiger_temp.Label.t * Tiger_temp.Label.t) -> Tiger_tree.stm
type exp
type access
val alloc_local : level:Level.t -> escap... | null | https://raw.githubusercontent.com/xandkar/tiger.ml/6ca1afb735a1b5619d833d6082f0191ff777e3da/compiler/src/lib/tiger/tiger_translate.mli | ocaml | FIXME: Remove dummy when real is ready | module Level : sig
type t
val init : t
* " outermost " in Applel 's code
val next : t -> name:Tiger_temp.Label.t -> formals:bool list -> t
* " newLevel " in 's code
end
type gen_stm =
(Tiger_temp.Label.t * Tiger_temp.Label.t) -> Tiger_tree.stm
type exp
type access
val alloc_local : level:Level.t -> escap... |
b7a73be47a7ae6311a7a4897251db835be36529ad79652df4d385b11f8f4897f | aiya000/haskell-examples | concrete.hs | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE OverloadedLabels #
# LANGUAGE TypeApplications #
# LANGUAGE TypeOperators #
import Data.Extensible
import Data.Extensible.Effect.Default
context :: Eff '["x" >: ReaderEff String, "y" >: WriterEff [String]] ()
context = do
a <- askEff #x
tellEff #y [a... | null | https://raw.githubusercontent.com/aiya000/haskell-examples/a337ba0e86be8bb1333e7eea852ba5fa1d177d8a/Data/Extensible/Effect/concrete.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE OverloadedLabels #
# LANGUAGE TypeApplications #
# LANGUAGE TypeOperators #
import Data.Extensible
import Data.Extensible.Effect.Default
context :: Eff '["x" >: ReaderEff String, "y" >: WriterEff [String]] ()
context = do
a <- askEff #x
tellEff #y [a... | |
c5a4063927cb4596b0a7bf224347b18388f4c55ce42cfa4da61f4201da81a113 | athos/aintegrant | core.cljc | (ns aintegrant.core
(:refer-clojure :exclude [run!])
(:require [aintegrant.async :as async]
[integrant.core :as ig]))
(defmulti init-key
{:arglists '([key value callback])}
(fn [key value callback] (#'ig/normalize-key key)))
(defmethod init-key :default [k v callback]
(callback (ig/init-key k v)... | null | https://raw.githubusercontent.com/athos/aintegrant/1a866435d081a6cb98abfe3c22bca8a84df054de/src/aintegrant/core.cljc | clojure | (ns aintegrant.core
(:refer-clojure :exclude [run!])
(:require [aintegrant.async :as async]
[integrant.core :as ig]))
(defmulti init-key
{:arglists '([key value callback])}
(fn [key value callback] (#'ig/normalize-key key)))
(defmethod init-key :default [k v callback]
(callback (ig/init-key k v)... | |
b9efe1c38367ad67da735b9d59133bfda52df3e513690451f69c16a14387c16d | ghosthamlet/algorithm-data-structure | stack.clj | (ns algorithm-data-structure.data-structures.stack
"-algorithms/tree/master/src/data-structures/stack"
(:require [algorithm-data-structure.data-structures.linked-list :as ll]))
(defn create []
{:linked-list (ll/create)})
(defn empty?* [self]
(not (get-in self [:linked-list :tail])))
(defn peek* [self]
(whe... | null | https://raw.githubusercontent.com/ghosthamlet/algorithm-data-structure/017f41a79d8b1d62ff5a6cceffa1b0f0ad3ead6b/src/algorithm_data_structure/data_structures/stack.clj | clojure | (ns algorithm-data-structure.data-structures.stack
"-algorithms/tree/master/src/data-structures/stack"
(:require [algorithm-data-structure.data-structures.linked-list :as ll]))
(defn create []
{:linked-list (ll/create)})
(defn empty?* [self]
(not (get-in self [:linked-list :tail])))
(defn peek* [self]
(whe... | |
27e862ad43bcbd3b58eeb6decfcb8e395be0e1317632a5f7ebc1b47c3a5a551b | vbmithr/ocaml-plnx | plnx_ws.mli | open Core_kernel
open Plnx
val url : Uri.t
type snapshot = {
symbol : Pair.t ;
bid : float Float.Map.t ;
ask : float Float.Map.t ;
} [@@deriving sexp]
type event =
| Err of string
| Snapshot of snapshot
| BookEntry of Side.t * BookEntry.t
| Trade of Trade.t
| Ticker of Ticker.t
[@@deriving sexp]
typ... | null | https://raw.githubusercontent.com/vbmithr/ocaml-plnx/99ac819b43910561cbd11202d8a0495c6c071968/src/plnx_ws.mli | ocaml | open Core_kernel
open Plnx
val url : Uri.t
type snapshot = {
symbol : Pair.t ;
bid : float Float.Map.t ;
ask : float Float.Map.t ;
} [@@deriving sexp]
type event =
| Err of string
| Snapshot of snapshot
| BookEntry of Side.t * BookEntry.t
| Trade of Trade.t
| Ticker of Ticker.t
[@@deriving sexp]
typ... | |
5530eddcfe297dfa57a875241fe66a458b738a7b2db4d23b070dbe5790084855 | racket/rhombus-prototype | space.rkt | #lang racket/base
(require (for-syntax racket/base
syntax/parse/pre
enforest/property
"introducer.rkt"
(for-syntax racket/base)))
(provide (for-syntax space-syntax)
define-space-syntax)
(begin-for-syntax
(provide (property-... | null | https://raw.githubusercontent.com/racket/rhombus-prototype/4e66c1361bdde51c2df9332644800baead49e86f/rhombus/private/space.rkt | racket | #lang racket/base
(require (for-syntax racket/base
syntax/parse/pre
enforest/property
"introducer.rkt"
(for-syntax racket/base)))
(provide (for-syntax space-syntax)
define-space-syntax)
(begin-for-syntax
(provide (property-... | |
199c62652e371f752694401494d428ef6a222caa631092e6f80348353f9a7c9f | stolen/edflow | dynamic_compile.erl | Copyright ( c ) 2007
Mats < >
< >
< >
%%
%% 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 limitatio... | null | https://raw.githubusercontent.com/stolen/edflow/4d356c2c0a3f95ed807d2ac7f4f600b3678a56dd/src/dynamic_compile.erl | erlang |
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
Software is furnished to do so, subject to the following
condi... | Copyright ( c ) 2007
Mats < >
< >
< >
files ( the " Software " ) , to deal in the Software without
copies of the Software , and to permit persons to whom the
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT W... |
2d7740397ebb1f279222dd6fde26c202a6ff07c79d94d2e2f60b51323cb56a43 | hirokai/PaperServer | TestImport.hs | {-# LANGUAGE OverloadedStrings #-}
module TestImport
( module Yesod.Test
, runDB
, Specs
) where
import Yesod.Test
import Database.Persist.MongoDB hiding (master)
type Specs = SpecsConn Connection
runDB :: Action IO a -> OneSpec Connection a
runDB = runDBRunner runMongoDBPoolDef
| null | https://raw.githubusercontent.com/hirokai/PaperServer/b577955af08660253d0cd11282cf141d1c174bc0/tests/TestImport.hs | haskell | # LANGUAGE OverloadedStrings # | module TestImport
( module Yesod.Test
, runDB
, Specs
) where
import Yesod.Test
import Database.Persist.MongoDB hiding (master)
type Specs = SpecsConn Connection
runDB :: Action IO a -> OneSpec Connection a
runDB = runDBRunner runMongoDBPoolDef
|
3e67998ccad4bc0d247547abc60240f35f578c9d3eb2b5ca9fdd7ddae23cfd09 | kpblc2000/KpblcLispLib | _kpblc-conv-value-to-nth.lsp | (defun _kpblc-conv-value-to-nth (value lst)
;|
* Ïðåîáðàçîâûâàåò ïåðåäàííîå çíà÷åíèå â ïîðÿäêîâûé íîìåð ýëåìåíòà â ñïèñêå
* Ïàðàìåòðû âûçîâà:
ïðåîáðàçîâûâàåìîå çíà÷åíèå ( ñòðîêà èëè öåëîå )
ñïèñîê , âíóòðè êîòîðîãî
|;
(cond ((and (= (type value) 'int) (< val... | null | https://raw.githubusercontent.com/kpblc2000/KpblcLispLib/49d1d9d29078b4167cc65dc881bea61b706c620d/lsp/conv/value/_kpblc-conv-value-to-nth.lsp | lisp | |
_ end of and
_ end of cond
_ end of defun
| (defun _kpblc-conv-value-to-nth (value lst)
* Ïðåîáðàçîâûâàåò ïåðåäàííîå çíà÷åíèå â ïîðÿäêîâûé íîìåð ýëåìåíòà â ñïèñêå
* Ïàðàìåòðû âûçîâà:
ïðåîáðàçîâûâàåìîå çíà÷åíèå ( ñòðîêà èëè öåëîå )
ñïèñîê , âíóòðè êîòîðîãî
(cond ((and (= (type value) 'int) (< value (length lst))) value)
((and (=... |
140e22998cd147ae10526e79822f6c8a53e39f41f1571420ff5054e0553e8a08 | msakai/haskell-decision-diagrams | TestZDD.hs | # OPTIONS_GHC -Wall -Wno - orphans #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
module TestZDD (zddTestGroup) where
import Control.DeepSeq
import Control.Monad
import Control.Monad.ST
import Data.IntMap (IntMap)
import qualified Data.IntMap as IntMap
import Data.IntSet (IntSet)
import qualified Data... | null | https://raw.githubusercontent.com/msakai/haskell-decision-diagrams/84985d53ab5c12804dca1cea7819cb13c2eb3a0f/test/TestZDD.hs | haskell | ------------------------------------------------------------------------
------------------------------------------------------------------------
Union
------------------------------------------------------------------------
------------------------------------------------------------------------
Intersection
--... | # OPTIONS_GHC -Wall -Wno - orphans #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
module TestZDD (zddTestGroup) where
import Control.DeepSeq
import Control.Monad
import Control.Monad.ST
import Data.IntMap (IntMap)
import qualified Data.IntMap as IntMap
import Data.IntSet (IntSet)
import qualified Data... |
7e1006b1a364b6d698065fc9637758f44a7973337ab687f89dcff60317391b66 | penpot/penpot | format.cljs | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
;;
;; Copyright (c) KALEIDOS INC
(ns app.util.path.format
(:require
[app.common.path.commands :as upc]
[app.common.path.subpaths :refer... | null | https://raw.githubusercontent.com/penpot/penpot/47c983ed887d018b2c5d0c34a5c82f7fe148c455/frontend/src/app/util/path/format.cljs | clojure |
Copyright (c) KALEIDOS INC | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(ns app.util.path.format
(:require
[app.common.path.commands :as upc]
[app.common.path.subpaths :refer [pt=]]
[app.util.array :as ar... |
3b435521c3738482becdab391bc051397711e6403dfa92c58405d55dc0318cf4 | mirage/ocaml-dns | dns_client_mirage.ml | open Lwt.Infix
let src = Logs.Src.create "dns_client_mirage" ~doc:"effectful DNS client layer"
module Log = (val Logs.src_log src : Logs.LOG)
module IM = Map.Make(Int)
module type S = sig
module Transport : Dns_client.S
with type io_addr = [
| `Plaintext of Ipaddr.t * int
| `Tls of Tls.Config.c... | null | https://raw.githubusercontent.com/mirage/ocaml-dns/ab04235dcf093fd0593a86cd216ecc04d2f2c48b/mirage/client/dns_client_mirage.ml | ocaml | minimum DNS length (header length)
ignoring this here | open Lwt.Infix
let src = Logs.Src.create "dns_client_mirage" ~doc:"effectful DNS client layer"
module Log = (val Logs.src_log src : Logs.LOG)
module IM = Map.Make(Int)
module type S = sig
module Transport : Dns_client.S
with type io_addr = [
| `Plaintext of Ipaddr.t * int
| `Tls of Tls.Config.c... |
e9cf567ae2fe58161ceeb733a4461f80deebd272dbb192998d38ff5a1177ffcb | sph-mn/sph-lib | performance.scm | (define-module (sph test performance))
(use-modules (ice-9 format) (ice-9 pretty-print)
(rnrs sorting) (sph)
(sph list) (sph math) (sph string) (sph time) ((sph other) #:select (each-integer pass)))
(export evaluate-performance sph-test-performance-description)
(define sph-test-performance-description
"adaptiv... | null | https://raw.githubusercontent.com/sph-mn/sph-lib/c7daf74f42d6bd1304f49c2fef89dcd6dd94fdc9/modules/sph/test/performance.scm | scheme | (define-module (sph test performance))
(use-modules (ice-9 format) (ice-9 pretty-print)
(rnrs sorting) (sph)
(sph list) (sph math) (sph string) (sph time) ((sph other) #:select (each-integer pass)))
(export evaluate-performance sph-test-performance-description)
(define sph-test-performance-description
"adaptiv... | |
62e164003d6f121fa673f8150c5a16ebff121c2074958665b53d6238d06c4ed5 | gedge-platform/gedge-platform | jose_base64.erl | -*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*-
%% vim: ts=4 sw=4 ft=erlang noet
%%%-------------------------------------------------------------------
@author < >
2017 - 2019 ,
@doc RFC 4648 , Section 4 : #section-4
%%%
%%% @end
Created : 11 May 2017 by < ... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/jose/src/base/jose_base64.erl | erlang | vim: ts=4 sw=4 ft=erlang noet
-------------------------------------------------------------------
@end
-------------------------------------------------------------------
API
===================================================================
API functions
==========================================================... | -*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*-
@author < >
2017 - 2019 ,
@doc RFC 4648 , Section 4 : #section-4
Created : 11 May 2017 by < >
-module(jose_base64).
-compile({parse_transform, jose_base}).
-include("jose_base.hrl").
-export([decode/1]).
-ex... |
6a1abfe808b65982c22929551ea6f499faa1162dd14e3cb4b146b51c8cdac6eb | Opetushallitus/aipal | tutkinto_test.clj | (ns aipal.arkisto.tutkinto-test
(:require
[clojure.test :refer :all]
[aipal.arkisto.tutkinto :as arkisto]
[clj-time.core :as time]))
(deftest tutkinnot-hierarkiaksi-test
(testing "tutkintojen hierarkiaksi muunto"
(let [tutkinnot [{:nimi_sv "Ingenjör, elkraftsteknik",
:opintoal... | null | https://raw.githubusercontent.com/Opetushallitus/aipal/767bd14ec7153dc97fdf688443b9687cdb70082f/aipal/test/clj/aipal/arkisto/tutkinto_test.clj | clojure | (ns aipal.arkisto.tutkinto-test
(:require
[clojure.test :refer :all]
[aipal.arkisto.tutkinto :as arkisto]
[clj-time.core :as time]))
(deftest tutkinnot-hierarkiaksi-test
(testing "tutkintojen hierarkiaksi muunto"
(let [tutkinnot [{:nimi_sv "Ingenjör, elkraftsteknik",
:opintoal... | |
611ac821b1136f0aa898175203d4a1d5d033af1aa3558b7e766d4b78ad98504e | yrashk/erlang | pg.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1996 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/yrashk/erlang/e1282325ed75e52a98d58f5bd9fb0fa27896173f/lib/stdlib/src/pg.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 1996 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(pg).
-export([create/1,
create/... |
9ac478a33b672783ee4ca123e7f914542b79e603701b18125482d70e2ccb864d | fpco/ide-backend | Builtin.hs | -----------------------------------------------------------------------------
-- |
Module : Distribution . Simple . Program . Builtin
Copyright : 2006 , 2007 - 2009
--
-- Maintainer :
-- Portability : portable
--
The module defines all the known built - in ' Program 's .
--
-- Where possible ... | null | https://raw.githubusercontent.com/fpco/ide-backend/860636f2d0e872e9481569236bce690637e0016e/ide-backend/TestSuite/inputs/Cabal-1.14.0/Distribution/Simple/Program/Builtin.hs | haskell | ---------------------------------------------------------------------------
|
Maintainer :
Portability : portable
Where possible we try to find their version numbers.
* The collection of unconfigured and configured progams
------------------------------------------------------------
* Known programs
---... | Module : Distribution . Simple . Program . Builtin
Copyright : 2006 , 2007 - 2009
The module defines all the known built - in ' Program 's .
module Distribution.Simple.Program.Builtin (
builtinPrograms,
* Programs that knows about
ghcProgram,
ghcPkgProgram,
lhcProgram,
lh... |
18b7f0759fb7552acb338dc0ae6f506aa66585c36882fb270354bf4550676b46 | juspay/atlas | Status.hs | |
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
dis... | null | https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/parking-bap/src/Core/Status.hs | haskell | |
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
dis... | |
55df327bea409ec4aa1209dedca0b60539cd4c42490e0b2a85ee07af5d7d3ac4 | xapi-project/xcp-rrdd | rrdd_bindings.ml | module type RRDD_IMPLEMENTATION = sig
val has_vm_rrd : string -> bool
val push_rrd_local : string -> int -> unit
val push_rrd_remote : string -> string -> unit
val remove_rrd : string -> unit
val migrate_rrd : string option -> string -> string -> string -> unit
val send_host_rrd_to_master : string -> u... | null | https://raw.githubusercontent.com/xapi-project/xcp-rrdd/f810004ae88d308043b73365a959562302b1d4b5/bin/rrdd/rrdd_bindings.ml | ocaml | Generate empty server before binding API calls
-- Server-implementation RPC bindings --
module Plugin
Plugin submodules
end Plugin
create module to allow server-implementation RPC bindings | module type RRDD_IMPLEMENTATION = sig
val has_vm_rrd : string -> bool
val push_rrd_local : string -> int -> unit
val push_rrd_remote : string -> string -> unit
val remove_rrd : string -> unit
val migrate_rrd : string option -> string -> string -> string -> unit
val send_host_rrd_to_master : string -> u... |
54a2a9e2ae68592f3b6876a14aebb188b7d4b785574a132e0ab27fdd4d901a6c | donut-party/system | 01.clj | (ns tutorial.01
"Basic component definition and signaling"
(:require
[donut.system :as ds]
[ring.adapter.jetty :as rj]))
;; The purpose of donut.system is to give you a structure for defining
;; components and their behavior, and for triggering that behavior. In this
;; example we look at how to define the b... | null | https://raw.githubusercontent.com/donut-party/system/96cc6036e245c248a83bd24c877ab1adc7c50515/tutorial/src/tutorial/01.clj | clojure | The purpose of donut.system is to give you a structure for defining
components and their behavior, and for triggering that behavior. In this
example we look at how to define the behavior for an HTTP server component:
when the system starts, the HTTP server component should start a new server
request.
You start wi... | (ns tutorial.01
"Basic component definition and signaling"
(:require
[donut.system :as ds]
[ring.adapter.jetty :as rj]))
that listens on port 9000 and returns the response " hello ! " for every
Signal handlers are what we use to define component behavior . In the example
Signal handlers are called whe... |
c4b2fbc2da60d80d07da43f3b85e3b8426121a791ca6b71ecbefcb5661e18117 | basho/riak_cs | riak_cs_policy.erl | %% ---------------------------------------------------------------------
%%
Copyright ( c ) 2007 - 2013 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 . Y... | null | https://raw.githubusercontent.com/basho/riak_cs/c0c1012d1c9c691c74c8c5d9f69d388f5047bcd2/src/riak_cs_policy.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 permiss... | Copyright ( c ) 2007 - 2013 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
... |
ea8c6c447171606dcde65fba24ad272e8415deee73a52fce06ffc297b74dd40c | facebook/pyre-check | expression.mli |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/pyre-check/31274432ffea30fd4d4d27ff4808a06cbf1c0f2b/source/ast/expression.mli | ocaml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | |
28cea56678b34ed4e34224a6b7c329405198b651fb970a245f80651495ca305c | expipiplus1/update-nix-fetchgit | Typed.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE TemplateHaskell #
# LANGUAGE UndecidableInstances #
-- | A more strongly typed alternative to 'Nix.Match'
module Nix.Match.Typed
( matchNix,
matchNixLoc,
TypedMatcher (..),
TypedMatch (..),
get,
getOptional,
matchTyped,
findMatchesTyped,
)
whe... | null | https://raw.githubusercontent.com/expipiplus1/update-nix-fetchgit/5a6e38eba72c82676a9b9d60fe56eb90eb3690df/src/Nix/Match/Typed.hs | haskell | | A more strongly typed alternative to 'Nix.Match'
--------------------------------------------------------------
Typed matching
--------------------------------------------------------------
and @reqs@ are the optional and required holes from the source expression.
The pattern, if matched, will bring into scope ... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE TemplateHaskell #
# LANGUAGE UndecidableInstances #
module Nix.Match.Typed
( matchNix,
matchNixLoc,
TypedMatcher (..),
TypedMatch (..),
get,
getOptional,
matchTyped,
findMatchesTyped,
)
where
import Control.Category ((>>>))
import Data.Coerce... |
728640948bfed9f5885683e6c9552992a2b26a27f03b90f443b698df6ea20c18 | twosigma/waiter | headers.clj | ;;
Copyright ( c ) Two Sigma Open Source , LLC
;;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;; -2.0
;;
;; Unless required by applicable law or agreed to in writing, software... | null | https://raw.githubusercontent.com/twosigma/waiter/8b7a5227a59c34d324b5fae93bff2eeb79ad1b4a/waiter/src/waiter/headers.clj | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permi... | Copyright ( c ) Two Sigma Open Source , LLC
distributed under the License is distributed on an " AS IS " BASIS ,
(ns waiter.headers
(:require [cheshire.core :as json]
[clojure.data.codec.base64 :as b64]
[clojure.string :as str]
[clojure.tools.logging :as log]
[plumb... |
c1455f5896d31f7d3c1f854703b2cb196cc57b1caf540e53a1f5205460f5a1d5 | mikelevins/categories | structure-macros.scm | ;;;; ***********************************************************************
;;;; FILE IDENTIFICATION
;;;;
;;;; Name: structure-macros.scm
;;;; Project: Categories
;;;; Purpose: macros for working with structures
;;;; Author: mikel evins
Copyright : Copyright 2009 by mikel evins , all... | null | https://raw.githubusercontent.com/mikelevins/categories/66e3861071e4d88b7b27421a78ab497e1fb5fa0c/0.2.1/scm/gambit/structure-macros.scm | scheme | ***********************************************************************
FILE IDENTIFICATION
Name: structure-macros.scm
Project: Categories
Purpose: macros for working with structures
Author: mikel evins
See the accompanying file "License" for more information
*******... | Copyright : Copyright 2009 by mikel evins , all rights reserved
License : Licensed under the Apache License , version 2.0
(define-macro (structure includes . keyspecs)
(let ((keyspecs (%parse-keyspecs keyspecs)))
`(structs:construct-structure-basis
(structs:merge-basis-includes (list ,@incl... |
2a820308203032bdc4494d8d2e539520d19e9d04961ca9a1420a934a87ac9ea9 | dardoria/ponon | logging-example.lisp | ;;; -*- Mode: Lisp; indent-tabs-mode: nil -*-
;;;
;;; logging-example.lisp --- A simple app that logs the invocation of every app method
;;;
Copyright ( c ) 2010 , Boian Tzonev < >
;;;
;;; Permission is hereby granted, free of charge, to any person obtaining a copy
;;; of this software and associated documentation f... | null | https://raw.githubusercontent.com/dardoria/ponon/f62d285da2a9a86c9f2dff8578bde61f52b97ab9/examples/logging-example.lisp | lisp | -*- Mode: Lisp; indent-tabs-mode: nil -*-
logging-example.lisp --- A simple app that logs the invocation of every app method
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, pub... | Copyright ( c ) 2010 , Boian Tzonev < >
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 ,... |
c42117f93e428edc7aea3ddb8d8b8499605c2f3ea044f5c55c4e13eb6dea4b40 | coq-community/vscoq | parTactic.mli | (**************************************************************************)
(* *)
(* VSCoq *)
(* *)
(* ... | null | https://raw.githubusercontent.com/coq-community/vscoq/544334513c6d94d2191c7b77ae8b99015f0f513b/language-server/dm/parTactic.mli | ocaml | ************************************************************************
VSCoq
Copyright... | ( see version control and README file for authors & dates )
This file is distributed under the terms of the MIT License .
module TacticWorkerProcess : sig
type options
val parse_options : string list -> options * string list
val main : st:Vernacstate.t -> options -> unit
val log : s... |
04cb8e2bfe581948cacd33bceca11d9334f89601e63efc8521bd76ed104c63dc | fukamachi/anypool | middleware.lisp | (defpackage #:anypool/middleware
(:nicknames #:lack.middleware.anypool)
(:use #:cl)
(:export #:*lack-middleware-anypool*
#:*connection*))
(in-package #:anypool/middleware)
(defparameter *connection* nil)
(defparameter *lack-middleware-anypool*
(lambda (app &rest args &key (var '*connection*) connec... | null | https://raw.githubusercontent.com/fukamachi/anypool/37511109f709ba84b8e7884a56db40ce82c0a958/src/middleware.lisp | lisp | (defpackage #:anypool/middleware
(:nicknames #:lack.middleware.anypool)
(:use #:cl)
(:export #:*lack-middleware-anypool*
#:*connection*))
(in-package #:anypool/middleware)
(defparameter *connection* nil)
(defparameter *lack-middleware-anypool*
(lambda (app &rest args &key (var '*connection*) connec... | |
036faca18f801d244e35643162a715974f713606edbc58c6003997eb0729963f | JacquesCarette/Drasil | AST.hs | | Defines types similar to those in " . Language " , but better suited to printing .
module Language.Drasil.Printing.AST where
import Language.Drasil (Special)
| Different types of links for referencing . May be internal , a citation , or external .
-- A citation may also hold additional reference information.
d... | null | https://raw.githubusercontent.com/JacquesCarette/Drasil/93cb12d84e35a938aaa20d27da9c16504dc37f59/code/drasil-printers/lib/Language/Drasil/Printing/AST.hs | haskell | A citation may also hold additional reference information.
| Different operators.
| Holds the type of "text fencing" ("(), {}, |, ||").
| The "^" symbol.
| Different font effects (__bold__, /emphasis/).
| Spacing is Thin.
| A Label is just a 'Spec' (sentence).
^ Case expressions
^ Matrix.
^ Special characters... | | Defines types similar to those in " . Language " , but better suited to printing .
module Language.Drasil.Printing.AST where
import Language.Drasil (Special)
| Different types of links for referencing . May be internal , a citation , or external .
data LinkType = Internal | Cite2 Spec | External
data Ops = Is... |
e79ef007087e474e0f415cf911004f0ff4582a1c27f385574b35f4d315386c70 | input-output-hk/cardano-sl | Shutdown.hs | module Pos.Infra.Shutdown
( module Pos.Infra.Shutdown.Class
, module Pos.Infra.Shutdown.Logic
, module Pos.Infra.Shutdown.Types
) where
import Pos.Infra.Shutdown.Class
import Pos.Infra.Shutdown.Logic
import Pos.Infra.Shutdown.Types
| null | https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/infra/src/Pos/Infra/Shutdown.hs | haskell | module Pos.Infra.Shutdown
( module Pos.Infra.Shutdown.Class
, module Pos.Infra.Shutdown.Logic
, module Pos.Infra.Shutdown.Types
) where
import Pos.Infra.Shutdown.Class
import Pos.Infra.Shutdown.Logic
import Pos.Infra.Shutdown.Types
| |
4ae73bd7f512a984fa2d870109a381927a711c63d9223b8f7bd437ff4f1a08eb | hindol/json-rpc | unix.clj | (ns json-rpc.unix
(:require
[clojure.java.io :as io]
[json-rpc.client :as client])
(:import
(java.io InputStreamReader PrintWriter)
(java.nio CharBuffer)
(java.nio.channels Channels)
(jnr.unixsocket UnixSocketAddress UnixSocketChannel)))
(defrecord UnixSocketClient []
client/Client
(open [th... | null | https://raw.githubusercontent.com/hindol/json-rpc/fb9805c1e1e62f01b43f432870924e35a0515b36/core/src/json_rpc/unix.clj | clojure | (ns json-rpc.unix
(:require
[clojure.java.io :as io]
[json-rpc.client :as client])
(:import
(java.io InputStreamReader PrintWriter)
(java.nio CharBuffer)
(java.nio.channels Channels)
(jnr.unixsocket UnixSocketAddress UnixSocketChannel)))
(defrecord UnixSocketClient []
client/Client
(open [th... | |
f8ab654feab4ce9f17726389835bc634ad4a6592622e317c0d0a57e6ad56065b | conal/Fran | TextB.hs | -- Text vectors
--
Last modified We d Jul 09 09:06:12 1997
module TextB where
import qualified Text as T
import Behavior
type TextB = Behavior T.TextT
simpleText = lift1 T.simpleText
boldT = lift1 T.boldT
italicT = lift1 T.italicT
-- No font behaviors for now
textFont f = lift1 (T.text... | null | https://raw.githubusercontent.com/conal/Fran/a113693cfab23f9ac9704cfee9c610c5edc13d9d/src/TextB.hs | haskell | Text vectors
No font behaviors for now
| Last modified We d Jul 09 09:06:12 1997
module TextB where
import qualified Text as T
import Behavior
type TextB = Behavior T.TextT
simpleText = lift1 T.simpleText
boldT = lift1 T.boldT
italicT = lift1 T.italicT
textFont f = lift1 (T.textFont f)
|
ed65c5a3a7c485c7f4562e68d4884493c8710519c6034d5af9f59b05641eee0b | achirkin/vulkan | VK_KHR_draw_indirect_count.hs | # OPTIONS_GHC -fno - warn - orphans #
# OPTIONS_HADDOCK not - home #
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE ForeignFunctionInterface #
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LA... | null | https://raw.githubusercontent.com/achirkin/vulkan/b2e0568c71b5135010f4bba939cd8dcf7a05c361/vulkan-api/src-gen/Graphics/Vulkan/Ext/VK_KHR_draw_indirect_count.hs | haskell | # LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE MagicHash #
# LANGUAGE PatternSynonyms #
# LANGUAGE Strict #
# LANGUAGE TypeFamilies #
# LANGUAGE ViewPatterns #
|
supported: @vulkan@
author: @KHR@
type: @dev... | # OPTIONS_GHC -fno - warn - orphans #
# OPTIONS_HADDOCK not - home #
# LANGUAGE FlexibleInstances #
# LANGUAGE ForeignFunctionInterface #
module Graphics.Vulkan.Ext.VK_KHR_draw_indirect_count
* Vulkan extension :
contact :
VkCmdDrawIndirectCountKHR, pattern VkCmdDrawIndirectCountKHR,
H... |
b10e0ccaa9867f0aec6d7968f4c8f428d7188e61908b218a204e2d7e55b92791 | haskell/text | Fold.hs | -- | Benchmark which formats paragraph, like the @sort@ unix utility.
--
-- Tested in this benchmark:
--
-- * Reading the file
--
-- * Splitting into paragraphs
--
-- * Reformatting the paragraphs to a certain line width
--
* the results using the text builder
--
-- * Writing back to a handle
--
# LANGUAGE CPP , Ove... | null | https://raw.githubusercontent.com/haskell/text/8d1b6ff5d636059c427bc80ba038de2105a8cfa6/benchmarks/haskell/Benchmarks/Programs/Fold.hs | haskell | | Benchmark which formats paragraph, like the @sort@ unix utility.
Tested in this benchmark:
* Reading the file
* Splitting into paragraphs
* Reformatting the paragraphs to a certain line width
* Writing back to a handle
| We represent a paragraph by a word list
| Fold a text
| Fold a paragraph
| Di... | * the results using the text builder
# LANGUAGE CPP , OverloadedStrings #
module Benchmarks.Programs.Fold
( benchmark
) where
import Data.List (foldl')
import Data.List (intersperse)
import System.IO (Handle)
import Test.Tasty.Bench (Benchmark, bench, whnfIO)
import qualified Data.Text as T
import qualified... |
a4bc491225f4778f2040ffd109f7403411fa4bc0878bdc81b4fa47968393a1bc | Octachron/tensority | linalg.ml | open Tensority
open Tensor
let rotation theta =
[%matrix
[ cos theta, -.sin theta ;
sin theta, cos theta ]
]
let m = rotation 1.
let c1 = m.!( All; 1j )
let one = [%vec ( 1., 1. ) ]
let d = det @@ rotation 0.95
let v = rotation 2. * one
let c = (rotation 0.45).%( [1i], [0i])
let x = v.( 1i; __ )
l... | null | https://raw.githubusercontent.com/Octachron/tensority/c5739cf6a97bd69ee582bc9758b74f14be6f7557/examples/linalg.ml | ocaml | open Tensority
open Tensor
let rotation theta =
[%matrix
[ cos theta, -.sin theta ;
sin theta, cos theta ]
]
let m = rotation 1.
let c1 = m.!( All; 1j )
let one = [%vec ( 1., 1. ) ]
let d = det @@ rotation 0.95
let v = rotation 2. * one
let c = (rotation 0.45).%( [1i], [0i])
let x = v.( 1i; __ )
l... | |
32593930bf0fee77acba951978fd989cc4eb7f830af426c284e2d90dfa40a8bb | NorfairKing/smos | CompatibilitySpec.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Smos.API.CompatibilitySpec
( spec,
)
where
import Data.Aeson as JSON
import qualified Data.ByteString as SB
import qualified Data.ByteString.Lazy as LB
import qualified Data.DirForest ... | null | https://raw.githubusercontent.com/NorfairKing/smos/489f5b510c9a30a3c79fef0a0d1a796464705923/smos-api-gen/test/Smos/API/CompatibilitySpec.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Smos.API.CompatibilitySpec
( spec,
)
where
import Data.Aeson as JSON
import qualified Data.ByteString as SB
import qualified Data.ByteString.Lazy as LB
import qualified Data.DirForest as DF
import qualified Data.Map as ... |
e122c3a2a29303b96975e224f33311ea53e70a91de67a7aaaf219b7c54a32724 | stackbuilders/cis194-templates | Calc.hs | {-# LANGUAGE TypeSynonymInstances #-}
# LANGUAGE FlexibleInstances #
----------------------------------------------------------------------
-- |
--
CIS 194 Spring 2013 : Homework 05
--
----------------------------------------------------------------------
module Homework05.Calc where
import Homework05.ExprT
import... | null | https://raw.githubusercontent.com/stackbuilders/cis194-templates/f41b9f0b9945afd387f433ff40fa8988b6a9fe8b/src/Homework05/Calc.hs | haskell | # LANGUAGE TypeSynonymInstances #
--------------------------------------------------------------------
|
--------------------------------------------------------------------
--------------------------------------------------------------------
--------------------------------------------------------------------
|
... | # LANGUAGE FlexibleInstances #
CIS 194 Spring 2013 : Homework 05
module Homework05.Calc where
import Homework05.ExprT
import Homework05.Parser
import Homework05.StackVM
import qualified Data.Map as M
Exercise 1
> > > eval ( ExprT.Mul ( ExprT.Add ( ExprT.Lit 2 ) ( ExprT.Lit 3 ) ) ( ExprT.Lit 4 ) ) = = 20
eva... |
206b866afb2715b47773c6e9e745ae8eb132136b4c17279d8d679fdbe14c2ddf | graninas/Hydra | IOException1Spec.hs | # LANGUAGE FunctionalDependencies #
{-# LANGUAGE PackageImports #-}
{-# LANGUAGE TemplateHaskell #-}
module Hydra.Tests.Integration.IOException1Spec where
import qualified Control.Exception as E
import qualified Prelude as P (writeFile, readFile)
import Hydra.Prelude
import qualified Hydra.D... | null | https://raw.githubusercontent.com/graninas/Hydra/60d591b1300528f5ffd93efa205012eebdd0286c/lib/hydra-free/test/Hydra/Tests/Integration/IOException1Spec.hs | haskell | # LANGUAGE PackageImports #
# LANGUAGE TemplateHaskell #
Samples for the book
Language-level error types:
Language itself: | # LANGUAGE FunctionalDependencies #
module Hydra.Tests.Integration.IOException1Spec where
import qualified Control.Exception as E
import qualified Prelude as P (writeFile, readFile)
import Hydra.Prelude
import qualified Hydra.Domain as D
import qualified Hydra.Language as L
impo... |
245c9d9ee048d6b87523a2e7799b7509f18006241233afd399ec65bc0517f1dd | clojure-interop/aws-api | AbstractAWSResourceGroups.clj | (ns com.amazonaws.services.resourcegroups.AbstractAWSResourceGroups
"Abstract implementation of AWSResourceGroups. Convenient method forms pass through to the corresponding
overload that takes a request object, which throws an UnsupportedOperationException."
(:refer-clojure :only [require comment defn ->])
(:im... | null | https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.resourcegroups/src/com/amazonaws/services/resourcegroups/AbstractAWSResourceGroups.clj | clojure | (ns com.amazonaws.services.resourcegroups.AbstractAWSResourceGroups
"Abstract implementation of AWSResourceGroups. Convenient method forms pass through to the corresponding
overload that takes a request object, which throws an UnsupportedOperationException."
(:refer-clojure :only [require comment defn ->])
(:im... | |
beb853697a4e3bec8ad2ab42d6e43cb64cf4002120d23d2ce6cca82f63a70a03 | basho/riak_kv | backend_eqc.erl | %% -------------------------------------------------------------------
%%
%% backend_eqc: Quickcheck testing for the backend api.
%%
Copyright ( c ) 2007 - 2011 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not us... | null | https://raw.githubusercontent.com/basho/riak_kv/aeef1591704d32230b773d952a2f1543cbfa1889/eqc/backend_eqc.erl | erlang | -------------------------------------------------------------------
backend_eqc: Quickcheck testing for the backend api.
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... | Copyright ( c ) 2007 - 2011 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
... |
bb0a697dc92569b9f5ba1e8ac75ca282284b5c090ac76a141c1c4b08a906ce18 | yapsterapp/er-cassandra | search_key_callback.cljc | (ns er-cassandra.model.callbacks.search-key-callback
(:require
[clojure.string :as str]
#?(:cljs [er-cassandra.model.callbacks.protocol :refer [ICallback]])
[er-cassandra.util.string :refer [normalize-string]])
#?(:clj
(:import
[er_cassandra.model.callbacks.protocol ICallback])))
(defn ^:privat... | null | https://raw.githubusercontent.com/yapsterapp/er-cassandra/1d059f47bdf8654c7a4dd6f0759f1a114fdeba81/src/er_cassandra/model/callbacks/search_key_callback.cljc | clojure | if there are no source-cols in the new-record
and the new-record doesn't update the search-col then
we don't care
if it's a create then new new-record is by definition complete
otherwise we need all the old source-cols and the search-col
(for a change op)
HACK ALERT
a partial update doesn't really give enough i... | (ns er-cassandra.model.callbacks.search-key-callback
(:require
[clojure.string :as str]
#?(:cljs [er-cassandra.model.callbacks.protocol :refer [ICallback]])
[er-cassandra.util.string :refer [normalize-string]])
#?(:clj
(:import
[er_cassandra.model.callbacks.protocol ICallback])))
(defn ^:privat... |
33c1e74211ad924aa808146a4946c3ff1ed4edeaefbcacfa08629956d423fe81 | pbrisbin/bugsnag-haskell | Parse.hs | -- |
--
Parse error messages for @'HasCallStack'@ information .
--
module Network.Bugsnag.Exception.Parse
( MessageWithStackFrames(..)
, parseErrorCall
, parseStringException
) where
import Prelude
import qualified Control.Exception as Exception
(ErrorCall, Exception, SomeException)
import Contr... | null | https://raw.githubusercontent.com/pbrisbin/bugsnag-haskell/7ac6935d87151298ad73ae08b1a38d6dcc8a8711/bugsnag/src/Network/Bugsnag/Exception/Parse.hs | haskell | |
We accept this as @'SomeException'@ so that this library doesn't depend on
sigh.)
brittany-disable-next-binding
brittany-disable-next-binding
Ignore the "in package:module" part. TODO: we could use this to set
bsfInProject if we had some more knowledge about project packages. | Parse error messages for @'HasCallStack'@ information .
module Network.Bugsnag.Exception.Parse
( MessageWithStackFrames(..)
, parseErrorCall
, parseStringException
) where
import Prelude
import qualified Control.Exception as Exception
(ErrorCall, Exception, SomeException)
import Control.Monad (v... |
de10f8febcfe7e0daf01db2b143614681a1991c989968d07ec1c663be03965fb | tolysz/ghcjs-stack | Macros.hs | -----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.Build.Macros
Copyright : 2008
--
-- Maintainer :
-- Portability : portable
--
-- Generate cabal_macros.h - CPP macros for package version testing
--
When using CPP you get
--
-- > VERS... | null | https://raw.githubusercontent.com/tolysz/ghcjs-stack/83d5be83e87286d984e89635d5926702c55b9f29/special/cabal-next/Cabal/Distribution/Simple/Build/Macros.hs | haskell | ---------------------------------------------------------------------------
|
Module : Distribution.Simple.Build.Macros
Maintainer :
Portability : portable
Generate cabal_macros.h - CPP macros for package version testing
> VERSION_<package>
> MIN_VERSION_<package>(A,B,C)
numbers.
--------------... | Copyright : 2008
When using CPP you get
for each /package/ in @build - depends@ , which is true if the version of
/package/ in use is @>= A.B.C@ , using the normal ordering on version
module Distribution.Simple.Build.Macros (
generate,
generatePackageVersionMacros,
) where
import Data.Maybe
... |
43eeae91383e8bb614fe6454a6ff7d2d2e2f6f5df55c8b24f12cc61974401a3d | MondayMorningHaskell/haskellings | IO2.hs | -- I AM NOT DONE
import Text.Read
- Once we know how to print items to the terminal , we need to know how
to retrieve a user 's input . This is done with the ' getLine ' function :
getLine : : IO String
main = do
-- ( String ) ( IO String )
usersInput < - getLine
- When reading non - str... | null | https://raw.githubusercontent.com/MondayMorningHaskell/haskellings/fafadd5bbb722b54c1b7b114e34dc9b96bb7ca4d/exercises/monads/IO2.hs | haskell | I AM NOT DONE
( String ) ( IO String )
Ca n't read " Hello " as an Integer !
(String) (IO String)
Can't read "Hello" as an Integer!
TODO:
Prompt the user to enter a number by printing "Please enter a number."
Then retrieve an integer entered by a user.
If it can be read as an integer properly, print "... |
import Text.Read
- Once we know how to print items to the terminal , we need to know how
to retrieve a user 's input . This is done with the ' getLine ' function :
getLine : : IO String
main = do
usersInput < - getLine
- When reading non - string data , you 'll likely have to use ' read ' or
... |
63486cf86b27d32d621e76eb67910a7451198c0920e1b65fbaf6bc98e73d494b | ghedamat/reagent-react-router | prod.cljs | (ns reagent-react-router.prod
(:require [reagent-react-router.core :as core]))
(core/init!)
| null | https://raw.githubusercontent.com/ghedamat/reagent-react-router/4eb082847a9fde3a3232f4dbb70e2c96a1435df6/react-router-example/env/prod/cljs/reagent_react_router/prod.cljs | clojure | (ns reagent-react-router.prod
(:require [reagent-react-router.core :as core]))
(core/init!)
| |
00bc24c5dfc0f87af6e18cf553ebd72e80d7df664d4e00b9038a6a52816e3b22 | axelarge/advent-of-code | day04.clj | (ns advent-of-code.y2016.day04
(:require [clojure.string :as str]
[advent-of-code.support :refer :all]))
(def input (get-input 2016 4))
(defn parse-line [line]
(let [[_ name sector checksum] (re-find #"^((?:[a-z]+-)+)(\d+)\[([a-z]+)\]$" line)
groups (str/split name #"-")]
{:name name :grou... | null | https://raw.githubusercontent.com/axelarge/advent-of-code/4c62a53ef71605780a22cf8219029453d8e1b977/src/advent_of_code/y2016/day04.clj | clojure | (ns advent-of-code.y2016.day04
(:require [clojure.string :as str]
[advent-of-code.support :refer :all]))
(def input (get-input 2016 4))
(defn parse-line [line]
(let [[_ name sector checksum] (re-find #"^((?:[a-z]+-)+)(\d+)\[([a-z]+)\]$" line)
groups (str/split name #"-")]
{:name name :grou... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.