_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 |
|---|---|---|---|---|---|---|---|---|
c2ad79f908971adedd81551790e22f414d42fcbb369698cd8583ee73e76211a7 | clojure-emacs/cider-nrepl | meta_test.clj | (ns cider.nrepl.middleware.util.meta-test
(:require
[cider.nrepl.middleware.util.meta :as um]
[clojure.test :refer :all]))
(defn- test-fn "docstring"
([a b] nil)
([a] nil)
([]))
(deftest dummy-test)
(deftest relevant-meta-test
(is (= (um/relevant-meta (meta #'test-fn))
{:arglists "([a b] [a]... | null | https://raw.githubusercontent.com/clojure-emacs/cider-nrepl/cd29bd761e58707d438b3373d7512c9e33ded865/test/clj/cider/nrepl/middleware/util/meta_test.clj | clojure | (ns cider.nrepl.middleware.util.meta-test
(:require
[cider.nrepl.middleware.util.meta :as um]
[clojure.test :refer :all]))
(defn- test-fn "docstring"
([a b] nil)
([a] nil)
([]))
(deftest dummy-test)
(deftest relevant-meta-test
(is (= (um/relevant-meta (meta #'test-fn))
{:arglists "([a b] [a]... | |
d3a57bc4754a2b601b332857fefabea4e70bccf7d0f2cd14517b011a0b5d02dd | google/ormolu | Default.hs | # LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
module Ormolu.Printer.Meat.Declaration.Default
( p_defaultDecl,
)
where
import GHC
import Ormolu.Printer.Combinators
import Ormolu.Printer.Meat.Type
p_defaultDecl :: DefaultDecl GhcPs -> R ()
p_defaultDecl = \case
DefaultDecl NoExtField ts -> do
tx... | null | https://raw.githubusercontent.com/google/ormolu/ffdf145bbdf917d54a3ef4951fc2655e35847ff0/src/Ormolu/Printer/Meat/Declaration/Default.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE LambdaCase #
module Ormolu.Printer.Meat.Declaration.Default
( p_defaultDecl,
)
where
import GHC
import Ormolu.Printer.Combinators
import Ormolu.Printer.Meat.Type
p_defaultDecl :: DefaultDecl GhcPs -> R ()
p_defaultDecl = \case
DefaultDecl NoExtField ts -> do
txt "default"
breakpoint
inci... |
fa264a54ae6874445b32141524a5811e8f20df6911bd604006fb4cc859a0d517 | pavponn/watcher | LoaderUtils.hs | module Utils.LoaderUtils
( isDirectory
, isFile
, listExceptionHandler
, permsExceptionHandler
, falseExceptionHandler
, rethrowHandler
, maybeExceptionHandler
, timeExceptionHandler
, itsOkayExceptionHandler
, defaultTimeUTC
) where
import Control.Exception (SomeException, catch, throw)
import D... | null | https://raw.githubusercontent.com/pavponn/watcher/3eda352b20addd1f729025290c6349f5f2e94549/watcher/src/Utils/LoaderUtils.hs | haskell | some reason, returns False.
some reason, returns False. | module Utils.LoaderUtils
( isDirectory
, isFile
, listExceptionHandler
, permsExceptionHandler
, falseExceptionHandler
, rethrowHandler
, maybeExceptionHandler
, timeExceptionHandler
, itsOkayExceptionHandler
, defaultTimeUTC
) where
import Control.Exception (SomeException, catch, throw)
import D... |
e4808b6b4e762aa6f2ce9717db22f3431dae89c9db4106e86c7ebf92721e9d97 | vikram/lisplibraries | request-handler.lisp |
(in-package :weblocks)
(export '(handle-client-request
*before-ajax-complete-scripts* *on-ajax-complete-scripts*
*uri-tokens* *current-navigation-url* *current-page-description*))
(defvar *uri-tokens*)
(setf (documentation '*uri-tokens* 'variable)
"URL-decoded list of the path elements in t... | null | https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/weblocks-stable/src/request-handler.lisp | lisp | a default dynamic-action hook function wraps get operations in a transaction
we need to render widgets before the boilerplate HTML
that wraps them in order to collect a list of script and
stylesheet dependencies.
set page title if it isn't already set
render page will wrap the HTML already rendered to
*weblocks-... |
(in-package :weblocks)
(export '(handle-client-request
*before-ajax-complete-scripts* *on-ajax-complete-scripts*
*uri-tokens* *current-navigation-url* *current-page-description*))
(defvar *uri-tokens*)
(setf (documentation '*uri-tokens* 'variable)
"URL-decoded list of the path elements in t... |
7bb0f02a829a8c799ff407c35336fcac8ed77b3d81d6e5259f6d1e640bf89a4d | hdbc/hdbc-odbc | Tests.hs | {- arch-tag: Tests main file
-}
module Tests(tests) where
import Test.HUnit
import qualified Testbasics
import qualified TestSbasics
import qualified SpecificDBTests
import qualified TestMisc
import qualified TestTime
tests = TestList [TestLabel "String basics" TestSbasics.tests,
TestLabel "SqlValue... | null | https://raw.githubusercontent.com/hdbc/hdbc-odbc/06833d77799f16634d2038bcdc308c35d4752cdd/testsrc/Tests.hs | haskell | arch-tag: Tests main file
|
module Tests(tests) where
import Test.HUnit
import qualified Testbasics
import qualified TestSbasics
import qualified SpecificDBTests
import qualified TestMisc
import qualified TestTime
tests = TestList [TestLabel "String basics" TestSbasics.tests,
TestLabel "SqlValue basics" Testbasics.tests,
... |
fbc986d2d1b01d771395830970eb538fa4b0303a4e6785656b25a8c4775ac498 | haskell-distributed/distributed-process-platform | CounterServer.hs | # OPTIONS_GHC -fno - warn - orphans #
import Blaze.ByteString.Builder (toLazyByteString)
import Blaze.ByteString.Builder.Char.Utf8 (fromString)
import Control.DeepSeq (NFData(rnf))
import Criterion.Main
import qualified Data.ByteString.Lazy as BL
import qualified Data.ByteString.Lazy.Internal as BL
main :: IO ()
main... | null | https://raw.githubusercontent.com/haskell-distributed/distributed-process-platform/46d63f81910e7dd527fb1d41e654a5cfb0dbfdba/benchmarks/src/CounterServer.hs | haskell | bgroup "call" [
bench "incrementCount" $ nf undefined
bench "resetCount" $ nf undefined
] | # OPTIONS_GHC -fno - warn - orphans #
import Blaze.ByteString.Builder (toLazyByteString)
import Blaze.ByteString.Builder.Char.Utf8 (fromString)
import Control.DeepSeq (NFData(rnf))
import Criterion.Main
import qualified Data.ByteString.Lazy as BL
import qualified Data.ByteString.Lazy.Internal as BL
main :: IO ()
main... |
a593b643c74fc310693a72694666c952aad4778f8605519d2745163a29d8e3f0 | poscat0x04/telegram-types | SetChatDescription.hs | module Web.Telegram.Types.Internal.API.SetChatDescription where
import Common
import Web.Telegram.Types.Internal.API.ChatId
data SetChatDescription = SetChatDescription
{ chatId :: ChatId,
description :: Text
}
deriving stock (Show, Eq)
mkLabel ''SetChatDescription
deriveToJSON snake ''SetChatDescription
m... | null | https://raw.githubusercontent.com/poscat0x04/telegram-types/3de0710640f5303638a83e409001b0342299aeb8/src/Web/Telegram/Types/Internal/API/SetChatDescription.hs | haskell | module Web.Telegram.Types.Internal.API.SetChatDescription where
import Common
import Web.Telegram.Types.Internal.API.ChatId
data SetChatDescription = SetChatDescription
{ chatId :: ChatId,
description :: Text
}
deriving stock (Show, Eq)
mkLabel ''SetChatDescription
deriveToJSON snake ''SetChatDescription
m... | |
a117c4c2c8dedb0eda6a5c7922d220beef7b6da41d8b2a9025450de7960e0bd3 | brownplt/Resugarer | lang-min-macros.rkt | #lang racket
(require redex)
(require "resugar-redex.rkt")
(require "lang-min.rkt")
;;;;;;;;;;;;;;
Macros ; ; ;
;;;;;;;;;;;;;;
* Sometimes a macro RHS must be wrapped in ' begin ' for two reasons :
- So that it 's reduction shows as a step ( otherwise , e.g. ( or ( + 1 2 ) ) - > 3 )
; - So that a calli... | null | https://raw.githubusercontent.com/brownplt/Resugarer/1353b4309c101f0f1ac2df2cba7f3cba1f0a3a37/prototype/lang-min-macros.rkt | racket |
; ;
- So that a calling macro doesn't inadvertently tag a constant.
begin required so that a step is shown!
TODO: bug!
Tests are here ;;;
uncomment the tests you want to run
(begin | #lang racket
(require redex)
(require "resugar-redex.rkt")
(require "lang-min.rkt")
* Sometimes a macro RHS must be wrapped in ' begin ' for two reasons :
- So that it 's reduction shows as a step ( otherwise , e.g. ( or ( + 1 2 ) ) - > 3 )
(define-macro Thunk
[(Thunk body)
(lambda unused body)])
(defin... |
46dbdec836010559ce0eeb14b3bfa60bf23a6fa7827737108afa45890a9fe9c1 | graninas/Pragmatic-Type-Level-Design | Types.hs | module TCA5.Types where
import CPrelude
import qualified Data.Vector as V
type Idx = Int
type Coords = (Idx, Idx)
type Torus = Bool
type Expandable = Bool
data Dim2Board cell = Dim2Board
{ cells :: V.Vector (V.Vector cell)
, xSize :: Idx
, ySize :: Idx
-- , isTorus :: Torus
-- , isExpandable :: Expandabl... | null | https://raw.githubusercontent.com/graninas/Pragmatic-Type-Level-Design/b85c88bf00fe8f4194730b117cfe5d5bc4df30f5/demo-apps/type-class-automaton5/src/TCA5/Types.hs | haskell | , isTorus :: Torus
, isExpandable :: Expandable | module TCA5.Types where
import CPrelude
import qualified Data.Vector as V
type Idx = Int
type Coords = (Idx, Idx)
type Torus = Bool
type Expandable = Bool
data Dim2Board cell = Dim2Board
{ cells :: V.Vector (V.Vector cell)
, xSize :: Idx
, ySize :: Idx
}
deriving (Show, Functor)
|
07a39fd76638077572533452f421c3f4d2ecad1dcefd0ee21ea5329b846ddafa | Javran/advent-of-code | Day19.hs | module Javran.AdventOfCode.Y2022.Day19 (
) where
{- TODO: a bit of improvment is done, but still not happy about the speed, come back later. -}
import Control.Lens ((%~), _1, _2, _3, _4)
import Control.Monad
import Control.Monad.State.Strict
import Data.Semigroup
import qualified Data.Set as S
import Javran.AdventO... | null | https://raw.githubusercontent.com/Javran/advent-of-code/9d5867bdbcc16ad50bb7fa1cf4d8f3512ea58185/src/Javran/AdventOfCode/Y2022/Day19.hs | haskell | TODO: a bit of improvment is done, but still not happy about the speed, come back later.
ore
clay
obsidian
genode
part of the search state (everything except remaining time)
collected resources
robots built
we could call buildRobot here, but every performance improvement matters now. | module Javran.AdventOfCode.Y2022.Day19 (
) where
import Control.Lens ((%~), _1, _2, _3, _4)
import Control.Monad
import Control.Monad.State.Strict
import Data.Semigroup
import qualified Data.Set as S
import Javran.AdventOfCode.Prelude
import Javran.AdventOfCode.TestExtra (consumeExtra)
import Text.ParserCombinators... |
010d7000da32374c10a15a6873b8c1be3e35f366c567becc48c0c0a0a610b448 | lortabac/ariel | Env.hs | {-# LANGUAGE DeriveTraversable #-}
module Ariel.Runtime.Env where
data Env a
= EmptyEnv
| ConsEnv a (Env a)
deriving (Eq, Show, Foldable, Functor, Traversable)
instance Semigroup (Env a) where
(<>) = appendEnv
instance Monoid (Env a) where
mempty = emptyEnv
emptyEnv :: Env a
emptyEnv = EmptyEnv
{-# INLIN... | null | https://raw.githubusercontent.com/lortabac/ariel/b613b6f24c12879f0267f950cae9052ba18a9a18/src/Ariel/Runtime/Env.hs | haskell | # LANGUAGE DeriveTraversable #
# INLINE emptyEnv # |
module Ariel.Runtime.Env where
data Env a
= EmptyEnv
| ConsEnv a (Env a)
deriving (Eq, Show, Foldable, Functor, Traversable)
instance Semigroup (Env a) where
(<>) = appendEnv
instance Monoid (Env a) where
mempty = emptyEnv
emptyEnv :: Env a
emptyEnv = EmptyEnv
extendEnv :: a -> Env a -> Env a
extendEnv ... |
fa7cbc9c622ef45b88ded09dc8641d3b91df3dbb3c5c942a48c01c74540e72c1 | aws-beam/aws-erlang | aws_mediapackage.erl | %% WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
See -beam/aws-codegen for more details .
%% @doc AWS Elemental MediaPackage
-module(aws_mediapackage).
-export([configure_logs/3,
configure_logs/4,
create_channel/2,
create_channel/3,
create_harvest_job/2,
create_harvest_job/... | null | https://raw.githubusercontent.com/aws-beam/aws-erlang/699287cee7dfc9dc8c08ced5f090dcc192c9cba8/src/aws_mediapackage.erl | erlang | WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
@doc AWS Elemental MediaPackage
====================================================================
API
====================================================================
@doc Changes the Channel's properities to configure log subscription
@doc Gets details about a Cha... | See -beam/aws-codegen for more details .
-module(aws_mediapackage).
-export([configure_logs/3,
configure_logs/4,
create_channel/2,
create_channel/3,
create_harvest_job/2,
create_harvest_job/3,
create_origin_endpoint/2,
create_origin_endpoint/3,
... |
e0f912d6ea38b7670d9b53f721fbd49c4d8e53d2d80d6efba3d0b9d4e2e89f69 | clojure-interop/java-jdk | URIResolver.clj | (ns javax.xml.transform.URIResolver
"An object that implements this interface that can be called by the processor
to turn a URI used in document(), xsl:import, or xsl:include into a Source object."
(:refer-clojure :only [require comment defn ->])
(:import [javax.xml.transform URIResolver]))
(defn resolve
"Ca... | null | https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.xml/src/javax/xml/transform/URIResolver.clj | clojure | (ns javax.xml.transform.URIResolver
"An object that implements this interface that can be called by the processor
to turn a URI used in document(), xsl:import, or xsl:include into a Source object."
(:refer-clojure :only [require comment defn ->])
(:import [javax.xml.transform URIResolver]))
(defn resolve
"Ca... | |
e8426f85e6450079125a9238ad4eb325135931764300b66cc18091094f6750cc | SimulaVR/Simula | VR.hs | {-# LANGUAGE BangPatterns #-}
module Plugin.VR
( VRInitResult(..)
, openHMD
, openVR
, openXR
, initVR
) where
import Plugin.Imports
import Plugin.Types
import qualified Godot.Methods as G
data VRInitResult
= InitVRSuccess
| InitVRFailed
data VRBackend
= OpenHMD OpenHMDConfig
... | null | https://raw.githubusercontent.com/SimulaVR/Simula/f4ebd0dd2266c62c49b06b08a6f425d454ed5814/addons/godot-haskell-plugin/src/Plugin/VR.hs | haskell | # LANGUAGE BangPatterns #
| Get the OpenHMD ARVRInterface
| Get the OpenVR ARVRInterface
Setting this to constants other than 0 messes with SteamVR Hz settings, and can cause jitters
| Find the interface for the given backend | module Plugin.VR
( VRInitResult(..)
, openHMD
, openVR
, openXR
, initVR
) where
import Plugin.Imports
import Plugin.Types
import qualified Godot.Methods as G
data VRInitResult
= InitVRSuccess
| InitVRFailed
data VRBackend
= OpenHMD OpenHMDConfig
| OpenVR
| OpenXR
derivin... |
07a57a3def5be3ee0c512ec2a32b938c406f0864db4b81b3751390be9cede0ac | trandi/thermal-printer-photo-booth | ImageProcessing.hs | -- pure functions dealing with the Image splitting into stripes, conversions, etc. ...
module ImageProcessing where
import Codec.Picture
import Codec.Picture.Extra
import Data.Foldable
scaledWidth = 240
stripeHeight = 8
split the image into 8dots high bands / stripes
imageToStripes :: Image Pixel8 -> [Image Pixe... | null | https://raw.githubusercontent.com/trandi/thermal-printer-photo-booth/0df7fa2af91b03fa9e8f784ebc1a550015e4b23b/src/ImageProcessing.hs | haskell | pure functions dealing with the Image splitting into stripes, conversions, etc. ...
we take any image, but need to scale it to fit on the paper, make it grey and then Black&White | module ImageProcessing where
import Codec.Picture
import Codec.Picture.Extra
import Data.Foldable
scaledWidth = 240
stripeHeight = 8
split the image into 8dots high bands / stripes
imageToStripes :: Image Pixel8 -> [Image Pixel8]
imageToStripes img@(Image width height _) =
fmap (\row -> crop 0 row width str... |
f5b7c6568bd793338c45bb7eab958ae6780437079f0d8f8856a8c22440b4b509 | quark-lang/quark | Converter.hs | module Core.Closure.Converter where
import Control.Monad.RWS
import Core.Closure.Definition
import Core.Inference.Type.AST
import qualified Data.Map as M
import Data.Functor
type Environment = M.Map String (String, Type)
type MonadClosure m = (MonadIO m, MonadRWS Environment [Closure] Int m)
fresh :: ... | null | https://raw.githubusercontent.com/quark-lang/quark/e3dc7fff4e4dfba3e5c9ab71f10ede8bc5a30a44/app/Core/Closure/Converter.hs | haskell | creating a new lambda name
building the environment based on self and argument
converting also body using the new environment
adding the closure to the environment
replacing lambda with closure maker
creating a new lambda name
building the environment based on self and argument
converting also body using the ne... | module Core.Closure.Converter where
import Control.Monad.RWS
import Core.Closure.Definition
import Core.Inference.Type.AST
import qualified Data.Map as M
import Data.Functor
type Environment = M.Map String (String, Type)
type MonadClosure m = (MonadIO m, MonadRWS Environment [Closure] Int m)
fresh :: ... |
27c602c91d55930d08a145776e77669b510c427ef754ad994004f5473c662549 | bjorng/wings | wpc_rwx.erl | %%
%% wpc_rwx.erl --
%%
Criterion Renderware import / export .
%%
Copyright ( c ) 2003 - 2011 and
%%
%% See the file "license.terms" for information on usage and redistribution
%% of this file, and for a DISCLAIMER OF ALL WARRANTIES.
%%
%% $Id$
%%
-module(wpc_rwx).
-export([init/0,menu/2,command/2... | null | https://raw.githubusercontent.com/bjorng/wings/1e2c2d62e93a98c263b167c7a41f8611e0ff08cd/plugins_src/import_export/wpc_rwx.erl | erlang |
wpc_rwx.erl --
See the file "license.terms" for information on usage and redistribution
of this file, and for a DISCLAIMER OF ALL WARRANTIES.
$Id$
Export.
{label_column,
put(rwx_path,filename:dirname(File)),
put(write_jpeg, proplists:get_value(write_jpeg,Flags)),
This is bad science right here... | Criterion Renderware import / export .
Copyright ( c ) 2003 - 2011 and
-module(wpc_rwx).
-export([init/0,menu/2,command/2]).
-include_lib("wings/e3d/e3d.hrl").
-include_lib("wings/e3d/e3d_image.hrl").
-include_lib("wings/intl_tools/wings_intl.hrl").
init() ->
true.
menu({file,export}, Menu) ->
... |
d01967f1b7d6f075241562a27bf572939e53d8b515508b2e817d2f407331d6e7 | mcorbin/meuse | cache.clj | (ns meuse.api.mirror.cache
(:require [meuse.api.params :as params]
[meuse.auth.request :as auth-request]
[meuse.log :as log]
[meuse.mirror :as mirror]
[meuse.store.protocol :as store]))
(defn cache
[mirror-store request]
(params/validate-params request :meuse.api.c... | null | https://raw.githubusercontent.com/mcorbin/meuse/d2b74543fce37c8cde770ae6f6097cabb509a804/src/meuse/api/mirror/cache.clj | clojure | (ns meuse.api.mirror.cache
(:require [meuse.api.params :as params]
[meuse.auth.request :as auth-request]
[meuse.log :as log]
[meuse.mirror :as mirror]
[meuse.store.protocol :as store]))
(defn cache
[mirror-store request]
(params/validate-params request :meuse.api.c... | |
625bc8dcd5e9e682e22ffe24b6b1c550a07735fa67af24deba7f57d3d3825d13 | kazu-yamamoto/quic | Frame.hs | {-# LANGUAGE OverloadedStrings #-}
module Network.QUIC.Packet.Frame (
encodeFrames
, encodeFramesWithPadding
, decodeFramesBS
, decodeFramesBuffer
, countZero -- testing
) where
import qualified Data.ByteString as BS
import qualified Data.ByteString.Short as Short
import Foreign.Ptr (Ptr, plusPtr, minus... | null | https://raw.githubusercontent.com/kazu-yamamoto/quic/6b9500c8057ac3d974a47543b74b5db11e29ecc0/Network/QUIC/Packet/Frame.hs | haskell | # LANGUAGE OverloadedStrings #
testing
--------------------------------------------------------------
^ payload size without paddings
padding
len
off
fin
--------------------------------------------------------------
--------------------------------------------------------------
----------------------------------... |
module Network.QUIC.Packet.Frame (
encodeFrames
, encodeFramesWithPadding
, decodeFramesBS
, decodeFramesBuffer
) where
import qualified Data.ByteString as BS
import qualified Data.ByteString.Short as Short
import Foreign.Ptr (Ptr, plusPtr, minusPtr, alignPtr, castPtr)
import Foreign.Storable (peek, align... |
e73fe1674ceb9348c2d2e62324f063c7a911b3e3c7abbcc1b2fb8955e42d372f | peterschwarz/clj-gpio | dev.cljs | (ns gpio.dev
(:require [cljs.nodejs :as nodejs]
[gpio.core :as gpio]
[cljs.core.async :as a :refer [<!]])
(:require-macros [cljs.core.async.macros :refer [go]]))
(nodejs/enable-util-print!)
(defn- configure-ports [led btn]
(println "Configuring ports")
(gpio/set-direction! led :out)
... | null | https://raw.githubusercontent.com/peterschwarz/clj-gpio/88fedec2605f6ff6713bfca382a9451538e99fe2/src/dev/clojure/gpio/dev.cljs | clojure | (ns gpio.dev
(:require [cljs.nodejs :as nodejs]
[gpio.core :as gpio]
[cljs.core.async :as a :refer [<!]])
(:require-macros [cljs.core.async.macros :refer [go]]))
(nodejs/enable-util-print!)
(defn- configure-ports [led btn]
(println "Configuring ports")
(gpio/set-direction! led :out)
... | |
02aff557e1c526543d84204a20bb388b79a953164b68763992173010095f3aac | viercc/kitchen-sink-hs | EfreetTest.hs | module Main
( main,
)
where
import Monad.Efreet
import MonadLaws
import System.Exit
tested :: Bool -> IO ()
tested True = return ()
tested False = exitFailure
main :: IO ()
main =
do checkMonadIO enumTree >>= tested
| null | https://raw.githubusercontent.com/viercc/kitchen-sink-hs/4576b7ff6d0ce87fcc24151c47dcfe3d142fcb27/monads-collection/test/EfreetTest.hs | haskell | module Main
( main,
)
where
import Monad.Efreet
import MonadLaws
import System.Exit
tested :: Bool -> IO ()
tested True = return ()
tested False = exitFailure
main :: IO ()
main =
do checkMonadIO enumTree >>= tested
| |
556d7e8f2c6121426829a59ff86f1f630438c2dd240058dbcccbd1cf2d0f6fdf | erikd/haskell-big-integer-experiment | Integer.hs |
# LANGUAGE CPP , MagicHash , NoImplicitPrelude #
-----------------------------------------------------------------------------
-- |
Module : New2.GHC.Integer
Copyright : ( c )
-- License : BSD3
--
-- Maintainer : <>
-- Stability : internal
Portability : non - portable ( GHC Extensio... | null | https://raw.githubusercontent.com/erikd/haskell-big-integer-experiment/7841ec3fcc5be219fa16963849bd12137112f8a9/New2/GHC/Integer.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD3
Maintainer : <>
Stability : internal
An simple definition of the 'Integer' type.
---------------------------------------------------------------------------
XXX |
# LANGUAGE CPP , MagicHash , NoImplicitPrelude #
Module : New2.GHC.Integer
Copyright : ( c )
Portability : non - portable ( GHC Extensions )
#include "MachDeps.h"
module New2.GHC.Integer (
Integer, mkInteger,
smallInteger, wordToInteger, integerToWord, integerToInt,
#if WORD_SIZE_IN... |
07058d2c1ec60477d40bf8753b4782b116098423bb477341ae3a7428d1657c00 | privet-kitty/dufy | hsluv.lisp | ;;;
HSLuv and HPLuv
;;; (contributed by masonium)
;;;
(in-package #:dufy/hsluv)
(define-colorspace hsluv (huv sat lstar)
:arg-types (real real real)
:return-types (double-float double-float double-float)
:documentation "Human-friendly HSL for automatic perceptual color generation. HSLuv uses a relative satura... | null | https://raw.githubusercontent.com/privet-kitty/dufy/c6ad03a9fca16a759c1c52449ac88420a536feca/src/hsluv/hsluv.lisp | lisp |
(contributed by masonium)
The minimum from the origin to the polygon is the minimum among
distances to the lines defining the boundary. | HSLuv and HPLuv
(in-package #:dufy/hsluv)
(define-colorspace hsluv (huv sat lstar)
:arg-types (real real real)
:return-types (double-float double-float double-float)
:documentation "Human-friendly HSL for automatic perceptual color generation. HSLuv uses a relative saturation percentage, of the available satu... |
8a71713d96684154e141bc2c5c00579f3d6a40e0176d7a0922ac504d009ed6cc | jaked/ocamljs | oo_init.ml | open OUnit
let z = ref false
class printable_point x_init =
let origin = (x_init / 10) * 10 in
object (self)
val mutable x = origin
method get_x = x
method move d = x <- x + d
initializer z := true
end
let tests = "Oo_init" >:: begin fun () ->
ignore (new printable_point 17);
assert_bool "" !z
end
| null | https://raw.githubusercontent.com/jaked/ocamljs/378080ff1c8033bb15ed2bd29bf1443e301d7af8/test/ocamljs/oo_init.ml | ocaml | open OUnit
let z = ref false
class printable_point x_init =
let origin = (x_init / 10) * 10 in
object (self)
val mutable x = origin
method get_x = x
method move d = x <- x + d
initializer z := true
end
let tests = "Oo_init" >:: begin fun () ->
ignore (new printable_point 17);
assert_bool "" !z
end
| |
5a2e961444cbd24f0c99bb2c3fecfb48ef216d4f0c58755d569bdf7721b48328 | drlivingston/kr | sesame_mem_kb.clj | (ns edu.ucdenver.ccp.kr.examples.sesame-mem-kb
(use edu.ucdenver.ccp.kr.kb
edu.ucdenver.ccp.kr.rdf
edu.ucdenver.ccp.kr.sparql)
(require edu.ucdenver.ccp.kr.sesame.kb))
;;; --------------------------------------------------------
;;; create kb
;;; ------------------------------------------------------... | null | https://raw.githubusercontent.com/drlivingston/kr/2872ed6f6b1400841091a215e5495a579d153e1c/kr-examples/sesame-mem-kb/src/main/clojure/edu/ucdenver/ccp/kr/examples/sesame_mem_kb.clj | clojure | --------------------------------------------------------
create kb
--------------------------------------------------------
a couple of ways to add triples
in parts
as a triple
to the 'default' kb
multiple triples
--------------------------------------------------------
rdf api
-----------------------------------... | (ns edu.ucdenver.ccp.kr.examples.sesame-mem-kb
(use edu.ucdenver.ccp.kr.kb
edu.ucdenver.ccp.kr.rdf
edu.ucdenver.ccp.kr.sparql)
(require edu.ucdenver.ccp.kr.sesame.kb))
(defn sesame-memory-test-kb []
(open (kb :sesame-mem)))
(defn add-namespaces [kb]
(register-namespaces kb
... |
fa84b65359984a4fc4a6c1ecd60459fd64a8c838b8da2ee83117db83ff60dc43 | mfoemmel/erlang-otp | ssh_cli.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2005 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/ssh/src/ssh_cli.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 2005 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
over SSH
-module(ssh_cli).
-behaviour(... |
ef3d459872a5cb268398fbb1a238ee7eabac47fa0d9be222aebba3932095a5e7 | jepsen-io/voltdb | voltdb_test.clj | (ns jepsen.voltdb-test
(:require [clojure.test :refer :all]
[clojure.string :as str]
[jepsen.voltdb :refer :all]
[jepsen.core :as jepsen]))
(def tarball (str/trim (slurp "tarball.url")))
(when (str/blank? tarball)
(println "Please put the URL to a VoltDB enterprise tarball into... | null | https://raw.githubusercontent.com/jepsen-io/voltdb/7c29d0d6caa29b85143d6942e078d7c0bdb82e35/test/jepsen/voltdb_test.clj | clojure | (ns jepsen.voltdb-test
(:require [clojure.test :refer :all]
[clojure.string :as str]
[jepsen.voltdb :refer :all]
[jepsen.core :as jepsen]))
(def tarball (str/trim (slurp "tarball.url")))
(when (str/blank? tarball)
(println "Please put the URL to a VoltDB enterprise tarball into... | |
ba55c4f8ba92de54d8fe125d130ebd98e3db64046264d96f3a8e4f2d599fbd2d | programaker-project/Programaker-Core | automate_logging_app.erl | %%%-------------------------------------------------------------------
%% @doc automate_logging app API
%% @end
%%%-------------------------------------------------------------------
-module(automate_logging_app).
-behaviour(application).
%% Application callbacks
-export([start/0, start/2, stop/1]).
%%=============... | null | https://raw.githubusercontent.com/programaker-project/Programaker-Core/ef10fc6d2a228b2096b121170c421f5c29f9f270/backend/apps/automate_logging/src/automate_logging_app.erl | erlang | -------------------------------------------------------------------
@doc automate_logging app API
@end
-------------------------------------------------------------------
Application callbacks
====================================================================
API
==================================================... |
-module(automate_logging_app).
-behaviour(application).
-export([start/0, start/2, stop/1]).
start() ->
automate_logging_sup:start_link().
start(_StartType, _StartArgs) ->
start().
stop(_State) ->
ok.
Internal functions
|
bff6e469c04a0990ca286e8ff6f59ddeef276c6d7b27e425755caad648f66677 | janestreet/core_kernel | moption.mli | (** A [Moption] is a mutable option, like ['a option ref], but with a more efficient
implementation; in particular, [set_some] does not allocate. *)
open! Core
open! Import
type 'a t [@@deriving sexp_of]
include Invariant.S1 with type 'a t := 'a t
module Optional_syntax :
Optional_syntax.S1 with type 'a t := ... | null | https://raw.githubusercontent.com/janestreet/core_kernel/18b2a732657ecac73e075e81e1edd0ef797fcc7d/moption/src/moption.mli | ocaml | * A [Moption] is a mutable option, like ['a option ref], but with a more efficient
implementation; in particular, [set_some] does not allocate.
* Does not check that [is_some] before unsafely accessing the stored value |
open! Core
open! Import
type 'a t [@@deriving sexp_of]
include Invariant.S1 with type 'a t := 'a t
module Optional_syntax :
Optional_syntax.S1 with type 'a t := 'a t with type 'a value := 'a
val create : unit -> _ t
val is_none : _ t -> bool
val is_some : _ t -> bool
val get : 'a t -> 'a option
val get_some_exn ... |
2468d0a885ba68c20958245cf5e976a7a12c4dd7270bf4d073d9440e646a2e64 | binsec/haunted | bw_options.ml | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2019
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/haunted/7ffc5f4072950fe138f53fe953ace98fff181c73/src/backwards/bw_options.ml | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
4a4d3320ecc1a6ba6bd61ac1f993a0da5b08c54cf6ec6e531cab45ad2131a19c | nomeata/arbtt | UpgradeLog1.hs | module UpgradeLog1 (upgradeLogFile1) where
import qualified Data.ByteString.Char8 as BS
import System.IO
import Data.Time
import Control.Applicative
import Control.Monad
import System.Directory
import qualified Data.MyText as T
import TimeLog (writeTimeLog)
import qualified Data as D
| A copy of the data definitio... | null | https://raw.githubusercontent.com/nomeata/arbtt/5e9bf42785e075adaa574bf853f7adbc3408e7f4/src/UpgradeLog1.hs | haskell | change them in the main code later, and still be able to read old log files.
^ Active window, window title, programm name | module UpgradeLog1 (upgradeLogFile1) where
import qualified Data.ByteString.Char8 as BS
import System.IO
import Data.Time
import Control.Applicative
import Control.Monad
import System.Directory
import qualified Data.MyText as T
import TimeLog (writeTimeLog)
import qualified Data as D
| A copy of the data definitio... |
b00fef9ff2d885bfd2a1b5f178f2c18e571a26aac0b045866efa492601593fe2 | objecthub/swift-lispkit | SyntaxRules.scm | SyntaxRules.scm
;;; Regression test data
;;;
Author :
Copyright © 2016 ObjectHub . All rights reserved .
;;;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;;; you may not use this file except in compliance with the License.
;;; You may obtain a copy of the License at
;;;
;;; -2.0
... | null | https://raw.githubusercontent.com/objecthub/swift-lispkit/a952f80bb85e6fd084770033141ed8edd2f46500/Tests/LispKitTests/Code/SyntaxRules.scm | scheme | Regression test data
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 specifi... | SyntaxRules.scm
Author :
Copyright © 2016 ObjectHub . All rights reserved .
distributed under the License is distributed on an " AS IS " BASIS ,
(
"Define syntax `for`"
for
(define-syntax for
(syntax-rules (in from)
((for element in list body ...) (map (lambda (element) body ...) list))
... |
42504940d9f4c708d2ef14235e97b7848e86e926fd480cd4dec6a97a31d9e299 | stathissideris/dali | io_test.clj | (ns dali.io-test
(:require [dali.io :refer :all]
[clojure.test :refer :all]))
(deftest test-render-svg-string
(testing "Test render-svg-string"
(are [doc expected] (= expected (render-svg-string doc))
[:dali/page
[:circle [0 0] 20]]
"<?xml version=\"1.0\" encoding=\"U... | null | https://raw.githubusercontent.com/stathissideris/dali/97ebf43527fe76e838d7b6bb98a953db2747824d/test/dali/io_test.clj | clojure | (ns dali.io-test
(:require [dali.io :refer :all]
[clojure.test :refer :all]))
(deftest test-render-svg-string
(testing "Test render-svg-string"
(are [doc expected] (= expected (render-svg-string doc))
[:dali/page
[:circle [0 0] 20]]
"<?xml version=\"1.0\" encoding=\"U... | |
e01d18b96e3ad92c5a526aba2fb293c82779d5ba293823e1739df197259d872a | seancorfield/next-jdbc | test_fixtures.clj | copyright ( c ) 2019 - 2021 , all rights reserved
(ns next.jdbc.test-fixtures
"Multi-database testing fixtures."
(:require [clojure.string :as str]
[next.jdbc :as jdbc]
[next.jdbc.prepare :as prep]
[next.jdbc.sql :as sql])
(:import (io.zonky.test.db.postgres.embedded Embed... | null | https://raw.githubusercontent.com/seancorfield/next-jdbc/d83ab07f9f58934aa856b0ce60d48f2bb0758e6c/test/next/jdbc/test_fixtures.clj | clojure | this is just a dummy db-spec -- it's handled in with-test-db below
it takes a while to spin up so we kick it off at startup
done
so that we get table names back from queries
MySQL is case sensitive!
")
")) "
this is a convenience to bring next.jdbc's test dependencies
into any REPL that has the add-lib3 bran... | copyright ( c ) 2019 - 2021 , all rights reserved
(ns next.jdbc.test-fixtures
"Multi-database testing fixtures."
(:require [clojure.string :as str]
[next.jdbc :as jdbc]
[next.jdbc.prepare :as prep]
[next.jdbc.sql :as sql])
(:import (io.zonky.test.db.postgres.embedded Embed... |
19a217671de3ee5abfc4881eea3fe5ccb02cb464cb44a66f4cab6049fe3682fe | hasktorch/ffi-experimental | MemorySpec.hs | # LANGUAGE ScopedTypeVariables #
{-# LANGUAGE BangPatterns #-}
# LANGUAGE DataKinds #
module MemorySpec (main, spec) where
import Test.Hspec
import Control.Exception (bracket)
import Control.Monad (forM_,forM)
import Data.Int
import Foreign
import ATen.Const
import ATen.Type
import ATen.Managed.Type.TensorOptions
impo... | null | https://raw.githubusercontent.com/hasktorch/ffi-experimental/54192297742221c4d50398586ba8d187451f9ee0/ffi/test/MemorySpec.hs | haskell | # LANGUAGE BangPatterns #
|Confirm that memory is deallocated (works)
|Leaks memory
|Releases memory | # LANGUAGE ScopedTypeVariables #
# LANGUAGE DataKinds #
module MemorySpec (main, spec) where
import Test.Hspec
import Control.Exception (bracket)
import Control.Monad (forM_,forM)
import Data.Int
import Foreign
import ATen.Const
import ATen.Type
import ATen.Managed.Type.TensorOptions
import ATen.Managed.Type.Tensor
im... |
b57315f970d740b1d968299692625a0963d4ede9aa5f7c4e132cd3129ad3a4cd | wooga/ebloomd | ebloomd_filter.erl | @license The FreeBSD License
2012 Wooga GmbH
-module (ebloomd_filter).
-compile ([export_all]).
-behavior (gen_server).
-export ([
init/1, handle_call/3, handle_cast/2,
handle_info/2, terminate/2, code_change/3]).
insert(FilterPid, Element) ->
gen_server:cast(FilterPid, {insert, Element}).
contain... | null | https://raw.githubusercontent.com/wooga/ebloomd/ca24885bdbab9e6f01221b1f26b6b8064149206a/src/ebloomd_filter.erl | erlang | purge by replacing the filter altogether.
Check for element membership with the filter.
Insert a new element into the bloom filter.
Ignore undefined calls. | @license The FreeBSD License
2012 Wooga GmbH
-module (ebloomd_filter).
-compile ([export_all]).
-behavior (gen_server).
-export ([
init/1, handle_call/3, handle_cast/2,
handle_info/2, terminate/2, code_change/3]).
insert(FilterPid, Element) ->
gen_server:cast(FilterPid, {insert, Element}).
contain... |
d71bbfb9c778a18bf58dd3f18deeee0ebdd6f1678f2a5e787c334cf079c9d9df | janestreet/merlin-jst | ast_mapper.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/janestreet/merlin-jst/980b574405617fa0dfb0b79a84a66536b46cd71b/src/ocaml/parsing/ast_mapper.ml | ocaml | ************************************************************************
OCaml
... | , LexiFi
Copyright 2012 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
A generic Parsetree mapping class
[ @@@ocaml.warning " +9 " ]
( * Ensure that record patterns do ... |
aacfc5cea66a235880a76ec93f7ab5be2da6e22ed9f98ed70cb637bd75cfe6fe | simplex-chat/simplexmq | CLI.hs | # LANGUAGE DataKinds #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeApplications #
module Simplex.Messaging.Server.CLI where
import Control.Monad
import Data.ByteString.Char... | null | https://raw.githubusercontent.com/simplex-chat/simplexmq/69a5896dac4505ca2a570f080cf96167afdee535/src/Simplex/Messaging/Server/CLI.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
server certificate (online)
--------\n\ | # LANGUAGE DataKinds #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
# LANGUAGE TypeApplications #
module Simplex.Messaging.Server.CLI where
import Control.Monad
import Data.ByteString.Char8 (ByteString)
import qualified Data.ByteString.Char8 as B... |
c4c7f125dd882cd9549c5c9487d37379e6cc0bf391e436b1799e1e259258bb49 | sshirokov/CLSQL | odbc-sql.lisp | -*- Mode : LISP ; Syntax : ANSI - Common - Lisp ; Base : 10 -*-
;;;; *************************************************************************
;;;; FILE IDENTIFICATION
;;;;
;;;; Name: odbc-sql.cl
Purpose : Medium - level interface for CLSQL ODBC backend
Programmer :
Date Started : Feb 2... | null | https://raw.githubusercontent.com/sshirokov/CLSQL/c680432aea0177677ae2ee7b810a7404f7a05cab/db-odbc/odbc-sql.lisp | lisp | Syntax : ANSI - Common - Lisp ; Base : 10 -*-
*************************************************************************
FILE IDENTIFICATION
Name: odbc-sql.cl
(), also known as the LLGPL.
*************************************************************************
Ensure this database type is initialized... | Purpose : Medium - level interface for CLSQL ODBC backend
Programmer :
Date Started : Feb 2002
This file , part of CLSQL , is Copyright ( c ) 2002 by
CLSQL users are granted the rights to distribute and use this software
as governed by the terms of the Lisp Lesser GNU Public License
(def... |
93c24d2e8ebbf83e09c406eb4d9d5935a38d963f8aaf0278794f39eaa67aae34 | shriram/gradescope-racket | grade-two-funs-2.rkt | #lang racket
(require rackunit) ;; WARNING: Use the test- forms, NOT the check- forms!
(require
racket/hash
"lib-grade.rkt")
(define-var add-one from "code.rkt")
(define-var sub-one from "code.rkt")
(define tests
(test-suite
""
(test-suite
"add-one test suite"
(test-suite
"extra nesting for t... | null | https://raw.githubusercontent.com/shriram/gradescope-racket/369c601f962533e36946a073886480166b8eeded/grade-two-funs-2.rkt | racket | WARNING: Use the test- forms, NOT the check- forms! | #lang racket
(require
racket/hash
"lib-grade.rkt")
(define-var add-one from "code.rkt")
(define-var sub-one from "code.rkt")
(define tests
(test-suite
""
(test-suite
"add-one test suite"
(test-suite
"extra nesting for testing"
(test-equal? "+1 0" (add-one 0) 1))
(test-equal? "+1 1" (... |
edeb7c4bb92dda3af6864e2891a7de5dc987c9e5fd9d7d88483b10a63fb68147 | skanev/playground | 73.scm | SICP exercise 4.73
;
; Why does flatten-stream use delay explicitly? What would be wrong with
; defining it as follows:
;
; (define (flatten-stream stream)
; (if (stream-null? stream)
; the-empty-stream
; (interleave
; (stream-car stream)
; (flatten-stream (stream-cdr stream)))))
; Well... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/04/73.scm | scheme |
Why does flatten-stream use delay explicitly? What would be wrong with
defining it as follows:
(define (flatten-stream stream)
(if (stream-null? stream)
the-empty-stream
(interleave
(stream-car stream)
(flatten-stream (stream-cdr stream)))))
Well, to be fair, this is just how I ... | SICP exercise 4.73
|
8529030ad7a6e6d5f2f4275182692de0c6360b3818df2bbdf5b4218f49c4bead | 8c6794b6/haskell-sc-scratch | Parse2.hs | # LANGUAGE NoMonomorphismRestriction #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE NoImplicitPrelude #
|
Module : $ Header$
License : : unstable
Portability : non - portable ( GADTs , RankNTypes , etc )
Parsing patterns encoded in ByteString... | null | https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/hsc3-lepton/src/lib/Sound/SC3/Lepton/Pattern/Old/Parse2.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
instance Pval PL where pval a = Func "pval" [Atom a]
funcNames = ["pval","plist","pappend","pconcat","prange","pcycle","pempty"]
iFuncNames = ["pseq","prand"]
----------------------------------------------------------------------------
Sampl... | # LANGUAGE NoMonomorphismRestriction #
# LANGUAGE NoImplicitPrelude #
|
Module : $ Header$
License : : unstable
Portability : non - portable ( GADTs , RankNTypes , etc )
Parsing patterns encoded in ByteString with Bz , take 2 .
Using dedicated data type to hold intermediate data structure .... |
bea2f303086c783614f80d5ab63118bbdcca1f650cce01afab544aada329fca0 | utahstreetlabs/parseapp-cljs | ironmq.cljs | (ns parseapp-cljs.ironmq
(:require [cemerick.url :refer [url URL]]
[cljs.core.async :refer [timeout]]
[parseapp-cljs.async :refer [prom->chan]]
[parseapp-cljs.parse :refer [fix-arguments]])
(:require-macros [cljs.core.async.macros :refer [go]]
[parseapp-cljs.pa... | null | https://raw.githubusercontent.com/utahstreetlabs/parseapp-cljs/577db251d984ad193cf8504cf334fd58a8b29fc1/src/cljs/parseapp_cljs/ironmq.cljs | clojure | pretty much stolen from:
-io/iron_mq_clojure/blob/master/src/iron_mq_clojure/client.clj
dreams of generalizing and pushing back upstream currently on hold | (ns parseapp-cljs.ironmq
(:require [cemerick.url :refer [url URL]]
[cljs.core.async :refer [timeout]]
[parseapp-cljs.async :refer [prom->chan]]
[parseapp-cljs.parse :refer [fix-arguments]])
(:require-macros [cljs.core.async.macros :refer [go]]
[parseapp-cljs.pa... |
40e6861a55e0e88d7c97e52f320765655b07a4bbb4c6cfb235fa620bdeab7799 | brendanhay/gogol | Types.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
{-# LANGUAGE St... | null | https://raw.githubusercontent.com/brendanhay/gogol/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-sourcerepo/gen/Gogol/SourceRepo/Types.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
* Configuration
* Types
** Xgafv
** AuditConfig
** AuditLogConfig
** AuditLogConfig_LogType
** Binding
** Empty
** ListReposResponse
** MirrorConfig
** Operation
** Operation_Metadata
** Operation_Response
** Policy
*... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators... |
9bdb9295e227f85c3b11fb99ac2b1d254411c2211a116d313a0466dc3e291214 | system-f/text1 | quickcheck.hs | module Main where
import Control.Applicative ((<$>), (<*>), pure)
import Data.Semigroup ((<>))
import Test.QuickCheck
import Data.Text (Text, pack)
import Data.Text1
import Data.Foldable (traverse_)
import Data.Traversable (traverse)
import System.Exit (exitFailure)
main :: IO ()
main =
traverse quickCheckResult te... | null | https://raw.githubusercontent.com/system-f/text1/2f1a43aeb7100dcc4fdf5aad622e49e24c4d8dec/tests/quickcheck.hs | haskell | module Main where
import Control.Applicative ((<$>), (<*>), pure)
import Data.Semigroup ((<>))
import Test.QuickCheck
import Data.Text (Text, pack)
import Data.Text1
import Data.Foldable (traverse_)
import Data.Traversable (traverse)
import System.Exit (exitFailure)
main :: IO ()
main =
traverse quickCheckResult te... | |
fb3edc380049f3c2f42fcddc3216675955b145fecc6621436a42971eccf82ad9 | BartMassey/parseargs | ParseArgs.hs | # LANGUAGE FlexibleInstances , DeriveDataTypeable , CPP #
#if __GLASGOW_HASKELL__ > 720
{-# LANGUAGE Safe #-}
#endif
------------------------------------------------------------
-- |
Module : System . Console . ParseArgs
-- Description : Full-featured command-line argument parsing library.
Copyright : ... | null | https://raw.githubusercontent.com/BartMassey/parseargs/be1acab1da4f358d4b96f4b6e0aa8691f0c399ce/System/Console/ParseArgs.hs | haskell | # LANGUAGE Safe #
----------------------------------------------------------
|
Description : Full-featured command-line argument parsing library.
License : BSD-style (see the file COPYING)
Stability : stable
Portability : portable
parsing library.
This module supplies an argument parser. Given a
de... | # LANGUAGE FlexibleInstances , DeriveDataTypeable , CPP #
#if __GLASGOW_HASKELL__ > 720
#endif
Module : System . Console . ParseArgs
Copyright : ( c ) 2007
Maintainer : < >
` ParseArgs ` is a full - featured command - line argument
module System.Console.ParseArgs (
Arg(..),
Argtype(..... |
412fddede16f4547220e9d2482b03c8ac3cc0f3d17f832abb94e47dde1138ab8 | jabber-at/ejabberd-contrib | fusco_protocol_eqc.erl | %%%=============================================================================
( C ) 1999 - 2013 , Erlang Solutions Ltd
@author < >
%%% @doc
%%% @end
%%%=============================================================================
-module(fusco_protocol_eqc).
-copyright("2013, Erlang Solutions Ltd.").
-inclu... | null | https://raw.githubusercontent.com/jabber-at/ejabberd-contrib/d5eb036b786c822d9fd56f881d27e31688ec6e91/ejabberd_auth_http/deps/fusco/test/fusco_protocol_eqc.erl | erlang | =============================================================================
@doc
@end
=============================================================================
==============================================================================
Quickcheck generators
==================================================... | ( C ) 1999 - 2013 , Erlang Solutions Ltd
@author < >
-module(fusco_protocol_eqc).
-copyright("2013, Erlang Solutions Ltd.").
-include_lib("eqc/include/eqc.hrl").
-include("fusco.hrl").
-export([prop_http_response_close_connection/0,
prop_http_response_keep_alive/0,
prop_chunked_http_response_keep_alive/0]... |
7600c08d5f45ad935b228275c4649961225115a9b36231323b3cff3e6c33d85a | input-output-hk/ouroboros-network | NonP2P.hs | # LANGUAGE CPP #
{-# LANGUAGE DataKinds #-}
# LANGUAGE GADTs #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
-- | This module is expected to be imported qualified (it will clash
wi... | null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/9249a70ed9e2365f3963e47cb31b4b1589bca8f6/ouroboros-network/src/Ouroboros/Network/Diffusion/NonP2P.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
| This module is expected to be imported qualified (it will clash
| NonP2P DiffusionTracers Extras
| IP subscription tracer
| DNS subscription tracer
| DNS resolver tracer
| Trace rate limiting of accepted conn... | # LANGUAGE CPP #
# LANGUAGE GADTs #
# LANGUAGE NamedFieldPuns #
# LANGUAGE ScopedTypeVariables #
with the " Ouroboros . Network . Diffusion . P2P " ) .
module Ouroboros.Network.Diffusion.NonP2P
( TracersExtra (..)
, nullTracers
, ApplicationsExtra (..)
, ArgumentsExtra (... |
fc9f7545e8833e57c21de86c7d0d03a57de81ea96b0fad23248ba3b9be9a795f | ocaml/odoc | test.mli | module M: sig include module type of Test0 end
| null | https://raw.githubusercontent.com/ocaml/odoc/2f639d7d661bc5397afce83dfaa71af53d2a8677/test/xref2/unexpanded_module_type_of.t/test.mli | ocaml | module M: sig include module type of Test0 end
| |
a4a1a0576d98c5ca7341b89d31a27b13307b66016ca395e71a44f00a15ecf8e0 | jellelicht/guix | python-build-system.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2013 , 2015 , 2016 < >
Copyright © 2013 < >
Copyright © 2013 < >
Copyright © 2015 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General... | null | https://raw.githubusercontent.com/jellelicht/guix/83cfc9414fca3ab57c949e18c1ceb375a179b59c/guix/build/python-build-system.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2013 , 2015 , 2016 < >
Copyright © 2013 < >
Copyright © 2013 < >
Copyright © 2015 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (guix ... |
96ff61011e138b3e28e7ce7afb12fe7eacc433dc176ce99b3cdc493bc82f9efa | commercialhaskell/rio | Map.hs | # LANGUAGE CPP #
-- | Strict @Map@. Import as:
--
-- > import qualified RIO.Map as Map
--
-- This module does not export any partial or unchecked functions. For those,
-- see "RIO.Map.Partial" and "RIO.Map.Unchecked"
module RIO.Map
(
-- * Map type
Data.Map.Strict.Map
-- * Operators
#if MIN_VERSION_containe... | null | https://raw.githubusercontent.com/commercialhaskell/rio/4eba306d37a60a20f0bed27f40afc23a7c892c40/rio/src/RIO/Map.hs | haskell | | Strict @Map@. Import as:
> import qualified RIO.Map as Map
This module does not export any partial or unchecked functions. For those,
see "RIO.Map.Partial" and "RIO.Map.Unchecked"
* Map type
* Operators
* Query
* Construction
** Insertion
** Delete\/Update
* Combine
** Union
** Difference
** Intersec... | # LANGUAGE CPP #
module RIO.Map
(
Data.Map.Strict.Map
#if MIN_VERSION_containers(0,5,9)
, (Data.Map.Strict.!?)
#endif
, (Data.Map.Strict.\\)
, Data.Map.Strict.null
, Data.Map.Strict.size
, Data.Map.Strict.member
, Data.Map.Strict.notMember
, Data.Map.Strict.lookup
, Data.Map.Strict.findWithDefa... |
57a62380eda0cf263cb04a4166af7017a503371d3401425b1ea5c929ba67643c | bowswung/voobly-scraper | Techs.hs | module Data.Mgz.Constants.Techs where
-- borrowed from -mgz/blob/master/mgz/const.py
import RIO
data Tech =
Tech_EliteTarkan
| Tech_Yeomen
| Tech_ElDorado
| Tech_FurorCeltica
| Tech_Drill
| Tech_Mahouts
| Tech_TownWatch
| Tech_Zealotry
| Tech_Artillery
| Tech_Crenellations
| Tech_CropRotation
... | null | https://raw.githubusercontent.com/bowswung/voobly-scraper/a6c330010455ab607b1803ae576e688b737ca536/src/Data/Mgz/Constants/Techs.hs | haskell | borrowed from -mgz/blob/master/mgz/const.py | module Data.Mgz.Constants.Techs where
import RIO
data Tech =
Tech_EliteTarkan
| Tech_Yeomen
| Tech_ElDorado
| Tech_FurorCeltica
| Tech_Drill
| Tech_Mahouts
| Tech_TownWatch
| Tech_Zealotry
| Tech_Artillery
| Tech_Crenellations
| Tech_CropRotation
| Tech_HeavyPlow
| Tech_HorseCollar
| Tec... |
e85c3dde72053f4eae2f714882a67bbf1422ab341f522f541268b11786f3ae17 | SimulaVR/godot-haskell | VisualShaderNodeFaceForward.hs | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.VisualShaderNodeFaceForward () where
import Data.Coerce
imp... | null | https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/src/Godot/Core/VisualShaderNodeFaceForward.hs | haskell | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.VisualShaderNodeFaceForward () where
import Data.Coerce
imp... | |
4d7cda3142e5260db31368b5f4a3dea0de479543b02d32a66bcc843f81f603e7 | synrc/kvs | kvs_rocks.erl | -module(kvs_rocks).
-include("backend.hrl").
-include("kvs.hrl").
-include("metainfo.hrl").
-include_lib("stdlib/include/qlc.hrl").
-export(?BACKEND).
-export([ref/0,ref/1,bt/1,key/2,key/1,fd/1,tb/1,estimate/0,estimate/1]).
-export([seek_it/1, seek_it/2, move_it/3, move_it/4, take_it/4, take_it/5, delete_it/1, delete_i... | null | https://raw.githubusercontent.com/synrc/kvs/c6293958289c5ebd76d91b6f2330bd7e3608b7d4/src/stores/kvs_rocks.erl | erlang | allow old writers
key
sup-key
direction next/prev
H is iterator reference
fail-safe closing |
acc unfold |
|
backward prefetch |
return (range-check error) |
run prev-take chain | loop
fail-safe closing |
acc unfold ... | -module(kvs_rocks).
-include("backend.hrl").
-include("kvs.hrl").
-include("metainfo.hrl").
-include_lib("stdlib/include/qlc.hrl").
-export(?BACKEND).
-export([ref/0,ref/1,bt/1,key/2,key/1,fd/1,tb/1,estimate/0,estimate/1]).
-export([seek_it/1, seek_it/2, move_it/3, move_it/4, take_it/4, take_it/5, delete_it/1, delete_i... |
03ef98e1ae3715a5264ff2eba7cf2605df8a14c5ba7ece39b3b7bcfc1a872602 | max-au/lambda | lambda_broker_SUITE.erl | %% @doc
%% Tests Lambda broker
%% @end
-module(lambda_broker_SUITE).
-author("").
%% Test server callbacks
-export([
suite/0,
all/0,
groups/0,
init_per_group/2,
end_per_group/2
]).
%% Test cases exports
-export([
trade/0, trade/1,
trade_down/0, trade_down/1,
peer/0, peer/1,
lat... | null | https://raw.githubusercontent.com/max-au/lambda/53d9ab894156f5b15bbf1ad774449bb877588144/test/lambda_broker_SUITE.erl | erlang | @doc
Tests Lambda broker
@end
Test server callbacks
Test cases exports
Internal exports, only for testing
start discovery
not distributed
--------------------------------------------------------------------
Convenience
Starts an authority, and returns bootstrap to start the rest
of the system.
---------... | -module(lambda_broker_SUITE).
-author("").
-export([
suite/0,
all/0,
groups/0,
init_per_group/2,
end_per_group/2
]).
-export([
trade/0, trade/1,
trade_down/0, trade_down/1,
peer/0, peer/1,
late_broker_start/0, late_broker_start/1
]).
-export([
monitored_peers/1
]).
-include_l... |
f1f71b10e8b6e33337d5946e762b12a2713fd00e5a1e5f1d7446b38dd33ca253 | alexandroid000/improv | RingChan.hs | module Ros.Internal.Util.RingChan (RingChan, newRingChan, writeChan,
readChan, getChanContents,
getBuffered) where
import Control.Monad (join)
import Control.Concurrent.MVar
import Control.Concurrent.SSem (SSem)
import qualified Control.Concurrent.... | null | https://raw.githubusercontent.com/alexandroid000/improv/ef0f4a6a5f99a9c7ff3d25f50529417aba9f757c/roshask/src/Ros/Internal/Util/RingChan.hs | haskell | newRingChan = newBoundedChan
semaphore used to indicate that the chan has gone from empty to
non-empty, and a sequence of items.
|If the chan is full, does nothing. NOTE: An alternative would be
to drop the oldest element before adding the new one.
else return (q, return ()))
|Read an item from the channel. Bloc... | module Ros.Internal.Util.RingChan (RingChan, newRingChan, writeChan,
readChan, getChanContents,
getBuffered) where
import Control.Monad (join)
import Control.Concurrent.MVar
import Control.Concurrent.SSem (SSem)
import qualified Control.Concurrent.... |
57df5aabc301d641599730373d235cfec8a0b3d16180dac3868cff3b461abe22 | lambe-lang/nethra | proof.ml | open Format
let check render hypothesis_render render_term prefix ppf
(hypothesis, term, kind, proofs) =
let () =
fprintf ppf "%s%a ⊢ %a <= %a\n" prefix hypothesis_render hypothesis
render_term term render_term kind
in
List.iter
(fun p -> render hypothesis_render render_term (prefix ^ "| ") pp... | null | https://raw.githubusercontent.com/lambe-lang/nethra/aaa1aaacb9cfbd4b360ad78f76115055a7c257d9/lib/nethra/lang/render/proof.ml | ocaml | open Format
let check render hypothesis_render render_term prefix ppf
(hypothesis, term, kind, proofs) =
let () =
fprintf ppf "%s%a ⊢ %a <= %a\n" prefix hypothesis_render hypothesis
render_term term render_term kind
in
List.iter
(fun p -> render hypothesis_render render_term (prefix ^ "| ") pp... | |
5375802c6e375fc4e912464e7679161368869338e2e3c33edf3d0718f9f26287 | sjl/advent | day-10.lisp | (advent:defpackage* :advent/2018/10
(:shadow :x :y :bounds))
(in-package :advent/2018/10)
(defun parse-line (line)
(destructuring-bind (x y vx vy) line
(cons (complex x y)
(complex vx vy))))
(defun x (star)
(realpart (car star)))
(defun y (star)
(imagpart (car star)))
(defun tick (stars)
(do... | null | https://raw.githubusercontent.com/sjl/advent/dc3debda9bd1a0570a6ab06919b1af7b285413dc/src/2018/days/day-10.lisp | lisp | left
right
bottom
top
This can't really be tested automatically :( | (advent:defpackage* :advent/2018/10
(:shadow :x :y :bounds))
(in-package :advent/2018/10)
(defun parse-line (line)
(destructuring-bind (x y vx vy) line
(cons (complex x y)
(complex vx vy))))
(defun x (star)
(realpart (car star)))
(defun y (star)
(imagpart (car star)))
(defun tick (stars)
(do... |
bd81aadd2d0b5c4ba0d8c982ec46bf462155209fe1c335860084fc1b1728b2ef | tsloughter/kuberl | kuberl_v1beta1_stateful_set_list.erl | -module(kuberl_v1beta1_stateful_set_list).
-export([encode/1]).
-export_type([kuberl_v1beta1_stateful_set_list/0]).
-type kuberl_v1beta1_stateful_set_list() ::
#{ 'apiVersion' => binary(),
'items' := list(),
'kind' => binary(),
'metadata' => kuberl_v1_list_meta:kuberl_v1_list_meta()
}.
... | null | https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v1beta1_stateful_set_list.erl | erlang | -module(kuberl_v1beta1_stateful_set_list).
-export([encode/1]).
-export_type([kuberl_v1beta1_stateful_set_list/0]).
-type kuberl_v1beta1_stateful_set_list() ::
#{ 'apiVersion' => binary(),
'items' := list(),
'kind' => binary(),
'metadata' => kuberl_v1_list_meta:kuberl_v1_list_meta()
}.
... | |
908c2f7d22bda8fa289d69124f10b0b4f9f124bc6f8937e8edcdb36b408b93e8 | racket/compatibility | awk.rkt |
(module awk mzscheme
(require-for-syntax syntax/stx)
(provide awk match:start match:end match:substring regexp-exec)
(define-syntax awk
(lambda (stx)
(syntax-case stx ()
[(_ next-record
(record field ...)
counter
((state-variable init-expr) ...)
continue
clause ...)
(and (... | null | https://raw.githubusercontent.com/racket/compatibility/492030dac6f095045ce8a13dca75204dd5f34e32/compatibility-lib/mzlib/awk.rkt | racket | Left out continue...
Left out counter...
Left out both... |
(module awk mzscheme
(require-for-syntax syntax/stx)
(provide awk match:start match:end match:substring regexp-exec)
(define-syntax awk
(lambda (stx)
(syntax-case stx ()
[(_ next-record
(record field ...)
counter
((state-variable init-expr) ...)
continue
clause ...)
(and (... |
619b661bd35e43bc6df0459e747d28b9c5b254ed2db6a98f0c73a6afe518a819 | ghcjs/ghcjs-examples | race.hs | {-# LANGUAGE JavaScriptFFI, CPP #-}
module Main where
import Control.Monad
import Control.Concurrent
import GHCJS.Foreign
import GHCJS.Types
import Data.Text (pack)
#ifdef __GHCJS__
foreign import javascript unsafe "document.getElementById($1).style.left = '' + $2 + 'px'"
setPos :: JSString -> Int -> IO ()
#else
s... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-examples/217b7fd3816f57634977beac711452704c3ea688/weblog/race/race.hs | haskell | # LANGUAGE JavaScriptFFI, CPP #
workaround, sometimes the dependencies for text aren't linked without this, need to investigate | module Main where
import Control.Monad
import Control.Concurrent
import GHCJS.Foreign
import GHCJS.Types
import Data.Text (pack)
#ifdef __GHCJS__
foreign import javascript unsafe "document.getElementById($1).style.left = '' + $2 + 'px'"
setPos :: JSString -> Int -> IO ()
#else
setPos = error "setPos: only availabl... |
7617ca918d4825fd30fdde40f83ff6e45166804a03471644884809e1d8e14b63 | cstar/ejabberd-old | iconv.erl | %%%----------------------------------------------------------------------
%%% File : iconv.erl
Author : < >
Purpose : Interface to
Created : 16 Feb 2003 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2010 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
modify ... | null | https://raw.githubusercontent.com/cstar/ejabberd-old/559f8b6b0a935710fe93e9afacb4270d6d6ea00f/src/mod_irc/iconv.erl | erlang | ----------------------------------------------------------------------
File : iconv.erl
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the imp... | Author : < >
Purpose : Interface to
Created : 16 Feb 2003 by < >
ejabberd , Copyright ( C ) 2002 - 2010 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU Gener... |
f857448381694816353ec04154a47a5bbd815ab54a4bf5d2e557d90ffebd9b79 | Perry961002/SICP | exe3.6-rand.scm | (define random-init 137)
(define (rand-update x)
(let ((a (expt 2 32))
(c 1103515245)
(m 12345))
(modulo (+ (* a x) c) m)))
(define rand
(let ((x random-init))
(lambda (m)
(cond ((eq? m 'generate)
(begin (set! x (rand-update x))
... | null | https://raw.githubusercontent.com/Perry961002/SICP/89d539e600a73bec42d350592f0ac626e041bf16/Chap3/exercise/exe3.6-rand.scm | scheme | (define random-init 137)
(define (rand-update x)
(let ((a (expt 2 32))
(c 1103515245)
(m 12345))
(modulo (+ (* a x) c) m)))
(define rand
(let ((x random-init))
(lambda (m)
(cond ((eq? m 'generate)
(begin (set! x (rand-update x))
... | |
bd0cca37d1c046d247185b79435aa833454eed4f6f7040f540fba465f6decc74 | CardanoSolutions/ogmios | TxMonitor.hs | 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 /.
# LANGUAGE DuplicateRecordFields #
# LANGUAGE TypeApplications #
# LANGUAGE UndecidableInstances #
-- NOTE:
-- This module uses partial rec... | null | https://raw.githubusercontent.com/CardanoSolutions/ogmios/317c826d9d0388cb7efaf61a34085fc7c1b12b06/server/src/Ogmios/Data/Protocol/TxMonitor.hs | haskell | NOTE:
This module uses partial record field accessor to automatically derive
JSON instances from the generic data-type structure. The partial fields are
otherwise unused.
* Codecs
* Messages
** Acquire / AwaitAcquire
** NextTx
** SizeAndCapacity
** ReleaseMempools
* Re-exports
Messages
AwaitAcquire
... | 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 /.
# LANGUAGE DuplicateRecordFields #
# LANGUAGE TypeApplications #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -fno - warn - partial - fi... |
849e2dc946d21425cfeaf5b8cff752c12a8b6ec8e2e624b1a1e4179bcb013071 | argp/bap | dGraphModel.ml | (**************************************************************************)
(* *)
(* This file is part of OcamlGraph. *)
(* *)
Copyright... | null | https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/ocamlgraph/dgraph/dGraphModel.ml | ocaml | ************************************************************************
This file is part of OcamlGraph.
... | Copyright ( C ) 2009 - 2010
CEA ( Commissariat à )
Lesser General Public License as published by the Free Software
Foundation , version 2.1 , with a linking exception .
( ) ... |
2601b46f0b3b7cee44e9228fe5e3eef2461afc67ef0cea5c6ddd29b4e7b29838 | maranget/hevea | explode.mli | (***********************************************************************)
(* *)
(* HEVEA *)
(* *)
, projet , INRIA R... | null | https://raw.githubusercontent.com/maranget/hevea/226eac8c506f82a600d453492fbc1b9784dd865f/explode.mli | ocaml | *********************************************************************
HEVEA
... | , projet , INRIA Rocquencourt
Copyright 2001 Institut National de Recherche en Informatique et
Automatique . Distributed only by permission .
$ I d : explode.mli , v 1.4 2001 - 05 - 28 17:28:55 maranget Exp $
val trees : Lexeme.style Tree.t list ->... |
001e50bd0a9deeed3b4b9c46522fe38718f0bc923f2d95c92037074c60962351 | racket/old-plt | nfa2dfa.scm | Copyright ( C ) 1997 , Universite ' de Montre'al .
; All rights reserved.
; SILex 1.0.
; Recoupement de deux arcs
(define n2d-2arcs
(lambda (arc1 arc2)
(let* ((class1 (car arc1))
(ss1 (cdr arc1))
(class2 (car arc2))
(ss2 (cdr arc2))
(result (class-sep class1 class2))
(classl (vector-ref ... | null | https://raw.githubusercontent.com/racket/old-plt/a580d75deae2a0d2f3d8a93bc3c4f8f1f619b5b7/collects/java/SILexSource/nfa2dfa.scm | scheme | All rights reserved.
SILex 1.0.
Recoupement de deux arcs
destinations distinctes
Ne tente pas de combiner les arcs qui ont nec. des classes disjointes
Conjecture: les arcs crees ont leurs classes disjointes
;
Section temporaire :
Dictionnaire d'etat det . Recherche lineaire . Creation naive
; des a... | Copyright ( C ) 1997 , Universite ' de Montre'al .
(define n2d-2arcs
(lambda (arc1 arc2)
(let* ((class1 (car arc1))
(ss1 (cdr arc1))
(class2 (car arc2))
(ss2 (cdr arc2))
(result (class-sep class1 class2))
(classl (vector-ref result 0))
(classc (vector-ref result 1))
(classr (vect... |
e567dbd93a643586753d32ade1017352a877c0bf7218e2f7122f5a5f13eb77d3 | alexandergunnarson/quantum | core.cljc | (ns quantum.core.collections.core
(:refer-clojure :exclude
[vector hash-map rest count first second butlast last aget get nth pop peek
conj! conj assoc assoc! dissoc dissoc! disj! contains? key val reverse rseq
empty? empty class reduce
#?@(:cljs [array])])
(:require [clojure.core :a... | null | https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/src/quantum/core/collections/core.cljc | clojure | TODO it.unimi.dsi.fastutil ReferenceArrayList ?
TODO Queues need support
split-at [o index] - clojure.core/split-at
insert-before-arr [o index val] - insert array of items inside coll
remove-n [o index n] - remove n items starting at index pos
sew [pre-coll item-arr suf-coll] - opposite of rip, but with arr... | (ns quantum.core.collections.core
(:refer-clojure :exclude
[vector hash-map rest count first second butlast last aget get nth pop peek
conj! conj assoc assoc! dissoc dissoc! disj! contains? key val reverse rseq
empty? empty class reduce
#?@(:cljs [array])])
(:require [clojure.core :a... |
e56125c78a7a43b01a586859d5e5c70ec99cf66f197bacfa10d40ff4a0c1b0f5 | schlagert/syslog | syslog_lager_backend.erl | %%%=============================================================================
Copyright 2016 - 2017 , < >
%%%
%%% Permission to use, copy, modify, and/or distribute this software for any
%%% purpose with or without fee is hereby granted, provided that the above
%%% copyright notice and this permission notice ap... | null | https://raw.githubusercontent.com/schlagert/syslog/afa22abe282ead1b6421b27a9d6469a24b776e66/src/syslog_lager_backend.erl | erlang | =============================================================================
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
WITH REGARD TO THIS SOFTWA... | Copyright 2016 - 2017 , < >
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES
ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN
@see
-module(syslog_lager_backend).
-behaviour(gen_event... |
9e0713735e5cc90ac0f35434f156b39566330465ecf3dea0882bbfc2945e0272 | mbutterick/aoc-racket | input.rkt | #lang reader "lang.rkt"
root@ebhq-gridcenter# df -h
Filesystem Size Used Avail Use%
/dev/grid/node-x0-y0 92T 73T 19T 79%
/dev/grid/node-x0-y1 91T 66T 25T 72%
/dev/grid/node-x0-y2 85T 73T 12T 85%
/dev/grid/node-x0-y3 85T 68T 17T 80%
/dev/grid/node-x0-y4 87T... | null | https://raw.githubusercontent.com/mbutterick/aoc-racket/2c6cb2f3ad876a91a82f33ce12844f7758b969d6/2016/day22/input.rkt | racket | #lang reader "lang.rkt"
root@ebhq-gridcenter# df -h
Filesystem Size Used Avail Use%
/dev/grid/node-x0-y0 92T 73T 19T 79%
/dev/grid/node-x0-y1 91T 66T 25T 72%
/dev/grid/node-x0-y2 85T 73T 12T 85%
/dev/grid/node-x0-y3 85T 68T 17T 80%
/dev/grid/node-x0-y4 87T... | |
5fba1e7b8832458affcfb4413bea1bd96754065cfe672c2041687c52120e1add | FranklinChen/hugs98-plus-Sep2006 | StateVar.hs | --------------------------------------------------------------------------------
-- |
Module : Graphics . Rendering . OpenGL.GL.StateVar
Copyright : ( c ) 2002 - 2005
-- License : BSD-style (see the file libraries/OpenGL/LICENSE)
--
-- Maintainer :
-- Stability : provisional
-- Portabilit... | null | https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/OpenGL/Graphics/Rendering/OpenGL/GL/StateVar.hs | haskell | ------------------------------------------------------------------------------
|
License : BSD-style (see the file libraries/OpenGL/LICENSE)
Maintainer :
Stability : provisional
Portability : portable
------------------------------------------------------------------------------
--------------------... | Module : Graphics . Rendering . OpenGL.GL.StateVar
Copyright : ( c ) 2002 - 2005
module Graphics.Rendering.OpenGL.GL.StateVar (
HasGetter(..),
GettableStateVar, makeGettableStateVar,
HasSetter(..), set,
SettableStateVar, makeSettableStateVar,
StateVar, makeStateVar,
($~), ($=!), ($... |
19f1f55153acb29db22aeadf1d5768233b1f939f812d00de29745526565af32e | facebook/duckling | ID.hs | Copyright ( c ) 2016 - present , Facebook , Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
module Duckling.Dimensions.ID
( allDimensions
) where
import Duckling.Dimensions.Types
allDimensions :... | null | https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/Dimensions/ID.hs | haskell | All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree. | Copyright ( c ) 2016 - present , Facebook , Inc.
module Duckling.Dimensions.ID
( allDimensions
) where
import Duckling.Dimensions.Types
allDimensions :: [Seal Dimension]
allDimensions =
[ Seal Numeral
, Seal Ordinal
]
|
3393cd25d324a65819a2a37d7ad1af32a2d1ac725b807b9b51aec7327e333b6b | uwiger/gproc | gproc_eqc_tests.erl | %%% File : gproc_eqc_tests.erl
%%% Author : <>
%%% : <>
%%% : <>
%%% Description : QuickCheck test model for gproc
Created : 11 Dec 2008 by < Hughes@JTABLET2007 >
-module(gproc_eqc_tests).
-include_lib("eqc/include/eqc.hrl").
-include_lib("eqc/include/eqc_statem.hrl").
-c... | null | https://raw.githubusercontent.com/uwiger/gproc/3737f2b958a5908d7a3870046ae162c5b9bf971c/eqc/gproc_eqc_tests.erl | erlang | File : gproc_eqc_tests.erl
Author : <>
: <>
: <>
Description : QuickCheck test model for gproc
QUESTIONS:
- does set_value for Class==a make sense?
- shouldn't mreg return {true, keys()} rather than the {true,
objects()} upon success?
TODO:
- implement mreg
- i... | Created : 11 Dec 2008 by < Hughes@JTABLET2007 >
-module(gproc_eqc_tests).
-include_lib("eqc/include/eqc.hrl").
-include_lib("eqc/include/eqc_statem.hrl").
-compile(export_all).
-record(key,
}).
-record(reg,
}).
-record(state,
}).
good_number_of_tests() ->
3000.
When ru... |
7be4616df88147c54cf0ecb79471bdd1bf98201cdd4a6f7f7edbafcf576325ea | ocaml/ocaml-lsp | w.mli | (** Helpers to generate OCaml code. Consider merging with ML *)
open Import
type t = unit Pp.t
type w = t
val surround : [ `Curly | `Paren | `Square ] -> 'a Pp.t -> 'a Pp.t
module Json : sig
val invalid_pat : string -> w * w
val typ : string
module Literal : sig
val str : string -> string
val int ... | null | https://raw.githubusercontent.com/ocaml/ocaml-lsp/79042d504209d963812fe7f69c99bcac5c6cf358/lsp/bin/ocaml/w.mli | ocaml | * Helpers to generate OCaml code. Consider merging with ML |
open Import
type t = unit Pp.t
type w = t
val surround : [ `Curly | `Paren | `Square ] -> 'a Pp.t -> 'a Pp.t
module Json : sig
val invalid_pat : string -> w * w
val typ : string
module Literal : sig
val str : string -> string
val int : int -> string
val null : string
val bool : bool -> s... |
728729fd8c1e4596bae56c429392648c3e0c96405142c5142fcad318e68f5f6e | xapi-project/xen-api | xapi_sr_operations.ml |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... | null | https://raw.githubusercontent.com/xapi-project/xen-api/fa6f118fb512a2c90159368a1a0bc1cc730c895b/ocaml/xapi/xapi_sr_operations.ml | ocaml | internal api
************************************************************************************
current/allowed operations checking
We fake clone ourselves
* Returns a table of operations -> API error options (None if the operation would be ok)
* If op is specifie... |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... |
9ffea1aa06a0aec41eac51d1f8dcf919867af259a751ac5638dad798a7696e1a | liquidz/jubot | system.clj | (ns jubot.system
"Jubot system manager."
(:require
[com.stuartsierra.component :as component]))
(def ^{:doc "Jubot system var."}
system {})
(defn init
"Initialize stuartsierra.component system.
Params
create-system-fn - A function to create jubot system.
"
[create-system-fn]
(alter-var-root
... | null | https://raw.githubusercontent.com/liquidz/jubot/0a2d7b18db801c3fe72f7ff216e8381df9b40815/src/jubot/system.clj | clojure | (ns jubot.system
"Jubot system manager."
(:require
[com.stuartsierra.component :as component]))
(def ^{:doc "Jubot system var."}
system {})
(defn init
"Initialize stuartsierra.component system.
Params
create-system-fn - A function to create jubot system.
"
[create-system-fn]
(alter-var-root
... | |
b9bd426ebb466b41387a462fe9f81a99c6a13aa8fbb54b2eabb60547dea508ad | input-output-hk/cardano-sl | Arbitrary.hs | # OPTIONS_GHC -fno - warn - orphans #
-- | Common things used in `Pos.Crypto.Arbitrary` and `Pos.Util.Arbitrary`
module Test.Pos.Util.QuickCheck.Arbitrary
( Nonrepeating (..)
, ArbitraryUnsafe (..)
, SmallGenerator (..)
, makeSmall
, sublistN
, arbitrarySizedS
, arbitr... | null | https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/util/test/Test/Pos/Util/QuickCheck/Arbitrary.hs | haskell | | Common things used in `Pos.Crypto.Arbitrary` and `Pos.Util.Arbitrary`
import Pos.Crypto.Random (randomNumberInRange)
for making tested values small. There was profound research
| Choose a random (shuffled) subset of length n. Throws an error if
there's not enough elements.
| Type for generating list o... | # OPTIONS_GHC -fno - warn - orphans #
module Test.Pos.Util.QuickCheck.Arbitrary
( Nonrepeating (..)
, ArbitraryUnsafe (..)
, SmallGenerator (..)
, makeSmall
, sublistN
, arbitrarySizedS
, arbitrarySizedSL
, runGen
) where
import Universum
impo... |
8346c14d7d99dae79b626863842ec994652a2cb7323868fbcff118690e311bf7 | csg-tokyo/typelevelLR | TestValid1.hs |
import DotLanguage
main :: IO ()
main = print $ begin
|> digraph "small_graph"
|> node "A" |> shape "rectangle"
|> node "B" |> node "C" |> shape "doublecircle"
|> edge "A" |> to "B" |> style "dotted"
|> edge "A" |> and_ "B" |> to "C"
|> end
| null | https://raw.githubusercontent.com/csg-tokyo/typelevelLR/ca5853890fac7fb819a026f0fd15d8b43f7c8470/examples/haskell/dot-r/TestValid1.hs | haskell |
import DotLanguage
main :: IO ()
main = print $ begin
|> digraph "small_graph"
|> node "A" |> shape "rectangle"
|> node "B" |> node "C" |> shape "doublecircle"
|> edge "A" |> to "B" |> style "dotted"
|> edge "A" |> and_ "B" |> to "C"
|> end
| |
76f9354fa53ff536b833ea4da9bcfa8bb8559f5570817d731609be775b19c340 | roman01la/shapy | utils.cljs | (ns shapy.utils)
(defn event->value [event]
(.. event -target -value))
| null | https://raw.githubusercontent.com/roman01la/shapy/af94ed921f9cc9349f11fb931bde563bdb900531/src/shapy/utils.cljs | clojure | (ns shapy.utils)
(defn event->value [event]
(.. event -target -value))
| |
2e2eeead51d677ec2aababd74fd73fedee70d4fcebb855b15a0bd15451f49c36 | wz1000/HieDb | Main.hs | module Main where
import GHC.Paths (libdir)
import HieDb.Run (hiedbMain)
import HieDb.Types (LibDir (..))
main :: IO ()
main = hiedbMain (LibDir libdir)
| null | https://raw.githubusercontent.com/wz1000/HieDb/450f5b55ed5d679ad6e78c3b100186f590bbccba/exe/Main.hs | haskell | module Main where
import GHC.Paths (libdir)
import HieDb.Run (hiedbMain)
import HieDb.Types (LibDir (..))
main :: IO ()
main = hiedbMain (LibDir libdir)
| |
0e48ecf43df44b1c71b2da416fd64e0827dc8bd348f3fddf1ed89b481b3311e7 | herbelin/coq-hh | classes.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/herbelin/coq-hh/296d03d5049fea661e8bdbaf305ed4bf6d2001d2/toplevel/classes.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
i
i
Declare everything in the param... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Names
open Decl_kinds
op... |
42accc91dfe59c26af153147fe82db278cb742ad5c0a2e05c44c670772fe491f | deadpendency/deadpendency | DependencyPassReport.hs | # OPTIONS_GHC -fno - warn - orphans #
module Common.HtmlReport.Instances.DependencyPassReport () where
import Common.HtmlReport.HtmlReport
import Common.HtmlReport.Instances.DependencyReportIdentifier ()
import Common.HtmlReport.Instances.Internal
import Common.HtmlReport.Instances.PackageLink ()
import Common.HtmlRe... | null | https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/common/src/Common/HtmlReport/Instances/DependencyPassReport.hs | haskell | # OVERLAPPING #
# OVERLAPPING # | # OPTIONS_GHC -fno - warn - orphans #
module Common.HtmlReport.Instances.DependencyPassReport () where
import Common.HtmlReport.HtmlReport
import Common.HtmlReport.Instances.DependencyReportIdentifier ()
import Common.HtmlReport.Instances.Internal
import Common.HtmlReport.Instances.PackageLink ()
import Common.HtmlRe... |
64900862fca8b44a589271625e995d785e5103c00da41604f4a252e9c6df0d21 | petitnau/algoml | int.ml | open Types
open General
open Amlprinter
let rec eval_exp (s:state) (d:env) (ci:callinfo) (e:exp) : eval =
match e with
| EInt(i) -> VInt(i)
| EBool(b) -> VBool(b)
| EString(s) -> VString(s)
| EToken(t) -> VToken(t)
| EAddress(a) -> VAddress(a)
| Val(NormVar(i)) -> Env.apply_ex d i
| Val(GlobVar(i))... | null | https://raw.githubusercontent.com/petitnau/algoml/a6ec67f5dea913f2c6cad347da0ab4d4ed3e7722/src/int/int.ml | ocaml | open Types
open General
open Amlprinter
let rec eval_exp (s:state) (d:env) (ci:callinfo) (e:exp) : eval =
match e with
| EInt(i) -> VInt(i)
| EBool(b) -> VBool(b)
| EString(s) -> VString(s)
| EToken(t) -> VToken(t)
| EAddress(a) -> VAddress(a)
| Val(NormVar(i)) -> Env.apply_ex d i
| Val(GlobVar(i))... | |
6c1532860ec9b12fc53aa20c4bf0ef2500faac0818b0ab72c5c7c2dee445f710 | haskell-tools/haskell-tools | Define.hs | # OPTIONS_GHC -fno - warn - missing - fields #
module TH.QuasiQuote.Define where
import Language.Haskell.TH.Quote
import Language.Haskell.TH
expr :: QuasiQuoter
expr = QuasiQuoter { quoteExp = const (return $ VarE $ mkName "hello") } | null | https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/refactor/examples/TH/QuasiQuote/Define.hs | haskell | # OPTIONS_GHC -fno - warn - missing - fields #
module TH.QuasiQuote.Define where
import Language.Haskell.TH.Quote
import Language.Haskell.TH
expr :: QuasiQuoter
expr = QuasiQuoter { quoteExp = const (return $ VarE $ mkName "hello") } | |
48bca71b105c32cd1ffa20130f37e7916621a06cef86c7ea5311487f94f0b467 | guildhall/guile-sly | animation.scm |
Copyright ( C ) 2013 , 2014 >
;;;
;;; This program is free software: you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation , either version 3 of the
;;; License, or (at your option) any later version.
;;;
;;; This program is ... | null | https://raw.githubusercontent.com/guildhall/guile-sly/92f5f21da76986c5b606b36afc4bb984cc63da5b/examples/animation.scm | scheme |
This program is free software: you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General P... |
Copyright ( C ) 2013 , 2014 >
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation , either version 3 of the
You should have received a copy of the GNU General Public License
(use-modules (sly game)
(sly window)
(sly signal)
... |
02e8489adb43b98779ee0aaac475b44ff873aee91cec3dc98923b1e8759363ae | thi-ng/geom | triangle.cljc | (ns thi.ng.geom.triangle
#?(:cljs (:require-macros [thi.ng.math.macros :as mm]))
(:require
[thi.ng.geom.core :as g]
[thi.ng.geom.utils :as gu]
[thi.ng.geom.utils.intersect :as isec]
[thi.ng.geom.vector :as v :refer [vec2 vec3 V3Z]]
[thi.ng.geom.attribs :as attr]
[thi.ng.geom.basicmesh :as bm]
#... | null | https://raw.githubusercontent.com/thi-ng/geom/85783a1f87670c5821473298fa0b491bd40c3028/src/thi/ng/geom/triangle.cljc | clojure | /~pbourke/modelling/triangulate/
Signed volume impl based on:
| (ns thi.ng.geom.triangle
#?(:cljs (:require-macros [thi.ng.math.macros :as mm]))
(:require
[thi.ng.geom.core :as g]
[thi.ng.geom.utils :as gu]
[thi.ng.geom.utils.intersect :as isec]
[thi.ng.geom.vector :as v :refer [vec2 vec3 V3Z]]
[thi.ng.geom.attribs :as attr]
[thi.ng.geom.basicmesh :as bm]
#... |
21ecfbee9af82914b42ae61329335446c138cb69cea4fed90da8e93a6085c485 | huangjs/cl | xercnt.lisp | ;;; Compiled by f2cl version:
( " f2cl1.l , v 1.215 2009/04/07 22:05:21 rtoy Exp $ "
" f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ "
" f2cl5.l , v 1.200 2009/01/19 02:38:17 rtoy Exp $ "
" f2cl6.l ,... | null | https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/maxima/src/numerical/slatec/xercnt.lisp | lisp | Compiled by f2cl version:
Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t)
(:coerce-assigns :as-needed) (:array-type ':simple-array)
(:array-slicing nil) (:declare-common nil)
(:float-format double-float)) | ( " f2cl1.l , v 1.215 2009/04/07 22:05:21 rtoy Exp $ "
" f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ "
" f2cl5.l , v 1.200 2009/01/19 02:38:17 rtoy Exp $ "
" f2cl6.l , v 1.48 2008/08/24 00:56:27 rt... |
7e41af91e3481240e8ddf5762cf9d58830c4c39e645e63d2e86d5f4e35f12d5a | haskell-mafia/projector | Match.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -fno - warn - missing - signatures #
module Test.Projector.Core.Match where
import Disorder.Core
import Disorder.Jack
import P
import Projector.Core.Match
import ... | null | https://raw.githubusercontent.com/haskell-mafia/projector/6af7c7f1e8a428b14c2c5a508f7d4a3ac2decd52/projector-core/test/Test/Projector/Core/Match.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE NoImplicitPrelude #
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -fno - warn - missing - signatures #
module Test.Projector.Core.Match where
import Disorder.Core
import Disorder.Jack
import P
import Projector.Core.Match
import Test.Projector.Core.Arbitrary... |
c5ea041cd5ec652abfbe9343111941718d14cb1bef3f892e594510eb2f60a7a6 | rufus-lang/rufus | rufus_raw_tokenize_const_test.erl | -module(rufus_raw_tokenize_const_test).
-include_lib("eunit/include/eunit.hrl").
string_with_atom_literal_test() ->
{ok, Tokens, _} = rufus_raw_tokenize:string("const Name = :rufus"),
?assertEqual(
[
{const, 1},
{identifier, 1, "Name"},
{'=', 1},
{atom_l... | null | https://raw.githubusercontent.com/rufus-lang/rufus/fb3ec8f67c06e8d656c6aa6c4297461559ee168f/rf/test/rufus_raw_tokenize_const_test.erl | erlang | TODO(jkakar): Implement these tests:
- string_with_string_containing_punctuation_test
- string_with_string_containing_multibyte_utf8_character_test | -module(rufus_raw_tokenize_const_test).
-include_lib("eunit/include/eunit.hrl").
string_with_atom_literal_test() ->
{ok, Tokens, _} = rufus_raw_tokenize:string("const Name = :rufus"),
?assertEqual(
[
{const, 1},
{identifier, 1, "Name"},
{'=', 1},
{atom_l... |
c9f19269237d900353160eaecc487184c53cb341a01a48c5575178826c0b58f2 | ocaml-multicore/ocaml-tsan | const_int_hint.ml | (* TEST
* expect
*)
let _ = Int32.(add 1 2l);;
[%%expect{|
Line 1, characters 19-20:
1 | let _ = Int32.(add 1 2l);;
^
Error: This expression has type int but an expression was expected of type
int32
Hint: Did you mean `1l'?
|}]
let _ : int32 * int32 = 42l, 43;;
[%%expect{|
Line 1,... | null | https://raw.githubusercontent.com/ocaml-multicore/ocaml-tsan/f54002470cc6ab780963cc81b11a85a820a40819/testsuite/tests/typing-core-bugs/const_int_hint.ml | ocaml | TEST
* expect
no hint
pattern
symmetric
not implemented |
let _ = Int32.(add 1 2l);;
[%%expect{|
Line 1, characters 19-20:
1 | let _ = Int32.(add 1 2l);;
^
Error: This expression has type int but an expression was expected of type
int32
Hint: Did you mean `1l'?
|}]
let _ : int32 * int32 = 42l, 43;;
[%%expect{|
Line 1, characters 29-31:
1 | ... |
1c3bf88c6a9d371aa39424a857e392f20773276e7ee32a1939a30138b0ef7506 | static-analysis-engineering/codehawk | jCHSubgraph.ml | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Java Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Copy... | null | https://raw.githubusercontent.com/static-analysis-engineering/codehawk/f2891d9120d5a776ea9ac1feec7bf98cce335e12/CodeHawk/CHJ/jchfeatures/jCHSubgraph.ml | ocaml | jchlib
jchpre | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Java Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Copy... |
6d0cc894a17a7494f5158eb6a23763664d27a4bc7f0895a134868087cd92ef6a | marick/Midje | facts.clj | (ns ^{:doc "Parsing facts."}
midje.parsing.1-to-explicit-form.facts
(:require [clojure.zip :as zip]
[such.control-flow :refer [branch-on]]
[clojure.pprint :as pprint]
[midje.data.compendium :as compendium]
[midje.parsing.1-to-explicit-form.expects :refer [wrap-with-ex... | null | https://raw.githubusercontent.com/marick/Midje/2b9bcb117442d3bd2d16446b47540888d683c717/src/midje/parsing/1_to_explicit_form/facts.clj | clojure | Fact processing
* Body processing: the convertion of arrow and provided forms into their
explicit forms, the insertion of background data, line numbering, etc.
* Compendium processing: wrapping the body in a function form that supports
rerunning and history keeping.
* Load-time processing: wrapping the fina... | (ns ^{:doc "Parsing facts."}
midje.parsing.1-to-explicit-form.facts
(:require [clojure.zip :as zip]
[such.control-flow :refer [branch-on]]
[clojure.pprint :as pprint]
[midje.data.compendium :as compendium]
[midje.parsing.1-to-explicit-form.expects :refer [wrap-with-ex... |
21ce858bef5f616719128fa7181194e2920ec9c673fd2213e33d8446cc1ac4da | takikawa/sweet-racket | case-lambda.rkt | #lang sweet-exp racket
require rackunit
define f
case-lambda
()
0
check-equal? f() 0
| null | https://raw.githubusercontent.com/takikawa/sweet-racket/a3c1ae74c2e75e8d6164a3a9d8eb34335a7ba4de/sweet-exp-test/sweet-exp/tests/case-lambda.rkt | racket | #lang sweet-exp racket
require rackunit
define f
case-lambda
()
0
check-equal? f() 0
| |
481eae6188eea1a545ee822ba1bc53ff4826bb1ed088ca2d4fa973e2aadf6f49 | penpot/penpot | middleware.clj | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
;;
;; Copyright (c) KALEIDOS INC
(ns app.http.middleware
(:require
[app.common.exceptions :as ex]
[app.common.logging :as l]
[app.co... | null | https://raw.githubusercontent.com/penpot/penpot/2ea81c0114fb13ece945b7082aff0bcd7383e563/backend/src/app/http/middleware.clj | clojure |
Copyright (c) KALEIDOS INC
Explicitly do not forward flush | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(ns app.http.middleware
(:require
[app.common.exceptions :as ex]
[app.common.logging :as l]
[app.common.transit :as t]
[app.confi... |
55315baf3b91d133d9e9eb86d22a7b4f6265f13944fd40abfb92d5a137751145 | boxer-project/boxer-sunrise | pane-callbacks.lisp | ;;;;
;;;; Boxer
Copyright 1985 - 2022 Andrea A. diSessa and the Estate of Edward H. Lay
;;;;
Portions of this code may be copyright 1982 - 1985 Massachusetts Institute of Technology . Those portions may be
used for any purpose , including commercial ones , providing that notice of MIT copyrigh... | null | https://raw.githubusercontent.com/boxer-project/boxer-sunrise/535fc1b2a35b4462f6931133a86953c78bed26b1/src/boxwin/lw-capi/pane-callbacks.lisp | lisp |
Boxer
Licensed under the 3-Clause BSD license. You may not use this file except in compliance with this license.
-3-Clause
+-Data--+
This file is part of the | BOXER | system
+-------+
canv... | Copyright 1985 - 2022 Andrea A. diSessa and the Estate of Edward H. Lay
Portions of this code may be copyright 1982 - 1985 Massachusetts Institute of Technology . Those portions may be
used for any purpose , including commercial ones , providing that notice of MIT copyright is retained .
(in-packa... |
a3f9d2def8eaed7a660649370984b58393976b669a7f2fae291a08f50b94f996 | DavidAlphaFox/RabbitMQ | clustering_management.erl | The contents of this file are subject to the Mozilla Public License
%% Version 1.1 (the "License"); you may not use this file except in
%% compliance with the License. You may obtain a copy of the License
%% at /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITHOUT WARRANTY OF ... | null | https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/plugins-src/rabbitmq-test/test/src/clustering_management.erl | erlang | Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License
at /
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and
limitations under the License.
Allow clusterin... | The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is RabbitMQ .
The Initial Developer of the Original Code is GoPivotal , Inc.
Copyright ( c ) 2007 - 2014 GoPivotal , Inc. All rights reserved .
-module(... |
24629b8181a9e0fda2a0ae120a0da9f191bf30494b6bfa4d8cd3e3492865b729 | JunSuzukiJapan/cl-reex | group-by.lisp | (in-package :cl-user)
(defpackage cl-reex.operator.group-by
(:use :cl)
(:import-from :cl-reex.observer
:observer
:on-next
:on-error
:on-completed )
(:import-from :cl-reex.observable
:observable
:dispose
:is-active
:set-active
:set-error
... | null | https://raw.githubusercontent.com/JunSuzukiJapan/cl-reex/94928c7949c235b41902138d9e4a5654b92d67eb/src/operator/group-by.lisp | lisp | class operator-group-by
class key-subject
as-observable
on-next, on-error, on-completed
set to operator-table | (in-package :cl-user)
(defpackage cl-reex.operator.group-by
(:use :cl)
(:import-from :cl-reex.observer
:observer
:on-next
:on-error
:on-completed )
(:import-from :cl-reex.observable
:observable
:dispose
:is-active
:set-active
:set-error
... |
fd101ac33ba78ba165a73da380ecfa29d3c9d7a8d62c903d739a18888d80dc53 | inaka/elvis_core | fail_max_module_length.erl | -module(fail_max_module_length).
-export([f/1]).
%% Random comment
%% @doc A function
f(_) -> ok.
| null | https://raw.githubusercontent.com/inaka/elvis_core/468bd3498f1782fd74ef3d8eb1b36217b0b76c11/test/examples/fail_max_module_length.erl | erlang | Random comment
@doc A function | -module(fail_max_module_length).
-export([f/1]).
f(_) -> ok.
|
e400b70bf1ddeb6be46b9585c97add201ef1f6c6bba355b1279bc17df1dd8802 | babashka/babashka | repl_test.clj | (ns babashka.impl.repl-test
(:require
[babashka.impl.pprint :refer [pprint-namespace]]
[babashka.impl.repl :refer [start-repl!]]
[babashka.test-utils :as tu]
[clojure.string :as str]
[clojure.test :as t :refer [deftest is]]
[sci.core :as sci]
[sci.impl.opts :refer [init]]
[sci.impl.vars :as va... | null | https://raw.githubusercontent.com/babashka/babashka/ddf03c50ae14c942c69c85e73e96caed00767e37/test/babashka/impl/repl_test.clj | clojure | (vars/bindRoot sci/in *in*)
(vars/bindRoot sci/out *out*)
Scratch | (ns babashka.impl.repl-test
(:require
[babashka.impl.pprint :refer [pprint-namespace]]
[babashka.impl.repl :refer [start-repl!]]
[babashka.test-utils :as tu]
[clojure.string :as str]
[clojure.test :as t :refer [deftest is]]
[sci.core :as sci]
[sci.impl.opts :refer [init]]
[sci.impl.vars :as va... |
f3270b59818dbf183d61900abb8715babf7b1f777a02a62ae788f0617f9e57e0 | fugue/fregot | Graph.hs | |
Copyright : ( c ) 2020 Fugue , Inc.
License : Apache License , version 2.0
Maintainer :
Stability : experimental
Portability : POSIX
Turn the prepared rules into a graph , based on their dependencies .
Copyright : (c) 2020 Fugue, Inc.
License : Apache License, version 2.0
Maintainer... | null | https://raw.githubusercontent.com/fugue/fregot/c3d87f37c43558761d5f6ac758d2f1a4117adb3e/lib/Fregot/Compile/Graph.hs | haskell | # LANGUAGE OverloadedStrings #
| If a key references `foo`; it may access `foo.bar` in a later
statement. This function takes care of collecting all the suffixes.
| Calculate the dependencies of a term.
Given `foo.bar`, compute both the dependencies of `foo.bar` (as
a ref) as well as those of `bar`.
Qualified na... | |
Copyright : ( c ) 2020 Fugue , Inc.
License : Apache License , version 2.0
Maintainer :
Stability : experimental
Portability : POSIX
Turn the prepared rules into a graph , based on their dependencies .
Copyright : (c) 2020 Fugue, Inc.
License : Apache License, version 2.0
Maintainer... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.