_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 |
|---|---|---|---|---|---|---|---|---|
eab3d3f93a9d4a2d123f4f10551f07a658ddc4491cb41237110ea3ecd6addef0 | JHU-PL-Lab/jaylang | graphviz.mli | val output_graph :
model:Z3.Model.model option -> testname:string -> Global_state.t -> unit
| null | https://raw.githubusercontent.com/JHU-PL-Lab/jaylang/484b3876986a515fb57b11768a1b3b50418cde0c/src/dbmc/graph/graphviz.mli | ocaml | val output_graph :
model:Z3.Model.model option -> testname:string -> Global_state.t -> unit
| |
9044d23dc4d6cddad993d82c30c763bd10fceaad6b363f3f64ef8fdd25a3f782 | quicklisp/quicklisp-controller | logical-host.lisp | ;;;; logical-host.lisp
(in-package #:quicklisp-controller)
(eval-when (:compile-toplevel :load-toplevel :execute)
(ignore-errors (load-logical-pathname-translations "quicklisp-controller"))
(unless (typep (ignore-errors (parse-namestring "quicklisp-controller:"))
'logical-pathname)
(setf (log... | null | https://raw.githubusercontent.com/quicklisp/quicklisp-controller/9fc95237f0f2f86cafc3afb2f1e7666610e8561b/logical-host.lisp | lisp | logical-host.lisp |
(in-package #:quicklisp-controller)
(eval-when (:compile-toplevel :load-toplevel :execute)
(ignore-errors (load-logical-pathname-translations "quicklisp-controller"))
(unless (typep (ignore-errors (parse-namestring "quicklisp-controller:"))
'logical-pathname)
(setf (logical-pathname-translati... |
6a5f7e1357bbb484dfacc65d5c2c9c84cda34f4e5609f15b90b344ce468ad286 | google/ormolu | warning-pragma-list-multiline-out.hs | module Test
# DEPRECATED
[ " This module is deprecated . "
, " Please use OtherModule instead . "
]
#
[ "This module is deprecated."
, "Please use OtherModule instead."
]
#-}
( foo
, bar
, baz
)
where
| null | https://raw.githubusercontent.com/google/ormolu/ffdf145bbdf917d54a3ef4951fc2655e35847ff0/data/examples/module-header/warning-pragma-list-multiline-out.hs | haskell | module Test
# DEPRECATED
[ " This module is deprecated . "
, " Please use OtherModule instead . "
]
#
[ "This module is deprecated."
, "Please use OtherModule instead."
]
#-}
( foo
, bar
, baz
)
where
| |
9574c4242273dfbcabfefcee6ce7a8fa3aac9c9af5ae008718ded617b0ed0fbe | haskell-tools/haskell-tools | Defs.hs | module Refactor.DollarApp.Defs where
f = id
g = id
($$) :: (a -> b) -> a -> a
f $$ a = a
infixl 0 $$ | null | https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/experimental-refactorings/examples/Refactor/DollarApp/Defs.hs | haskell | module Refactor.DollarApp.Defs where
f = id
g = id
($$) :: (a -> b) -> a -> a
f $$ a = a
infixl 0 $$ | |
3e50373da2ee813c6a641aa39a6cac4b5e92695111a25e714a194e58958ca637 | serokell/time-warp | MonadTransfer.hs | # LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE DefaultSignatures #-}
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
{-# LANGUAGE GADTs #-}
# LANGUAGE MultiParamTypeClasses ... | null | https://raw.githubusercontent.com/serokell/time-warp/2783f81957a2e5b02e9d3425d760247a6c5a766b/src/Control/TimeWarp/Rpc/MonadTransfer.hs | haskell | # LANGUAGE DefaultSignatures #
# LANGUAGE GADTs #
# LANGUAGE Rank2Types #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
|
Module : Control.TimeWarp.Rpc.MonadTransfer
License : GPL-3 (see the file LICENSE)
Stability : experimental
... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE MultiParamTypeClasses #
Copyright : ( c ) , 2016
Maintainer : >
Portability : POSIX , GHC... |
15eeb97ba82799db69a4de28596acdbdb95d737907f1a8a5527efd837be1f879 | ekmett/unpacked-containers | List.hs | # LANGUAGE ScopedTypeVariables #
# OPTIONS_GHC -fno - full - laziness -funbox - strict - fields #
-- | Extra list functions
--
-- In separate module to aid testing.
module Internal.List
( isPermutationBy
, deleteBy
, unorderedCompare
) where
import Data.Maybe (fromMaybe)
import Data.List (sortBy)
impor... | null | https://raw.githubusercontent.com/ekmett/unpacked-containers/7dc56993a57511b58257b5d389473e638a7082d2/unpacked-unordered-containers/utils/Internal/List.hs | haskell | | Extra list functions
In separate module to aid testing.
Note: previous implemenation isPermutation = null (as // bs)
was O(n^2) too.
This assumes lists are of equal length
The idea:
Homogeonous version
uc :: (a -> a -> Ordering) -> [a] -> [a] -> Ordering
uc c as bs = compare (sortBy c as) (sortBy c bs)
... | # LANGUAGE ScopedTypeVariables #
# OPTIONS_GHC -fno - full - laziness -funbox - strict - fields #
module Internal.List
( isPermutationBy
, deleteBy
, unorderedCompare
) where
import Data.Maybe (fromMaybe)
import Data.List (sortBy)
import Data.Monoid
import Prelude
isPermutationBy :: (a -> b -> Bool) -... |
9945fa80f8bdf3c34d650d44a2b36cc2e0fad7bf6de479ebf68c1fe41e3d3953 | TerrorJack/ghc-alter | Monoid.hs | # LANGUAGE Trustworthy #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE DeriveGeneric #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE PolyKinds #
# LANGUAGE ScopedTypeVariables #
-----------------------------------------------------------------------------
-- |
-- Module : Data.Monoid
Copyright : ( c ) ... | null | https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/boot-lib/base/Data/Monoid.hs | haskell | ---------------------------------------------------------------------------
|
Module : Data.Monoid
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : experimental
Portability : portable
A class for monoids (types with an associative binary operation that
has a... | # LANGUAGE Trustworthy #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE DeriveGeneric #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE PolyKinds #
# LANGUAGE ScopedTypeVariables #
Copyright : ( c ) 2001 ,
( c ) Oregon Graduate Institute of Science and Technology , 2001
module Data.Monoid (
... |
dd32532260d64a5313fb1f983778481cf1d240054d7c1249bd5c825b29cd74b4 | 2600hz/kazoo | pqc_cb_callflows.erl | %%%-----------------------------------------------------------------------------
( C ) 2010 - 2020 , 2600Hz
%%% @doc
@author
%%%
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 /.
%%%
%%% ... | null | https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_proper/src/pqc_cb_callflows.erl | erlang | -----------------------------------------------------------------------------
@doc
@end
----------------------------------------------------------------------------- | ( C ) 2010 - 2020 , 2600Hz
@author
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 /.
-module(pqc_cb_callflows).
-export([summary/2]).
-export([create/3]).
-export([fetch/3]).
-export([up... |
62fcacfe93e09c995f662954311bf64f0a9d0ef63d4a345df4ff70356dd12645 | cram2/cram | chebyshev.lisp | Regression test CHEBYSHEV for GSLL , automatically generated
;;
Copyright 2009
Distributed under the terms of the GNU General Public License
;;
;; 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 Foun... | null | https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_3rdparty/gsll/src/tests/chebyshev.lisp | lisp |
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Publi... | Regression test CHEBYSHEV for GSLL , automatically generated
Copyright 2009
Distributed under the terms of the GNU General Public License
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 cop... |
8c1eefa9b6a0faaeded6a1c92cc45b5c4e2ebc7434f62ac91ee5c40cb3914413 | tmattio/js-bindings | vscode_languageserver_protocol_protocol_progress.ml | [@@@js.dummy "!! This code has been generated by gen_js_api !!"]
[@@@ocaml.warning "-7-32-39"]
[@@@ocaml.warning "-7-11-32-33-39"]
open Es5
open Vscode_jsonrpc
open Vscode_languageserver_types
open Vscode_languageserver_protocol_messages
module AnonymousInterface0 =
struct
type t = Ojs.t
let rec t_of_js : Ojs... | null | https://raw.githubusercontent.com/tmattio/js-bindings/ca3bd6a12db519c8de7f41b303f14cf70cfd4c5f/lib/vscode-languageserver-protocol/vscode_languageserver_protocol_protocol_progress.ml | ocaml | [@@@js.dummy "!! This code has been generated by gen_js_api !!"]
[@@@ocaml.warning "-7-32-39"]
[@@@ocaml.warning "-7-11-32-33-39"]
open Es5
open Vscode_jsonrpc
open Vscode_languageserver_types
open Vscode_languageserver_protocol_messages
module AnonymousInterface0 =
struct
type t = Ojs.t
let rec t_of_js : Ojs... | |
f09db13bcd6bad4cce39298938c1f6b4f3581ef035cbd33b45958f95eed3c8cf | silkapp/girella | Conv.hs | # LANGUAGE
DefaultSignatures
, FlexibleInstances
, TypeFamilies
, TypeSynonymInstances
#
DefaultSignatures
, FlexibleInstances
, TypeFamilies
, TypeSynonymInstances
#-}
module Girella.Conv (Conv (..)) where
import Data.CaseInsensitive
import Data.Int
import Data.String.Conversions
imp... | null | https://raw.githubusercontent.com/silkapp/girella/f2fbbaaa2536f1afc5bc1a493d02f92cec81da18/src/Girella/Conv.hs | haskell | | Convert an opaleye result to a separate type. Conv is used by the
query functions.
Using the identity conversion we get just this value, good if you
have short lived objects or are writing very DB centric code.
Otherwise you may want to write a conversion to a "domain" type.
It's possible to write functions... | # LANGUAGE
DefaultSignatures
, FlexibleInstances
, TypeFamilies
, TypeSynonymInstances
#
DefaultSignatures
, FlexibleInstances
, TypeFamilies
, TypeSynonymInstances
#-}
module Girella.Conv (Conv (..)) where
import Data.CaseInsensitive
import Data.Int
import Data.String.Conversions
imp... |
f24fe182360511e9ad18202c1147ca3837352715af6fed590ca917c467921cc9 | marcelosousa/llvmvf | Instruction.hs | -------------------------------------------------------------------------------
-- Module : Analysis.Type.Memory.Instruction
Copyright : ( c ) 2013
-- A Type System for Memory Analysis of LLVM IR Modules
-- Type Inference
-------------------------------------------------------------------------------
module ... | null | https://raw.githubusercontent.com/marcelosousa/llvmvf/c314e43aa8bc8bb7fd9c83cebfbdcabee4ecfe1b/src/Analysis/Type/Memory/Instruction.hs | haskell | -----------------------------------------------------------------------------
Module : Analysis.Type.Memory.Instruction
A Type System for Memory Analysis of LLVM IR Modules
Type Inference
-----------------------------------------------------------------------------
Terminators
Float Operations
Truncate intege... | Copyright : ( c ) 2013
module Analysis.Type.Memory.Instruction where
import qualified Data.Map as M
import qualified Data.Set as S
import Language.LLVMIR
import Analysis.Type.Util
import Analysis.Type.Memory.Util
import Analysis.Type.Memory.Constant
import Analysis.Type.Memory.Context
import Analysis.Type.Mem... |
fb352b982913ac774e4f54afd7f35d4a91ffdf67ca002d927c98c5162ade22a6 | ChrisTitusTech/gimphelp | 210_effects-selection_glass-selection.scm | 210_effects-selection_glass-selection.scm
last modified / tested by [ gimphelp.org ]
05/11/2019 on GIMP 2.10.10
;==================================================
;
; Installation:
; This script should be placed in the user or system-wide script folder.
;
; Windows 7/10
C:\Program Files\GIMP 2\share\gimp\2.0... | null | https://raw.githubusercontent.com/ChrisTitusTech/gimphelp/fdbc7e3671ce6bd74cefd83ecf7216e5ee0f1542/gimp_scripts-2.10/210_effects-selection_glass-selection.scm | scheme | ==================================================
Installation:
This script should be placed in the user or system-wide script folder.
Windows 7/10
or
Linux
/home/yourname/.config/GIMP/2.10/scripts
or
Linux system-wide
/usr/share/gimp/2.0/scripts
==================================================
... | 210_effects-selection_glass-selection.scm
last modified / tested by [ gimphelp.org ]
05/11/2019 on GIMP 2.10.10
C:\Program Files\GIMP 2\share\gimp\2.0\scripts
C:\Users\YOUR - NAME\AppData\Roaming\GIMP\2.10\scripts
it under the terms of the GNU General Public License as published by
the Free Softwa... |
3cc050303b08128670e0be70c4fad3d23593030e59314229510468a313f1a2c6 | solatis/haskell-bitcoin-api | Transaction.hs | {-# LANGUAGE OverloadedStrings #-}
-- | This module provides functionality to manipulate raw transaction. It
-- automatically interprets transactions using the `bitcoin-tx` package, so
-- you can work with actual 'Btc.Transaction' objects rather than their
-- serialized format.
module Network.Bitcoin.Api.Transa... | null | https://raw.githubusercontent.com/solatis/haskell-bitcoin-api/cd4b9757283bdd61b5b4ac922db36bbebc469dea/src/Network/Bitcoin/Api/Transaction.hs | haskell | # LANGUAGE OverloadedStrings #
| This module provides functionality to manipulate raw transaction. It
automatically interprets transactions using the `bitcoin-tx` package, so
you can work with actual 'Btc.Transaction' objects rather than their
serialized format.
| Creates a new transaction, but does not sign... |
module Network.Bitcoin.Api.Transaction where
import Data.Aeson
import Data.Aeson.Lens
import Data.Maybe (fromMaybe, catMaybes)
import Control.Lens ((^.), (^?))
import qualified Data.Base58String ... |
28d6a62a4f01d28b93798899910026badf16d72794b9b83bcafd4f6e97ae73f6 | ksseono/the-joy-of-clojure | graphics.clj | (ns joy.graphics)
(def frame (java.awt.Frame.))
(comment
(for [meth (.getMethods java.awt.Frame)
:let [name (.getName meth)]
:when (re-find #"Vis" name)]
name)
= > ( " setVisible " " isVisible " )
)
(.setVisible frame true)
(.setSize frame (java.awt.Dimension. 200 200))
(def gfx (.getGraphics ... | null | https://raw.githubusercontent.com/ksseono/the-joy-of-clojure/4fee3fb2750236b85b59ae9d7a83e0929040e4f0/src/clj/ch03/joy/graphics.clj | clojure | (ns joy.graphics)
(def frame (java.awt.Frame.))
(comment
(for [meth (.getMethods java.awt.Frame)
:let [name (.getName meth)]
:when (re-find #"Vis" name)]
name)
= > ( " setVisible " " isVisible " )
)
(.setVisible frame true)
(.setSize frame (java.awt.Dimension. 200 200))
(def gfx (.getGraphics ... | |
fe2da009cf96e1d9803fd430bedee9c34958aa884707ba9feb3a5e3d4267e768 | jiangpengnju/htdp2e | sl-numbers.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname sl-numbers) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repea... | null | https://raw.githubusercontent.com/jiangpengnju/htdp2e/d41555519fbb378330f75c88141f72b00a9ab1d3/intermezzo-the-nature-of-numbers/sl-numbers.rkt | racket | about the language level of this file in a form that our tools can easily process. | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname sl-numbers) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
|
3ff180929586e905017f77a63f25a9997650f7be2aeb54ee07443bfe96c4603a | AdRoll/kinetic | kinetic_sup_tests.erl | -module(kinetic_sup_tests).
-include("kinetic.hrl").
-include_lib("eunit/include/eunit.hrl").
-hank([{unnecessary_function_arguments, [{test_teardown, 1, 1}]}]).
test_setup() ->
meck:new(erliam, [passthrough]),
meck:expect(erliam, invalidate, 0, ok),
meck:expect(erliam, credentials, 0, fake_creds),
... | null | https://raw.githubusercontent.com/AdRoll/kinetic/32693728d19f94787170acaf45a894fd96778148/test/kinetic_sup_tests.erl | erlang | -module(kinetic_sup_tests).
-include("kinetic.hrl").
-include_lib("eunit/include/eunit.hrl").
-hank([{unnecessary_function_arguments, [{test_teardown, 1, 1}]}]).
test_setup() ->
meck:new(erliam, [passthrough]),
meck:expect(erliam, invalidate, 0, ok),
meck:expect(erliam, credentials, 0, fake_creds),
... | |
86efa037cb8bb8df5b947ad3bbb47008b5cf4f7e53392f68d650c923a902a00f | TrustInSoft/tis-interpreter | wpPropId.ml | Modified by TrustInSoft
(**************************************************************************)
(* *)
This file is part of WP plug - in of Frama - C.
(* ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/wp/wpPropId.ml | ocaml | ************************************************************************
alternatives)
... | Modified by TrustInSoft
This file is part of WP plug - in of Frama - C.
Copyright ( C ) 2007 - 2015
CEA ( Commissariat a l'energie atomique et aux energies
Lesser General Public License as published by the Free Soft... |
40cb8643f9356dc1d7749efd7b29a803b1e7c655b14e9dbf945050f36515a316 | michalkonecny/aern2 | Arrows.hs | |
Module : AERN2.Utils . Arrows
Description : Miscellaneous arrow - generic functions
Copyright : ( c ) : :
Stability : experimental
Portability : portable
Miscellaneous arrow - generic functions
Module : AERN2.Utils.Arrows
De... | null | https://raw.githubusercontent.com/michalkonecny/aern2/7ab41113ca8f73dca70d887d190ddab3b43ef084/aern2-net/src/AERN2/Utils/Arrows.hs | haskell | import Text.Printf
switchArrow2 = arr . (arr .)
| Apply an arrow morphism on all elements of a list
| Apply an arrow morphism on all elements of a list | |
Module : AERN2.Utils . Arrows
Description : Miscellaneous arrow - generic functions
Copyright : ( c ) : :
Stability : experimental
Portability : portable
Miscellaneous arrow - generic functions
Module : AERN2.Utils.Arrows
De... |
5ab6007b766569487ec56a98fc09adcf3da0376c396afe61baedbaf5266ec616 | rtoy/ansi-cl-tests | write.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Thu Jul 15 06:43:55 2004
;;;; Contains: Tests of WRITE
(in-package :cl-test)
(compile-and-load "printer-aux.lsp")
( compile - and - load " write-aux.lsp " )
;;; This function is also incidentally tested elsewhere.
(deftest write.1
(random-write-test 1000)
... | null | https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/write.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of WRITE
This function is also incidentally tested elsewhere.
Error tests | Author :
Created : Thu Jul 15 06:43:55 2004
(in-package :cl-test)
(compile-and-load "printer-aux.lsp")
( compile - and - load " write-aux.lsp " )
(deftest write.1
(random-write-test 1000)
nil)
(deftest write.2
(with-standard-io-syntax
(let ((*print-readably* nil))
(with-output-to-string
... |
52d85d08aa9380b19ca0ed185a88d01b089639ea8681aa9ba7aa67e0fac65d79 | mightybyte/zeus | Common.hs | # OPTIONS_GHC -fno - warn - orphans #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE RecursiveDo #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
module Frontend.Common where
--------------------------------------------------------------------... | null | https://raw.githubusercontent.com/mightybyte/zeus/5566e3244f1ab0cd245e4c36be315a5abddb5810/frontend/src/Frontend/Common.hs | haskell | # LANGUAGE RankNTypes #
# LANGUAGE OverloadedStrings #
----------------------------------------------------------------------------
----------------------------------------------------------------------------
intLink :: DomBuilder t m => Text -> m a -> m a
elAttr "a" ("href" =: href) $ m
-----------------------------... | # OPTIONS_GHC -fno - warn - orphans #
# LANGUAGE FlexibleContexts #
# LANGUAGE RecursiveDo #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
module Frontend.Common where
import Control.Lens hiding (element)
import Data.Default
import Data.Proxy
import Data.Text... |
82833e62a8d08b72187559b146fde861b9255c7e6f1976ff0030a6698a41c638 | yesodweb/wai | CmdLine.hs | {-# LANGUAGE CPP, RecordWildCards #-}
| Command line version of wai - app - static , used for the warp - static server .
module WaiAppStatic.CmdLine
( runCommandLine
, Args (..)
) where
import Network.Wai (Middleware)
import Network.Wai.Application.Static (staticApp, defaultFileServerSettings)
import Net... | null | https://raw.githubusercontent.com/yesodweb/wai/47aeb1708c728019cd82b598a6f3b239008b6414/wai-app-static/WaiAppStatic/CmdLine.hs | haskell | # LANGUAGE CPP, RecordWildCards #
| Run with the given middleware and parsing options from the command line.
| | Command line version of wai - app - static , used for the warp - static server .
module WaiAppStatic.CmdLine
( runCommandLine
, Args (..)
) where
import Network.Wai (Middleware)
import Network.Wai.Application.Static (staticApp, defaultFileServerSettings)
import Network.Wai.Handler.Warp
( runSetting... |
33879cd0b468cd9b6d55b985fb159d0d1dd4ef054e4ad5a0eb37176e2c24251c | stoeffel/elmi-to-json | Json.hs | module Elm.Json
( ElmJson (..),
ElmVersion (..),
load,
)
where
import qualified Data.Aeson as Aeson
import Data.Aeson ((.!=), (.:), (.:?))
import qualified Data.ByteString.Lazy as BL
import qualified Data.Text as T
import qualified Error
import Error (Error)
import qualified Reporting.Task as Task
import R... | null | https://raw.githubusercontent.com/stoeffel/elmi-to-json/ae40d1aa1e3d6878f2af514e611d44890e7abc1e/src/Elm/Json.hs | haskell | module Elm.Json
( ElmJson (..),
ElmVersion (..),
load,
)
where
import qualified Data.Aeson as Aeson
import Data.Aeson ((.!=), (.:), (.:?))
import qualified Data.ByteString.Lazy as BL
import qualified Data.Text as T
import qualified Error
import Error (Error)
import qualified Reporting.Task as Task
import R... | |
3d0a9491f4b768d8ed5c8b4387c2e8320b5794a5c5f536be4656fa621d024f47 | JustusAdam/language-haskell | T0090.hs | SYNTAX TEST " source.haskell " " Fixity declarations "
infixl 6 :+
-- <------ keyword.other.fixity.infixl.haskell
-- ^ constant.numeric.integral.decimal.haskell
-- ^^ constant.other.operator.infix.haskell
infixr 7 //
-- ^ constant.numeric.integral.decimal.haskell
-- <------ keyword.other.fixity.infixr.... | null | https://raw.githubusercontent.com/JustusAdam/language-haskell/c9ee1b3ee166c44db9ce350920ba502fcc868245/test/tickets/T0090.hs | haskell | <------ keyword.other.fixity.infixl.haskell
^ constant.numeric.integral.decimal.haskell
^^ constant.other.operator.infix.haskell
^ constant.numeric.integral.decimal.haskell
<------ keyword.other.fixity.infixr.haskell
^^ keyword.operator.infix.haskell
^ constant.numeric.integral.decimal... | SYNTAX TEST " source.haskell " " Fixity declarations "
infixl 6 :+
infixr 7 //
infix 2 `elem`
^^^^^ keyword.other.fixity.infix.haskell
infix 0 `Cons`
^^^^^ keyword.other.fixity.infix.haskell
|
aa39012e9e01e87e19f527eae3e703564798c2a5ea190503c2581e8c7f8a9e9e | REMath/mit_16.399 | pretty_Print.mli | (* pretty_Print.mli *)
open Abstract_Syntax
val print_Aexp : aexp -> unit
val print_Bexp : bexp -> unit
val pretty_print : com -> unit
| null | https://raw.githubusercontent.com/REMath/mit_16.399/3f395d6a9dfa1ed232d307c3c542df3dbd5b614a/project/Generic-FW-Abstract-Interpreter/pretty_Print.mli | ocaml | pretty_Print.mli | open Abstract_Syntax
val print_Aexp : aexp -> unit
val print_Bexp : bexp -> unit
val pretty_print : com -> unit
|
f36eae12dbbbe533e5c5bcc5c16d20e2620d8b27a365c785c4b56a8ecb0be358 | biocad/hasbolt-extras | Cypher.hs | # LANGUAGE FlexibleInstances #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeSynonymInstances #-}
module Database.Bolt.Extras.Internal.Cypher
(
ToCypher (..)
) where
-------------------------------------------------------... | null | https://raw.githubusercontent.com/biocad/hasbolt-extras/6562ce13b86641928d55883b1cafe3c5a3e75d9e/src/Database/Bolt/Extras/Internal/Cypher.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE QuasiQuotes #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeSynonymInstances #
-----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------... | # LANGUAGE FlexibleInstances #
module Database.Bolt.Extras.Internal.Cypher
(
ToCypher (..)
) where
Queries for neo4j are formatted with ` Cypher ` language .
Read documentation for ` Cypher ` here : -manual/current/cypher/.
This file contains some converation rules from ' Database . ' types to ` Cy... |
2da0007060be6dae895cfb46dd31b6deb1ab59defa1356ff34389bba3ad71be5 | camsaul/toucan2 | test.clj | (ns hooks.clojure.test
(:require [clj-kondo.hooks-api :as hooks]))
(def disallowed-parallel-forms
'#{with-redefs
clojure.core/with-redefs
with-discarded-table-changes
test/with-discarded-table-changes
toucan2.test/with-discarded-table-changes
finally})
(defn warn-about-disallowed-parallel... | null | https://raw.githubusercontent.com/camsaul/toucan2/b48c85addc5103b6f5e294620977ca7f1b797f78/.clj-kondo/hooks/clojure/test.clj | clojure | (ns hooks.clojure.test
(:require [clj-kondo.hooks-api :as hooks]))
(def disallowed-parallel-forms
'#{with-redefs
clojure.core/with-redefs
with-discarded-table-changes
test/with-discarded-table-changes
toucan2.test/with-discarded-table-changes
finally})
(defn warn-about-disallowed-parallel... | |
82a7f40768d4a6338aef268c9e86d979a0de09aff12a372c3f0fa57075e83298 | maximedenes/native-coq | autoinstance.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/toplevel/autoinstance.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* What to do if we find an instance.... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Term
open Libnames
open ... |
9fa4a61b86f046d04198e2caad748e5e406101d7707e7668a2ecf08c81131025 | GillianPlatform/Gillian | pp_utils.ml | (** If the string is an indentifier, don't change it, otherwiser quote it. *)
let maybe_quote_ident str =
let matches = Str.string_match (Str.regexp "[A-Za-z][A-Za-z0-9_]*") str 0 in
if matches && Str.match_end () == String.length str then str
else "\"" ^ str ^ "\""
| null | https://raw.githubusercontent.com/GillianPlatform/Gillian/3d0c78f5440f10cef7bd12720f483a25a61bf1d3/GillianCore/GIL_Syntax/pp_utils.ml | ocaml | * If the string is an indentifier, don't change it, otherwiser quote it. | let maybe_quote_ident str =
let matches = Str.string_match (Str.regexp "[A-Za-z][A-Za-z0-9_]*") str 0 in
if matches && Str.match_end () == String.length str then str
else "\"" ^ str ^ "\""
|
6a3da0b46f0e26eb8961e7514a51f04718c1b788295c39738c86b48f036f7b67 | mfikes/esprit | esprit.clj | (ns cljs.repl.esprit
(:require [esprit.repl :as esprit]))
(def repl-env esprit/repl-env)
| null | https://raw.githubusercontent.com/mfikes/esprit/82b2339d0d3af052f84975928308bbb19a7e3c34/src/cljs/repl/esprit.clj | clojure | (ns cljs.repl.esprit
(:require [esprit.repl :as esprit]))
(def repl-env esprit/repl-env)
| |
f15523a9242277deab7d569c9012fdfa21f1d3acfa4b59b843bbab8682e451ee | TyGuS/hoogle_plus | Pretty.hs | # LANGUAGE FlexibleInstances , UndecidableInstances , FlexibleContexts #
module Synquid.Pretty (
-- * Interface
Pretty (..),
Doc,
renderPretty,
putDoc,
prettyShow,
-- * Basic documents
empty,
isEmpty,
text,
linebreak,
semi,
lbrace, rbrace,
-- * Combinators
option,
optionMaybe,
(<+>), ... | null | https://raw.githubusercontent.com/TyGuS/hoogle_plus/d02a1466d98f872e78ddb2fb612cb67d4bd0ca18/src/Synquid/Pretty.hs | haskell | * Interface
* Basic documents
* Combinators
* Enclosing
* Indentation
* Structures
* Programs
* Highlighting
* Counting
| Is document empty?
| Separate by spaces
| Separate by new lines
| Separate by commas
| Enclose in spaces
| Conditionally enclose in parentheses
| Conditionally produce a doc
| Conve... | # LANGUAGE FlexibleInstances , UndecidableInstances , FlexibleContexts #
module Synquid.Pretty (
Pretty (..),
Doc,
renderPretty,
putDoc,
prettyShow,
empty,
isEmpty,
text,
linebreak,
semi,
lbrace, rbrace,
option,
optionMaybe,
(<+>), ($+$), (<>), (</>),
hcat,
vcat,
hsep,
vsep,
punct... |
ab4886786278c2361986517819d081dfc0edef0a92e5854dba402e530bb2d8fd | bosco/p2p | client.erl | %%% All our client functions go in here, including the main loop
-module(client).
-export([client_loop/3, find_closest/3, get_peers/2]).
-include("p2p.hrl").
find_closest(Peer, Pid, Id) ->
Cookie = calc:cookie(),
Pid ! #find_closest{cookie=Cookie, mypid=self(), peer=Peer, id=Id},
receive
#find_closest_response{c... | null | https://raw.githubusercontent.com/bosco/p2p/54e5d4261777057a5d0e04040b1861e9b276fc0d/client.erl | erlang | All our client functions go in here, including the main loop |
-module(client).
-export([client_loop/3, find_closest/3, get_peers/2]).
-include("p2p.hrl").
find_closest(Peer, Pid, Id) ->
Cookie = calc:cookie(),
Pid ! #find_closest{cookie=Cookie, mypid=self(), peer=Peer, id=Id},
receive
#find_closest_response{cookie=Cookie, result=Result} ->
Result
after ?client_timeout ... |
2faca07961c4bae45436faf622d51e1c1498659e0fd197732947019e4ec6dbf0 | ocaml-explore/explore | numbers.ml | module Float = struct
type t = float
let print : t -> unit = print_float
end
module Int = struct
type t = int
let print : t -> unit = print_int
end
| null | https://raw.githubusercontent.com/ocaml-explore/explore/117768b378959f18a8d818f37779a750e90f3438/content/workflows/debugging-and-exploring-ocaml-projects/examples/library/lib/numbers.ml | ocaml | module Float = struct
type t = float
let print : t -> unit = print_float
end
module Int = struct
type t = int
let print : t -> unit = print_int
end
| |
56d2a017512e03c5b8aab757c253f1776468f018a5318f90f6829629a028d19f | alexandergunnarson/quantum | refs.cljc | (ns quantum.core.refs
(:refer-clojure :exclude
[deref
volatile!
atom remove-watch add-watch get-validator set-validator! reset! swap! compare-and-set!
agent restart-agent agent-error await await-for commute send set-agent-send-executor!
send-off set-agent-send-off-executor! send-via
ref... | null | https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/src/quantum/core/refs.cljc | clojure |
TODO fix
===== COMMON MUTATIVE OPERATIONS ===== ;
TODO `reify-compatible`
===== VOLATILES ===== ;
===== ATOMS ===== ;
AtomicFloat
===== AGENTS ===== ;
===== REFS ===== ;
===== VARS ===== ;
===== OTHER ===== ;
in order to not print out `body` by default unless asked | (ns quantum.core.refs
(:refer-clojure :exclude
[deref
volatile!
atom remove-watch add-watch get-validator set-validator! reset! swap! compare-and-set!
agent restart-agent agent-error await await-for commute send set-agent-send-executor!
send-off set-agent-send-off-executor! send-via
ref... |
6a78581394e554e3c781458e6bdba1a2ccf6344341938101a21d76c2abda0e44 | huangjs/cl | foptim.lisp | ;;; -*- LISP -*-
;;; Auxiliary routines for OPTIMIZE'ing
;;;
Created by KMP 8:23pm Friday , 23 February 1979
;;; Syntax is:
;;;
, B,[C , D],[Q ] ... ) ;
;;;
;;; Elements of the arg list with different forms do different things:
;;;
[ 1 ] If an arg is an ATOM , then its function will be redefined with the
;;;... | null | https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/maxima/share/misc/foptim.lisp | lisp | -*- LISP -*-
Auxiliary routines for OPTIMIZE'ing
Syntax is:
Elements of the arg list with different forms do different things:
optimized form.
will be optimized, and the optimized LAMBDA will be returned.
element of the list.
FOPTIMIZE is the function that does the work.
It does type checking but ... | Created by KMP 8:23pm Friday , 23 February 1979
[ 1 ] If an arg is an ATOM , then its function will be redefined with the
[ 2 ] If the arg is a 1 - length List , then the function named in the list
[ 3 ] If the arg is a 2 - length list , then the function named by its
first arg will be optimized and given ... |
c218d72099eee65140dd5f373c4260001de99be920029284402cb0e0ce225d9d | bcc32/projecteuler-ocaml | sol_725.ml | open! Core
open! Import
let partition_int : int -> int list list =
Memo.simple
(module Int)
(fun n ->
let rec partition_int n ~largest_part =
if n = 0
then [ [] ]
else (
let largest_part = Int.min n largest_part in
List.range 1 largest_part ~stop:`inclu... | null | https://raw.githubusercontent.com/bcc32/projecteuler-ocaml/712f85902c70adc1ec13dcbbee456c8bfa8450b2/sol/sol_725.ml | ocaml | TODO: Move this function into [Number_theory].
Basically, this is the number of possible DS-numbers times the
probability that a given position takes the value of this
digit. | open! Core
open! Import
let partition_int : int -> int list list =
Memo.simple
(module Int)
(fun n ->
let rec partition_int n ~largest_part =
if n = 0
then [ [] ]
else (
let largest_part = Int.min n largest_part in
List.range 1 largest_part ~stop:`inclu... |
668f041f38ce60641f3dc88dd2a844cad7193a920c0eebbc40786ae9d75f90d7 | brendanhay/amazonka | Main.hs | # OPTIONS_GHC -fno - warn - unused - imports #
-- |
-- Module : Main
Copyright : ( c ) 2013 - 2023
License : Mozilla Public License , v. 2.0 .
Maintainer : < brendan.g.hay+ >
-- Stability : auto-generated
Portability : non - portable ( GHC extensions )
module Main (main) where
import Test... | null | https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-wellarchitected/test/Main.hs | haskell | |
Module : Main
Stability : auto-generated | # OPTIONS_GHC -fno - warn - unused - imports #
Copyright : ( c ) 2013 - 2023
License : Mozilla Public License , v. 2.0 .
Maintainer : < brendan.g.hay+ >
Portability : non - portable ( GHC extensions )
module Main (main) where
import Test.Amazonka.WellArchitected
import Test.Amazonka.WellArchitec... |
1688bd228f496bbdafcef8940af9b752135bf3cd69d42ff3c13c6024705be20f | pfdietz/ansi-test | format-paren.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sun Oct 17 20:28:24 2004
;;;; Contains: Tests of the ~( format directives
(def-format-test format.paren.1
"~(XXyy~AuuVV~)" ("ABc dEF ghI") "xxyyabc def ghiuuvv")
Conversion of simple characters to downcase
(deftest format.paren.2
(loop for i from 0 below... | null | https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/printer/format/format-paren.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of the ~( format directives
Nested conversion | Author :
Created : Sun Oct 17 20:28:24 2004
(def-format-test format.paren.1
"~(XXyy~AuuVV~)" ("ABc dEF ghI") "xxyyabc def ghiuuvv")
Conversion of simple characters to downcase
(deftest format.paren.2
(loop for i from 0 below (min char-code-limit (ash 1 16))
for c = (code-char i)
w... |
9b796717e190ed3bf7a832ff55e927e32de3c46debd5b60c3e260915f9185832 | rnewman/clj-sip | hierarchy.clj | (ns com.twinql.clojure.hierarchy
(:refer-clojure))
Utilities for manipulating a global hierarchy .
(defn deriving-form [hierarchy [[parent & children] & remaining]]
(letfn [(derive-form
[hier parent [child & remaining-children]]
(if child
`(derive ~(derive-form hier parent ... | null | https://raw.githubusercontent.com/rnewman/clj-sip/0e883c13c0b4a978f0655d163b249ae61081ded7/src/com/twinql/clojure/hierarchy.clj | clojure | (ns com.twinql.clojure.hierarchy
(:refer-clojure))
Utilities for manipulating a global hierarchy .
(defn deriving-form [hierarchy [[parent & children] & remaining]]
(letfn [(derive-form
[hier parent [child & remaining-children]]
(if child
`(derive ~(derive-form hier parent ... | |
cd62bec8f5b1e6643c770e3c26486ff24168aa4ebb2905cace35ecfe07facd5c | ghc/packages-haskeline | RunTTY.hs | # LANGUAGE RecordWildCards #
-- This module provides an interface for testing the output
-- of programs that expect to be run in a terminal.
module RunTTY (Invocation(..),
runInvocation,
assertInvocation,
testI,
setLang,
setTerm,
setLatin1,
... | null | https://raw.githubusercontent.com/ghc/packages-haskeline/5f16b76168f13c6413413386efc44fb1152048d5/tests/RunTTY.hs | haskell | This module provides an interface for testing the output
of programs that expect to be run in a terminal.
Input chunks. (We pause after each chunk to
from coalescing the changes.)
(TODO: I'd like to just unset ONLCR in the slave tty, but
cause error to be thrown | # LANGUAGE RecordWildCards #
module RunTTY (Invocation(..),
runInvocation,
assertInvocation,
testI,
setLang,
setTerm,
setLatin1,
setUTF8
) where
import Control.Concurrent
import Data.ByteString as B
import System.IO
import ... |
ddc10aa63cab20650f5d4efc3305b1269167609c841978f370d3542031843c2b | clj-holmes/clj-watson | cli.clj | (ns clj-watson.cli
(:gen-class)
(:require
[cli-matic.core :as cli]
[clj-watson.entrypoint :as entrypoint]))
(def CONFIGURATION
{:app {:command "clj-watson"
:description "run clj-holmes" :version (System/getProperty "clj-watson.version")}
:commands [{:command "scan"
... | null | https://raw.githubusercontent.com/clj-holmes/clj-watson/9972a334b49dd50bb9bb14314ce37e8ad566dc55/src/clj_watson/cli.clj | clojure | keep stdout type to avoid break current automations | (ns clj-watson.cli
(:gen-class)
(:require
[cli-matic.core :as cli]
[clj-watson.entrypoint :as entrypoint]))
(def CONFIGURATION
{:app {:command "clj-watson"
:description "run clj-holmes" :version (System/getProperty "clj-watson.version")}
:commands [{:command "scan"
... |
8b3dd7d47832ef1c355f2a1d2b9c6c5973e9af53c8b8e1e635278cac1b1a7cfc | ocaml-multicore/tezos | check.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2021 Nomadic Labs < >
(* ... | null | https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/tezt/lib/check.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2021 Nomadic Labs < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN AN... |
8dd057f6cff863fcc4b9cf4b29cbfb8a75eef466f8c6109a242817eaaff30c49 | haroldcarr/learn-haskell-coq-ml-etc | NonLinearFood.hs | {-# LANGUAGE GADTs #-}
# LANGUAGE LambdaCase #
{-# LANGUAGE RankNTypes #-}
module NonLinearFood where
--
--
------------------------------------------------------------------------------
newtype CoData con = CoData { unCoData :: forall r. con r -> r }
data Full where
Eaten :: Full
data Food r where
Hav... | null | https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/66dc7ac85e46635daa8b225cff2bc7f6f23a3d06/agda/2015-03-carter-schonwald-copattern-matching/src/NonLinearFood.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes #
----------------------------------------------------------------------------
----------------------------------------------------------------------------
---------------------------------------------------------------------------- | # LANGUAGE LambdaCase #
module NonLinearFood where
newtype CoData con = CoData { unCoData :: forall r. con r -> r }
data Full where
Eaten :: Full
data Food r where
Have :: Food (CoData Food)
Eat :: Food Full
biscuit :: CoData Food
biscuit = CoData $ \case
Have -> biscuit
Eat -> Eaten
eat :: CoData... |
c1a77600d4dc532efff38048dd2869cb9a8ce70a211c87f8734bc357af015ee4 | acl2/acl2 | top.lisp | PFCS ( Prime Field Constraint System ) Library
;
Copyright ( C ) 2023 Kestrel Institute ( )
;
License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 .
;
Author : ( )
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(in-package "PFCS")
(include-book... | null | https://raw.githubusercontent.com/acl2/acl2/560688cd2b96edcacc5594329e238526c2d216d3/books/kestrel/crypto/pfcs/top.lisp | lisp | PFCS ( Prime Field Constraint System ) Library
Copyright ( C ) 2023 Kestrel Institute ( )
License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 .
Author : ( )
(in-package "PFCS")
(include-book "concrete-syntax")
(include-book "abstract-syntax")
(include-book "abstract-syntax-ope... | |
ff7005ea25738f907d11a318e5474dcbdd991d92bcc6c9ca2600aa89d7276b58 | mbenke/zpf2013 | BadCollection2.hs | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances , FlexibleContexts #
# LANGUAGE TypeFamilies #
class Collection c e where
empty :: c
insert :: e -> c -> c
member :: e -> c -> Bool
instance Eq a => Collection [a] a where
empty = []
insert = (:)
member = elem
ins2 x y = insert y . insert x... | null | https://raw.githubusercontent.com/mbenke/zpf2013/85f32747e17f07a74e1c3cb064b1d6acaca3f2f0/Slides/02Typ2/BadCollection2.hs | haskell | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances , FlexibleContexts #
# LANGUAGE TypeFamilies #
class Collection c e where
empty :: c
insert :: e -> c -> c
member :: e -> c -> Bool
instance Eq a => Collection [a] a where
empty = []
insert = (:)
member = elem
ins2 x y = insert y . insert x... | |
bf6d1cca79168f45ef6710cef359d87e092e3aeb6150b0789cb204931ba3de16 | kana/sicp | ex-4.42.scm | Exercise 4.42 . Solve the following ` ` Liars '' puzzle ( from Phillips 1934 ):
;;;
Five schoolgirls sat for an examination . Their parents -- so they thought
;;; -- showed an undue degree of interest in the result. They therefore agreed
that , in writing home about the examination , each girl should make one t... | null | https://raw.githubusercontent.com/kana/sicp/912bda4276995492ffc2ec971618316701e196f6/ex-4.42.scm | scheme |
-- showed an undue degree of interest in the result. They therefore agreed
their letters:
| Exercise 4.42 . Solve the following ` ` Liars '' puzzle ( from Phillips 1934 ):
Five schoolgirls sat for an examination . Their parents -- so they thought
that , in writing home about the examination , each girl should make one true
statement and one untrue one . The following are the relevant passages from
... |
af98fa426d6029bf90ffca5a17f8f3e5cfa8a7ccac26921589db399d5093afc5 | prowdsponsor/fb | RealTime.hs | # LANGUAGE FlexibleContexts , OverloadedStrings #
module Facebook.RealTime
( RealTimeUpdateObject(..)
, RealTimeUpdateField
, RealTimeUpdateUrl
, RealTimeUpdateToken
, modifySubscription
, RealTimeUpdateSubscription(..)
, listSubscriptions
, verifyRealTimeUpdateNotifications
, getRea... | null | https://raw.githubusercontent.com/prowdsponsor/fb/596f2633e017e1765c58a913949b4c4948a5455e/src/Facebook/RealTime.hs | haskell | | The type of objects that a real-time update refers to.
| A field of a 'RealTimeUpdateObject' that you would like to
receive notifications when changed.
| The URL on your server that will receive the real-time
see what this URL needs to implement.
server in order to verify that you really were trying to
modify ... | # LANGUAGE FlexibleContexts , OverloadedStrings #
module Facebook.RealTime
( RealTimeUpdateObject(..)
, RealTimeUpdateField
, RealTimeUpdateUrl
, RealTimeUpdateToken
, modifySubscription
, RealTimeUpdateSubscription(..)
, listSubscriptions
, verifyRealTimeUpdateNotifications
, getRea... |
63201349ec56f735c78e0dee8294490f531cc76df02fbbdc39c78d9509a5abd8 | jyh/metaprl | sil_itt_sos.ml |
* Operational semantics of the imperative programs ,
* coded in ITT .
*
* ----------------------------------------------------------------
*
* This file is part of MetaPRL , a modular , higher order
* logical framework that provides a logical programming
* environment for OCaml and other languag... | null | https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/sil/sil_itt_sos.ml | ocaml | ***********************************************************************
* EVALSTO DEFINITION *
***********************************************************************
* New terms we need to define the syntax.
* prog is the abstraction of an expression over the stat... |
* Operational semantics of the imperative programs ,
* coded in ITT .
*
* ----------------------------------------------------------------
*
* This file is part of MetaPRL , a modular , higher order
* logical framework that provides a logical programming
* environment for OCaml and other languag... |
f3cbbfab8774f0bb4ba2541e5b120b6cdc137677d3d4abaa75d1e9f9e71ec1e0 | philnguyen/soft-contract | snake.rkt | #lang racket
(provide
(contract-out
;; data
[DIR/C contract?]
[POSN/C contract?]
[SNAKE/C contract?]
[WORLD/C contract?]
[struct posn ([x real?] [y real?])]
[posn=? (POSN/C POSN/C . -> . boolean?)]
[struct snake ([dir DIR/C] [segs (and/c cons? (listof POSN/C))])]
[struct world ([snake SNAKE/C] [food... | null | https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/test/programs/safe/games/snake.rkt | racket | data
const
collide
cut-tail
motion-help
motion
handlers
scenes
Dummy functions `image`
data
const
collide
snake-wall-collide? : Snake -> Boolean
Is the snake colliding with any/c of the walls?
head-collide? : Posn -> Boolean
snake-self-collide? : Snake -> Boolean
cut-tail
- (cons Posn empty)... | #lang racket
(provide
(contract-out
[DIR/C contract?]
[POSN/C contract?]
[SNAKE/C contract?]
[WORLD/C contract?]
[struct posn ([x real?] [y real?])]
[posn=? (POSN/C POSN/C . -> . boolean?)]
[struct snake ([dir DIR/C] [segs (and/c cons? (listof POSN/C))])]
[struct world ([snake SNAKE/C] [food POSN/C])]... |
3cefe85e0ad535abd540b4f8b38d202b580bfd6c16bd6928c905fb57a861d3f0 | ygmpkk/house | DevInfo.hs | module Kernel.PCI.DevInfo
( DevInfo, getDevInfo
, vendorId, deviceId, revision, rawClass, headerType
, isPresent, isMultiFun, isPCItoPCIbridge
, showDevInfo
) where
import H.Monad(H)
import Kernel.PCI.ConfigSpace
import Kernel.PCI.ParseVendors(ClassTable, VendorTable)
import Kernel.Bits(showHex)
import Dat... | null | https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/kernel/Kernel/PCI/DevInfo.hs | haskell | module Kernel.PCI.DevInfo
( DevInfo, getDevInfo
, vendorId, deviceId, revision, rawClass, headerType
, isPresent, isMultiFun, isPCItoPCIbridge
, showDevInfo
) where
import H.Monad(H)
import Kernel.PCI.ConfigSpace
import Kernel.PCI.ParseVendors(ClassTable, VendorTable)
import Kernel.Bits(showHex)
import Dat... | |
fe91f8882253d0a77ca580b2c4d2f27c736a23cec7bcbbd4d1336fea9786343f | takikawa/racket-ppa | simple.rkt | #lang racket/base
(require racket/fixnum
"wrap.rkt"
"match.rkt"
"known.rkt"
"import.rkt"
"mutated-state.rkt")
(provide simple?
simple/can-copy?)
;; Check whether an expression is simple in the sense that its order
;; of evaluation isn't detectable (`pure?` = #t) o... | null | https://raw.githubusercontent.com/takikawa/racket-ppa/5f2031309f6359c61a8dfd1fec0b77bbf9fb78df/src/schemify/simple.rkt | racket | Check whether an expression is simple in the sense that its order
of evaluation isn't detectable (`pure?` = #t) or at least it won't
try to capture a continuation (`pure?` = #f). In `pure?` mode, if
`no-alloc?` is true, then allocation counts as detectable (for
ordering with respect to functions that might capture... | #lang racket/base
(require racket/fixnum
"wrap.rkt"
"match.rkt"
"known.rkt"
"import.rkt"
"mutated-state.rkt")
(provide simple?
simple/can-copy?)
(define (simple? e prim-knowns knowns imports mutated simples unsafe-mode?
#:pure? [pure? #t]
... |
18191be5bdb233375bb5ff11e1f49db8bc94426ff07805e4d1f99bce76c2d987 | dwayne/eopl3 | ex2.25.rkt | #lang eopl
Exercise 2.25
;;
;; Use cases to write max-interior, which takes a binary tree of integers
with at least one interior node and returns the symbol associated with
;; an interior node with a maximal leaf sum.
(provide
Construct
leaf-node interior-node
;; Find
max-interior)
(define-datatype bintre... | null | https://raw.githubusercontent.com/dwayne/eopl3/9d5fdb2a8dafac3bc48852d49cda8b83e7a825cf/solutions/02-ch2/racket/ex2.25.rkt | racket |
Use cases to write max-interior, which takes a binary tree of integers
an interior node with a maximal leaf sum.
Find
NOTE: max-interior-helper traverses the bintree twice. Once to get
alternative is to get both values at once.
max-interior-helper:
Helpers
max-interior-helper: bintree? -> maybe[(s... | #lang eopl
Exercise 2.25
with at least one interior node and returns the symbol associated with
(provide
Construct
leaf-node interior-node
max-interior)
(define-datatype bintree bintree?
[leaf-node
(num integer?)]
[interior-node
(key symbol?)
(left bintree?)
(right bintree?)])
(define (max... |
7cc76d86427f0a59e2de6a67e1851dcb9f19f1a1455ca7534e7acc09af0aa371 | jakemcc/test-refresh | test_refresh.clj | (ns leiningen.test-refresh
(:require [leiningen.test :as test]
[leiningen.core.project :as project]
[leiningen.core.eval :as eval]))
(def is-test-refresh? (comp (partial = 'com.jakemccrary/lein-test-refresh)
symbol
first))
(defn- add-de... | null | https://raw.githubusercontent.com/jakemcc/test-refresh/e793522793c40485fcaacd8c9d9af667c967fc97/lein-test-refresh/src/leiningen/test_refresh.clj | clojure | (ns leiningen.test-refresh
(:require [leiningen.test :as test]
[leiningen.core.project :as project]
[leiningen.core.eval :as eval]))
(def is-test-refresh? (comp (partial = 'com.jakemccrary/lein-test-refresh)
symbol
first))
(defn- add-de... | |
c137c69feb3923a4f08cb2a1f8c7b1b538d0df97c46546c79e0a242e39ee6e27 | scalaris-team/scalaris | iblt.erl | 2011 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
% you may not use this file except in compliance with the License.
% You may obtain a copy of the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, software
distribut... | null | https://raw.githubusercontent.com/scalaris-team/scalaris/feb894d54e642bb3530e709e730156b0ecc1635f/src/rrepair/iblt.erl | erlang | you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language gov... | 2011 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
@doc Invertible Bloom Lookup Table
Operations : Insert , Delete , Get , ListEntries
1 ) M.T. G... |
6ca7d7c033c5d4aa63fdd1556c2350b8ecd0d16d7ce43803e160f41666ddae96 | Ptival/chick | Test.hs | module Diff.ConcatMap.Test where
import qualified Diff.Atom as DA
import Diff.ConcatMap
import qualified Diff.List as DL
import Polysemy
import Polysemy.Error
import Polysemy.Trace
import PrettyPrinting . PrettyPrintable
input :: [Int]
input = [2, 3, 4, 5]
f :: Int -> [Int]
f n = replicate n n
δinput ... | null | https://raw.githubusercontent.com/Ptival/chick/a5ce39a842ff72348f1c9cea303997d5300163e2/backend/test/Diff/ConcatMap/Test.hs | haskell | property:
concatMap f (patch p l) = permute p' (concatMap f l) | module Diff.ConcatMap.Test where
import qualified Diff.Atom as DA
import Diff.ConcatMap
import qualified Diff.List as DL
import Polysemy
import Polysemy.Error
import Polysemy.Trace
import PrettyPrinting . PrettyPrintable
input :: [Int]
input = [2, 3, 4, 5]
f :: Int -> [Int]
f n = replicate n n
δinput ... |
d754b2ed321da204b6429db650fcffb25cbd676c0813db39eba9a6da02dc9044 | thi-ng/geom | protocols.cljc | (ns thi.ng.geom.test.core.protocols
#?(:cljs
(:require-macros
[cemerick.cljs.test :refer (is deftest with-test run-tests testing)]))
(:require
[thi.ng.math.core :as m]
[thi.ng.geom.core :as g]
[thi.ng.geom.matrix]
[thi.ng.geom.quaternion]
[thi.ng.geom.vector]
#?(:clj
[clojure.test... | null | https://raw.githubusercontent.com/thi-ng/geom/85783a1f87670c5821473298fa0b491bd40c3028/test/thi/ng/geom/test/core/protocols.cljc | clojure | (ns thi.ng.geom.test.core.protocols
#?(:cljs
(:require-macros
[cemerick.cljs.test :refer (is deftest with-test run-tests testing)]))
(:require
[thi.ng.math.core :as m]
[thi.ng.geom.core :as g]
[thi.ng.geom.matrix]
[thi.ng.geom.quaternion]
[thi.ng.geom.vector]
#?(:clj
[clojure.test... | |
c43af1540e428e997dc96e2f3c5d4e6c5a7c2466262c5c56af2d365c740344dc | mcandre/ocaml-getopt | getopt.ml | Module [ ] : parsing of command line arguments
let noshort = '\000'
let nolong = ""
type opt = char * string * ((unit -> unit) option) * ((string -> unit) option)
exception Error of string
let index_option s c =
try Some (String.index s c)
with Not_found -> None
let extract_arg_handle opt = function
... | null | https://raw.githubusercontent.com/mcandre/ocaml-getopt/9d36081db01008c15a4a0044b4c1cbdf8d3f3492/getopt.ml | ocaml | Anonymous arguments after --
--
long option with argument
long option with no argument
-
short option
no argument allowed; next chars are options
argument allowed or mandatory
immediate argument
non-immediate argument
no argument
useful actions and handlers | Module [ ] : parsing of command line arguments
let noshort = '\000'
let nolong = ""
type opt = char * string * ((unit -> unit) option) * ((string -> unit) option)
exception Error of string
let index_option s c =
try Some (String.index s c)
with Not_found -> None
let extract_arg_handle opt = function
... |
b6a05ea925856c83aa957c880092b4ed565227bc2092daa6a5d65f01c015a52e | tensorflow/haskell | BuildTest.hs | Copyright 2016 TensorFlow authors .
--
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
distr... | null | https://raw.githubusercontent.com/tensorflow/haskell/d088e30b80f1508281e400975bec9d14b431a22c/tensorflow-ops/tests/BuildTest.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 perm... | Copyright 2016 TensorFlow authors .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
# LANGUAGE OverloadedLists #
# LANGUAGE ScopedTypeVariables #
module Main where
import Control.Monad.IO.Class (liftIO)
import Lens.Famil... |
dd30582a9d32c6a6d24dcd4a1c08ccd394666546151363812e0ed7c8435e836f | hackwaly/ocaml-dap | debug_protocol.mli | (** The Debug Adapter Protocol defines the protocol used between an editor or IDE and a debugger or runtime. *)
(* Auto-generated from json schema. Do not edit manually. *)
include module type of Debug_protocol_types
module Protocol_message : sig
module Type : sig
(** Message type. *)
type t =
| Reque... | null | https://raw.githubusercontent.com/hackwaly/ocaml-dap/c17e0bf279619cc3d6dbf719575a539dca48aa7f/src/debug_protocol/debug_protocol.mli | ocaml | * The Debug Adapter Protocol defines the protocol used between an editor or IDE and a debugger or runtime.
Auto-generated from json schema. Do not edit manually.
* Message type.
* Base class of requests, responses, and events.
* Sequence number (also known as message ID). For protocol messages of type 'request' th... |
include module type of Debug_protocol_types
module Protocol_message : sig
module Type : sig
type t =
| Request [@name "request"]
| Response [@name "response"]
| Event [@name "event"]
| Custom of string
include JSONABLE with type t := t
end
type t = {
}
[@@deriving make, yoj... |
5a1c25e2df20173ae4f033eb050ea4e28b16a20b3eb7af60dcb7bcbe5541bd25 | janestreet/incr_dom_partial_render | partial_render_list_intf.ml | open! Core
open! Import
open Util
module Interval = struct
type 'a t =
| Empty
| Range of 'a * 'a
[@@deriving compare, sexp]
end
module Measurements = struct
type t =
{ list_rect : float Js_misc.Rect.t
; view_rect : float Js_misc.Rect.t
}
[@@deriving compare, sexp]
end
module type Key = s... | null | https://raw.githubusercontent.com/janestreet/incr_dom_partial_render/82be6e4688d8491c9a71a2aa7d1591da7aa61eee/src/partial_render_list_intf.ml | ocaml | * [Row_id.t] is used to uniquely identify rows, while [Sort_key.t] is used to sort them.
If the order of your rows frequently changes, you can use [Row_id.t] to uniquely
identify a row even as its [Sort_key.t] value changes.
This is useful for preserving the measured heights in [Height_cache] as row values... | open! Core
open! Import
open Util
module Interval = struct
type 'a t =
| Empty
| Range of 'a * 'a
[@@deriving compare, sexp]
end
module Measurements = struct
type t =
{ list_rect : float Js_misc.Rect.t
; view_rect : float Js_misc.Rect.t
}
[@@deriving compare, sexp]
end
module type Key = s... |
f677e01cc155606905eb114f37e7c27a61b38101cdc2e572cdfe2ad17d1038ca | kit-ty-kate/visitors | hexpr_polymorphic.ml | open Hashcons
module VisitorsHashcons = struct
(* We CAN implement the method [visit_hash_consed], but this method requires
a hash-consing table. We assume that this table is stored in the field
[_table], which we declare virtual. *)
(* A key subtlety is that the method [visit_hash_consed] must be mono... | null | https://raw.githubusercontent.com/kit-ty-kate/visitors/fc53cc486178781e0b1e581eced98e07facb7d29/test/hexpr_polymorphic.ml | ocaml | We CAN implement the method [visit_hash_consed], but this method requires
a hash-consing table. We assume that this table is stored in the field
[_table], which we declare virtual.
A key subtlety is that the method [visit_hash_consed] must be monomorphic
in ['b]. Indeed, we cannot hope to build values... | open Hashcons
module VisitorsHashcons = struct
class virtual ['self] map = object (_ : 'self)
val virtual _table: 'b Hashcons.t
method visit_hash_consed: 'env 'a .
('env -> 'a -> 'b) ->
'env -> 'a hash_consed -> 'b hash_consed
= fun visit_'a env { node = e; _ } ->
hashcons _table (... |
4083c8ca565b9ca68d4b3741a4410485b0e84ec9ecfab47c34faf42644148386 | rescript-association/genType | Config_.ml | module ModuleNameMap = Map.Make (ModuleName)
let bsbProjectRoot = ref ""
let projectRoot = ref ""
type language = Flow | TypeScript | Untyped
type module_ = CommonJS | ES6
type importPath = Relative | Node
type bsVersion = int * int * int
type config = {
bsCurryPath : string option;
bsDependencies : string list;... | null | https://raw.githubusercontent.com/rescript-association/genType/cd10ad34d63b28e2be7d136ffdb267127b543ffd/src/Config_.ml | ocaml | To be deprecated: array of strings
Give priority to gentypeconfig, followed by package-specs | module ModuleNameMap = Map.Make (ModuleName)
let bsbProjectRoot = ref ""
let projectRoot = ref ""
type language = Flow | TypeScript | Untyped
type module_ = CommonJS | ES6
type importPath = Relative | Node
type bsVersion = int * int * int
type config = {
bsCurryPath : string option;
bsDependencies : string list;... |
1e271ad991df071ea2e2481711e0edd085eb055562f0e434cfd9dec4c6733ab9 | input-output-hk/plutus-apps | Spec.hs | # LANGUAGE DataKinds #
{-# LANGUAGE OverloadedStrings #-}
module Main(main) where
import Test.Tasty (TestTree, defaultMain, testGroup)
main :: IO ()
main = defaultMain tests
tests :: TestTree
tests =
testGroup "all tests" [
TODO : Before writing tests for typed scripts , we need to define
the idea... | null | https://raw.githubusercontent.com/input-output-hk/plutus-apps/7fb0e73765502b9876a78a5d80e993161823a54f/plutus-script-utils/test/Spec.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE DataKinds #
module Main(main) where
import Test.Tasty (TestTree, defaultMain, testGroup)
main :: IO ()
main = defaultMain tests
tests :: TestTree
tests =
testGroup "all tests" [
TODO : Before writing tests for typed scripts , we need to define
the ideal testing strategy ( Mockchain ? , ... |
40ad21cf62883245fd2cf6ccf875faf423384ba4b1a16416185005bed21ab101 | lispnik/cl-http | unix.lisp | -*- Syntax : Ansi - Common - Lisp ; Base : 10 ; Mode : lisp ; Package : www - utils -*-
( C ) Copyright 1994 - 1995 , .
;;; All Rights Reserved.
;;;
( C ) Allegro enhancements Copyright 1995 , OBC . All Rights Reserved .
;;;
LispWorks enhancements Copyright ( C ) 1995 - 1998 Harlequin Group plc All righ... | null | https://raw.githubusercontent.com/lispnik/cl-http/84391892d88c505aed705762a153eb65befb6409/lw/server/unix.lisp | lisp | Base : 10 ; Mode : lisp ; Package : www - utils -*-
All Rights Reserved.
-------------------------------------------------------------------
Cannot guaranty all errors are printable.
with-tcp-port-for-protocol not used !
-------------------------------------------------------------------
There are sur... |
( C ) Copyright 1994 - 1995 , .
( C ) Allegro enhancements Copyright 1995 , OBC . All Rights Reserved .
LispWorks enhancements Copyright ( C ) 1995 - 1998 Harlequin Group plc All rights reserved .
MAC AND LISPM FILES COMPATABILITY CODE ADAPTED FOR LISPWORKS
(in-package :www-utils)
(define report-con... |
ba5eca9e25baa766f247431d974ab472042899060bc72a47ef7a4dc18e57832c | ideas-edu/ideas | StringRef.hs | -----------------------------------------------------------------------------
Copyright 2019 , Ideas project team . This file is distributed under the
terms of the Apache License 2.0 . For more information , see the files
" LICENSE.txt " and " NOTICE.txt " , which are included in the distribution .
-------... | null | https://raw.githubusercontent.com/ideas-edu/ideas/f84907f92a8c407b7313f99e65a08d2646dc1565/src/Ideas/Utils/StringRef.hs | haskell | ---------------------------------------------------------------------------
---------------------------------------------------------------------------
|
Maintainer :
Stability : provisional
---------------------------------------------------------------------------
----------------------------------... | Copyright 2019 , Ideas project team . This file is distributed under the
terms of the Apache License 2.0 . For more information , see the files
" LICENSE.txt " and " NOTICE.txt " , which are included in the distribution .
Portability : portable ( depends on ghc )
References to Strings , proving a fa... |
7840abfe1c06df9012edbc7f37b1fa5e4a5166e8dec88c734a894e712dbb23c0 | lisp-korea/sicp2014 | ex-2.2.scm | Exercise 2.2
;; segments
(define (make-segment start end) (cons start end))
(define (start-segment s) (car s))
(define (end-segment s) (cdr s))
(define (midpoint-segment s)
(make-point (average (x-point (start-segment s))
(x-point (end-segment s)))
(average (y-point (start-segment s))
(y-p... | null | https://raw.githubusercontent.com/lisp-korea/sicp2014/9e60f70cb84ad2ad5987a71aebe1069db288b680/unipro/2.1/ex-2.2.scm | scheme | segments
points
utils | Exercise 2.2
(define (make-segment start end) (cons start end))
(define (start-segment s) (car s))
(define (end-segment s) (cdr s))
(define (midpoint-segment s)
(make-point (average (x-point (start-segment s))
(x-point (end-segment s)))
(average (y-point (start-segment s))
(y-point (end-se... |
2107f3b4206d809e6f0c46b05b50c9ef082944f00fe363d08694d3eaae3e5a51 | exoscale/clojure-kubernetes-client | v1beta1_volume_attachment.clj | (ns clojure-kubernetes-client.specs.v1beta1-volume-attachment
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1-object-meta :refer :all]
[clojure-kubernetes-client.specs.v1beta1-volume-attachment-spec :refer :all]
[cl... | null | https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/v1beta1_volume_attachment.clj | clojure | (ns clojure-kubernetes-client.specs.v1beta1-volume-attachment
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1-object-meta :refer :all]
[clojure-kubernetes-client.specs.v1beta1-volume-attachment-spec :refer :all]
[cl... | |
34af6024c6c8bee2f115f6375bcc876e0b968558037491f8fe5518ac8bf19cec | rnons/ted2srt | TED.hs | module Web.TED
( Subtitle (..)
, FileType (..)
, Item (..)
, toSub
-- * Re-exports
, module TED
) where
import Control.Exception as E
import Control.Monad
import Data.Aeson
import Data.Text (Text)
import qualified Data.Text as T
import qual... | null | https://raw.githubusercontent.com/rnons/ted2srt/7456f109bce2b9f07d0c929bef2fd42e6bc4f75d/backend/src/Web/TED.hs | haskell | * Re-exports
to do Windows user a favor. | module Web.TED
( Subtitle (..)
, FileType (..)
, Item (..)
, toSub
, module TED
) where
import Control.Exception as E
import Control.Monad
import Data.Aeson
import Data.Text (Text)
import qualified Data.Text as T
import qualified Data.Text.IO... |
e11fd9ecb342eb1a3b2d9e6c3c4a8557ee8752dd69ce09feaf092e23ebb5d652 | gedge-platform/gedge-platform | rabbit_queue_location_min_masters.erl | 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 ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rabbit_queue_location_min_masters).
-beha... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbit/src/rabbit_queue_location_min_masters.erl | erlang |
---------------------------------------------------------------------------
Queue Master Location Callbacks
--------------------------------------------------------------------------- | 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 ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_queue_location_min_masters).
-behaviour(... |
433a14eb4bb00714114fb5c9063d796846b058b3c9e10834369d6eed150e8b11 | MyDataFlow/ttalk-server | toppage_handler.erl | %% Feel free to use, reuse and abuse the code in this file.
%% @doc Handler with basic HTTP authorization.
-module(toppage_handler).
-export([init/3]).
-export([content_types_provided/2]).
-export([is_authorized/2]).
-export([to_text/2]).
init(_Transport, _Req, []) ->
{upgrade, protocol, cowboy_rest}.
is_authorize... | null | https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/deps/cowboy/examples/rest_basic_auth/src/toppage_handler.erl | erlang | Feel free to use, reuse and abuse the code in this file.
@doc Handler with basic HTTP authorization. |
-module(toppage_handler).
-export([init/3]).
-export([content_types_provided/2]).
-export([is_authorized/2]).
-export([to_text/2]).
init(_Transport, _Req, []) ->
{upgrade, protocol, cowboy_rest}.
is_authorized(Req, State) ->
{ok, Auth, Req1} = cowboy_req:parse_header(<<"authorization">>, Req),
case Auth of
{<<... |
758f4f855ce8ea706b092b4931b191bd0a76b809ebe6696ec068cfe29d003a35 | c4-project/c4f | my_map.mli | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... | null | https://raw.githubusercontent.com/c4-project/c4f/8939477732861789abc807c8c1532a302b2848a5/lib/utils/src/my_map.mli | ocaml | * Utilities for working with Base maps.
* [map_with_keys cmp map ~f] maps [f] across the keys and values of [f],
then tries to reconstitute a map from the result.
* [find_or_error ?sexp_of_key ?map_name map key] behaves like
[find map key], but, instead of returning [None] on failure, returns an
[Or_error... | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... |
2f387f0a75661c2eaa31e295565acd3ffc1e48b7e0d5c5c3aedd8ba0aea8d1d4 | GrammaTech/sel | symbol-macrolet-1.lisp | (symbol-macrolet ((a 1))
(- a))
| null | https://raw.githubusercontent.com/GrammaTech/sel/a59174c02a454e8d588614e221cf281260cf12f8/test/etc/lisp-scopes/symbol-macrolet-1.lisp | lisp | (symbol-macrolet ((a 1))
(- a))
| |
0ff58d3ca3f206810a81b4143d897851d79e135c3596af87b7840c08368d500a | locusmath/locus | object.clj | (ns locus.set.action.local.object
(:require [locus.set.logic.core.set :refer :all]
[locus.set.logic.structure.protocols :refer :all]
[locus.set.logic.lens.object :refer :all]
[locus.set.mapping.general.core.object :refer :all]
[locus.set.mapping.effects.local.transforma... | null | https://raw.githubusercontent.com/locusmath/locus/b232579217be4e39458410893827a84d744168e4/src/clojure/locus/set/action/local/object.clj | clojure | A lens type can be defined by a pair of congruences in a topos of monoid actions.
On the other hand, a lens itself is defined by a pair consisting of a getter
and a setter. If we take a lens then we can produce local monoid actions that
handle only the memory location defined by the lens. This is a part of our
dev... | (ns locus.set.action.local.object
(:require [locus.set.logic.core.set :refer :all]
[locus.set.logic.structure.protocols :refer :all]
[locus.set.logic.lens.object :refer :all]
[locus.set.mapping.general.core.object :refer :all]
[locus.set.mapping.effects.local.transforma... |
078d238f372f10ba1859d387c2a5cc9825fe6153b933cdb6ca1dfc004f56e3db | haskell-suite/base | Int.hs | # LANGUAGE Trustworthy #
# LANGUAGE CPP , NoImplicitPrelude #
-----------------------------------------------------------------------------
-- |
-- Module : Data.Int
Copyright : ( c ) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer :
--... | null | https://raw.githubusercontent.com/haskell-suite/base/1ee14681910c76d0a5a436c33ecf3289443e65ed/Data/Int.hs | haskell | ---------------------------------------------------------------------------
|
Module : Data.Int
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : experimental
Portability : portable
Signed integer types
-------------------------------------------------------... | # LANGUAGE Trustworthy #
# LANGUAGE CPP , NoImplicitPrelude #
Copyright : ( c ) The University of Glasgow 2001
module Data.Int
(
Int,
Int8, Int16, Int32, Int64,
) where
#ifdef __GLASGOW_HASKELL__
import GHC.Base ( Int )
import GHC.Int ( Int8, Int16, Int32, Int64 )
#endif
#ifdef ... |
596165b96ae149678b3de25ed10c1bfe83fe6235be60677866bd3d1269fd94a6 | lsrcz/grisette | FoldableTests.hs | module Grisette.Lib.Data.FoldableTests where
import Control.Monad.Except
import Control.Monad.Trans.Maybe
import Grisette.Core.Control.Monad.UnionMBase
import Grisette.Core.Data.Class.SimpleMergeable
import Grisette.Lib.Control.Monad
import Grisette.Lib.Data.Foldable
import Grisette.TestUtils.SBool
import Test.Tasty
i... | null | https://raw.githubusercontent.com/lsrcz/grisette/51d492f60fb37b74a626b591ec4c7ed128fa6217/test/Grisette/.Lib/Data/FoldableTests.hs | haskell | module Grisette.Lib.Data.FoldableTests where
import Control.Monad.Except
import Control.Monad.Trans.Maybe
import Grisette.Core.Control.Monad.UnionMBase
import Grisette.Core.Data.Class.SimpleMergeable
import Grisette.Lib.Control.Monad
import Grisette.Lib.Data.Foldable
import Grisette.TestUtils.SBool
import Test.Tasty
i... | |
d2fe3355fe37dd05f11f97719d2e91fa576b84a05b56b9f18211ab95a3ab9089 | ndmitchell/neil | hc.hs |
module Main(main) where
import System.Environment
import System.Process.Extra
import System.Time.Extra
import Control.Monad.Extra
import Data.List.Extra
import System.Directory
import System.FilePath
data Args = Setup | Checkout | Pull | Build | Ghcid | Run | Clean
deriving (Show, Enum, Bounded)
args :: [(Stri... | null | https://raw.githubusercontent.com/ndmitchell/neil/b06624fe697c23375222856d538cb974e96da048/misc/hc.hs | haskell |
module Main(main) where
import System.Environment
import System.Process.Extra
import System.Time.Extra
import Control.Monad.Extra
import Data.List.Extra
import System.Directory
import System.FilePath
data Args = Setup | Checkout | Pull | Build | Ghcid | Run | Clean
deriving (Show, Enum, Bounded)
args :: [(Stri... | |
2cd0e6cf35e47cbb24f281440f3ed5ad45b00d99f60756fa251ca89042ae5e62 | andrewMacmurray/haskell-book-solutions | phone.hs | module Phone where
import Data.Char
import Data.List
import Utils ((|>))
data Button = Button Digit String deriving (Show)
type Digit = Char
type Presses = Int
data Phone = Phone [Button] deriving (Show)
phone :: Phone
phone = Phone
[ Button '1' "1"
, Button '2' "abc2"
, Button '3' "def3"
, Button '4' "ghi4... | null | https://raw.githubusercontent.com/andrewMacmurray/haskell-book-solutions/f4fd386187c03828d1736d9a43642ab4f0ec6462/src/ch11/phone.hs | haskell | module Phone where
import Data.Char
import Data.List
import Utils ((|>))
data Button = Button Digit String deriving (Show)
type Digit = Char
type Presses = Int
data Phone = Phone [Button] deriving (Show)
phone :: Phone
phone = Phone
[ Button '1' "1"
, Button '2' "abc2"
, Button '3' "def3"
, Button '4' "ghi4... | |
db829d81c11a62506bd9f48a576f6a38d51d661131f49da3398cb1291ab20346 | AlfrescoLabs/technical-validation | ux.clj | ;
Copyright © 2013,2014 ( )
;
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
distributed under... | null | https://raw.githubusercontent.com/AlfrescoLabs/technical-validation/bd1b4b83f6a5e9dd150eedbeebecd30970d3b4aa/src/clojure/alfresco_technical_validation/impl/validations/ux.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 pe... | Copyright © 2013,2014 ( )
distributed under the License is distributed on an " AS IS " BASIS ,
This file is part of an unsupported extension to Alfresco .
(ns alfresco-technical-validation.impl.validations.ux
(:require [clojure.string :as s]
[clojure.tools.logging ... |
9fe61a4d30bf0de3745552c3a2f73f56761df04c03598d06b571a6e4e9ac1df2 | openweb-nl/open-bank-mark | core.clj | (ns nl.openweb.synchronizer.core
(:require [nl.openweb.synchronizer.admin :as admin]
[nl.openweb.synchronizer.schema :as schema]
[nl.openweb.topology.core :as topology])
(:gen-class))
(defn exists-reduce
[set [to-create to-check] k v]
(if (contains? set k)
[to-create (assoc to-check... | null | https://raw.githubusercontent.com/openweb-nl/open-bank-mark/786c940dafb39c36fdbcae736fe893af9c00ef17/synchronizer/src/nl/openweb/synchronizer/core.clj | clojure | (ns nl.openweb.synchronizer.core
(:require [nl.openweb.synchronizer.admin :as admin]
[nl.openweb.synchronizer.schema :as schema]
[nl.openweb.topology.core :as topology])
(:gen-class))
(defn exists-reduce
[set [to-create to-check] k v]
(if (contains? set k)
[to-create (assoc to-check... | |
878be4919f54bdf3ef46157b57822c52295d7cc2a6f75c8d825e0ef0b98e4868 | CoNarrative/precept | ws.clj | (ns fullstack.routes.ws
(:require [compojure.core :refer [defroutes GET POST]]
[taoensso.sente :as sente]
[mount.core :refer [defstate]]
[fullstack.db.core :refer [db]]
[taoensso.sente.server-adapters.http-kit :refer [get-sch-adapter]]))
(defstate socket
:s... | null | https://raw.githubusercontent.com/CoNarrative/precept/6078286cae641b924a2bffca4ecba19dcc304dde/examples/fullstack/src/clj/fullstack/routes/ws.clj | clojure | (ns fullstack.routes.ws
(:require [compojure.core :refer [defroutes GET POST]]
[taoensso.sente :as sente]
[mount.core :refer [defstate]]
[fullstack.db.core :refer [db]]
[taoensso.sente.server-adapters.http-kit :refer [get-sch-adapter]]))
(defstate socket
:s... | |
fd64b956d39c5c74318e7f6db57ba6360f83aa758c073caa01094ede234fc776 | ghc/testsuite | rule1.hs |
This one triggers the bug reported in Trac # 1092
-- The problem is that the rule
-- forall w. f (\v->w) = w
-- erroneously matches the call
-- f id
--
catches the error
module Foo where
f :: (Int -> Int) -> Int
# NOINLINE f #
f g = g 4
{-# RULES
"f" forall w. f (\v->w) = w
#-}
h = f ... | null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/simplCore/should_compile/rule1.hs | haskell | The problem is that the rule
forall w. f (\v->w) = w
erroneously matches the call
f id
# RULES
"f" forall w. f (\v->w) = w
# |
This one triggers the bug reported in Trac # 1092
catches the error
module Foo where
f :: (Int -> Int) -> Int
# NOINLINE f #
f g = g 4
h = f id
|
ecb00ec4ee6b04b2cffe0fad6404afebe59b88212ffa2435a9cca3814132a34e | wireless-net/erlang-nommu | ex_radioBox.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2009 - 2013 . 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/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/wx/examples/demo/ex_radioBox.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 2009 - 2013 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(ex_radioBox).
-behaviour(wx_objec... |
8b2c10182dcbd87d23d99589dd4fa2689dbe4047d677f56311168ecf83fa8a53 | oreillymedia/etudes-for-erlang | weather.erl | -module(weather).
-behaviour(gen_server).
-include_lib("xmerl/include/xmerl.hrl").
-export([start_link/0]). % convenience call for startup
-export([init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
terminate/2,
code_change/3]). % gen_server callbacks
-export([report/1,
... | null | https://raw.githubusercontent.com/oreillymedia/etudes-for-erlang/07200372503a8819f9fcc2856f8cb82451be7b48/code/ch11-02/weather.erl | erlang | convenience call for startup
gen_server callbacks
wrapper functions
macro that just defines this module as server
Wrapper to hide internal details when getting a weather report
Wrapper to hide internal details when getting a list of recently used
stations.
convenience method for startup
gen_server callbacks
w... | -module(weather).
-behaviour(gen_server).
-include_lib("xmerl/include/xmerl.hrl").
-export([init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
terminate/2,
-export([report/1,
report(Station) ->
gen_server:call(?SERVER, Station).
recent() ->
gen_server:cast(?SERVER, "").
sta... |
6e0f73ea72842c01b7971c7476e63878da473314c13e7ca37d7b9b9169f9011e | thierry-martinez/refl | tree.ml | type 'a t =
| Leaf
| Node of { left : 'a t; label : 'a; right : 'a t }
[@@deriving refl]
let () =
assert (Refl.map [%refl: _ t] [%refl: _ t] [P string_of_int]
(Node {
left = Node {
left = Leaf;
label = 1;
right = Node { left = Leaf; label = 2; right = Leaf }};
labe... | null | https://raw.githubusercontent.com/thierry-martinez/refl/64e7c86f25c47c29aeeaa581a751ef37e138a42f/tests/tree/tree.ml | ocaml | type 'a t =
| Leaf
| Node of { left : 'a t; label : 'a; right : 'a t }
[@@deriving refl]
let () =
assert (Refl.map [%refl: _ t] [%refl: _ t] [P string_of_int]
(Node {
left = Node {
left = Leaf;
label = 1;
right = Node { left = Leaf; label = 2; right = Leaf }};
labe... | |
652ef4346e99293550076985edacfdf69e7d43ffea9efe822e4a9de285fcb145 | acl2/acl2 | semantics-deep@useless-runes.lsp | (TMP-DEFTYPES-SYMBOLP-OF-SYMBOL-FIX)
(TMP-DEFTYPES-NATP-OF-NFIX)
(TMP-DEFTYPES-NFIX-WHEN-NATP
(2 2 (:REWRITE DEFAULT-<-2))
(2 2 (:REWRITE DEFAULT-<-1))
)
(PFCS::ASSIGNMENTP)
(PFCS::BOOLEANP-OF-ASSIGNMENTP
(4 2 (:DEFINITION PFCS::ASSIGNMENTP))
(2 2 (:TYPE-PRESCRIPTION FAST-<<))
)
(PFCS::MAPP-WHEN-ASSIGNMENTP
(184... | null | https://raw.githubusercontent.com/acl2/acl2/f64742cc6d41c35f9d3f94e154cd5fd409105d34/books/kestrel/crypto/pfcs/.sys/semantics-deep%40useless-runes.lsp | lisp | (TMP-DEFTYPES-SYMBOLP-OF-SYMBOL-FIX)
(TMP-DEFTYPES-NATP-OF-NFIX)
(TMP-DEFTYPES-NFIX-WHEN-NATP
(2 2 (:REWRITE DEFAULT-<-2))
(2 2 (:REWRITE DEFAULT-<-1))
)
(PFCS::ASSIGNMENTP)
(PFCS::BOOLEANP-OF-ASSIGNMENTP
(4 2 (:DEFINITION PFCS::ASSIGNMENTP))
(2 2 (:TYPE-PRESCRIPTION FAST-<<))
)
(PFCS::MAPP-WHEN-ASSIGNMENTP
(184... | |
64f1eeef7751e4c4f4de7f3680900a32f500111eeb1e6b2031efce1953934c9e | sheyll/b9-vm-image-builder | CloudConfigYaml.hs | {-# LANGUAGE OverloadedStrings #-}
| This contains a ' YamlObject ' for
--
-- For some reason, cloud-config yaml documents __MUST__
contain in the first line .
--
-- This is documented in the <#cloud-config-data cloud config documentation>.
--
Otherwise , this is just a wrapper around ' YamlObject ' .
--
... | null | https://raw.githubusercontent.com/sheyll/b9-vm-image-builder/4d2af80d3be4decfce6c137ee284c961e3f4a396/src/lib/B9/Artifact/Content/CloudConfigYaml.hs | haskell | # LANGUAGE OverloadedStrings #
For some reason, cloud-config yaml documents __MUST__
This is documented in the <#cloud-config-data cloud config documentation>.
@cloud-config@ yaml documents contain:
text file containing the cloud-config Yaml document.
skip the optional header line |
| This contains a ' YamlObject ' for
contain in the first line .
Otherwise , this is just a wrapper around ' YamlObject ' .
@Since 0.5.62
module B9.Artifact.Content.CloudConfigYaml
( CloudConfigYaml (..),
cloudConfigFileHeader,
)
where
import B9.Artifact.Content.AST
import B9.Artifact.Content.Y... |
c6638188df2cae48c52acf9ffa33cb4f2430b11831d95d8790b366323f7549a1 | tonsky/advent-of-code | day14.clj | (ns advent-of-code.year2022.day14
(:require
[advent-of-code.v2 :as v2 :refer [v2]]
[advent-of-code.grid :as grid]
[clojure.java.io :as io]
[clojure.math :as math]
[clojure.string :as str]
[clojure.set :as set]
[remote-require.core :as rr]
[advent-of-code.year2022.gui :as gui]
[io.g... | null | https://raw.githubusercontent.com/tonsky/advent-of-code/f1614e353c4f5fd221574fac857db1b4cc45e625/src/advent_of_code/year2022/day14.clj | clojure | (ns advent-of-code.year2022.day14
(:require
[advent-of-code.v2 :as v2 :refer [v2]]
[advent-of-code.grid :as grid]
[clojure.java.io :as io]
[clojure.math :as math]
[clojure.string :as str]
[clojure.set :as set]
[remote-require.core :as rr]
[advent-of-code.year2022.gui :as gui]
[io.g... | |
445b2db7965edec161df516f1eca120268dfbc7eb30954455569be3846ed28d1 | typelead/eta | Sim01.hs | # LANGUAGE TypeFamilies #
module Sim01 where
data family Aab a
type family AAb a
class AaB a where
| null | https://raw.githubusercontent.com/typelead/eta/97ee2251bbc52294efbf60fa4342ce6f52c0d25c/tests/suite/similar-names/compile/Sim01.hs | haskell | # LANGUAGE TypeFamilies #
module Sim01 where
data family Aab a
type family AAb a
class AaB a where
| |
64b4bced3749ecd68adca55298571835f7a4be6fb6ed4fbcaa1f1670ba1e918f | rpt/gen_tcp_server | gen_tcp_server.erl | %%------------------------------------------------------------------------------
Copyright 2012
%%
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 requir... | null | https://raw.githubusercontent.com/rpt/gen_tcp_server/8f1f0daa35fbca6db9781c8df20187ca139857dc/src/gen_tcp_server.erl | erlang | ------------------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, eithe... | Copyright 2012
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
2012
-module(gen_tcp_server).
-export([start_link/2,
start_link/3,
stop/1]).
-callback handle_accept(Socket :: ter... |
8e4aea0a7930d9984c9c1376802444dfcb11447672db4a160a0b87255ff8aa4b | racket/racket7 | error.rkt | #lang racket/base
(require "../host/rktio.rkt"
"../host/error.rkt")
(provide raise-network-error
raise-network-arguments-error)
(define (raise-network-error who orig-err base-msg)
(define err (remap-rktio-error orig-err))
(define msg (format-rktio-message who err base-msg))
(raise
(cond
... | null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/io/network/error.rkt | racket | #lang racket/base
(require "../host/rktio.rkt"
"../host/error.rkt")
(provide raise-network-error
raise-network-arguments-error)
(define (raise-network-error who orig-err base-msg)
(define err (remap-rktio-error orig-err))
(define msg (format-rktio-message who err base-msg))
(raise
(cond
... | |
b1992823c59606adb05d6a13d847f2c1948967a1d9aec2f8a066416654466a83 | johnwhitington/ocamli | exercise03.ml | let rec forloop f n m =
if n <= m then
begin
f n;
forloop f (n + 1) m
end
| null | https://raw.githubusercontent.com/johnwhitington/ocamli/28da5d87478a51583a6cb792bf3a8ee44b990e9f/OCaml%20from%20the%20Very%20Beginning/Chapter%2013/exercise03.ml | ocaml | let rec forloop f n m =
if n <= m then
begin
f n;
forloop f (n + 1) m
end
| |
bf22ff0eb598776c714bb91325375a65e99dd167606510a8aa20000a9a8523a3 | mk270/archipelago | light.ml |
Archipelago , a multi - user dungeon ( MUD ) server , by ( C ) 2009 - 2012
This programme is free software ; you may redistribute and/or modify
it under the terms of the GNU Affero General Public Licence as published by
the Free Software Foundation , either version 3 of said Licence , or
( ... | null | https://raw.githubusercontent.com/mk270/archipelago/4241bdc994da6d846637bcc079051405ee905c9b/src/model/light.ml | ocaml |
Archipelago , a multi - user dungeon ( MUD ) server , by ( C ) 2009 - 2012
This programme is free software ; you may redistribute and/or modify
it under the terms of the GNU Affero General Public Licence as published by
the Free Software Foundation , either version 3 of said Licence , or
( ... | |
14a25babbdc7a211c00c5494ff237a43cccc39c5857c27a50ac3be5287405d5d | helium/miner | miner_blockhistory.erl | -module(miner_blockhistory).
-behavior(gen_server).
-record(state, {
url,
historical_block=0,
historical_time=0,
last_retrieved_time=0
}).
-define(HISTORICAL_TIME_FETCH_INTERVAL, 3600).
-export([init/1, handle_info/2, handle_cast/2, handle_call/3]).
-export([start_link/0, get_history/0]).
start_li... | null | https://raw.githubusercontent.com/helium/miner/1e50874b4feb86e4454c2f682e0ceafeca25290b/src/miner_blockhistory.erl | erlang | gen_server callbacks | -module(miner_blockhistory).
-behavior(gen_server).
-record(state, {
url,
historical_block=0,
historical_time=0,
last_retrieved_time=0
}).
-define(HISTORICAL_TIME_FETCH_INTERVAL, 3600).
-export([init/1, handle_info/2, handle_cast/2, handle_call/3]).
-export([start_link/0, get_history/0]).
start_li... |
60e7b693281a505428a6d784e228600030205758326f862a612253e2e46572cc | camllight/camllight | normalization.ml | #open "external_type";;
#open "type_for_matching";;
#open "operations_on_types";;
type INTERMEDIARY_TYPE =
{Cst : ((string * INTERMEDIARY_TYPE list) * INTERMEDIARY_TYPE) list;
Froz : (int * INTERMEDIARY_TYPE) list;
Subst : (int * INTERMEDIARY_TYPE) list;
Ar_c : int;
Ar_f : int};;
let full_iso = ref fals... | null | https://raw.githubusercontent.com/camllight/camllight/0cc537de0846393322058dbb26449427bfc76786/sources/contrib/camlsearch/source/normalization.ml | ocaml | Compress bases | #open "external_type";;
#open "type_for_matching";;
#open "operations_on_types";;
type INTERMEDIARY_TYPE =
{Cst : ((string * INTERMEDIARY_TYPE list) * INTERMEDIARY_TYPE) list;
Froz : (int * INTERMEDIARY_TYPE) list;
Subst : (int * INTERMEDIARY_TYPE) list;
Ar_c : int;
Ar_f : int};;
let full_iso = ref fals... |
1aec4b54ea1cda5ee9b23fc6c44a8df96af0ab4a039ef11fcf19cbe98c4d1321 | Paczesiowa/hsenv | Skeletons.hs | # LANGUAGE TemplateHaskell #
module Skeletons where
import Data.FileEmbed (embedFile)
import Data.ByteString.Char8 (unpack)
import System.FilePath ((</>))
activateSkel :: String
activateSkel = unpack $(embedFile $ "skeletons" </> "activate")
cabalWrapperSkel :: String
cabalWrapperSkel = unpack $(embedFile $ "skelet... | null | https://raw.githubusercontent.com/Paczesiowa/hsenv/b904436e10bde707a7838661a5ec30de430ca2b9/src/Skeletons.hs | haskell | # LANGUAGE TemplateHaskell #
module Skeletons where
import Data.FileEmbed (embedFile)
import Data.ByteString.Char8 (unpack)
import System.FilePath ((</>))
activateSkel :: String
activateSkel = unpack $(embedFile $ "skeletons" </> "activate")
cabalWrapperSkel :: String
cabalWrapperSkel = unpack $(embedFile $ "skelet... | |
2141932bf3f0f8de9d618c25af6ba8ac1e4ff8d3ad0be25dce6d5a26349cb3b1 | keithj/cl-genomic | raw.lisp | ;;;
Copyright ( c ) 2009 - 2011 . All rights reserved .
;;;
;;; This file is part of cl-genomic.
;;;
;;; 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
;... | null | https://raw.githubusercontent.com/keithj/cl-genomic/d160199c2b369df97afd3fded16b1ade507b80dd/src/io/raw.lisp | lisp |
This file is part of cl-genomic.
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR P... | Copyright ( c ) 2009 - 2011 . All rights reserved .
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
(in-package :bio-sequence)
(declaim (type fixnum *raw... |
62f169c4e0e2dd80f87d8c046d8fe17c5186c80f0bfffb0e4e8eb4713d7260f9 | mdedwards/slippery-chicken | videos-example-10-c.lsp | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; File: videos-example-10-c.lsp
;;;
Class Hierarchy : None
;;;
Version : 1.0
;;;
;;; Project: slippery chicken (algorithmic composition)
;;;
Purpose : Lisp example code to accompany video t... | null | https://raw.githubusercontent.com/mdedwards/slippery-chicken/c1c11fadcdb40cd869d5b29091ba5e53c5270e04/doc/examples/videos-example-10-c.lsp | lisp |
File: videos-example-10-c.lsp
Project: slippery chicken (algorithmic composition)
****
This file is part of slippery-chicken
slippery-chicken is free software; you can redistribute it
and/or modify it under the terms of the GNU G... | Class Hierarchy : None
Version : 1.0
Purpose : Lisp example code to accompany video tutorial 10
Author :
Creation date : 22nd December 2012
Licence : Copyright ( c ) 2012
Public License as published by the Free Software
... |
f55fedcda28de5089d98eba7ec6090d92de32a7a4ad9fe580d85db86d3b8f66c | Decentralized-Pictures/T4L3NT | test_alpha_context.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2021 Marigold < >
(* ... | null | https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/src/proto_012_Psithaca/lib_protocol/test/unit/test_alpha_context.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2021 Marigold < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER I... |
45635febadf21ccb151305b635edbfed6d10370867015e2ab8b9161a3db01d15 | elizabethsiegle/reddit-slack-bot | test.hs | {-# LANGUAGE OverloadedStrings #-}
module Test where
import Control.Monad
import Data.Aeson
import Data.Text
newtype Test = Test { getTest :: Maybe Text }
deriving Show
instance FromJSON Test where
parseJSON = withObject "Test" (\v -> Test <$> v .:? "test")
test1 :: Maybe Test
test1 = decode "{\"test\":\"test\... | null | https://raw.githubusercontent.com/elizabethsiegle/reddit-slack-bot/a52ab60dcaae8e16bee8cdba22fce627157a42d8/twilio-haskell-move-to-stack/src/test.hs | haskell | # LANGUAGE OverloadedStrings # |
module Test where
import Control.Monad
import Data.Aeson
import Data.Text
newtype Test = Test { getTest :: Maybe Text }
deriving Show
instance FromJSON Test where
parseJSON = withObject "Test" (\v -> Test <$> v .:? "test")
test1 :: Maybe Test
test1 = decode "{\"test\":\"test\"}"
test2 :: Maybe Test
test2 = de... |
e7a03420d5ab9552b6179d7a8c1c282b43627cf0dfdc2474ff945ebe2843a6fd | haskell-compat/base-compat | Compat.hs | # LANGUAGE CPP , NoImplicitPrelude , PackageImports #
module Data.Foldable1.Compat (
module Base
) where
#if MIN_VERSION_base(4,18,0)
import "base-compat" Data.Foldable1.Compat as Base
#else
import "foldable1-classes-compat" Data.Foldable1 as Base
#endif
| null | https://raw.githubusercontent.com/haskell-compat/base-compat/e18c4664d784542505966a7610bbac43652afda6/base-compat-batteries/src/Data/Foldable1/Compat.hs | haskell | # LANGUAGE CPP , NoImplicitPrelude , PackageImports #
module Data.Foldable1.Compat (
module Base
) where
#if MIN_VERSION_base(4,18,0)
import "base-compat" Data.Foldable1.Compat as Base
#else
import "foldable1-classes-compat" Data.Foldable1 as Base
#endif
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.