_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 |
|---|---|---|---|---|---|---|---|---|
753a911aee1b41f26c41cc026657820d228017ff554325200e102a6b475a4aef | weblocks-framework/weblocks | html-template.lisp |
(in-package :cm)
(export '(html-template with-widget-header render-widget-body))
(defwidget html-template (widget)
((tp :accessor tp :initform nil)
(src :type string :accessor src :initarg :src :initform nil)
(file :type pathname :accessor file :initarg :file :initform nil)
(vars :type list :accessor var... | null | https://raw.githubusercontent.com/weblocks-framework/weblocks/fe96152458c8eb54d74751b3201db42dafe1708b/contrib/nunb/templates-crufty/html-template.lisp | lisp |
(in-package :cm)
(export '(html-template with-widget-header render-widget-body))
(defwidget html-template (widget)
((tp :accessor tp :initform nil)
(src :type string :accessor src :initarg :src :initform nil)
(file :type pathname :accessor file :initarg :file :initform nil)
(vars :type list :accessor var... | |
ac4ea9d396a8b8dbf4e6ebb2cff3d75b01b77bc0ec72e51d8616cbad6c37a49c | cdfa/frugel | Prelude.hs | # LANGUAGE KindSignatures #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Prelude
( module Prelude
, module Relude
, module Control.Monad.Reader
, (><)
, toList
, dup
) where
import Control.Monad.Reader
( MonadReader(..), Reader, ReaderT(ReaderT), asks, mapReade... | null | https://raw.githubusercontent.com/cdfa/frugel/9c59f2281c06bfa5e13bd575866d165dbc0ce411/prelude/Prelude.hs | haskell | From -ht-0.0.16/docs/src/Data.Function.HT.Private.html#nest
# INLINE nTimes #
>>> concatBy leftToMaybe Left [Left "h", Left "i", Right 1]
From -3.4.0.0/docs/src/Distribution.Utils.Generic.html#spanMaybe
>>> spanMaybe leftToMaybe [Left "h", Left "i", Right 1]
(["h","i"],[Right 1])
Modified from -lib-1.20.4/docs/sr... | # LANGUAGE KindSignatures #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Prelude
( module Prelude
, module Relude
, module Control.Monad.Reader
, (><)
, toList
, dup
) where
import Control.Monad.Reader
( MonadReader(..), Reader, ReaderT(ReaderT), asks, mapReade... |
5538066000df729dbd701171b6d13454c76b90ff61a7f3161ebcbfc8d19e6d87 | ShamoX/cash | durf.ml | #!/usr/local/adm/src/caml/bin/cash -r
-I /usr/local/adm/src/cash
!#
open Cash;
(* We see parent after children, so we'll backpatch the parent field. *)
type dir =
{ name : string; subtree_size : int; children : list dir; parent : mutable option dir }
;
value dname n =
let slash_i = Env_3_11.internal_rindex '/' n ... | null | https://raw.githubusercontent.com/ShamoX/cash/aa97231154c3f64c9d0a62823e1ed71e32ab8718/examples/durf.ml | ocaml | We see parent after children, so we'll backpatch the parent field.
Backpatch children.
a new root or a last's brother.
XXX.
# Load input, while establishing list of roots.
# Calculate total size.
print headers.
Output formatted tree for each root.
# Prepare file handle.
probably a file, anyway. | #!/usr/local/adm/src/caml/bin/cash -r
-I /usr/local/adm/src/cash
!#
open Cash;
type dir =
{ name : string; subtree_size : int; children : list dir; parent : mutable option dir }
;
value dname n =
let slash_i = Env_3_11.internal_rindex '/' n (String.length n) in
if slash_i < 1 then n else String.sub n 0 slash_i
... |
b59574b2f6f787ddbb1f5754c126ac154da989972fd686dc1d6c96b1d8d69362 | tvraman/aster-math | tts.lisp | ;;; -*- Syntax: Common-Lisp; Mode: LISP -*- ;;;
tts.lisp -- Common Lisp interface to Emacspeak speech server
;;; $Author: tv.raman.tv $
;;; Description: Interface Common Lisp to Emacspeak TTS servers
Keywords : AsTeR , Emacspeak , Audio Desktop
;;{{{ Copyright:
Copyright ( C ) 2011 -- 2016 , >
All Righ... | null | https://raw.githubusercontent.com/tvraman/aster-math/6fc3203bc66f63ad3142fc1a71b95f67d81816e1/lisp/afl/tts.lisp | lisp | -*- Syntax: Common-Lisp; Mode: LISP -*- ;;;
$Author: tv.raman.tv $
Description: Interface Common Lisp to Emacspeak TTS servers
{{{ Copyright:
you can redistribute it and/or modify
either version 2 , or ( at your option )
any later version.
but WITHOUT ANY WARRANTY; without even the implied warranty of
M... | tts.lisp -- Common Lisp interface to Emacspeak speech server
Keywords : AsTeR , Emacspeak , Audio Desktop
Copyright ( C ) 2011 -- 2016 , >
All Rights Reserved .
This file is not part of GNU Emacs , but the same permissions apply .
it under the terms of the GNU General Public License as published by
GN... |
0a0b67b1e000113af31d58fb678df0108defe8ecfdd60f4af909d1737f67632b | NorfairKing/easyspec | ChunksSimilarityType.hs | module EasySpec.Discover.SignatureInference.ChunksSimilarityType where
import Import
import EasySpec.Discover.SignatureInference.ChunksUtils
import EasySpec.Discover.SignatureInference.SimilarityUtils
import EasySpec.Discover.SignatureInference.SyntacticSimilarityType
import EasySpec.Discover.Types
inferChunksSimila... | null | https://raw.githubusercontent.com/NorfairKing/easyspec/b038b45a375cc0bed2b00c255b508bc06419c986/easyspec/src/EasySpec/Discover/SignatureInference/ChunksSimilarityType.hs | haskell | module EasySpec.Discover.SignatureInference.ChunksSimilarityType where
import Import
import EasySpec.Discover.SignatureInference.ChunksUtils
import EasySpec.Discover.SignatureInference.SimilarityUtils
import EasySpec.Discover.SignatureInference.SyntacticSimilarityType
import EasySpec.Discover.Types
inferChunksSimila... | |
02fd471afcf139e597d65fa1ca1ada02deb6070958db2ce88f4aa92aa6c86c91 | tweag/linear-base | Instances.hs | {-# OPTIONS -Wno-orphans #-}
# LANGUAGE DerivingVia #
{-# LANGUAGE LinearTypes #-}
# LANGUAGE QuantifiedConstraints #
# LANGUAGE RebindableSyntax #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSections #
# LANGUAGE NoImplicitPrelude #
{-# OPTIONS_HADDOCK hide #-}
module Control.Functor.Linear.Internal.Instances
... | null | https://raw.githubusercontent.com/tweag/linear-base/9d82f67f1415dda385a6349954bf55f9bfa4e62e/src/Control/Functor/Linear/Internal/Instances.hs | haskell | # OPTIONS -Wno-orphans #
# LANGUAGE LinearTypes #
# OPTIONS_HADDOCK hide #
# Deriving Data.XXX in terms of Control.XXX
-----------------------------------------------------------------------------
| This is a newtype for deriving Data.XXX classes from
Control.XXX classes.
# Basic instances
-------------------------... | # LANGUAGE DerivingVia #
# LANGUAGE QuantifiedConstraints #
# LANGUAGE RebindableSyntax #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSections #
# LANGUAGE NoImplicitPrelude #
module Control.Functor.Linear.Internal.Instances
( Data (..),
)
where
import Control.Functor.Linear.Internal.Class
import qualified D... |
317adffa1e98523f10971ea1e08c217a06edab36744969fe342850944ddf9f69 | camllight/camllight | builtin_text.ml | (* Not a string as such, more like a symbol *)
(* type *)
type textMark == string
;;
/type
let cCAMLtoTKtextMark x = TkToken x
;;
let cTKtoCAMLtextMark x = x
;;
(* type *)
type textTag == string
;;
/type
let cCAMLtoTKtextTag x = TkToken x
;;
let cTKtoCAMLtextTag x = x
;;
(* type *)
type textModifier =
tk... | null | https://raw.githubusercontent.com/camllight/camllight/0cc537de0846393322058dbb26449427bfc76786/sources/contrib/camltk4/libsupport/builtin_text.ml | ocaml | Not a string as such, more like a symbol
type
type
type
tk keyword: +/- Xlines
tk keyword: linestart
tk keyword: lineend
tk keyword: wordend
type |
type textMark == string
;;
/type
let cCAMLtoTKtextMark x = TkToken x
;;
let cTKtoCAMLtextMark x = x
;;
type textTag == string
;;
/type
let cCAMLtoTKtextTag x = TkToken x
;;
let cTKtoCAMLtextTag x = x
;;
type textModifier =
tk keyword : + /-
tk keyword : wordstart
;;
/type
TextModifiers are never ... |
d1c2eb6997d9a3f041e2939dbe55044e7cc1e329063dcece93c33120b0c9aa3b | purenix-org/purenix | Main.hs | # LANGUAGE NoImplicitPrelude #
module PureNix.Main where
import qualified Data.Aeson as Aeson
import Data.Aeson.Types (parseEither)
import Data.Foldable (toList)
import Data.List (intercalate)
import qualified Data.Text.Lazy.IO as TL
import qualified Language.PureScript.CoreFn as P
import Language.PureScript.CoreFn.F... | null | https://raw.githubusercontent.com/purenix-org/purenix/5587e599a39811d6d1645e7d2cfed559506e3637/src/PureNix/Main.hs | haskell | # LANGUAGE NoImplicitPrelude #
module PureNix.Main where
import qualified Data.Aeson as Aeson
import Data.Aeson.Types (parseEither)
import Data.Foldable (toList)
import Data.List (intercalate)
import qualified Data.Text.Lazy.IO as TL
import qualified Language.PureScript.CoreFn as P
import Language.PureScript.CoreFn.F... | |
ec26e759d8f39b125eaa1b356c16f4341edb98d82b1efe8b72dcb06f157f9089 | earl-ducaine/cl-garnet | menuinter.lisp | -*- Mode : LISP ; Syntax : Common - Lisp ; Package : INTERACTORS ; Base : 10 -*-
;;;
The Garnet User Interface Development Environment .
;;;
This code was written as part of the Garnet project at Carnegie
Mellon University , and has been placed in the public domain . If
you are using this code or any part o... | null | https://raw.githubusercontent.com/earl-ducaine/cl-garnet/f0095848513ba69c370ed1dc51ee01f0bb4dd108/src/inter/menuinter.lisp | lisp | Syntax : Common - Lisp ; Package : INTERACTORS ; Base : 10 -*-
to be put on the mailing list.
This file contains the mouse interactors to handle menus. It
Utility procedures
parts of :slots-to-set list
there always must be an aggregate selected slot because used for
final-feedback
final feedback objects
t... | The Garnet User Interface Development Environment .
This code was written as part of the Garnet project at Carnegie
Mellon University , and has been placed in the public domain . If
you are using this code or any part of Garnet , please contact
should be loaded after Interactor and after MoveGrowInter
D... |
57a384145c27c4d0d975007846efc687a219fa89889c08752340fc181040a10b | fourmolu/fourmolu | qualified-ops-four-out.hs | lenses =
Just $
M.fromList $
"type" Foo..= ("user.connection" :: Text)
Bar.# "connection" Foo..= uc
Bar.# "user" Foo..= case name of
Just n -> Just $ object ["name" .= n]
Nothing -> Nothing
Bar.# []
| null | https://raw.githubusercontent.com/fourmolu/fourmolu/1f8903a92c8d5001dc1ec8ecfd4a04a3b61c3283/data/examples/declaration/value/function/infix/qualified-ops-four-out.hs | haskell | lenses =
Just $
M.fromList $
"type" Foo..= ("user.connection" :: Text)
Bar.# "connection" Foo..= uc
Bar.# "user" Foo..= case name of
Just n -> Just $ object ["name" .= n]
Nothing -> Nothing
Bar.# []
| |
7ad57674dbd2c808f4fabca0b2180adb3de5f45040ccd2847b48f140f28bcec8 | lukstafi/invargent | Invariants.mli | * Solving second - order i.e. formula variables for InvarGenT.
Released under the GNU General Public Licence ( version 2 or
higher ) , NO WARRANTY of correctness etc . ( C ) 2013
@author ( AT ) gmail.com
@since Mar 2013
Released under the GNU General Public Licence (version 2 or
... | null | https://raw.githubusercontent.com/lukstafi/invargent/e25d8b12d9f9a8e2d5269001dd14cf93abcb7549/src/Invariants.mli | ocaml | * Solving second - order i.e. formula variables for InvarGenT.
Released under the GNU General Public Licence ( version 2 or
higher ) , NO WARRANTY of correctness etc . ( C ) 2013
@author ( AT ) gmail.com
@since Mar 2013
Released under the GNU General Public Licence (version 2 or
... | |
8128d2e71fdbf4da694bd735292d7b25c9870f6231d1fa5b4b4d0d5ffb4be074 | hstreamdb/hstream | Exception.hs | {-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
# LANGUAGE TypeApplications #
module HStream.SQL.Exception
( Position
, SomeSQLException (..)
, SomeSQLExceptionInfo (..)
, SomeRuntimeException (..)
, buildSQLException
, throwSQLException
, throwRunt... | null | https://raw.githubusercontent.com/hstreamdb/hstream/3a6df1337747e2e080712d7708ed05824d069664/hstream-sql/src/HStream/SQL/Exception.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
------------------------------------------------------------------------------
| Position in a SQL input text. 'Nothing' means that the position information
has been erased.
------------------------------------------------------------------------------
| ... | # LANGUAGE RecordWildCards #
# LANGUAGE TypeApplications #
module HStream.SQL.Exception
( Position
, SomeSQLException (..)
, SomeSQLExceptionInfo (..)
, SomeRuntimeException (..)
, buildSQLException
, throwSQLException
, throwRuntimeException
, formatSomeSQLException
, isEOF
) where
import ... |
1423e4f607f7eecb43bc0793addd5ed505c9f3fcff1399fdc5cf0b263b3b8241 | reborg/clojure-essential-reference | 2.clj | (def coll [])
< 1 >
;; :empty
< 2 >
;; :empty
(if (not-empty coll) :full :empty) ; <3>
;; :empty | null | https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/Sequences/SequentialCollections/seqandsequence/2.clj | clojure | :empty
:empty
<3>
:empty | (def coll [])
< 1 >
< 2 >
|
95f1781fc1000201249693482c5d611ac967655fe915bb19335f80995a04316b | supki/envparse | Error.hs | -- | This module contains an extensible error infrastructure.
--
-- Each kind of errors gets a separate type class which encodes
-- a 'Prism' (roughly a getter and a constructor). The 'Reader's, then,
-- have the constraints for precisely the set of errors they can return.
module Env.Internal.Error
( Error(..)
, As... | null | https://raw.githubusercontent.com/supki/envparse/de5944fb09e9d941fafa35c0f05446af348e7b4d/src/Env/Internal/Error.hs | haskell | | This module contains an extensible error infrastructure.
Each kind of errors gets a separate type class which encodes
a 'Prism' (roughly a getter and a constructor). The 'Reader's, then,
have the constraints for precisely the set of errors they can return.
categories:
* Variables that are unset in the envir... | module Env.Internal.Error
( Error(..)
, AsUnset(..)
, AsEmpty(..)
, AsUnread(..)
) where
| The type of errors returned by @envparse@ 's ' Reader 's . These fall into 3
data Error
= UnsetError
| EmptyError
| UnreadError String
deriving (Show, Eq)
class AsUnset e where
unset :: e
tryUnset :: ... |
6f23e028464cc95e82d66bcdd6b472081c335ed20810a41038b3c434335694b1 | iconnect/api-tools | Lens.hs | {-# LANGUAGE TemplateHaskell #-}
module Data.API.Tools.Lens
( lensTool
, binary
) where
import Data.API.Tools.Combinators
import Data.API.Tools.Datatypes
import Data.API.Types
import Control.Lens
-- | Tool to make lenses for fields in generated types.
l... | null | https://raw.githubusercontent.com/iconnect/api-tools/3d7b4dfadf82c7cb859b515d033447bd1d8ef6c6/src/Data/API/Tools/Lens.hs | haskell | # LANGUAGE TemplateHaskell #
| Tool to make lenses for fields in generated types.
Exclude newtypes if we are using smart constructors, because
the lens can be used to bypass the invariant | module Data.API.Tools.Lens
( lensTool
, binary
) where
import Data.API.Tools.Combinators
import Data.API.Tools.Datatypes
import Data.API.Types
import Control.Lens
lensTool :: APITool
lensTool = apiDataTypeTool $ mkTool $ \ ts an ->
if ok ts an then makeLenses ... |
f7685781f173054f3f126bf8518cab96073fb0fcbdd87957618a663b48c6d537 | processone/esip | esip_dialog.erl | %%%----------------------------------------------------------------------
%%% File : esip_dialog.erl
Author : < >
%%% Purpose :
Created : 29 Dec 2010 by < >
%%%
%%%
Copyright ( C ) 2002 - 2022 ProcessOne , SARL . All Rights Reserved .
%%%
Licensed under the Apache License , Version 2.0 ( the " Licen... | null | https://raw.githubusercontent.com/processone/esip/a2ee6c2506b86e937fc7bbf5e4a8fa1bffacc741/src/esip_dialog.erl | erlang | ----------------------------------------------------------------------
File : esip_dialog.erl
Purpose :
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... | Author : < >
Created : 29 Dec 2010 by < >
Copyright ( C ) 2002 - 2022 ProcessOne , SARL . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(esip_dialog).
-behaviour(gen_server).
-e... |
32f8a1db61e3b1f76be4994c9c4b233fac632b6875f1963d41782982a398ba67 | gedge-platform/gedge-platform | jose_jwa_curve448.erl | -*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*-
%% vim: ts=4 sw=4 ft=erlang noet
%%%-------------------------------------------------------------------
@author < >
2014 - 2016 ,
%%% @doc
%%%
%%% @end
Created : 07 Jan 2016 by < >
%%%---------------------------... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/jose/src/jwa/jose_jwa_curve448.erl | erlang | vim: ts=4 sw=4 ft=erlang noet
-------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
====================================================================
====================================================================
E... | -*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*-
@author < >
2014 - 2016 ,
Created : 07 Jan 2016 by < >
-module(jose_jwa_curve448).
-behaviour(jose_curve448).
jose_curve448 callbacks
-export([eddsa_keypair/0]).
-export([eddsa_keypair/1]).
-export([eddsa_se... |
226e818195b0392d59aa9ee09467a6f2234658f05045deebce90b09efa01e4fb | dgtized/shimmers | wave_function_collapse.cljs | (ns shimmers.sketches.wave-function-collapse
(:require
[cljs.core.async :as async :include-macros true]
[shimmers.algorithm.wave-function-collapse :as wfc]
[shimmers.common.sequence :as cs]
[shimmers.common.svg :as csvg]
[shimmers.common.ui.controls :as ctrl]
[shimmers.common.ui.debug :as debug]
... | null | https://raw.githubusercontent.com/dgtized/shimmers/f096c20d7ebcb9796c7830efcd7e3f24767a46db/src/shimmers/sketches/wave_function_collapse.cljs | clojure | reset won't work if it's the only current legal tile
maybe need to track "dependents" and unset those too? | (ns shimmers.sketches.wave-function-collapse
(:require
[cljs.core.async :as async :include-macros true]
[shimmers.algorithm.wave-function-collapse :as wfc]
[shimmers.common.sequence :as cs]
[shimmers.common.svg :as csvg]
[shimmers.common.ui.controls :as ctrl]
[shimmers.common.ui.debug :as debug]
... |
3f2430534e335a588267937990711abd344a0d35024d5bc8d4584538769b8755 | ocaml-ppx/ppx | test.ml | let () =
Printf.printf "%s %d\n" [%plop.Foobar] [%omp_test]
| null | https://raw.githubusercontent.com/ocaml-ppx/ppx/40e5a35a4386d969effaf428078c900bd03b78ec/test/driver/omp-integration/test/test.ml | ocaml | let () =
Printf.printf "%s %d\n" [%plop.Foobar] [%omp_test]
| |
2e724ac8530ef1d0dc51b4736c65730926ba90f9f0f48a969710c8ef12267918 | 0install/0install | stream.ml | module LList = struct
type 'a item = Nil | Cons of 'a * 'a t
and 'a t = 'a item Lazy.t
let rec of_list = function
| [] -> lazy Nil
| x :: xs -> lazy (Cons (x, of_list xs))
let rec from fn =
lazy (
match fn () with
| None -> Nil
| Some x -> Cons (x, from fn)
)
end
type 'a t =... | null | https://raw.githubusercontent.com/0install/0install/b3d7e5fdabb42c495c0ba3a97056b21264064f4f/src/support/stream.ml | ocaml | module LList = struct
type 'a item = Nil | Cons of 'a * 'a t
and 'a t = 'a item Lazy.t
let rec of_list = function
| [] -> lazy Nil
| x :: xs -> lazy (Cons (x, of_list xs))
let rec from fn =
lazy (
match fn () with
| None -> Nil
| Some x -> Cons (x, from fn)
)
end
type 'a t =... | |
d896b3f17f16e07b4c7e8106b03b9a7c01993ecfe743eacae3f1f578da0b7098 | haskell/cabal | cabal.test.hs | import Test.Cabal.Prelude
` default - language ` need ≥1.10 .
main = cabalTest $
fails $ cabal "check" []
| null | https://raw.githubusercontent.com/haskell/cabal/1cfe7c4c7257aa7ae450209d34b4a359e6703a10/cabal-testsuite/PackageTests/Check/ConfiguredPackage/CabalVersion/DefaultLanguage/cabal.test.hs | haskell | import Test.Cabal.Prelude
` default - language ` need ≥1.10 .
main = cabalTest $
fails $ cabal "check" []
| |
48c97a6c43ffa3cc870a04e9ea470b83ba6093fbe14d11e5f81f46e8c1f42b03 | ku-fpg/kansas-lava | Protocols.hs | # LANGUAGE ScopedTypeVariables , RankNTypes , TypeFamilies , FlexibleContexts , ExistentialQuantification , DataKinds #
module Protocols where
import Language.KansasLava
import Test
import Data.Sized.Fin
import Data.Sized.Unsigned
import Data.Sized.Matrix (matrix, Matrix)
import Data.Array.IArray
import GHC.TypeLit... | null | https://raw.githubusercontent.com/ku-fpg/kansas-lava/cc0be29bd8392b57060c3c11e7f3b799a6d437e1/tests/Protocols.hs | haskell | import qualified Data.Sized.Matrix as M
import Debug.Trace
testing Streams
trace ( show ( " cc",length ins , length outs ) ) $
testing Streams
trace (show ("cc",length ins,length outs)) $
let bridge' :: forall w . (Rep w,Eq w, Show w, Size (W w))
=> (Seq (Enabled w), Seq Full) -> (Seq Ack, Seq (Enabled... | # LANGUAGE ScopedTypeVariables , RankNTypes , TypeFamilies , FlexibleContexts , ExistentialQuantification , DataKinds #
module Protocols where
import Language.KansasLava
import Test
import Data.Sized.Fin
import Data.Sized.Unsigned
import Data.Sized.Matrix (matrix, Matrix)
import Data.Array.IArray
import GHC.TypeLit... |
a9f350057356497f021d5ac6d3c55ca43b65ec0f2104b7afe234e0193f968cd7 | yesodweb/persistent | ImplicitIdColSpec.hs | # LANGUAGE DataKinds #
# LANGUAGE DerivingStrategies #
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #... | null | https://raw.githubusercontent.com/yesodweb/persistent/eaf9d561a66a7b7a8fcbdf6bd0e9800fa525cc13/persistent/test/Database/Persist/TH/ImplicitIdColSpec.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE DataKinds #
# LANGUAGE DerivingStrategies #
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE QuasiQuotes #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LA... |
ddb110bf27deb81c0e1fb8eb5d0a8216d8e921333f503d2693d9c87f47517995 | GaloisInc/saw-script | Monad.hs | # LANGUAGE FlexibleInstances #
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE FlexibleContexts #
{-# LANGUAGE RankNTypes #-}
|
Module : Verifier . SAW.Translation . Coq
Copyright : Galois , Inc. 2018
License : :
Stability : experimental
Portability : portable
Module : Verifier.SA... | null | https://raw.githubusercontent.com/GaloisInc/saw-script/cd3f1416b2f416b15cd3d9e628256052b0b862d6/saw-core-coq/src/Verifier/SAW/Translation/Coq/Monad.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE RankNTypes #
# OVERLAPPING #
# OVERLAPPABLE #
^ Whether to wrap everything in a free monad construction.
- Advantage: fixpoints can be readily represented
- Disadvantage: pure computations look more gnarly
generated by the translation. Usually consists of extra file imports,... | # LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
|
Module : Verifier . SAW.Translation . Coq
Copyright : Galois , Inc. 2018
License : :
Stability : experimental
Portability : portable
Module : Verifier.SAW.Translation.Coq
Copyright : Galois, Inc. 2018
License ... |
d922991c179d559a10d3482c29dfb6fb0fda119938cf0d26fa7ee679f7b5af70 | crategus/cl-cffi-gtk | revealer-icon.lisp | ;;;; Example Revealer Icon - 2021-12-4
;;;;
GtkRevealer is a container that animates showing and hiding
;;;; of its sole child with nice transitions.
;;;;
;;;; TODO: This example uses the gtk-widget-mapped function, but the
;;;; documentation says: This function should only ever be called in a derived
;;;; "map" or "... | null | https://raw.githubusercontent.com/crategus/cl-cffi-gtk/ba198f7d29cb06de1e8965e1b8a78522d5430516/demo/gtk-example/revealer-icon.lisp | lisp | Example Revealer Icon - 2021-12-4
of its sole child with nice transitions.
TODO: This example uses the gtk-widget-mapped function, but the
documentation says: This function should only ever be called in a derived
"map" or "unmap" implementation of the widget.
What is a better implementation? | GtkRevealer is a container that animates showing and hiding
(in-package :gtk-example)
(defun example-revealer-icon (&optional (application nil))
(within-main-loop
(let* ((count 0)
(timeout 0)
(builder (gtk-builder-new-from-file (sys-path "revealer-icon.ui")))
(window (gtk-buil... |
0d501feb479ba50c673b459797119d3bb5bed05a4c67efca6ca6034c73546c9c | juxt/roll | utils.cljs | (ns roll.utils
(:require [lumo.io]
[cljstache.core :refer [render]]
[clojure.string]))
(defn resolve-path [path]
(clojure.string/join "_" (map name path)))
(defn ->snake [s]
(clojure.string/replace (name s) "-" "_"))
(defn tf-path-to [path]
(->> path
(map ->snake)
(cloj... | null | https://raw.githubusercontent.com/juxt/roll/1ef07d72f05b5604eec4f7d6a5dbf0d21ec3c8b3/src/roll/utils.cljs | clojure | (ns roll.utils
(:require [lumo.io]
[cljstache.core :refer [render]]
[clojure.string]))
(defn resolve-path [path]
(clojure.string/join "_" (map name path)))
(defn ->snake [s]
(clojure.string/replace (name s) "-" "_"))
(defn tf-path-to [path]
(->> path
(map ->snake)
(cloj... | |
f3f087ac44b94669c8347449c5931bbaf2ff29118a3114864af52685e28b286b | chrisdone/sandbox | conduit-tcp-server.hs | #!/usr/bin/env stack
-- stack --resolver lts-12.12 script
{-# LANGUAGE OverloadedStrings #-}
import Data.Conduit.Network
import Conduit
main =
runTCPServer
(serverSettings 2019 "*")
(\app -> do
putStrLn "Someone connected!"
let loop = do
oneMessageMaybe <-
runConduit... | null | https://raw.githubusercontent.com/chrisdone/sandbox/c43975a01119a7c70ffe83c49a629c45f7f2543a/conduit-tcp-server.hs | haskell | stack --resolver lts-12.12 script
# LANGUAGE OverloadedStrings # | #!/usr/bin/env stack
import Data.Conduit.Network
import Conduit
main =
runTCPServer
(serverSettings 2019 "*")
(\app -> do
putStrLn "Someone connected!"
let loop = do
oneMessageMaybe <-
runConduit (appSource app .| mapMC print .| await)
case oneMessageMay... |
81f930de20e8a14d64126e30473f7b52c3e22d6850f6f041cd3df88daac870a3 | dpiponi/Moodler | xmidi11.hs |
do
(x0, y0) <- mouse
let (x, y) = quantise2 quantum (x0, y0)
root <- currentPlane
keyboard11 <- new' "input"
alias "keyboard11" keyboard11
trigger11 <- new' "input"
alias "trigger11" trigger11
modulation11 <- new' "input"
alias "modulation11" modulation11
bend11 <- new' "inp... | null | https://raw.githubusercontent.com/dpiponi/Moodler/a0c984c36abae52668d00f25eb3749e97e8936d3/Moodler/scripts/xmidi11.hs | haskell |
do
(x0, y0) <- mouse
let (x, y) = quantise2 quantum (x0, y0)
root <- currentPlane
keyboard11 <- new' "input"
alias "keyboard11" keyboard11
trigger11 <- new' "input"
alias "trigger11" trigger11
modulation11 <- new' "input"
alias "modulation11" modulation11
bend11 <- new' "inp... | |
c0b5da80481b3e0ceaa3efbcbbbd459bd8cd51424b7bb9b6bc0beef611f948ed | ijvcms/chuanqi_dev | player_extra_lib.erl | %%%-------------------------------------------------------------------
%%% @author qhb
( C ) 2016 , < COMPANY >
%%% @doc
玩家的扩展属性或状态 , 可随时动态增加 ,
%%% @end
Created : 19 . 2016 下午9:52
%%%-------------------------------------------------------------------
-module(player_extra_lib).
-author("qhb").
-include("record.... | null | https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/business/player/player_extra_lib.erl | erlang | -------------------------------------------------------------------
@author qhb
@doc
@end
-------------------------------------------------------------------
API
请求服务端发送状态数据,参数为需要推送的协议
推送王城乱斗的排行 | ( C ) 2016 , < COMPANY >
玩家的扩展属性或状态 , 可随时动态增加 ,
Created : 19 . 2016 下午9:52
-module(player_extra_lib).
-author("qhb").
-include("record.hrl").
-include("proto.hrl").
-export([
request/2
]).
request(PlayerState, ProList) ->
lists:foreach(fun(Pro) ->
push(Pro, PlayerState)
end, ProList).
临时加 , 推送开服第几天
pus... |
6d7ecbddc8c33c33ad071f8f56b700490d181feef923e9070139afef5c5c5842 | marcoheisig/simplified-types | simplified-types.lisp | (in-package #:simplified-types)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Simplified Floating-Point Type Specifiers
(defmacro define-floating-point-types ()
(let ((floating-point-types
(remove-duplicates
(list 'short-float 'single-float 'long-float ... | null | https://raw.githubusercontent.com/marcoheisig/simplified-types/8fd0727a70a9de76289ac62c1567b8d278e7434e/code/simplified-types.lisp | lisp |
Simplified Floating-Point Type Specifiers
Simplified Complex Type Specifiers
Non-float complex numbers are upgraded to the type T.
Simplified Integer Type Specifiers
| (in-package #:simplified-types)
(defmacro define-floating-point-types ()
(let ((floating-point-types
(remove-duplicates
(list 'short-float 'single-float 'long-float 'double-float)
:test #'alexandria:type=)))
(flet ((find-type (type)
(or (find type floating-point-type... |
e9e3c058dc1adfebced3db45afb06bc29973ee72392e9bf8d56ff3ef3b715fa4 | jkoppel/ecta | ECTA.hs | {-# Language OverloadedStrings #-}
module Test.Generators.ECTA () where
import Prelude hiding ( max )
import Control.Monad ( replicateM )
import Data.List ( subsequences, (\\) )
import Test.QuickCheck
import Data.ECTA
import Data.ECTA.Internal.ECTA.Type
import Data.ECTA.Paths
import Data.ECTA.Term
---------------... | null | https://raw.githubusercontent.com/jkoppel/ecta/865cf95fea1c875c2732991db6415d963c5d6189/test/Test/Generators/ECTA.hs | haskell | # Language OverloadedStrings #
---------------------------------------------------------------------------------------------
TODO: Should this depend on n? |
module Test.Generators.ECTA () where
import Prelude hiding ( max )
import Control.Monad ( replicateM )
import Data.List ( subsequences, (\\) )
import Test.QuickCheck
import Data.ECTA
import Data.ECTA.Internal.ECTA.Type
import Data.ECTA.Paths
import Data.ECTA.Term
size at 3 whenever you will generate all deno... |
bbb99bf81ef8e0cf142ad74adfb327e982f7d58c399960f21f6cb200b92c1227 | robertmeta/cowboy-examples | hello_world_rest_handler.erl | -module(hello_world_rest_handler).
-export([init/3, content_types_provided/2, get_text_plain/2]).
init(_Transport, _Req, _Opts) ->
{upgrade, protocol, cowboy_http_rest}.
content_types_provided(Req, State) ->
{[{{<<"text">>, <<"plain">>, []}, get_text_plain}], Req, State}.
get_text_plain(Req, State) ->
{<... | null | https://raw.githubusercontent.com/robertmeta/cowboy-examples/d03c289c9fb0d750eca11e3f1671e74d1841bd09/apps/hello_world_rest/src/hello_world_rest_handler.erl | erlang | -module(hello_world_rest_handler).
-export([init/3, content_types_provided/2, get_text_plain/2]).
init(_Transport, _Req, _Opts) ->
{upgrade, protocol, cowboy_http_rest}.
content_types_provided(Req, State) ->
{[{{<<"text">>, <<"plain">>, []}, get_text_plain}], Req, State}.
get_text_plain(Req, State) ->
{<... | |
7df7854b961f5109ea63359b7815f2948b3ebbffa931be7072a255f5d857216f | static-analysis-engineering/codehawk | jCHLoopCostAbstractor.ml | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Java Analyzer
Author :
------------------------------------------------------------------------------
The MIT License ( MIT )
... | null | https://raw.githubusercontent.com/static-analysis-engineering/codehawk/98ced4d5e6d7989575092df232759afc2cb851f6/CodeHawk/CHJ/jchcost/jCHLoopCostAbstractor.ml | ocaml | chutil | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Java Analyzer
Author :
------------------------------------------------------------------------------
The MIT License ( MIT )
... |
b68dd2203af04ce42d98cac8090952a5aec8e706d71c01f7c9434ddb120d2e3a | channable/icepeak | Main.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
module Main (main) where
import Control.Exception (fromException, catch, handle, AsyncException, SomeException)
import Control.Monad (forM, void, when)
import Data.Foldable (forM_)
import Options.Applicative (execParser)
import System.Environment (get... | null | https://raw.githubusercontent.com/channable/icepeak/46eaa1cad65a97adad87a1b36cbec5d98fffd0b9/server/app/Icepeak/Main.hs | haskell | # LANGUAGE OverloadedStrings #
Install SIGTERM and SIGINT handlers to do a graceful exit.
make sure output is flushed regularly
make sure the storage file exists and that it has the right format - otherwise, fail early
start logging as early as possible
setup metrics if enabled
only stop logging when everything e... | # LANGUAGE ScopedTypeVariables #
module Main (main) where
import Control.Exception (fromException, catch, handle, AsyncException, SomeException)
import Control.Monad (forM, void, when)
import Data.Foldable (forM_)
import Options.Applicative (execParser)
import System.Environment (getEnvironment)
import System.IO (Buff... |
b004e9fee41be9b3ae24e95fc983f1ce4f5ec2dfd58fe61513029fb4f750a91b | serokell/universum | String.hs | {-# LANGUAGE Safe #-}
-- | Type classes for convertion between different string representations.
module Universum.String
( module Universum.String.Conversion
, module Universum.String.Reexport
) where
import Universum.String.Conversion
import Universum.String.Reexport
| null | https://raw.githubusercontent.com/serokell/universum/7fc5dd3951d1177d1873e36b0678c759aeb5dc08/src/Universum/String.hs | haskell | # LANGUAGE Safe #
| Type classes for convertion between different string representations. |
module Universum.String
( module Universum.String.Conversion
, module Universum.String.Reexport
) where
import Universum.String.Conversion
import Universum.String.Reexport
|
261258b10ae7b9c6568be1b55f8fcc3f65fa9b1d7ba6cdf211c20c83c84266b3 | TorXakis/TorXakis | RandIncrementBins.hs |
TorXakis - Model Based Testing
Copyright ( c ) 2015 - 2017 TNO and Radboud University
See LICENSE at root directory of this repository .
TorXakis - Model Based Testing
Copyright (c) 2015-2017 TNO and Radboud University
See LICENSE at root directory of this repository.
-}
{-# LANGUAGE OverloadedStrings #-}
#... | null | https://raw.githubusercontent.com/TorXakis/TorXakis/038463824b3d358df6b6b3ff08732335b7dbdb53/sys/solve/src/RandIncrementBins.hs | haskell | # LANGUAGE OverloadedStrings #
----------------------------------------------------------------------------------------- --
When the variable can be changed,
bins are created and shuffled to find a random solution.
----------------------------------------------------------------------------------------- --
ex... |
TorXakis - Model Based Testing
Copyright ( c ) 2015 - 2017 TNO and Radboud University
See LICENSE at root directory of this repository .
TorXakis - Model Based Testing
Copyright (c) 2015-2017 TNO and Radboud University
See LICENSE at root directory of this repository.
-}
# LANGUAGE ScopedTypeVariables #
modul... |
5dcd8fe2752242345f7d77aefbd51a5cb2339b12b7be7d71bccd5f62a1b21f27 | fukamachi/psychiq | scheduled.lisp | (in-package :cl-user)
(defpackage psychiq.launcher.scheduled
(:use #:cl
#:psychiq.util
#:psychiq.specials)
(:import-from #:psychiq.connection
#:with-connection
#:make-connection
#:disconnect)
(:import-from #:psychiq.queue
#:enqueue-to... | null | https://raw.githubusercontent.com/fukamachi/psychiq/602fbb51d4c871de5909ec0c5a159652f4ae9ad3/src/launcher/scheduled.lisp | lisp | (in-package :cl-user)
(defpackage psychiq.launcher.scheduled
(:use #:cl
#:psychiq.util
#:psychiq.specials)
(:import-from #:psychiq.connection
#:with-connection
#:make-connection
#:disconnect)
(:import-from #:psychiq.queue
#:enqueue-to... | |
3a70a2fdb4f606ef2d7c223380c3218d0288030f389be7fb02ae5b7e7c088bc8 | mainland/nikola | Main.hs | # LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
# LANGUAGE QuasiQuotes #
# LANGUAGE TemplateHaskell #
module Main where
import Prelude hiding (map)
import qualified Data.Vector.Storable as V
import Language.C.Quote.CUDA
import qualified Language.C.Syntax as C
#if !MIN_VERSION_template_haskell(2,7,0)
import qualified... | null | https://raw.githubusercontent.com/mainland/nikola/d86398888c0a76f8ad1556a269a708de9dd92644/tests/Main.hs | haskell | # LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
# LANGUAGE QuasiQuotes #
# LANGUAGE TemplateHaskell #
module Main where
import Prelude hiding (map)
import qualified Data.Vector.Storable as V
import Language.C.Quote.CUDA
import qualified Language.C.Syntax as C
#if !MIN_VERSION_template_haskell(2,7,0)
import qualified... | |
81761af071e3c292577cbb1978314fc2baeeeec869c41c4cfe3c6ca68de77c5b | inguardians/kismapping | KismetPoints.hs | {-# LANGUAGE OverloadedStrings #-}
module Kismapping.Input.KismetPoints where
import Data.Foldable
import Data.HashMap.Lazy (HashMap)
import qualified Data.HashMap.Lazy as HashMap
import Data.Hashable
import Data.Monoid
import Data.Sequence (Seq)
import qualified Data.Sequence as Seq
import Data.Text (Text)
import Da... | null | https://raw.githubusercontent.com/inguardians/kismapping/98b8511cb60595db45f89746d4586bd9d3a60e6a/library/Kismapping/Input/KismetPoints.hs | haskell | # LANGUAGE OverloadedStrings # |
module Kismapping.Input.KismetPoints where
import Data.Foldable
import Data.HashMap.Lazy (HashMap)
import qualified Data.HashMap.Lazy as HashMap
import Data.Hashable
import Data.Monoid
import Data.Sequence (Seq)
import qualified Data.Sequence as Seq
import Data.Text (Text)
import Data.Vector (Vector)
import qualified... |
7a06a45e28ce061685a168b2d459a27068f33d4070f0f7d032cbc9b2c0e00df1 | stepcut/isomaniac | Types.hs | # LANGUAGE ExistentialQuantification , FlexibleContexts , FlexibleInstances , GADTs , JavaScriptFFI , ScopedTypeVariables , TemplateHaskell , TypeFamilies #
# language GeneralizedNewtypeDeriving #
module Web.ISO.Types where
import Control.Applicative (Applicative, Alternative)
import Control.Monad (Monad, MonadPlus)
i... | null | https://raw.githubusercontent.com/stepcut/isomaniac/ee4ab64bb5571b66335a913287d1385dcf9584fe/Web/ISO/Types.hs | haskell | import GHCJS.Prim (ToJSString(..), FromJSString(..))
* JSNode
* IsJSNode
* JSNodeList
>>= fromJSValUnchecked)
* parentNode
* JSDocument
* JSWindow
* JSElement
* createJSElement
| <-US/docs/Web/API/JSDocument.createJSElement Mozilla JSDocument.createJSElement documentation>
* childNodes
* getElementsByName
... | # LANGUAGE ExistentialQuantification , FlexibleContexts , FlexibleInstances , GADTs , JavaScriptFFI , ScopedTypeVariables , TemplateHaskell , TypeFamilies #
# language GeneralizedNewtypeDeriving #
module Web.ISO.Types where
import Control.Applicative (Applicative, Alternative)
import Control.Monad (Monad, MonadPlus)
i... |
15ca6331b2042c5e072dc520707fe21892d0756e1e844d3a5a8b7c0221b41303 | mjambon/moving-percentile | mv_var.mli |
State that tracks moving average and moving variance based on that
moving average , for a given signal .
State that tracks moving average and moving variance based on that
moving average, for a given signal.
*)
type state = private {
avg: Mv_avg.state;
var: Mv_avg.state;
mutable stdev: float;
... | null | https://raw.githubusercontent.com/mjambon/moving-percentile/d39e68069acf0b188542459896d237a142ced4b6/mv_var.mli | ocaml | square root of the estimated variance
Add an observation
Square root of the estimated variance
Return the number of observations so far, i.e. the number of times
`update` was called successfully. |
State that tracks moving average and moving variance based on that
moving average , for a given signal .
State that tracks moving average and moving variance based on that
moving average, for a given signal.
*)
type state = private {
avg: Mv_avg.state;
var: Mv_avg.state;
mutable stdev: float;
... |
77bc208981918f7940ffcac1722af5708c8a2c663d391179dd76b0e0b491a989 | MyDataFlow/ttalk-server | exo_montest.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2014 Basho Technologies , Inc. All Rights Reserved .
%%
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 obtai... | null | https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/deps/exometer/src/exo_montest.erl | erlang | -------------------------------------------------------------------
-------------------------------------------------------------------
@doc Demo module for `exometer_folsom_monitor' behaviours.
This module simply
@end | Copyright ( c ) 2014 Basho Technologies , Inc. All Rights Reserved .
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
-module(exo_montest).
-behaviour(exometer_folsom_monitor).
-behav... |
dff26f8a57e1eb2aa7541b6ec04462185b4950f013a5b2749fa9d7c2953c1ef8 | geoffder/olm-ml | inboundGroupSession.mli | open Core
type t = { buf : char Ctypes.ptr
; igs : C.Types.InboundGroupSession.t Ctypes_static.ptr
}
(** [clear igs]
Clear memory backing the given [igs] pointer. *)
val clear : C.Types.InboundGroupSession.t Ctypes_static.ptr -> (int, [> `OlmError ]) result
* [ check_error t ret ]
Check... | null | https://raw.githubusercontent.com/geoffder/olm-ml/6ab791c5f4cacb54cf8939d78bd2a6820ec136b3/olm/lib/inboundGroupSession.mli | ocaml | * [clear igs]
Clear memory backing the given [igs] pointer.
* [create outbound_session_key]
Start a new inbound group session, using an exported [outbound_session_key],
(obtained with [OutboundGroupSession.session_key]).
* [decrypt t ciphertext]
Returns a tuple of the plain-text decrypted from [cip... | open Core
type t = { buf : char Ctypes.ptr
; igs : C.Types.InboundGroupSession.t Ctypes_static.ptr
}
val clear : C.Types.InboundGroupSession.t Ctypes_static.ptr -> (int, [> `OlmError ]) result
* [ check_error t ret ]
Check whether return code [ ret ] is equal to ` olm_error ( ) ` ( -1 ) , re... |
54e0130d63c6420748ec458787abe003a832f69ba06e35441e4a5ec3ba932dc1 | MyDataFlow/ttalk-server | ranch_tcp.erl | Copyright ( c ) 2011 - 2014 , < >
%%
%% Permission to use, copy, modify, and/or distribute this software for any
%% purpose with or without fee is hereby granted, provided that the above
%% copyright notice and this permission notice appear in all copies.
%%
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISC... | null | https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/deps/ranch/src/ranch_tcp.erl | erlang |
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVE... | Copyright ( c ) 2011 - 2014 , < >
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES
ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN
-module(ranch_tcp).
-behaviour(ranch_transport).
-ex... |
3dacac549c198b65cde4c1a485d1d1219ee3c06148b91ae2e5f022033e2cec6b | sethfowler/pygmalion | Orphans.hs | # OPTIONS_GHC -fno - warn - orphans #
module Pygmalion.Database.Orphans () where
import Database.SQLite.Simple.ToField (ToField (..))
import Database.SQLite.Simple.ToRow (ToRow (..))
instance (ToField a, ToField b, ToField c, ToField d, ToField e, ToField f,
ToField g, ToField h, ToField i, ToField j, ToF... | null | https://raw.githubusercontent.com/sethfowler/pygmalion/d58cc3411d6a17cd05c3b0263824cd6a2f862409/src/Pygmalion/Database/Orphans.hs | haskell | # OPTIONS_GHC -fno - warn - orphans #
module Pygmalion.Database.Orphans () where
import Database.SQLite.Simple.ToField (ToField (..))
import Database.SQLite.Simple.ToRow (ToRow (..))
instance (ToField a, ToField b, ToField c, ToField d, ToField e, ToField f,
ToField g, ToField h, ToField i, ToField j, ToF... | |
e935bb6acee6693044e31dd794c24fac95bb4a605e4cd5b4f85dad0b8c57382c | panda-planner-dev/ipc2020-domains | d-17.lisp | (defdomain domain (
(:operator (!obtain_permit ?op_h)
;; preconditions
(
(type_Hazardous ?op_h)
(not (Have_Permit ?op_h))
)
;; delete effects
()
;; add effects
((Have_Permit ?op_h))
)
(:operator (!collect_fees ?cf_p)
;; preconditions
(
(type_Package ?cf_p)
... | null | https://raw.githubusercontent.com/panda-planner-dev/ipc2020-domains/9adb54325d3df35907adc7115fcc65f0ce5953cc/partial-order/UM-Translog/other/SHOP2/d-17.lisp | lisp | preconditions
delete effects
add effects
preconditions
delete effects
add effects
preconditions
delete effects
add effects
preconditions
delete effects
add effects
preconditions
delete effects
add effects
preconditions
delete effects
add effects
preconditions
delete effects
add effects
preconditio... | (defdomain domain (
(:operator (!obtain_permit ?op_h)
(
(type_Hazardous ?op_h)
(not (Have_Permit ?op_h))
)
()
((Have_Permit ?op_h))
)
(:operator (!collect_fees ?cf_p)
(
(type_Package ?cf_p)
(not (Fees_Collected ?cf_p))
)
()
((Fees_Collected ?cf_p))
)
(:o... |
220c41e0d05754d4eaf18beb543663ccae0152b9bf682010a97ccaab9cc56062 | threatgrid/clj-momo | http.clj | (ns clj-momo.test-helpers.http
(:refer-clojure :exclude [get])
(:require [cheshire.core :as json]
[clj-http.client :as http]
[clj-momo.lib.url :as url]
[clojure
[edn :as edn]
[pprint :refer [pprint]]
[string :as str]]))
(defn url [path port... | null | https://raw.githubusercontent.com/threatgrid/clj-momo/7bc0a411593eee4a939b6a3d0f628413518e09e2/src/clj_momo/test_helpers/http.clj | clojure | (ns clj-momo.test-helpers.http
(:refer-clojure :exclude [get])
(:require [cheshire.core :as json]
[clj-http.client :as http]
[clj-momo.lib.url :as url]
[clojure
[edn :as edn]
[pprint :refer [pprint]]
[string :as str]]))
(defn url [path port... | |
333bb9cf5b871a1c2689e65adaf143d5ce096122c11c582e971d9108a494bed4 | rjnw/sham | types.rkt | #lang racket
(require sham/llvm/ir/ast
sham/ir/ast
sham/ir/rkt
sham/md
sham/ir/env)
(require ffi/unsafe)
(provide rkt-cast-jit-ptr)
(define ((build-rkt-types s-env))
(match-define (sham-env s-mod ll-env s-md) s-env)
(match-define (sham-module s-ast ll-ast ext) s-mod)
(match-... | null | https://raw.githubusercontent.com/rjnw/sham/6e0524b1eb01bcda83ae7a5be6339da4257c6781/sham-base/sham/rkt/types.rkt | racket | #lang racket
(require sham/llvm/ir/ast
sham/ir/ast
sham/ir/rkt
sham/md
sham/ir/env)
(require ffi/unsafe)
(provide rkt-cast-jit-ptr)
(define ((build-rkt-types s-env))
(match-define (sham-env s-mod ll-env s-md) s-env)
(match-define (sham-module s-ast ll-ast ext) s-mod)
(match-... | |
380ec6e9d2b920c3b51867a45d06d430ff8e61966159f1cac9694a71ee8c49e0 | vedang/clj_fdb | transaction.clj | (ns me.vedang.clj-fdb.transaction
(:refer-clojure :exclude [get set read])
(:import clojure.lang.IFn
[com.apple.foundationdb MutationType Range Transaction TransactionContext]
com.apple.foundationdb.async.AsyncIterable
java.util.concurrent.CompletableFuture
[java.util.fun... | null | https://raw.githubusercontent.com/vedang/clj_fdb/58aae585273f291a1dbd69d5a2a355f177e20b61/src/me/vedang/clj_fdb/transaction.clj | clojure | (ns me.vedang.clj-fdb.transaction
(:refer-clojure :exclude [get set read])
(:import clojure.lang.IFn
[com.apple.foundationdb MutationType Range Transaction TransactionContext]
com.apple.foundationdb.async.AsyncIterable
java.util.concurrent.CompletableFuture
[java.util.fun... | |
f808df45ed7d002f352690fb210d3e9d5327f306e053714f457b33bfb641cfc0 | yi-editor/yi-rope | MainBenchmarkSuite.hs | # OPTIONS_GHC -fno - warn - orphans #
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Data.Char (isSpace)
import Control.DeepSeq
import Criterion.Main
import qualified Criterion.Main as C
import Data.Text (unlines, Text, replicate)
import Prelude hiding (un... | null | https://raw.githubusercontent.com/yi-editor/yi-rope/f3b925e2f4c55092957cecc3c037f36baff582bb/bench/MainBenchmarkSuite.hs | haskell | # LANGUAGE OverloadedStrings #
| Sample usage:
^ Group name
^ Function being benchmarked
The replicate here inflates the benchmark like mad, should be
moved out. | # OPTIONS_GHC -fno - warn - orphans #
module Main where
import Data.Char (isSpace)
import Control.DeepSeq
import Criterion.Main
import qualified Criterion.Main as C
import Data.Text (unlines, Text, replicate)
import Prelude hiding (unlines)
import qualified Yi.Rope as ... |
58329f37f9b7acaef48dba8a97dec29e2c2e4814308f7c412e698d2029401b09 | mcorbin/tour-of-clojure | loop.clj | (ns tourofclojure.pages.loop
(:require [hiccup.element :refer [link-to]]
[clojure.java.io :as io]
[tourofclojure.pages.util :refer [navigation-block]]))
(def code
(slurp (io/resource "public/pages/code/loop.clj")))
(defn desc
[previous next lang]
(condp = lang
"fr" [:div
... | null | https://raw.githubusercontent.com/mcorbin/tour-of-clojure/57f97b68ca1a8c96904bfb960f515217eeda24a6/src/tourofclojure/pages/loop.clj | clojure | (ns tourofclojure.pages.loop
(:require [hiccup.element :refer [link-to]]
[clojure.java.io :as io]
[tourofclojure.pages.util :refer [navigation-block]]))
(def code
(slurp (io/resource "public/pages/code/loop.clj")))
(defn desc
[previous next lang]
(condp = lang
"fr" [:div
... | |
660d5d4899e357acd87e2019518657a3418adfb31923a4b28fbcec36f587d553 | jackfirth/rebellion | range-set-interface.rkt | #lang racket/base
(require racket/contract/base)
(provide
(contract-out
[range-set? predicate/c]
[immutable-range-set? predicate/c]
[mutable-range-set? predicate/c]
[in-range-set (->* (range-set?) (#:descending? boolean?) (sequence/c nonempty-range?))]
[range-set-comparator (-> range-set? comparator?)]
... | null | https://raw.githubusercontent.com/jackfirth/rebellion/69dce215e231e62889389bc40be11f5b4387b304/collection/private/range-set-interface.rkt | racket | The APIs for creating the generic, extensible hierarchy of collection implementations exist only to
external consumption, and no promises of API stability or quality are made. Please do not make your
own implementations of these interfaces; instead file an issue at
describing your use case. These APIs might be mad... | #lang racket/base
(require racket/contract/base)
(provide
(contract-out
[range-set? predicate/c]
[immutable-range-set? predicate/c]
[mutable-range-set? predicate/c]
[in-range-set (->* (range-set?) (#:descending? boolean?) (sequence/c nonempty-range?))]
[range-set-comparator (-> range-set? comparator?)]
... |
f767fb8b40100981c40c191aa8cf94cfaadcff907a967244aba45496627e92d7 | janestreet/merlin-jst | oprint.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/janestreet/merlin-jst/980b574405617fa0dfb0b79a84a66536b46cd71b/src/ocaml/typing/oprint.ml | ocaml | ************************************************************************
OCaml
... | Projet Cristal , INRIA Rocquencourt
Copyright 2002 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Format
open Outcometree
exception Ellipsis
let cautious f ppf arg =
try f ppf arg with... |
db12262b144c183e511a49bd9e4adf7b6c5acfa04440c3ea7bc71a984e655005 | atgreen/red-light-green-light | interpret.lisp | -*- Mode : LISP ; Syntax : Ansi - Common - Lisp ; Base : 10 ; Package : CL - POSTGRES ; -*-
(in-package :cl-postgres)
(defparameter *timestamp-format* :unbound
"This is used to communicate the format \(integer or float) used for
timestamps and intervals in the current connection, so that the
interpreters for those... | null | https://raw.githubusercontent.com/atgreen/red-light-green-light/f067507721bbab4aa973866db5276c83df3e8784/local-projects/postmodern-20220220-git/cl-postgres/interpret.lisp | lisp | Syntax : Ansi - Common - Lisp ; Base : 10 ; Package : CL - POSTGRES ; -*-
Names are there just for clarity
"row" types
Should we return nil or a (make-array nil) when num-dims is
0? Returning nil for now.
(internal PG type)
record arrays
NOTE: need to treat this separately because if we want
the record (row t... | (in-package :cl-postgres)
(defparameter *timestamp-format* :unbound
"This is used to communicate the format \(integer or float) used for
timestamps and intervals in the current connection, so that the
interpreters for those types know how to parse them.")
(defparameter *sql-readtable* (make-hash-table)
"The expor... |
fef8fa2d90c470de5a352ef7bf4adff4d824d3791277d2d2120a81be3903de7c | vito/atomo | Types.hs | # LANGUAGE DeriveDataTypeable , OverloadedStrings , TypeSynonymInstances #
module Atomo.Format.Types where
import Control.Monad.RWS
import Data.Typeable
import Text.PrettyPrint
import qualified Data.Text as T
import Atomo.Pretty
import Atomo.Types
-- | The core types of formats to use.
data Segment
-- | Arbitra... | null | https://raw.githubusercontent.com/vito/atomo/df22fcb3fbe80abb30b9ab3c6f5d50d3b8477f90/src/Atomo/Format/Types.hs | haskell | | The core types of formats to use.
| Arbitrary text.
| %s
| %d
| %x
| %o
| %b
| %r
| %f
| %e
| %g
| %c
| %a
| %v
| %p(...)
| %l(...)
| %c(...)
| %u(...)
| %_
| %%
| %{...}
| %^
Various modifiers, for our segments.
The Maybe is Nothing if they used #, in which case we use the number
of remainin... | # LANGUAGE DeriveDataTypeable , OverloadedStrings , TypeSynonymInstances #
module Atomo.Format.Types where
import Control.Monad.RWS
import Data.Typeable
import Text.PrettyPrint
import qualified Data.Text as T
import Atomo.Pretty
import Atomo.Types
data Segment
= SChunk T.Text
| SString
| SDecimal
... |
cf4eb1566faee50a3a9cbe85b74de78fe404b0f54949156614040091c69040d7 | siraben/haoc-2021 | day4.hs | # LANGUAGE TupleSections #
import Control.Applicative
import Control.Monad
import Criterion.Main
import Data.Foldable
import Data.Function
import Data.List
import Data.Maybe
import Data.Text (Text)
import qualified Data.Text as T
-- Slow splitOn for prototyping
splitOn :: String -> String -> [String]
splitOn sep s = ... | null | https://raw.githubusercontent.com/siraben/haoc-2021/d928c251a82e58b3a20f31638bf0720eb82e5a77/day4.hs | haskell | Slow splitOn for prototyping | # LANGUAGE TupleSections #
import Control.Applicative
import Control.Monad
import Criterion.Main
import Data.Foldable
import Data.Function
import Data.List
import Data.Maybe
import Data.Text (Text)
import qualified Data.Text as T
splitOn :: String -> String -> [String]
splitOn sep s = T.unpack <$> T.splitOn (T.pack s... |
b76ae12f7183e739e2d65ab11047346893e7a86352f58182012b8e1ae214014d | Andromedans/andromeda | form.ml | (** Formation of judgements from rules *)
open Nucleus_types
let form_alpha_equal_type t1 t2 =
match Alpha_equal.is_type t1 t2 with
| false -> None
| true -> Some (Mk.eq_type Assumption.empty t1 t2)
* Compare two terms for alpha equality .
let form_alpha_equal_term sgn e1 e2 =
let t1 = Sanity.type_of_term sg... | null | https://raw.githubusercontent.com/Andromedans/andromeda/a5c678450e6c6d4a7cd5eee1196bde558541b994/src/nucleus/form.ml | ocaml | * Formation of judgements from rules
* Partial rule applications
* Form a rule application for the given constructor [c]
order of arguments not important in [Collect_assumptions.arguments],
we could try avoiding a list reversal caused by [Indices.to_list].
order of arguments not important in [Collect_... |
open Nucleus_types
let form_alpha_equal_type t1 t2 =
match Alpha_equal.is_type t1 t2 with
| false -> None
| true -> Some (Mk.eq_type Assumption.empty t1 t2)
* Compare two terms for alpha equality .
let form_alpha_equal_term sgn e1 e2 =
let t1 = Sanity.type_of_term sgn e1
and t2 = Sanity.type_of_term sgn e2... |
a7c2abd90eb4370fff24da8b07295cd27c40e9586b4956bfc73c8dd4f251ecde | haslab/HAAP | RunT3.hs | module Main where
import LI11718
import qualified Tarefa3_2017li1g180 as T3
import System.Environment
import Text.Read
main = do
args <- getArgs
case args of
["movimenta"] -> do
str <- getContents
let params = readMaybe str
case params of
Nothing ->... | null | https://raw.githubusercontent.com/haslab/HAAP/5acf9efaf0e5f6cba1c2482e51bda703f405a86f/examples/plab/svn/2017li1g180/src/RunT3.hs | haskell | module Main where
import LI11718
import qualified Tarefa3_2017li1g180 as T3
import System.Environment
import Text.Read
main = do
args <- getArgs
case args of
["movimenta"] -> do
str <- getContents
let params = readMaybe str
case params of
Nothing ->... | |
15511b6d68fd9b97d591b878f49d3b0ed90b3f152dd46311efdda444ed0aef9e | pflanze/chj-schemelib | debuggable-promise-everywhere.scm | Copyright 2017 by < >
;;; This file is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License ( GPL ) as published
by the Free Software Foundation , either version 2 of the License , or
;;; (at your option) any later version.
(require define-macr... | null | https://raw.githubusercontent.com/pflanze/chj-schemelib/59ff8476e39f207c2f1d807cfc9670581c8cedd3/debuggable-promise-everywhere.scm | scheme | This file is free software; you can redistribute it and/or modify
(at your option) any later version. | Copyright 2017 by < >
it under the terms of the GNU General Public License ( GPL ) as published
by the Free Software Foundation , either version 2 of the License , or
(require define-macro-star
debuggable-promise)
(export make-promise)
(set! make-promise debuggable#make-promise)
|
30d631d55fbb2db273aa2e2735cd003eaa409e9cb60f6bacc6e5fefaebd06aff | jmingtan/clonings | maps1.clj | ;; maps1.clj
;; Make me compile by filling in the ??? parts, scroll down for hints :)
(ns collections.maps1)
;; maps are associative collections of key-value pairs, created with the {} literal
(def a-map #{:a 1
:b 2
:c 3
:d 4
:e 5})
Here are two possible ways to ... | null | https://raw.githubusercontent.com/jmingtan/clonings/ca64b031ab26a1924bed91f5c9c98b6dd69fc129/exercises/collections/maps1.clj | clojure | maps1.clj
Make me compile by filling in the ??? parts, scroll down for hints :)
maps are associative collections of key-value pairs, created with the {} literal
which behaves as if calling the `get` function on it.
try creating your own map here! |
(ns collections.maps1)
(def a-map #{:a 1
:b 2
:c 3
:d 4
:e 5})
Here are two possible ways to retrieve an element from a map :
First method :
returns 2
Second method :
returns 2
The second method works because keyword types also act as a function ,
#Ke... |
e6f87c07a156352f7bddff3c83d0d3bab981b72ea914bf7c0333a89119cf4478 | geoffder/dometyl-keyboard | key.ml | open! OCADml
open! OSCADml
module Face = struct
type t =
{ path : Path3.t
; points : Points.t
; bounds : Points.t
; normal : V3.t [@cad.unit]
}
[@@deriving cad]
let direction { points = { top_left; top_right; _ }; _ } =
V3.normalize V3.(top_left -@ top_right)
end
module Faces = struct
... | null | https://raw.githubusercontent.com/geoffder/dometyl-keyboard/d6af46ea157a38167b50cc492e16428644806ddb/lib/key.ml | ocaml | open! OCADml
open! OSCADml
module Face = struct
type t =
{ path : Path3.t
; points : Points.t
; bounds : Points.t
; normal : V3.t [@cad.unit]
}
[@@deriving cad]
let direction { points = { top_left; top_right; _ }; _ } =
V3.normalize V3.(top_left -@ top_right)
end
module Faces = struct
... | |
20846bb9285bd2c7e232fe3f1218653315270b6400aa29ce921fed28d5b165a1 | ocaml-multicore/tezos | fitness_repr.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
(* ... | null | https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_012_Psithaca/lib_protocol/fitness_repr.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETH... |
a3a5df7397ed412e58a9b1f93f38655bc4ec23a5c3ee3c265f96d32b83d44448 | haskell-hvr/missingh | ControlParser.hs | {-# LANGUAGE Safe #-}
arch - tag : for Debian control file
Copyright ( c ) 2004 - 2011 < >
All rights reserved .
For license and copyright information , see the file LICENSE
Copyright (c) 2004-2011 John Goerzen <>
All rights reserved.
For license and copyright information, see the file LICENSE
-}
... | null | https://raw.githubusercontent.com/haskell-hvr/missingh/e1a73bd9547db967b4e8d76a443000d06ce95ac4/src/System/Debian/ControlParser.hs | haskell | # LANGUAGE Safe #
| Main parser for the control file
| Dependency parser.
Returns (package name, Maybe version, arch list)
version is (operator, operand) |
arch - tag : for Debian control file
Copyright ( c ) 2004 - 2011 < >
All rights reserved .
For license and copyright information , see the file LICENSE
Copyright (c) 2004-2011 John Goerzen <>
All rights reserved.
For license and copyright information, see the file LICENSE
-}
|
Module : S... |
1cc4127cba8fd329a5438cf413acf47cb13c0862068d93c2f068a13c6d23a5b6 | facebookarchive/pfff | printexc.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/external/stdlib/printexc.mli | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
$ I d : printexc.mli 11156 2011 - 07 ... |
77378aeecb0f183a562ec66c3fd20f5c78c84833c271ac6d047f5d5cc77bb4c0 | anwarmamat/cmsc330spring19-public | public.ml | open OUnit2
open P5.SmallCTypes
open TestUtils
open P5.TokenTypes
let test_assign1 = create_system_test "../../../test/public_inputs/assign1.c"
(Seq(Declare(Int_Type, "a"), Seq(Assign("a", Int 100), NoOp)))
let test_assign_exp = create_system_test "../../../test/public_inputs/assign-exp.c"
(Seq(Declare(Int_Type, "... | null | https://raw.githubusercontent.com/anwarmamat/cmsc330spring19-public/98af1e8efc3d8756972731eaca19e55fe8febb69/project5/test/public.ml | ocaml | open OUnit2
open P5.SmallCTypes
open TestUtils
open P5.TokenTypes
let test_assign1 = create_system_test "../../../test/public_inputs/assign1.c"
(Seq(Declare(Int_Type, "a"), Seq(Assign("a", Int 100), NoOp)))
let test_assign_exp = create_system_test "../../../test/public_inputs/assign-exp.c"
(Seq(Declare(Int_Type, "... | |
9da94efb836513a94bed8b966209ad02afd3adae64f313eb57057f2174d75e0d | tsloughter/kuberl | kuberl_v1_custom_resource_definition_version.erl | -module(kuberl_v1_custom_resource_definition_version).
-export([encode/1]).
-export_type([kuberl_v1_custom_resource_definition_version/0]).
-type kuberl_v1_custom_resource_definition_version() ::
#{ 'additionalPrinterColumns' => list(),
'name' := binary(),
'schema' => kuberl_v1_custom_resource_vali... | null | https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v1_custom_resource_definition_version.erl | erlang | -module(kuberl_v1_custom_resource_definition_version).
-export([encode/1]).
-export_type([kuberl_v1_custom_resource_definition_version/0]).
-type kuberl_v1_custom_resource_definition_version() ::
#{ 'additionalPrinterColumns' => list(),
'name' := binary(),
'schema' => kuberl_v1_custom_resource_vali... | |
ef4695846146a08980e0bc581fa4969c64b6d390be752b3f2776ad66852d7b3d | cabalism/hpack-dhall | Options.hs | # LANGUAGE RecordWildCards #
# LANGUAGE ApplicativeDo #
module Options
( Options(..)
, parseNumericVersion
, parseVersion
, parseOptions
, parsePkgFile
, parseForce
, parseQuiet
) where
import Hpack.Dhall (packageConfig)
import Options.Applicative
newtype Options = Options {pkgFile ::... | null | https://raw.githubusercontent.com/cabalism/hpack-dhall/4f5671164098dedcaa3dd92624e0106d49899507/exe/options/Options.hs | haskell | # LANGUAGE RecordWildCards #
# LANGUAGE ApplicativeDo #
module Options
( Options(..)
, parseNumericVersion
, parseVersion
, parseOptions
, parsePkgFile
, parseForce
, parseQuiet
) where
import Hpack.Dhall (packageConfig)
import Options.Applicative
newtype Options = Options {pkgFile ::... | |
70cf69d40ef8af491e4837b9447d37d90bf2ace0e6ca322bb4301737004b4cbb | mflatt/not-a-box | port.rkt | #lang racket/base
(require "port.rkt"
(only-in racket/base
[open-input-file c:open-input-file]
[port-count-lines! c:port-count-lines!]
[read-string c:read-string]
[close-input-port c:close-input-port]
[bytes->string/utf-8... | null | https://raw.githubusercontent.com/mflatt/not-a-box/b6c1af4fb0eb877610a3a20b5265a8c8d2dd28e9/demo/port.rkt | racket | #lang racket/base
(require "port.rkt"
(only-in racket/base
[open-input-file c:open-input-file]
[port-count-lines! c:port-count-lines!]
[read-string c:read-string]
[close-input-port c:close-input-port]
[bytes->string/utf-8... | |
1335a6dfe78d7a686a7d5c0e8d2d3c0d9943b53eee71976958d60bd951a46871 | yetanalytics/flint | where.cljc | (ns com.yetanalytics.flint.spec.where
(:require [clojure.spec.alpha :as s]
[com.yetanalytics.flint.spec.axiom :as ax]
[com.yetanalytics.flint.spec.expr :as es]
[com.yetanalytics.flint.spec.modifier :as ms]
[com.yetanalytics.flint.spec.select :as ss]
... | null | https://raw.githubusercontent.com/yetanalytics/flint/b0a2530582e04f5592869b0152b846864c283d77/src/main/com/yetanalytics/flint/spec/where.cljc | clojure |
Sub-SELECT query
s/merge does not result in correct conformation
WHERE clause
recursion | (ns com.yetanalytics.flint.spec.where
(:require [clojure.spec.alpha :as s]
[com.yetanalytics.flint.spec.axiom :as ax]
[com.yetanalytics.flint.spec.expr :as es]
[com.yetanalytics.flint.spec.modifier :as ms]
[com.yetanalytics.flint.spec.select :as ss]
... |
183920fd7c9c644e7553dca5ec4854c0b15125155361f2bf177d0c869a6c0de3 | bscarlet/llvm-general | Exceptable.hs | # LANGUAGE
GeneralizedNewtypeDeriving ,
MultiParamTypeClasses ,
UndecidableInstances ,
CPP
#
GeneralizedNewtypeDeriving,
MultiParamTypeClasses,
UndecidableInstances,
CPP
#-}
module Control.Monad.Exceptable (
-- * MonadError class
MonadError(..),
* The monad
Exceptable,
... | null | https://raw.githubusercontent.com/bscarlet/llvm-general/61fd03639063283e7dc617698265cc883baf0eec/llvm-general/src/Control/Monad/Exceptable.hs | haskell | * MonadError class
* The ExceptT monad transformer
* Exception operations
* Lifting other operations
* underlying ExceptT type
| Constructor for computations in the exception monad.
| Extractor for computations in the exception monad.
(The inverse of 'except').
| Map the unwrapped computation using the given f... | # LANGUAGE
GeneralizedNewtypeDeriving ,
MultiParamTypeClasses ,
UndecidableInstances ,
CPP
#
GeneralizedNewtypeDeriving,
MultiParamTypeClasses,
UndecidableInstances,
CPP
#-}
module Control.Monad.Exceptable (
MonadError(..),
* The monad
Exceptable,
exceptable,
runExcept... |
35f642b7d8ff5f8fec64f0fe24478d1e70064e5e199a19ef5af2ed362b4e4b98 | ejgallego/coq-serapi | ser_environ.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2016
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/ejgallego/coq-serapi/9c799e3d8965a78dce6b5af29a61e1997c8e17a4/serlib/ser_environ.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
************************************... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2016
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Copyright 2016 - 2020 MINES... |
7025c99e07c7bf36c5d052b6fdef3cbded6290d3b51127ce6c0c6e7d6771eeed | froggey/Mezzano | network-setup.lisp | Network initialization and link management
(in-package :mezzano.network)
;; Everything in the network stack uses a single serial queue for the moment...
(defvar *network-serial-queue*)
These three variables are only accessed from the network serial queue
;; and don't need additional synchronization.
(defvar *rec... | null | https://raw.githubusercontent.com/froggey/Mezzano/f0eeb2a3f032098b394e31e3dfd32800f8a51122/net/network-setup.lisp | lisp | Everything in the network stack uses a single serial queue for the moment...
and don't need additional synchronization.
match all interfaces
match all interfaces
running the file-server on non-10.0.2.0 10/8 networks
wildcard configuration
Bring interfaces up.
Add routes.
Local network.
Default route.
Do rece... | Network initialization and link management
(in-package :mezzano.network)
(defvar *network-serial-queue*)
These three variables are only accessed from the network serial queue
(defvar *receive-sources* (make-hash-table))
(defvar *boot-source* nil)
(defvar *interface-config* (make-hash-table))
(defvar *static-con... |
f15df5ac686127881466c3ebc8dff0a17e8c78bfe9a1bbf1e3437a174e410655 | tautologico/opfp | exp.ml |
expressoes aritmeticas
Interpretador ,
Linguagem de expressoes aritmeticas
Interpretador, compilador para maquina de pilha
*)
* { 1 }
(** Tipo para expressões *)
type exp =
| Const of int
| Soma of exp * exp
| Sub of exp * exp
| Mult of exp * exp
let rec print e =
match e wit... | null | https://raw.githubusercontent.com/tautologico/opfp/74ef9ed97b0ab6b78c147c3edf7e0b69f2acf9d1/exp/src/exp.ml | ocaml | * Tipo para expressões
* Operações da máquina
* Obtém dois operandos de uma pilha
* Elimina sub-expressões de soma com o valor 0
TODO traducao para ILasm |
expressoes aritmeticas
Interpretador ,
Linguagem de expressoes aritmeticas
Interpretador, compilador para maquina de pilha
*)
* { 1 }
type exp =
| Const of int
| Soma of exp * exp
| Sub of exp * exp
| Mult of exp * exp
let rec print e =
match e with
Const n -> string_of_... |
753d0231d3adeed672dc1f06d9787402137e61de7d84c5661304cd4e53b26b26 | mpickering/apply-refact | Bracket16.hs | main = do f; (print x) | null | https://raw.githubusercontent.com/mpickering/apply-refact/a4343ea0f4f9d8c2e16d6b16b9068f321ba4f272/tests/examples/Bracket16.hs | haskell | main = do f; (print x) | |
e4e0c7847798390820c73cdfa0d525f2a03c875c67c8358a75ab55e7aac419fc | ardumont/vinyasa | project.clj | (defproject im.chit/vinyasa "0.2.0"
:description "Utilities to make the development process smoother"
:url ""
:license {:name "The MIT License"
:url ""}
:dependencies [[org.clojure/clojure "1.5.1"]
[com.cemerick/pomegranate "0.3.0"]]
:profiles {:dev {:plugins [[lein-repack "0.1.0"... | null | https://raw.githubusercontent.com/ardumont/vinyasa/59726febd52f8de792963ea6e61f0522cb3d7404/project.clj | clojure | (defproject im.chit/vinyasa "0.2.0"
:description "Utilities to make the development process smoother"
:url ""
:license {:name "The MIT License"
:url ""}
:dependencies [[org.clojure/clojure "1.5.1"]
[com.cemerick/pomegranate "0.3.0"]]
:profiles {:dev {:plugins [[lein-repack "0.1.0"... | |
2b14d8f4e79f1758ae1d72528760502be5d58f9a97ef79d04e5d8d88bbc8c389 | HealthSamurai/dojo.clj | storage.cljs | (ns zframes.storage
(:require [re-frame.core :as rf]))
(defn keywordize [x]
(js->clj x :keywordize-keys true))
(defn remove-item
[key]
(.removeItem (.-localStorage js/window) key))
(defn set-item
[key val]
(->> val
clj->js
(.stringify js/JSON)
js/encodeURIComponent
(.setItem (... | null | https://raw.githubusercontent.com/HealthSamurai/dojo.clj/94922640f534897ab2b181c608b54bfbb8351d7b/ui/src/zframes/storage.cljs | clojure | (ns zframes.storage
(:require [re-frame.core :as rf]))
(defn keywordize [x]
(js->clj x :keywordize-keys true))
(defn remove-item
[key]
(.removeItem (.-localStorage js/window) key))
(defn set-item
[key val]
(->> val
clj->js
(.stringify js/JSON)
js/encodeURIComponent
(.setItem (... | |
2aa2f7bd43e73b58c969a0418d017a941bdc1bb93bfd8d3a4fe832de0698c72c | ronxin/stolzen | ex2.73.scm | #lang scheme
(require racket/trace)
(define (variable? e)
(symbol? e)
)
(define (same-variable? v1 v2)
(and (variable? v1) (variable? v2) (eq? v1 v2))
)
(define (=number? exp num)
(and (number? exp) (= exp num))
)
(define (operator exp)
(car exp)
)
(define (operands exp)
(... | null | https://raw.githubusercontent.com/ronxin/stolzen/bb13d0a7deea53b65253bb4b61aaf2abe4467f0d/sicp/chapter2/2.4/ex2.73.scm | scheme | a
because number won't contain a type-tag
same is with same-variable?
b
for checking
c
for checking
d
if change to ((get (operator exp) 'deriv) (operands) var), then you'll have to
change only the get procedure
get for testing
| #lang scheme
(require racket/trace)
(define (variable? e)
(symbol? e)
)
(define (same-variable? v1 v2)
(and (variable? v1) (variable? v2) (eq? v1 v2))
)
(define (=number? exp num)
(and (number? exp) (= exp num))
)
(define (operator exp)
(car exp)
)
(define (operands exp)
(... |
119166e7f95d5b6c45d085d62bcc267dc679c739d8fcb073d572fe033881344c | gojek/ziggurat | error_test.clj | (ns ziggurat.util.error-test
(:require [clojure.test :refer :all]
[sentry-clj.async :refer [sentry-report]]
[ziggurat.new-relic :as nr]
[ziggurat.util.error :refer [report-error]]))
(deftest report-error-test
(testing "error gets reported to sentry and new-relic"
(let [sentr... | null | https://raw.githubusercontent.com/gojek/ziggurat/7ac8072917aa67cd10b25e940a01bc196d7d8c98/test/ziggurat/util/error_test.clj | clojure | (ns ziggurat.util.error-test
(:require [clojure.test :refer :all]
[sentry-clj.async :refer [sentry-report]]
[ziggurat.new-relic :as nr]
[ziggurat.util.error :refer [report-error]]))
(deftest report-error-test
(testing "error gets reported to sentry and new-relic"
(let [sentr... | |
92e8e30ef9aac93115d1af75c81bde430d75943a59bb21ece147a5db67e783b4 | janestreet/core_kernel | enumeration.ml | open! Core
open! Import
type ('a, 'b) t = { all : 'a list }
module type S =
Enumeration_intf.S with type ('a, 'witness) enumeration := ('a, 'witness) t
module type S_fc =
Enumeration_intf.S_fc with type ('a, 'witness) enumeration := ('a, 'witness) t
module Make (T : sig
type t [@@deriving enumerate]
end) ... | null | https://raw.githubusercontent.com/janestreet/core_kernel/18b2a732657ecac73e075e81e1edd0ef797fcc7d/total_map/src/enumeration.ml | ocaml | open! Core
open! Import
type ('a, 'b) t = { all : 'a list }
module type S =
Enumeration_intf.S with type ('a, 'witness) enumeration := ('a, 'witness) t
module type S_fc =
Enumeration_intf.S_fc with type ('a, 'witness) enumeration := ('a, 'witness) t
module Make (T : sig
type t [@@deriving enumerate]
end) ... | |
954c9728b7d8480d81caab5c67f2d0cfffadfe3353631856df37352ab1a38d9b | mbutterick/aoc-racket | day12.rkt | #lang scribble/lp2
@(require scribble/manual aoc-racket/helper)
@aoc-title[12]
@defmodule[aoc-racket/day12]
@link[""]{The puzzle}. Our @link-rp["day12-input.txt"]{input} is, unfortunately, a @link["/"]{JSON} file.
@chunk[<day12>
<day12-setup>
<day12-q1>
<day12-q2>
<day12-test>]
@isectio... | null | https://raw.githubusercontent.com/mbutterick/aoc-racket/2c6cb2f3ad876a91a82f33ce12844f7758b969d6/day12.rkt | racket | #lang scribble/lp2
@(require scribble/manual aoc-racket/helper)
@aoc-title[12]
@defmodule[aoc-racket/day12]
@link[""]{The puzzle}. Our @link-rp["day12-input.txt"]{input} is, unfortunately, a @link["/"]{JSON} file.
@chunk[<day12>
<day12-setup>
<day12-q1>
<day12-q2>
<day12-test>]
@isectio... | |
05ab60f7c86a1bc574f1a5e8951c68ca389a043649d994a98713ffc47d9f70f0 | kmi/irs | load.lisp | Copyright © 2008 The Open University
File created in GNU Emacs
(in-package #:ocml)
(def-ontology math-ontology
"Goals and services for simple mathematics."
:includes (http-grounding mime rfc2616 wsmo)
:type :goal
:namespace-uri "-ontology#"
:namespaces (("math" math-ontology)
... | null | https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/apps/math/ontologies/math-ontology/load.lisp | lisp | Copyright © 2008 The Open University
File created in GNU Emacs
(in-package #:ocml)
(def-ontology math-ontology
"Goals and services for simple mathematics."
:includes (http-grounding mime rfc2616 wsmo)
:type :goal
:namespace-uri "-ontology#"
:namespaces (("math" math-ontology)
... | |
10c4a9324330625460b7f4f66985a36cfa82bfad1c1763cd98300e9cf3603f5f | mfp/obigstore | obs_replication.ml |
* Copyright ( C ) 2011 < >
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation ; either
* version 2.1 of the License , or ( at your option ) any later version ,
* wi... | null | https://raw.githubusercontent.com/mfp/obigstore/1b078eeb21e11c8de986717150c7108a94778095/src/core/obs_replication.ml | ocaml | * Replication. |
* Copyright ( C ) 2011 < >
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation ; either
* version 2.1 of the License , or ( at your option ) any later version ,
* wi... |
7cbb8f73eadfc2d681ea60e553d1c78e013325915e857292f680298db52c3cc6 | rtoy/ansi-cl-tests | format-justify.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sun Aug 22 18:09:49 2004
;;;; Contains: Tests of the ~< ~> directive
(in-package :cl-test)
(compile-and-load "printer-aux.lsp")
(def-pprint-test format.justify.1
(format nil "~<~>")
"")
(def-pprint-test format.justify.2
(loop for i from 1 to 20
for... | null | https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/format-justify.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of the ~< ~> directive
~:; tests
Error cases
Interaction with ~W
Interaction with ~_
Interaction with ~I | Author :
Created : Sun Aug 22 18:09:49 2004
(in-package :cl-test)
(compile-and-load "printer-aux.lsp")
(def-pprint-test format.justify.1
(format nil "~<~>")
"")
(def-pprint-test format.justify.2
(loop for i from 1 to 20
for s1 = (make-string i :initial-element #\x)
for s2 = (format ... |
40c3d6c010b6e9ac1722445d40c0441a515d7f14863e1ffcd95470db39cf1794 | ivanperez-keera/dunai | Yampa.hs | -- |
Copyright : ( c ) , 2019 - 2022
( c ) and , 2016 - 2018
-- License : BSD3
Maintainer :
module FRP.Yampa (module X, SF, FutureSF) where
-- External imports
import Data.Functor.Identity
-- Internal imports
import FRP.BearRiver as X hiding (SF, andThen)
import qualified FRP.... | null | https://raw.githubusercontent.com/ivanperez-keera/dunai/845a4e0dfe8ac060ee65856f035fda2b8168e5ba/dunai-frp-bearriver/src/FRP/Yampa.hs | haskell | |
License : BSD3
External imports
Internal imports
| Signal function (conceptually, a function between signals that respects
causality).
| Future signal function (conceptually, a function between fugure signals
that respects causality).
A future signal is a signal that is only defined for positive times. | Copyright : ( c ) , 2019 - 2022
( c ) and , 2016 - 2018
Maintainer :
module FRP.Yampa (module X, SF, FutureSF) where
import Data.Functor.Identity
import FRP.BearRiver as X hiding (SF, andThen)
import qualified FRP.BearRiver as BR
type SF = BR.SF Identity
type FutureSF = B... |
e7c9fcc9530be547da963270f61ac3c86cbbb54534ce6ad544aae04728c28bea | admich/Doors | menu.lisp | (in-package :doors)
;; KLUDGE to call menu-choose with :associated-window the graft although it isn't a pane
(defmethod pane-frame ((pane doors-graft))
*wm-application*)
;;; The doors graft don't call tell-window-manager-about-space-reqiurements
(defmethod note-space-requirements-changed :around ((graft doors-graft... | null | https://raw.githubusercontent.com/admich/Doors/322cd234ee97a281832f1fbac72377bbf3341977/menu.lisp | lisp | KLUDGE to call menu-choose with :associated-window the graft although it isn't a pane
The doors graft don't call tell-window-manager-about-space-reqiurements
(menu-choose (managed-frames) :associated-window (graft *wm-application*))
| (in-package :doors)
(defmethod pane-frame ((pane doors-graft))
*wm-application*)
(defmethod note-space-requirements-changed :around ((graft doors-graft) pane)
(declare (ignore graft))
nil)
|
096a76fdfbeedb4d424ffc0833ee39733475105655aa7804fe0004b5c65c0232 | ekmett/dense | Vector.hs | # language RankNTypes #
{-# language TypeFamilies #-}
# language PatternSynonyms #
# language ViewPatterns #
module Dense.Vector where
import Control.Lens
import qualified Linear.V2 as Linear
import qualified Linear.V3 as Linear
type family Elem (t :: *) :: *
class IsV2 t where
_V2 :: Iso' t (Linear.V2 (Elem t))
... | null | https://raw.githubusercontent.com/ekmett/dense/c1ae5d937a1cd64c55310c253eb1745597a9bb9a/lib/dense-common/Dense/Vector.hs | haskell | # language TypeFamilies #
{-# complete V2 #-} -- let me write this damn it.
and i can't supply it on the data type, because it doesn't involve a constructor for the damn type
{-# complete #-} pragmas are completely worthless
{-# complete V3 #-} | # language RankNTypes #
# language PatternSynonyms #
# language ViewPatterns #
module Dense.Vector where
import Control.Lens
import qualified Linear.V2 as Linear
import qualified Linear.V3 as Linear
type family Elem (t :: *) :: *
class IsV2 t where
_V2 :: Iso' t (Linear.V2 (Elem t))
pattern V2 :: IsV2 t => Elem t... |
f774fdd7da66026e1135cfd803d0633e6f627219f99746432c0191fa551f2e42 | jean-lopes/dfm-to-json | Main.hs | # LANGUAGE CPP #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
module Main where
import qualified AST
import Control.Monad
import Control.Monad.Except
import Data.Aeson
import Data.Aeson.Encode.Pretty
import qualified Data.ByteString.Lazy ... | null | https://raw.githubusercontent.com/jean-lopes/dfm-to-json/8c2e51f3e43267c948d307659db9745129578a96/app/Main.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE CPP #
# LANGUAGE TemplateHaskell #
module Main where
import qualified AST
import Control.Monad
import Control.Monad.Except
import Data.Aeson
import Data.Aeson.Encode.Pretty
import qualified Data.ByteString.Lazy as ByteString
import D... |
e5a42857d8451ca1b0c6271bb2b24b614832342e09d74a55cbd819e69d960a02 | erlang-ls/erlang_ls | rename_usage1.erl | -module(rename_usage1).
-include("rename.hrl").
-behaviour(rename).
-export([rename_me/1]).
-spec rename_me(any()) -> any().
rename_me(x) ->
ok;
rename_me(_) ->
any.
rename_me_macro() ->
{?RENAME_ME, ?RENAME_ME}.
rename_me_parametrized_macro() ->
{?RENAME_ME_PARAMETRIZED(1), ?RENAME_ME_PARAMETRIZED(2)}.
... | null | https://raw.githubusercontent.com/erlang-ls/erlang_ls/b4e2fd4fa5993d608ff547f1798c69ac2ae1c3cd/apps/els_lsp/priv/code_navigation/src/rename_usage1.erl | erlang | field access
record create
record update | -module(rename_usage1).
-include("rename.hrl").
-behaviour(rename).
-export([rename_me/1]).
-spec rename_me(any()) -> any().
rename_me(x) ->
ok;
rename_me(_) ->
any.
rename_me_macro() ->
{?RENAME_ME, ?RENAME_ME}.
rename_me_parametrized_macro() ->
{?RENAME_ME_PARAMETRIZED(1), ?RENAME_ME_PARAMETRIZED(2)}.
... |
5e65204b4f1b577882b891d509e04d4f593054211850e1815c46de4c3a6e08a2 | ocramz/taco-hs | Compiler.hs | # language GADTs #
{-# language PackageImports #-}
module Data.Tensor.Compiler
-- (
-- -- contract
-- -- -- * Tensor types
-- -- , Tensor(..), Sh(..), Dd(..), Sd(..)
-- -- * Syntax
Phoas , eval , var , let _ , let2 _
-- -- -- * Exceptions
-- , ( .. )
-- )
where
import Data . Typeable
... | null | https://raw.githubusercontent.com/ocramz/taco-hs/19d208e2ddc628835a816568cd32029fb0b85048/src/Data/Tensor/Compiler.hs | haskell | # language PackageImports #
(
-- contract
-- -- * Tensor types
-- , Tensor(..), Sh(..), Dd(..), Sd(..)
-- * Syntax
-- -- * Exceptions
, ( .. )
)
( Phoas ( .. ) , let _ , let2 _ , var , , lift2 , eval )
IN: Tensor reduction syntax (Einstein notation)
OUT: stride program (how to read/write memory)
t... | # language GADTs #
module Data.Tensor.Compiler
Phoas , eval , var , let _ , let2 _
where
import Data . Typeable
import " exceptions " Control . . Catch ( MonadThrow ( .. ) , throwM , MonadCatch ( .. ) , catch )
import Control.Exception (Exception(..))
import Control . Applicative ( liftA2 , ( < | > ) )
... |
643e5d9b8a3b5575706ea54f06a508aa8e1d1973ac13f9a5073290cf113e3599 | erlang/otp | io.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1996 - 2023 . 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
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/erlang/otp/2b397d7e5580480dc32fa9751db95f4b89ff029e/lib/stdlib/src/io.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 1996 - 2023 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(io).
-export([put_chars/1,put_chars/2,nl/0,nl/1,
get_chars/2,get_chars/3,get_line/1,get_line/2,
get_pass... |
3201420a1653cc0a31c54da61edbc64f7cd5c5dbbc2e039ed2415ff66ee29f9f | vabal/vabal | Glob.hs | --TODO: [code cleanup] plausibly much of this module should be merged with
similar functionality in Cabal .
module Glob
( FilePathGlob(..)
, FilePathRoot(..)
, FilePathGlobRel(..)
, Glob
, GlobPiece(..)
, matchFileGlob
, matchFileGlobRel
, matchGlob
, isTrivialFilePathGlob
, ge... | null | https://raw.githubusercontent.com/vabal/vabal/89bc2ea1cd09e2bf6c6666de1d15f98f840e88fd/vabal/src/Glob.hs | haskell | TODO: [code cleanup] plausibly much of this module should be merged with
| A file path specified by globbing
| A single directory or file component of a globbed path
| A piece of a globbing pattern
^ e.g. @"/"@, @"c:\"@ or result of 'takeDrive'
| Check if a 'FilePathGlob' doesn't actually make use of any globbing... | similar functionality in Cabal .
module Glob
( FilePathGlob(..)
, FilePathRoot(..)
, FilePathGlobRel(..)
, Glob
, GlobPiece(..)
, matchFileGlob
, matchFileGlobRel
, matchGlob
, isTrivialFilePathGlob
, getFilePathRootDirectory
, parseFilePathGlob
, parseFilePathGlobRel
... |
9590d3f3a1a799e5cb153dbc860f0c108fdf1888bd20bce5c42b4b0db3afcf17 | exoscale/clojure-kubernetes-client | v1_attached_volume.clj | (ns clojure-kubernetes-client.specs.v1-attached-volume
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
)
(:import (java.io File)))
(declare v1-attached-volume-data v1-attached-volume)
(def v1-attached-volume-data
{
(ds/req :devicePath) string?
(ds/req :name) stri... | null | https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/v1_attached_volume.clj | clojure | (ns clojure-kubernetes-client.specs.v1-attached-volume
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
)
(:import (java.io File)))
(declare v1-attached-volume-data v1-attached-volume)
(def v1-attached-volume-data
{
(ds/req :devicePath) string?
(ds/req :name) stri... | |
04a5109040d5640610c673a0cf6325c70c97702668d7047e4dba9c6e39151a96 | MaskRay/OJHaskell | E.hs | # LANGUAGE FlexibleContexts , ScopedTypeVariables #
import Control.Monad
import Data.Array.IArray
import Data.Foldable
import Data.Functor
import Data.List hiding (foldl')
import Data.Maybe
import qualified Data.Set as S
import qualified Data.ByteString.Char8 as B
int = fst . fromJust . B.readInt
ints = map int . B.wo... | null | https://raw.githubusercontent.com/MaskRay/OJHaskell/ba24050b2480619f10daa7d37fca558182ba006c/Codeforces/653/E.hs | haskell | # LANGUAGE FlexibleContexts , ScopedTypeVariables #
import Control.Monad
import Data.Array.IArray
import Data.Foldable
import Data.Functor
import Data.List hiding (foldl')
import Data.Maybe
import qualified Data.Set as S
import qualified Data.ByteString.Char8 as B
int = fst . fromJust . B.readInt
ints = map int . B.wo... | |
e3729dae86b641915bc18638fba4a94617a55da291c59365536e25473d8fef0e | jeanparpaillon/erlang-dbus | dbus_hex.erl | 2014
@author < >
%% @doc
%%
%% @end
-module(dbus_hex).
%%--------------------------------------------------------------------
%% External exports
%%--------------------------------------------------------------------
-export([encode/1,
decode/1]).
%%========================================================... | null | https://raw.githubusercontent.com/jeanparpaillon/erlang-dbus/80640bf735badca4a18753f47abbc0072b546c29/src/dbus_hex.erl | erlang | @doc
@end
--------------------------------------------------------------------
External exports
--------------------------------------------------------------------
====================================================================
External functions
==============================================================... | 2014
@author < >
-module(dbus_hex).
-export([encode/1,
decode/1]).
-spec encode(binary()) -> binary().
encode(Bin) ->
encode(Bin, <<>>).
-spec decode(binary()) -> binary().
decode(Bin) ->
decode(Bin, <<>>).
decode(<<>>, Acc) ->
Acc;
decode(<< $\s, _/binary >>, Acc) ->
Acc;
decode(<<... |
86ef228cc345788e2143b48e295b0f395b73191776c08097d5ccfac00c27ff5c | alanb2718/wallingford | integral-numeric-tests.rkt | #lang s-exp rosette
;; unit tests for integral using a numeric solution
These are like integral - symbolic - tests , except for the first one ( integral - in - always ) , which has some additional time advances
;; to exercise that part of the code.
(require rackunit rackunit/text-ui rosette/lib/roseunit)
(require ".... | null | https://raw.githubusercontent.com/alanb2718/wallingford/9dd436c29f737d210c5b87dc1b86b2924c0c5970/tests/integral-numeric-tests.rkt | racket | unit tests for integral using a numeric solution
to exercise that part of the code.
helper function to test for approximate equality (pretty coarse for integration tests)
outside of while at this time, so x should have its initial value
still outside of while
still outside of while
while should now be active (bu... | #lang s-exp rosette
These are like integral - symbolic - tests , except for the first one ( integral - in - always ) , which has some additional time advances
(require rackunit rackunit/text-ui rosette/lib/roseunit)
(require "../core/wallingford.rkt")
(require "../applications/geothings.rkt")
(require "../reactive/r... |
77f4f39eeb0b05c00f6af06349735e8e414db456238cdc478a3e8d9f084a1bb8 | pirapira/coq2rust | sos.ml | (* ========================================================================= *)
- This code originates from HOL LIGHT 2.30
( see file LICENSE.sos for license , copyright and disclaimer )
- ( ) has isolated the HOL
(* independent bits ... | null | https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/plugins/micromega/sos.ml | ocaml | =========================================================================
independent bits
=========================================================================
=========================================================================
===============... | - This code originates from HOL LIGHT 2.30
( see file LICENSE.sos for license , copyright and disclaimer )
- ( ) has isolated the HOL
- ( ) is using it to feed micromega
Nonlinear universal reals procedure using SOS decomposition .
o... |
807b17b87c67a8510fc69b17c0eda3e9de87229b16b7056ab9432b3840ee35dc | discus-lang/salt | Type.hs |
module Salt.Core.Eval.Type where
import Salt.Core.Eval.Error
import Salt.Core.Eval.Base
import Control.Exception
import Control.Monad
---------------------------------------------------------------------------------------------------
-- | Evaluate a type in the given environment.
--
evalType :: EvalType a (Type a) (... | null | https://raw.githubusercontent.com/discus-lang/salt/33c14414ac7e238fdbd8161971b8b8ac67fff569/src/salt/Salt/Core/Eval/Type.hs | haskell | -------------------------------------------------------------------------------------------------
| Evaluate a type in the given environment.
(evt-ann) ----------------------------------------------
(evt-ref) ----------------------------------------------
(evt-var) ----------------------------------------------
T... |
module Salt.Core.Eval.Type where
import Salt.Core.Eval.Error
import Salt.Core.Eval.Base
import Control.Exception
import Control.Monad
evalType :: EvalType a (Type a) (Type a)
evalType s _a env (TAnn a' t)
= evalType s a' env t
evalType _s _a _env tt@TRef{}
= return tt
evalType s a env (TVar u)
= resolveTypeBou... |
22ac14274fe8ff5d597dc1172c281d889577ecdf16e19a835843416d681ff7cb | rurban/clisp | ctak.lisp | CTAK -- A version of the TAKeuchi function
;;; that uses the CATCH/THROW facility.
(defun ctak (x y z)
(catch 'ctak (ctak-aux x y z)))
(defun ctak-aux (x y z)
(declare (fixnum x y z))
(cond ((not (< y x))
(throw 'ctak z))
(t (ctak-aux
(catch 'ctak
(ctak-aux... | null | https://raw.githubusercontent.com/rurban/clisp/75ed2995ff8f5364bcc18727cde9438cca4e7c2c/benchmarks/ctak.lisp | lisp | that uses the CATCH/THROW facility. | CTAK -- A version of the TAKeuchi function
(defun ctak (x y z)
(catch 'ctak (ctak-aux x y z)))
(defun ctak-aux (x y z)
(declare (fixnum x y z))
(cond ((not (< y x))
(throw 'ctak z))
(t (ctak-aux
(catch 'ctak
(ctak-aux (the fixnum (1- x))
y
... |
7a0eafb2ad6177858ddc46e78a7d9a157a0037cf769263ff532fbc11347df7e3 | alexbs01/OCaml | queens.mli |
val all_queens : int -> int list list
" all_queens_sol n " da ( para cada n > = 0 ) una lista con todas las posibles soluciones
al problema de las n reinas de ajedrez en .
solución lista con n enteros ( de 1 a n ) que indica la columna que
ocuparía la dama de cada fila ( ordenadas de la fila 1 a ... | null | https://raw.githubusercontent.com/alexbs01/OCaml/b5f6b2dac761cf3eb99ba55dfe7de85f7e3c4f48/queens/queens.mli | ocaml |
val all_queens : int -> int list list
" all_queens_sol n " da ( para cada n > = 0 ) una lista con todas las posibles soluciones
al problema de las n reinas de ajedrez en .
solución lista con n enteros ( de 1 a n ) que indica la columna que
ocuparía la dama de cada fila ( ordenadas de la fila 1 a ... | |
d2315238337afb29fb7df56544c5fdd50972a1697de0af57fe711e35ce89c6c8 | namachan10777/folivora | key_unit.ml | module M = Scad_ml.Model
open Scad_ml.Util
let keycap_chery_r2 =
( (17.7, 17.9, 4.0)
, M.hull
[ M.cube (11.5, 0.1, 0.1) |>> ((17.7 -. 11.5) /. 2., 17.3, 6.8)
; M.cube (11.5, 0.1, 0.1) |>> ((17.7 -. 11.5) /. 2., 3.3, 7.3)
; M.cube (17.7, 17.9, 0.1) ] )
let keycap_chery_r3 =
( (17.7,... | null | https://raw.githubusercontent.com/namachan10777/folivora/f752c45f1a4ca1485ebd5488ffef29c704ca06e5/model/lib/key_unit.ml | ocaml | module M = Scad_ml.Model
open Scad_ml.Util
let keycap_chery_r2 =
( (17.7, 17.9, 4.0)
, M.hull
[ M.cube (11.5, 0.1, 0.1) |>> ((17.7 -. 11.5) /. 2., 17.3, 6.8)
; M.cube (11.5, 0.1, 0.1) |>> ((17.7 -. 11.5) /. 2., 3.3, 7.3)
; M.cube (17.7, 17.9, 0.1) ] )
let keycap_chery_r3 =
( (17.7,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.