_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 |
|---|---|---|---|---|---|---|---|---|
6e2143037bc3c50b3b6e0892cd212af0fd7e5919cfd0a588733b507f3de0d038 | fortytools/holumbus | Master.hs | -- ----------------------------------------------------------------------------
|
Module :
Copyright : Copyright ( C ) 2008
License : MIT
Maintainer : ( )
Stability : experimental
Portability : portable
Version : 0.1
Module :
Copyright : Copyright (C) 2... | null | https://raw.githubusercontent.com/fortytools/holumbus/4b2f7b832feab2715a4d48be0b07dca018eaa8e8/mapreduce/Programs/MapReduceMaster/Master.hs | haskell | ----------------------------------------------------------------------------
----------------------------------------------------------------------------
---------------------------------------------------------------------------- | |
Module :
Copyright : Copyright ( C ) 2008
License : MIT
Maintainer : ( )
Stability : experimental
Portability : portable
Version : 0.1
Module :
Copyright : Copyright (C) 2008 Stefan Schmidt
License : MIT
Maintainer : Stefan Schmidt ()
Stabil... |
893e81dda4aabc60dc79448e4372ec069fdebd9b81f0c5b77a518afb02932b09 | nh2/network-house | TCP_Client.hs | # LANGUAGE FlexibleContexts #
module Net.TCP_Client(
initialize,Active(..),tx,rx,Passive(..),Interface(..),Peer,Port(..)
) where
Transmission Control Protocol
-- See
import Net.Concurrent
import Control.Monad.State
import Control.Monad.Trans(lift)
import Data.Map (Map)
import qualified Data.Map as Ma... | null | https://raw.githubusercontent.com/nh2/network-house/f31b6af230069f21928aae2b7242eb2c53e4d678/Net/TCP_Client.hs | haskell | See
------------------------------------------------------------------------------
from connection handling thread
_ = iface::TCPIPLink
check that port is not already listening
debug $ "Forwarding "++show c
Half-open connection detected
duplicates, slow?
find an unused port
packets from client to connection
p... | # LANGUAGE FlexibleContexts #
module Net.TCP_Client(
initialize,Active(..),tx,rx,Passive(..),Interface(..),Peer,Port(..)
) where
Transmission Control Protocol
import Net.Concurrent
import Control.Monad.State
import Control.Monad.Trans(lift)
import Data.Map (Map)
import qualified Data.Map as Map
import... |
e1fbc78fcf2efcb6030b8046a734fffa967948c5678a10d02180da64db7b1116 | s-expressionists/Eclector | methods.lisp | (cl:in-package #:eclector.readtable.simple.test)
(in-suite :eclector.readtable.simple)
(test readtablep.smoke
"Smoke test for the method on the READTABLEP protocol function."
(is-false (eclector.readtable:readtablep 1))
(is-true (eclector.readtable:readtablep
(make-instance 'eclector.readtable.simpl... | null | https://raw.githubusercontent.com/s-expressionists/Eclector/acd141db4efdbd88d57a8fe4f258ffc18cc47baa/test/readtable/simple/methods.lisp | lisp | (cl:in-package #:eclector.readtable.simple.test)
(in-suite :eclector.readtable.simple)
(test readtablep.smoke
"Smoke test for the method on the READTABLEP protocol function."
(is-false (eclector.readtable:readtablep 1))
(is-true (eclector.readtable:readtablep
(make-instance 'eclector.readtable.simpl... | |
69bc68bb582743db8accdd4499fdb6be642107ccb40458ccb3973fdcffe7072e | scrintal/heroicons-reagent | currency_dollar.cljs | (ns com.scrintal.heroicons.mini.currency-dollar)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 20 20"
:fill "currentColor"
:aria-hidden "true"}
[:path {:d "M10.75 10.818v2.614A3.13 3.13 0 0011.888 13c.482-.315.612-.648.612-.875 0-.227-.13-.56-.612-.875a3.13 3.13 0 00-1... | null | https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/mini/currency_dollar.cljs | clojure | (ns com.scrintal.heroicons.mini.currency-dollar)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 20 20"
:fill "currentColor"
:aria-hidden "true"}
[:path {:d "M10.75 10.818v2.614A3.13 3.13 0 0011.888 13c.482-.315.612-.648.612-.875 0-.227-.13-.56-.612-.875a3.13 3.13 0 00-1... | |
36f65e6ec8a92590b5f0f2b6362a9cc1f0a2712d381829b1c89a7f5f31887b92 | hverr/lxdfile | Version.hs | module Language.LXDFile.Version (
version
) where
import Paths_lxdfile (version)
| null | https://raw.githubusercontent.com/hverr/lxdfile/16c371b3ab3aff2ebc4bb1fc7f6a7c45f0b91b01/src/Language/LXDFile/Version.hs | haskell | module Language.LXDFile.Version (
version
) where
import Paths_lxdfile (version)
| |
ab7564a002e3b5f60869a37b229e6ac5d8b3deab2946ac92e9ef6cbecfdb00a4 | plumatic/fnhouse | ring.clj | (ns guesthouse.ring
"A standard set of commonly used ring middleware"
(:use plumbing.core)
(:require
[clojure.string :as str]
[ring.middleware.json :as json]
[ring.middleware.params :as params]))
(defn wrap-exception [f]
(fn [request]
(try (f request)
(catch Exception e
(.print... | null | https://raw.githubusercontent.com/plumatic/fnhouse/e27ec5649a91470b63285ef9e28c6a77494f7ffd/examples/guesthouse/src/guesthouse/ring.clj | clojure | (ns guesthouse.ring
"A standard set of commonly used ring middleware"
(:use plumbing.core)
(:require
[clojure.string :as str]
[ring.middleware.json :as json]
[ring.middleware.params :as params]))
(defn wrap-exception [f]
(fn [request]
(try (f request)
(catch Exception e
(.print... | |
9e81137f181be4c8de59710372383a540d3b33171a8b2f8f2acb10a0df5a05cb | Chris00/ocaml-moss | moss.mli | File : moss.mli
Copyright ( C ) 2017-
< >
WWW : /
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 .
TH... | null | https://raw.githubusercontent.com/Chris00/ocaml-moss/c5aea65fde4724bef8a6a9ec04b0034368bb3ba8/src/moss.mli | ocaml | * Source language of programs being tested.
* [set_userid id] the the default user ID. Use the one that was
sent to you when you {{:/~aiken/moss/}asked
for an account}. The default userid is set from the environment
variable MOSS_USERID or else is ["0"].
* Return the default userid.
* Representation of "f... | File : moss.mli
Copyright ( C ) 2017-
< >
WWW : /
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 .
TH... |
4364f14464fb45ac76f681654f289a05043a6ff4dab4bd031bb42c6a0f2fab52 | yaru22/problem-solving | problem67.hs | {- Find the maximum total from top to bottom of the triangle below. -}
import Data.Array
tri =
[[59],
[73, 41],
[52, 40, 09],
[26, 53, 06, 34],
[10, 51, 87, 86, 81],
[61, 95, 66, 57, 25, 68],
[90, 81, 80, 38, 92, 67, 73],
[30, 28, 51, 76, 81, 18, 75, 44],
[84, 14, 95, 87, ... | null | https://raw.githubusercontent.com/yaru22/problem-solving/33cd299d6d3dd1de2378f8a42e99a8a17b4a3c5d/project-euler/problem67.hs | haskell | Find the maximum total from top to bottom of the triangle below.
Another solution from the forum; is it guaranteed to work? |
import Data.Array
tri =
[[59],
[73, 41],
[52, 40, 09],
[26, 53, 06, 34],
[10, 51, 87, 86, 81],
[61, 95, 66, 57, 25, 68],
[90, 81, 80, 38, 92, 67, 73],
[30, 28, 51, 76, 81, 18, 75, 44],
[84, 14, 95, 87, 62, 81, 17, 78, 58],
[21, 46, 71, 58, 02, 79, 62, 39, 31, 09],
... |
c3f94b4310e6a41ddaf153ad4289e5262a41ad6cffc795be2776567d798f8a50 | clojure-interop/aws-api | AbstractAmazonRekognition.clj | (ns com.amazonaws.services.rekognition.AbstractAmazonRekognition
"Abstract implementation of AmazonRekognition. Convenient method forms pass through to the corresponding
overload that takes a request object, which throws an UnsupportedOperationException."
(:refer-clojure :only [require comment defn ->])
(:impor... | null | https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.rekognition/src/com/amazonaws/services/rekognition/AbstractAmazonRekognition.clj | clojure | (ns com.amazonaws.services.rekognition.AbstractAmazonRekognition
"Abstract implementation of AmazonRekognition. Convenient method forms pass through to the corresponding
overload that takes a request object, which throws an UnsupportedOperationException."
(:refer-clojure :only [require comment defn ->])
(:impor... | |
d80078f35515477a31a7d4f67908143c88f4cf202da0ccda808c6efdc0c43808 | wavewave/hoodle | Conduit.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE FlexibleInstances #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE NoMonomorphismRestriction #
# OPTIONS_GHC -fno - warn - deprecations -fno - warn - incomplete - uni - patterns #
module Text.Xournal.Parse.Conduit where
import Control.Applicative ()
import Control.Categor... | null | https://raw.githubusercontent.com/wavewave/hoodle/0d94530020e3e9641a652edade77cd0eb8d9a1a4/xournal-parser/src/Text/Xournal/Parse/Conduit.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE OverloadedStrings #
hiding (many)
* utils
|
|
|
|
|
|
|
|
* parsers
| parse whole xournal file
|
|
|
|
* for each event
|
|
(str { stroke_tool = encodeUtf8 txt})
|
|
|
|
| get Content
* predicates
|
| check start of element with name txt
| check... | # LANGUAGE FlexibleInstances #
# LANGUAGE NoMonomorphismRestriction #
# OPTIONS_GHC -fno - warn - deprecations -fno - warn - incomplete - uni - patterns #
module Text.Xournal.Parse.Conduit where
import Control.Applicative ()
import Control.Category (id, (.))
import Control.Monad ((>=>))
import Control.Monad.Catch (Mo... |
d09231c8197fb5ff11f574a7ad80735e842bed77c8b1f538029721c427b287a2 | creswick/cabal-dev | Command.hs | # LANGUAGE ExistentialQuantification #
module Distribution.Dev.Command
( CommandActions(..)
, CommandResult(..)
)
where
import System.Console.GetOpt ( OptDescr(..) )
import Distribution.Dev.Flags ( Config )
data CommandResult = CommandError String | CommandOk
data CommandActions
= forall a . Command... | null | https://raw.githubusercontent.com/creswick/cabal-dev/bb1fb44a00cf053ea142617a31b5e2f2c189866b/src/Distribution/Dev/Command.hs | haskell | # LANGUAGE ExistentialQuantification #
module Distribution.Dev.Command
( CommandActions(..)
, CommandResult(..)
)
where
import System.Console.GetOpt ( OptDescr(..) )
import Distribution.Dev.Flags ( Config )
data CommandResult = CommandError String | CommandOk
data CommandActions
= forall a . Command... | |
96610efc4910418530bee98ccf984686ac4c137b9c690f85e7f1e4bb03faf8f6 | aggieben/weblocks | html-utils.lisp |
(in-package :weblocks)
(export '(*submit-control-name* *cancel-control-name* with-html-form
render-link render-button render-form-and-button
render-checkbox render-dropdown render-autodropdown
*dropdown-welcome-message* render-radio-buttons
render-close-button render-password render-textarea
render-lis... | null | https://raw.githubusercontent.com/aggieben/weblocks/8d86be6a4fff8dde0b94181ba60d0dca2cbd9e25/src/snippets/html-utils.lisp | lisp | render password implementation |
(in-package :weblocks)
(export '(*submit-control-name* *cancel-control-name* with-html-form
render-link render-button render-form-and-button
render-checkbox render-dropdown render-autodropdown
*dropdown-welcome-message* render-radio-buttons
render-close-button render-password render-textarea
render-lis... |
e45a542933dff8d479cd03876fb9a586918cff10473bc131e4ac7455636269bf | degree9/enterprise | quotes.cljs | (ns degree9.hubspot.quotes
(:require [degree9.hubspot.core :as hubspot]))
| null | https://raw.githubusercontent.com/degree9/enterprise/36e4f242c18b1dde54d5a15c668b17dc800c01ff/src/degree9/hubspot/quotes.cljs | clojure | (ns degree9.hubspot.quotes
(:require [degree9.hubspot.core :as hubspot]))
| |
4e91626d3eccda9eeb346b7c04e157d91cb5e1dc93bf29d9b5582d21e8dd361d | GaloisInc/lumberjack | Lumberjack.hs | # LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FunctionalDependencies #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PolyKinds #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE RecordWildCards #
# LANGUAGE Scop... | null | https://raw.githubusercontent.com/GaloisInc/lumberjack/d0cf695272f9d9064014afb14765e9d4339b0589/src/Lumberjack.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
-----------------------------------------
|
Module : Lumberjack
Maintainer :
Stability : experimental
Portability : POSIX
This module defines a general logging facility that can be used to
output log messages to various... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FunctionalDependencies #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# OPTIONS_GHC -fno - warn - orphans #
Copyrig... |
e353ee5e04f884887764613c249879cfb7d115725fa846dae605a0ee36f24468 | lhope/cl-bayesnet | bn.lisp | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; bn - Bayesian Network classes, evidence and querying APIs.
;;
Copyright ( c ) 2007 - 2013 , < > .
Copyright other contributors as noted in the file .
;;
;; This file is part of cl-bayesnet - a Common Lisp Bayesian Network
Inference En... | null | https://raw.githubusercontent.com/lhope/cl-bayesnet/3834f6ec27a297054e9b2f67220161682d63109d/src/bn.lisp | lisp |
bn - Bayesian Network classes, evidence and querying APIs.
This file is part of cl-bayesnet - a Common Lisp Bayesian Network
This file is licensed under the terms of the LLGPL.
This library is free software; you can redistribute it and/or modify
This library is distributed in the hope that it will be useful,... | Copyright ( c ) 2007 - 2013 , < > .
Copyright other contributors as noted in the file .
Inference Engine .
it under the terms of the Lisp Lesser General Public License version
3 , which consists of the GNU Lesser General Public License , either
version 3 or ( at your option ) any later version , as publ... |
7e3087b0c5b677544f2dd107ed56bba9cdcb3aecc8549972a4174917f2dd9863 | eugeneia/athens | package.lisp | (defpackage :postmodern
(:use #-postmodern-use-mop :common-lisp
#+postmodern-use-mop :closer-common-lisp
:s-sql :cl-postgres)
(:nicknames :pomo)
#+postmodern-use-mop
(:export
#:dao-class #:dao-exists-p #:dao-keys #:query-dao #:select-dao #:get-dao #:do-query-dao #:do-select-dao
#:with-col... | null | https://raw.githubusercontent.com/eugeneia/athens/cc9d456edd3891b764b0fbf0202a3e2f58865cbf/quicklisp/dists/quicklisp/software/postmodern-20180711-git/postmodern/package.lisp | lisp | Reduced S-SQL interface
Condition type from cl-postgres | (defpackage :postmodern
(:use #-postmodern-use-mop :common-lisp
#+postmodern-use-mop :closer-common-lisp
:s-sql :cl-postgres)
(:nicknames :pomo)
#+postmodern-use-mop
(:export
#:dao-class #:dao-exists-p #:dao-keys #:query-dao #:select-dao #:get-dao #:do-query-dao #:do-select-dao
#:with-col... |
bed8ed5c2322a0613b07ce35407ab8f1f103d458cd2fb8410d2b89ae5469040d | kongeor/evolduo-app | evolution.clj | (ns evolduo-app.views.evolution
(:require [evolduo-app.views.common :refer [base-view]]
[evolduo-app.views.components :as comps]
[ring.middleware.anti-forgery :as anti-forgery]
[evolduo-app.urls :as u]
[evolduo-app.schemas :as s]
[clojure.contrib.humanize :a... | null | https://raw.githubusercontent.com/kongeor/evolduo-app/e97e389e3ce7edf06a4e6fc0ad4de8a273ef229f/src/evolduo_app/views/evolution.clj | clojure | TODO!! disable rating past tracks | (ns evolduo-app.views.evolution
(:require [evolduo-app.views.common :refer [base-view]]
[evolduo-app.views.components :as comps]
[ring.middleware.anti-forgery :as anti-forgery]
[evolduo-app.urls :as u]
[evolduo-app.schemas :as s]
[clojure.contrib.humanize :a... |
a1187f157c646032dee7d0c22e51ff064faa31f3f14ba41acb9aefc5087ecd27 | aantron/luv | FS_event.ml | This file is part of Luv , released under the MIT license . See LICENSE.md for
details , or visit .
details, or visit . *)
open Test_helpers
let filename = "fs_event"
let with_fs_event f =
if Sys.file_exists filename then
Sys.remove filename;
let event = Luv.FS_event.init () |> check_success_re... | null | https://raw.githubusercontent.com/aantron/luv/4b49d3edad2179c76d685500edf1b44f61ec4be8/test/FS_event.ml | ocaml | This file is part of Luv , released under the MIT license . See LICENSE.md for
details , or visit .
details, or visit . *)
open Test_helpers
let filename = "fs_event"
let with_fs_event f =
if Sys.file_exists filename then
Sys.remove filename;
let event = Luv.FS_event.init () |> check_success_re... | |
b6785d5cdf6bd099218c2afa863bb35bf79eb1fe214d71729b85e5523fcf85ab | russmatney/org-crud | parse_test.clj | (ns org-crud.parse-test
(:require
[clojure.test :refer [deftest is testing]]
[org-crud.parse :as sut]
[org-crud.schema :as schema]
org-crud.test-util))
(defn prop-bucket [test-data]
(->>
[":PROPERTIES:"
(when-let [id (:id test-data)]
(str ":ID: " id))
":END:"]
(remove nil... | null | https://raw.githubusercontent.com/russmatney/org-crud/3204a84f7d5a7cd625e10faf72f45babf5a0fe6d/test/org_crud/parse_test.clj | clojure |
basic
todos
links-to
tags
flattned->nested
| (ns org-crud.parse-test
(:require
[clojure.test :refer [deftest is testing]]
[org-crud.parse :as sut]
[org-crud.schema :as schema]
org-crud.test-util))
(defn prop-bucket [test-data]
(->>
[":PROPERTIES:"
(when-let [id (:id test-data)]
(str ":ID: " id))
":END:"]
(remove nil... |
b41f4b5214ddc779af8acbddd7971704ed286b2c35488d7e7adf4eb34a053c2e | developandplay/material-components-web-miso | List.hs | # LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
module Material.List
( Config,
config,
setNonInteractive,
setDense,
setAvatarList,
setTwoLine,
setAttributes,
setWrapFocus,
list,
group,
subheader,
)
where
import Data.Aeson.Types
im... | null | https://raw.githubusercontent.com/developandplay/material-components-web-miso/97a20097bf522b62743c884b66757eb895edd690/sample-app-jsaddle/Material/List.hs | haskell | # LANGUAGE OverloadedStrings #
| Configuration of a list
| Default configuration of a list
| Specify whether a list should be non-interactive
Non-interactive lists do not feature keyboard interaction and list items have
no visual interaction effect.
| Specify whether a list should be _dense_
Dense lists are mo... | # LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
module Material.List
( Config,
config,
setNonInteractive,
setDense,
setAvatarList,
setTwoLine,
setAttributes,
setWrapFocus,
list,
group,
subheader,
)
where
import Data.Aeson.Types
import qualified Data.Function
import... |
47e65ea39650feefbe6759320b3d18e1b49628b57231e5ae8359cc5e1f6307c9 | coingaming/lnd-client | Kind.hs | module LndClient.Data.Kind
( TxKind (..),
)
where
import LndClient.Import.External
data TxKind
= Funding
| Closing
deriving stock (Eq, Show)
| null | https://raw.githubusercontent.com/coingaming/lnd-client/98974c514cd82253dbd6111bafbbb2bbff6bffe2/src/LndClient/Data/Kind.hs | haskell | module LndClient.Data.Kind
( TxKind (..),
)
where
import LndClient.Import.External
data TxKind
= Funding
| Closing
deriving stock (Eq, Show)
| |
e212c5c34c2f002de9aaaeb2e580856c2dccb97d218ddc9d9ef3c3bafd252efc | csabahruska/jhc-components | Unlit.hs | module FrontEnd.Unlit(unlit) where
-- Part of the following code is from
" Report on the Programming Language Haskell " ,
version 1.2 , appendix C.
import Char
data Classified = Program String | Blank | Comment
| Include Int String | Pre String
classify :: [String] -> [Classified]
classify [] ... | null | https://raw.githubusercontent.com/csabahruska/jhc-components/a7dace481d017f5a83fbfc062bdd2d099133adf1/jhc-frontend/src/FrontEnd/Unlit.hs | haskell | Part of the following code is from
Should give an error message,
but I have no good position information.
| Remove literate comments leaving normal haskell source.
^ Filename for error messages
^ literate source
^ deliterated source
force evaluation of line number
Re-implementation of 'lines', for better effic... | module FrontEnd.Unlit(unlit) where
" Report on the Programming Language Haskell " ,
version 1.2 , appendix C.
import Char
data Classified = Program String | Blank | Comment
| Include Int String | Pre String
classify :: [String] -> [Classified]
classify [] = []
classify (('\\':x)... |
5853804eafc6feededa570c03d0654bf5ffe052a028e11dae1e99183d860f493 | erlangonrails/devdb | transaction_v2_SUITE.erl | Copyright 2008 , 2010 fuer Informationstechnik Berlin
%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
% you may not use this file except in compliance with the License.
% You may obtain a copy of the License at
%
% -2.0
%
% Unless required by applicable law or agreed to i... | null | https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/scalaris/test/transaction_v2_SUITE.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language go... | Copyright 2008 , 2010 fuer Informationstechnik Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
Author : < >
Created : 14 Mar 2008 by < >
-module(transaction_v2_SUITE).
-author('').
-vsn('$Id:... |
0a12136f8dba0b30ba50e31ce0207ceb1efc4441d3e465f6bc86f9b621802f53 | vikram/lisplibraries | lexer.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CL - PPCRE ; Base : 10 -*-
$ Header : /usr / local / cvsrep / cl - ppcre / lexer.lisp , v 1.21 2004/09/30 09:58:42 edi Exp $
;;; The lexer's responsibility is to convert the regex string into a
;;; sequence of tokens which are in turn consumed by the parser.
;;;... | null | https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/practicals-1.0.3/libraries/cl-ppcre-1.2.3/lexer.lisp | lisp | Syntax : COMMON - LISP ; Package : CL - PPCRE ; Base : 10 -*-
The lexer's responsibility is to convert the regex string into a
sequence of tokens which are in turn consumed by the parser.
(with a little help from the parser) how many register groups it
has opened so far. (The latter is necessary for interpreting
... | $ Header : /usr / local / cvsrep / cl - ppcre / lexer.lisp , v 1.21 2004/09/30 09:58:42 edi Exp $
The lexer is aware of 's ' extended mode ' and it also ' knows '
strings like " \\10 " correctly . )
Copyright ( c ) 2002 - 2004 , Dr. . All rights reserved .
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , E... |
7e6863686e292d377dcd80d862bee4968eadebfee61587ddba666a157cfc0d78 | ghc/packages-Cabal | AnotherVal.hs | module MyForeignLib.AnotherVal where
anotherVal = 189
| null | https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-testsuite/PackageTests/ForeignLibs/src/MyForeignLib/AnotherVal.hs | haskell | module MyForeignLib.AnotherVal where
anotherVal = 189
| |
df591e59f43cb1839497377cc636e80afca86bc30a81a7412b081afc8d83b0e5 | muxspace/bunny_farm | bunny_farm.erl | Copyright 2011
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing, software
distributed under the Li... | null | https://raw.githubusercontent.com/muxspace/bunny_farm/d686b877bdceb4426fe14f8832e0dc0cef15d987/src/bunny_farm.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permis... | Copyright 2011
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(bunny_farm).
-include("bunny_farm.hrl").
-include("private_macros.hrl").
-compile([{parse_transform,lager_transform}]).
-export([open/1, open/2, cl... |
a16a23b662212b893853a51700c9bf7a9873ad027b7d6e61b2a9956ece91d639 | aeternity/aeternity | aec_chain_state.erl | %%% -*- erlang-indent-level:4; indent-tabs-mode: nil -*-
%%%-------------------------------------------------------------------
( C ) 2017 , Aeternity Anstalt
%%% @doc
ADT for keeping the state of the chain service
%%%
%%% This module is responsible for tracking the structure of the
%%% chain. The building blocks ... | null | https://raw.githubusercontent.com/aeternity/aeternity/1c819d843c44baf554d97f29dc3f86f2b530c59c/apps/aecore/src/aec_chain_state.erl | erlang | -*- erlang-indent-level:4; indent-tabs-mode: nil -*-
-------------------------------------------------------------------
@doc
This module is responsible for tracking the structure of the
chain. The building blocks of the chain is abstracted to Nodes. A
node is either a key block or a micro block.
The chain star... | ( C ) 2017 , Aeternity Anstalt
ADT for keeping the state of the chain service
Forks in the structure are labeled by fork i d. The fork i d is
local to each Aeternity node instance and can not be used to reason about
structure across peers . The fork i d is the hash of the first node
hash is the first fork ... |
1826a2e18f69bee976a76162407a1ee3137ab6768f110590ff7dc1689249bb2a | ocaml-flambda/ocaml-jst | asmpackager.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/7e5a626e4b4e12f1e9106564e1baba4d0ef6309a/asmcomp/asmpackager.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
" Package " a set of .cmx/.o files into one .cmx/.o file having the
original compilation units as ... |
17f18394b043c788a933de3bbfe31e212132af966dfedb7b9f7b481acd6190d5 | jeapostrophe/mode-lambda | sprite-index.rkt | #lang racket/base
(require (only-in ffi/unsafe
ctype-sizeof
_float)
racket/fixnum)
(define INDEX-VALUES 4)
(define (sprite-index->bytes idx->w*h*tx*ty)
(define sprite-index-count
(vector-length idx->w*h*tx*ty))
(define index-bytes-per-value (ctype-sizeof _float))
... | null | https://raw.githubusercontent.com/jeapostrophe/mode-lambda/64b5ae81f457ded7664458cd9935ce7d3ebfc449/mode-lambda/sprite-index.rkt | racket | #lang racket/base
(require (only-in ffi/unsafe
ctype-sizeof
_float)
racket/fixnum)
(define INDEX-VALUES 4)
(define (sprite-index->bytes idx->w*h*tx*ty)
(define sprite-index-count
(vector-length idx->w*h*tx*ty))
(define index-bytes-per-value (ctype-sizeof _float))
... | |
f72b5be6adb70f5c9ce4bfc5f399e7519e8d8c73a0ee4f85f3c9594f7c862c60 | well-typed-lightbulbs/ocaml-esp32 | utimes.ml | (* TEST
* hasunix
include unix
files = "utimes.txt"
** bytecode
** native
*)
We do not check setting the " last access time " because it is hard to do so on
some file systems . FAT , for example , only has a 1d resolution for this
timestamp , and even NTFS can potentially delay the update of this timestamp... | null | https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/testsuite/tests/lib-unix/common/utimes.ml | ocaml | TEST
* hasunix
include unix
files = "utimes.txt"
** bytecode
** native
|
We do not check setting the " last access time " because it is hard to do so on
some file systems . FAT , for example , only has a 1d resolution for this
timestamp , and even NTFS can potentially delay the update of this timestamp
by up to an hour .
some file systems. FAT, for example, only has a... |
409a6aa71fe5e1495ca8c228cef31a6f2f8d1f176750bbef1413239631b05e96 | Armael/papiers | source.ml | open Batteries
module PathGen = BatPathGen.OfString
type t =
| File of PathGen.t
| Other of string
(* Path manipulation **********************************************************)
(* Take [path], relative to the current working directory, and output
the absolute path *)
let full_path_in_cwd (path: PathGen.t) =
... | null | https://raw.githubusercontent.com/Armael/papiers/2cfab4759a6aee510a27d5ad4f02d210ced479a4/tools/source.ml | ocaml | Path manipulation *********************************************************
Take [path], relative to the current working directory, and output
the absolute path
Output [path] relatively to [db_base_path]
Relocate [path] to be relative to the database location [db_path]
[path] was not pointing to a file in th... | open Batteries
module PathGen = BatPathGen.OfString
type t =
| File of PathGen.t
| Other of string
let full_path_in_cwd (path: PathGen.t) =
if PathGen.is_relative path then
PathGen.(
concat
(of_string (Unix.getcwd ()))
path
)
else
path
let relative_path (db_path: PathGen.t) (p... |
cf75fdd57a2683f0e75b1dee778cdf9441757053fdc89c7b617382b5c77f50c6 | jarmuszz/dots | nonascii.lisp | (defun _nonascii/set-x-selection (str &key (selection :clipboard))
"Copies STR into SELECTION."
(set-x-selection str selection)
(message (strcon "Put `~a' into " (string selection) ".") str))
(defcommand nonascii/set-x-selection (str &key (selection :clipboard)) ((:string))
"Command wrapper arround _NONASCII/... | null | https://raw.githubusercontent.com/jarmuszz/dots/90f2378b96c021ab24c95ef11a2b89f2f3817a89/stumpwm/internal/nonascii.lisp | lisp | Root nonascii map
Minor nonascii modes
Maps for associative menus
Note the quote ─┐
v | (defun _nonascii/set-x-selection (str &key (selection :clipboard))
"Copies STR into SELECTION."
(set-x-selection str selection)
(message (strcon "Put `~a' into " (string selection) ".") str))
(defcommand nonascii/set-x-selection (str &key (selection :clipboard)) ((:string))
"Command wrapper arround _NONASCII/... |
ce2e15c30ef497ce5504d73d9078e979ccffffb163e70325aaf2be95a7e2298c | funimage/funimage | calibration.clj | (ns funimage.imp.calibration
(:import [ij.measure Calibration]))
(defn get-x-unit
"Return the units of the x-axis."
[^Calibration cal]
(.getXUnit cal))
(defn get-y-unit
"Return the units of the y-axis."
[^Calibration cal]
(.getYUnit cal))
(defn get-z-unit
"Return the units of the z-axis."
[^Calib... | null | https://raw.githubusercontent.com/funimage/funimage/397d1ed9a1c11287f8562d05c10040ce24717f04/src/funimage/imp/calibration.clj | clojure | (ns funimage.imp.calibration
(:import [ij.measure Calibration]))
(defn get-x-unit
"Return the units of the x-axis."
[^Calibration cal]
(.getXUnit cal))
(defn get-y-unit
"Return the units of the y-axis."
[^Calibration cal]
(.getYUnit cal))
(defn get-z-unit
"Return the units of the z-axis."
[^Calib... | |
9ac70dd820062cccc2b2c860252da34935c7a2a82477783018352ebd1ce018a7 | grin-compiler/ghc-grin | Lisplikefns.hs |
Haskell version of ...
! Lisp - like functions which allow easy hand translation from Lisp to Hope+
! Started by on 30th March 1988
! Changes Log
! 18 - 05 - 88 added LUT functions and regularized assoc
! 25 - 05 - 88 added and DisplayLUT
Haskell version : :
23 - 06 - 93 JSM initial versio... | null | https://raw.githubusercontent.com/grin-compiler/ghc-grin/ebc4dca2e1f5b3581d4b84726730564ce909d786/ghc-grin-benchmark/boquist-grin-bench/spectral/boyer2/Lisplikefns.hs | haskell | "(" or ")" or "Lisp Symbol"
was:Text
These functions provide more complex operations based on a Lisp-like
functionality, they do not exactly match the equivalent Lisp functions
was:Text |
Haskell version of ...
! Lisp - like functions which allow easy hand translation from Lisp to Hope+
! Started by on 30th March 1988
! Changes Log
! 18 - 05 - 88 added LUT functions and regularized assoc
! 25 - 05 - 88 added and DisplayLUT
Haskell version : :
23 - 06 - 93 JSM initial versio... |
c235f1284f37991bd48e62c27b63df08fd048d820919d87b96c120267cc71d40 | AbstractMachinesLab/caramel | names.ml | let rec run_local () =
let x = run_local in
let y = `Atom in
y
module Nested = struct
let x () = `compiler "caramel"
let w () = `version `kind_of_working
end
let rec run_nested () =
Nested.x ();
Nested.w ()
let run_nested_ambiguous () =
let x () = 1 in
Nested.x ()
| null | https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/tests/compiler/expressions.t/names.ml | ocaml | let rec run_local () =
let x = run_local in
let y = `Atom in
y
module Nested = struct
let x () = `compiler "caramel"
let w () = `version `kind_of_working
end
let rec run_nested () =
Nested.x ();
Nested.w ()
let run_nested_ambiguous () =
let x () = 1 in
Nested.x ()
| |
46fa4207c09340338c79eb705d4a83cd0fcb03bfe8ce8ef8225a27483d6d8458 | ocaml-doc/doc-ock | docOckNameEnv.ml |
* Copyright ( c ) 2014 < >
*
* Permission to use , copy , modify , and 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 AU... | null | https://raw.githubusercontent.com/ocaml-doc/doc-ock/788aabe6e3d157633890f67042d6a4d0161835a7/src/docOckNameEnv.ml | ocaml | Hack
there are no local pages.
there are no local pages. |
* Copyright ( c ) 2014 < >
*
* Permission to use , copy , modify , and 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 AU... |
936fb898ff71af2944a8a5ea8fa88078c9f7c59bb57598d15cabadfa879d3ccc | parsonsmatt/annotated-exception | UnliftIOSpec.hs | # language ScopedTypeVariables , RecordWildCards , StrictData , RankNTypes #
module Control.Exception.Annotated.UnliftIOSpec where
import Test.Hspec
import Control.Exception.Annotated.UnliftIO
import qualified Control.Exception.Safe as Safe
import Data.Annotation
import GHC.Stack
import Data.AnnotationSpec ()
impor... | null | https://raw.githubusercontent.com/parsonsmatt/annotated-exception/83623c26ef266aca6f077d269cca96cd8fafbace/test/Control/Exception/Annotated/UnliftIOSpec.hs | haskell | # language ScopedTypeVariables , RecordWildCards , StrictData , RankNTypes #
module Control.Exception.Annotated.UnliftIOSpec where
import Test.Hspec
import Control.Exception.Annotated.UnliftIO
import qualified Control.Exception.Safe as Safe
import Data.Annotation
import GHC.Stack
import Data.AnnotationSpec ()
impor... | |
fb4dbc2d1ab8798a0c10b7eeaba5b109b796943f9c1d1bb873d34b92ce0bbd52 | tweag/ormolu | recursive-do-mdo-out.hs | # LANGUAGE RecursiveDo #
baz =
mdo
bar a
a <- foo
b <-
bar
1
2
3
return (a + b)
| null | https://raw.githubusercontent.com/tweag/ormolu/34bdf62429768f24b70d0f8ba7730fc4d8ae73ba/data/examples/declaration/value/function/do/recursive-do-mdo-out.hs | haskell | # LANGUAGE RecursiveDo #
baz =
mdo
bar a
a <- foo
b <-
bar
1
2
3
return (a + b)
| |
57524335f18ced7942fce586b5a8f424f013de0f6d60fa0fa5f037c21c769ec1 | bmeurer/ocaml-arm | bigarray.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
and , INRI... | null | https://raw.githubusercontent.com/bmeurer/ocaml-arm/43f7689c76a349febe3d06ae7a4fc1d52984fd8b/otherlibs/bigarray/bigarray.mli | ocaml | *********************************************************************
OCaml
... | and , INRIA Rocquencourt
Copyright 2000 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
$ Id$
* Large , multi - dimensional , numerical ar... |
f9e6a2cc61e8b329ea53515db716467f1a021c5acf2a1397aea7ba5f551adb60 | eareese/htdp-exercises | 059-rocket-key-event.rkt | #lang htdp/bsl
(require 2htdp/image)
(require 2htdp/universe)
a LRCD ( short for : launching rocket count down ) is one of :
; - "resting"
; - a number in [-3,-1]
; - non-negative number
; interpretation a rocket resting on the ground, in countdown mode,
; or the number of pixels from the bottom of the canvas (heigh... | null | https://raw.githubusercontent.com/eareese/htdp-exercises/a85ff3111d459dda0e94d9b463d01a09accbf9bf/part01-fixed-size-data/059/059-rocket-key-event.rkt | racket | - "resting"
- a number in [-3,-1]
- non-negative number
interpretation a rocket resting on the ground, in countdown mode,
or the number of pixels from the bottom of the canvas (height)
NOTE: this time, the interpretation of height is height from the ground up,
physical constants
graphical constants
LRCD -> Ima... | #lang htdp/bsl
(require 2htdp/image)
(require 2htdp/universe)
a LRCD ( short for : launching rocket count down ) is one of :
(define HEIGHT 300)
(define WIDTH 100)
(define YDELTA 3)
(define BACKG (empty-scene WIDTH HEIGHT))
(define ROCKET (rectangle 5 30 "solid" "blue"))
(define ROCKET-CENTER (/ (image-height ROC... |
c721aacb89594d23436e5ecbeefe9c87182b615aa6c50cca7138a4209fca55a2 | eareese/htdp-exercises | 069-ball-flat-representation.rkt | #lang htdp/bsl
(define-struct ball [location velocity])
(define-struct vel [deltax deltay])
(define ball1 (make-ball (make-posn 30 40) (make-vel -10 5)))
; interpretation
; a ball that is 30px from the left, 40px from top. it moves
; -10px toward left per tick, and its vertical direction drops
at 5px per tick , si... | null | https://raw.githubusercontent.com/eareese/htdp-exercises/a85ff3111d459dda0e94d9b463d01a09accbf9bf/part01-fixed-size-data/069-ball-flat-representation.rkt | racket | interpretation
a ball that is 30px from the left, 40px from top. it moves
-10px toward left per tick, and its vertical direction drops
flat representation
create an instance of ballf that has the same interpretation
is this it? | #lang htdp/bsl
(define-struct ball [location velocity])
(define-struct vel [deltax deltay])
(define ball1 (make-ball (make-posn 30 40) (make-vel -10 5)))
at 5px per tick , since adding + to y increases distance from top .
exercise 69
(define-struct ballf [x y deltax deltay])
as ball1 above .
(define ball2 (... |
d3880e3df1caea569b91f6723fa74717d84fc028a83fdf1ee6725c016a855bb5 | votinginfoproject/data-processor | value_format.clj | (ns vip.data-processor.validation.data-spec.value-format)
(def all-digits
{:check #"\A\d+\z"
:message "Invalid data type"
:severity :fatal})
(def date
{:check #"\A\d{4}-\d{2}-\d{2}\z"
:message "Invalid date format"})
(def datetime
{:check #"\A\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\z"
:message "Invalid... | null | https://raw.githubusercontent.com/votinginfoproject/data-processor/b4baf334b3a6219d12125af8e8c1e3de93ba1dc9/src/vip/data_processor/validation/data_spec/value_format.clj | clojure | (ns vip.data-processor.validation.data-spec.value-format)
(def all-digits
{:check #"\A\d+\z"
:message "Invalid data type"
:severity :fatal})
(def date
{:check #"\A\d{4}-\d{2}-\d{2}\z"
:message "Invalid date format"})
(def datetime
{:check #"\A\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\z"
:message "Invalid... | |
9f7247cd282c150dcc4e8bfd112a15ca7a2a5700d7a1161ba300be9f52a21f76 | well-typed/large-records | Options.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE LambdaCase #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ViewPatterns #
-- | Generation options for large-records.
module Data.Record.Internal.Plugin.Options (
... | null | https://raw.githubusercontent.com/well-typed/large-records/c6b9c74d67191fe9def69dcb57e33680c62f7718/large-records/src/Data/Record/Internal/Plugin/Options.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DeriveDataTypeable #
# LANGUAGE DerivingStrategies #
# LANGUAGE LambdaCase #
| Generation options for large-records.
* Definition
* Extract options from source module
------------------------------------------------------------------------------
Defini... | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE ViewPatterns #
module Data.Record.Internal.Plugin.Options (
LargeRecordOptions(..)
, largeRecord
, getLargeRecordOptions
) where
import Data.Bifunctor
import Data.Data (Data)
import Data.Map (Map)
import Data.Maybe (mapMaybe)
import GHC.Records.Compat
... |
a6c308ae02a9e4af6ac5bc01fa41aa0b24801d0e44002f5635ab3423d83c45ce | digital-asset/daml-finance | Yaml.hs | Copyright ( c ) 2023 Digital Asset ( Switzerland ) GmbH and/or its affiliates . All rights reserved .
SPDX - License - Identifier : Apache-2.0
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE OverloadedStrings #-}
module Daml.Yaml (
T
, Config(..)
, damlConfigFile
, readDamlConfig
, writeDamlConfig
) whe... | null | https://raw.githubusercontent.com/digital-asset/daml-finance/30b0690c7b7d21d655e38f774ea3ae78be539e12/tools/packell/src/main/haskell/Daml/Yaml.hs | haskell | # LANGUAGE OverloadedStrings #
| Name of a daml config file on the filesystem.
| Given a file path to a daml yaml config file, this will extract and return the contents.
| Generate daml yaml config.
| Add indentation when writing yaml lists. | Copyright ( c ) 2023 Digital Asset ( Switzerland ) GmbH and/or its affiliates . All rights reserved .
SPDX - License - Identifier : Apache-2.0
# LANGUAGE ScopedTypeVariables #
module Daml.Yaml (
T
, Config(..)
, damlConfigFile
, readDamlConfig
, writeDamlConfig
) where
import Control.Applicative
impo... |
221debecb699479cf14e2499f6368fc845bee1a056eade2a32a2a88cc0d14239 | diku-kmc/kleenexlang | Approximation.hs | module KMC.Kleenex.Approximation( approxProg
, approxProgIt
, module AM) where
import qualified Data.Map as M
import qualified Data.HashMap.Strict as HM
import KMC.Kleenex.ApproximationMetrics as AM
import KMC.Kleenex.Core
import ... | null | https://raw.githubusercontent.com/diku-kmc/kleenexlang/d474c6015339c261b2e7bf37061175fd69185baf/src/KMC/Kleenex/Approximation.hs | haskell | | Makes a Reduced Program capable of approximate matching using the k-fold
approach
| Makes a Reduced Program capable of approximation matching using the
iterative approach
-----------
Utility --
-----------
| Looks up a mapping
| Translates a list of points, if mapping already exists, this is returned,
otherwi... | module KMC.Kleenex.Approximation( approxProg
, approxProgIt
, module AM) where
import qualified Data.Map as M
import qualified Data.HashMap.Strict as HM
import KMC.Kleenex.ApproximationMetrics as AM
import KMC.Kleenex.Core
import ... |
9b71a7f2eae95d7d987da1bfadb3959e549619b23bc100efa0dff273522c3e33 | MarcosPividori/push-notify | Handlers.hs | # LANGUAGE OverloadedStrings , QuasiQuotes , PackageImports #
-- This module defines the main function to handle the messages that comes from users (web or device users).
module Handlers
( handleMessage
, parsMessage
, setMessageValue
) where
import Database.Persist.Postgresql
import Data.Aeson.Types
... | null | https://raw.githubusercontent.com/MarcosPividori/push-notify/4c023c3fd731178d1d114774993a5e337225baa1/test/Connect4/Yesod-App/Handlers.hs | haskell | This module defines the main function to handle the messages that comes from users (web or device users).
Cancel
New Game | # LANGUAGE OverloadedStrings , QuasiQuotes , PackageImports #
module Handlers
( handleMessage
, parsMessage
, setMessageValue
) where
import Database.Persist.Postgresql
import Data.Aeson.Types
import Data.Aeson
import Data.Conduit.Pool
import Data.Default
import Data.IORef
import Data.Monoid ... |
ef20f3ee64cb4944c12c3518c42554fabd0ef60fd6fbf9ce91b1fdb79c17a35d | andrewthad/quickcheck-classes | Applicative.hs | # LANGUAGE CPP #
# LANGUAGE ScopedTypeVariables #
#if HAVE_QUANTIFIED_CONSTRAINTS
# LANGUAGE QuantifiedConstraints #
#endif
# OPTIONS_GHC -Wall #
module Test.QuickCheck.Classes.Applicative
(
#if HAVE_UNARY_LAWS
applicativeLaws
#endif
) where
import Control.Applicative
import Test.QuickCheck hiding ((.&.))
#... | null | https://raw.githubusercontent.com/andrewthad/quickcheck-classes/0fc6c0602bc6875cdbde34cbdbcf229a175af62f/quickcheck-classes-base/src/Test/QuickCheck/Classes/Applicative.hs | haskell | | Tests the following applicative properties:
[/Identity/]
@'pure' 'id' '<*>' v ≡ v@
[/Composition/]
@'pure' ('.') '<*>' u '<*>' v '<*>' w ≡ u '<*>' (v '<*>' w)@
[/Homomorphism/]
@'pure' f '<*>' 'pure' x ≡ 'pure' (f x)@
[/Interchange/]
@u '<*>' 'pure' y ≡ 'pure' ('$' y) '<*>' u@
@('<*>') ≡ 'liftA2'... | # LANGUAGE CPP #
# LANGUAGE ScopedTypeVariables #
#if HAVE_QUANTIFIED_CONSTRAINTS
# LANGUAGE QuantifiedConstraints #
#endif
# OPTIONS_GHC -Wall #
module Test.QuickCheck.Classes.Applicative
(
#if HAVE_UNARY_LAWS
applicativeLaws
#endif
) where
import Control.Applicative
import Test.QuickCheck hiding ((.&.))
#... |
36be1004a312e69f2c02399f0d6c3f011b23e2c75a42045a009eccfc6b773d29 | aggieben/weblocks | snippets.lisp |
(in-package :weblocks-clsql-demo)
;;; Header
(defun render-header (&rest args)
(declare (ignore args))
"This function renders the page header."
(with-html
(:div :class "header"
(with-extra-tags))))
;;; Footer
(defmethod render-page-body :after (rendered-html)
(with-html
(:div :class "footer"
... | null | https://raw.githubusercontent.com/aggieben/weblocks/8d86be6a4fff8dde0b94181ba60d0dca2cbd9e25/examples/weblocks-clsql-demo/src/snippets.lisp | lisp | Header
Footer |
(in-package :weblocks-clsql-demo)
(defun render-header (&rest args)
(declare (ignore args))
"This function renders the page header."
(with-html
(:div :class "header"
(with-extra-tags))))
(defmethod render-page-body :after (rendered-html)
(with-html
(:div :class "footer"
(:p :id "system-info... |
03e8dd126359eb1c6e0f6135b4c5c4f23a1d1f4c7883395a6698ece3b1b5abda | webmachine/webmachine | webmachine_router.erl | @author < >
2007 - 2010 Basho Technologies
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to... | null | https://raw.githubusercontent.com/webmachine/webmachine/8a3460fcc5fa1ffabe8bf2bdf3875bb62b5ee196/src/webmachine_router.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
limitations under the License.
t... | @author < >
2007 - 2010 Basho Technologies
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
See the License for the specific language governing permissions and
@doc Module to add and remove dynamic route... |
69365ed3ee42212f54f7358e5b3aa088e278f4d0aabfd28327658164dc59c62d | themetaschemer/malt | G-correlate.rkt | #lang racket
(require (only-in "../tensors.rkt" ext2 build-tensor ref tref tlen))
(require "../autodiff.rkt")
(require "A-scalar-ops.ss")
(define correlate-3-2
(λ (bank signal)
(build-tensor (list (tlen signal) (tlen bank))
(λ (idx)
(let ((segment (ref idx 0))
(filter (tref bank (re... | null | https://raw.githubusercontent.com/themetaschemer/malt/78a04063a5a343f5cf4332e84da0e914cdb4d347/learner/ext-ops/G-correlate.rkt | racket | #lang racket
(require (only-in "../tensors.rkt" ext2 build-tensor ref tref tlen))
(require "../autodiff.rkt")
(require "A-scalar-ops.ss")
(define correlate-3-2
(λ (bank signal)
(build-tensor (list (tlen signal) (tlen bank))
(λ (idx)
(let ((segment (ref idx 0))
(filter (tref bank (re... | |
4aac7905ffaaef91fc4491a88afad520e5d519ec0246cbbf96705b673cccfb1c | csabahruska/jhc-components | Pretty.hs | # LANGUAGE NoMonomorphismRestriction #
-----------------------------------------------------------
( c ) 2000 , /~daan
modified by 2003
--
--
Pretty print module based on " prettier printer "
-- "A prettier printer"
Draft paper , April 1997 , revised March 1998 .
-- -labs.com/cm/cs/who/wadl... | null | https://raw.githubusercontent.com/csabahruska/jhc-components/a7dace481d017f5a83fbfc062bdd2d099133adf1/jhc-common/src/Doc/Pretty.hs | haskell | ---------------------------------------------------------
"A prettier printer"
-labs.com/cm/cs/who/wadler/papers/prettier/prettier.ps
Haskell98 compatible
---------------------------------------------------------
| Modification od Daan Leijens pretty printer. main changes are use of
or ansi escape cod... | # LANGUAGE NoMonomorphismRestriction #
( c ) 2000 , /~daan
modified by 2003
Pretty print module based on " prettier printer "
Draft paper , April 1997 , revised March 1998 .
Doc . DocLike framework and the addition of out - of - band data for html tags
module Doc.Pretty
( Doc
, p... |
8fad8c1a705429663ae74f37d425d31fd6340df95a2251dac1df383caa55d9a2 | kmi/irs | load.lisp | Mode : Lisp ; Package :
File created in WebOnto
(in-package "OCML")
(eval-when (eval load)
(ensure-ontology wsmo domain "ocml:library;domains;wsmo;load.lisp" ))
(def-ontology cashew-ontology :includes (wsmo)
:type :domain
:author "barry" :allowed-editors ("john" "simonf")) | null | https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/ontologies/domains/cashew-ontology/load.lisp | lisp | Package : |
File created in WebOnto
(in-package "OCML")
(eval-when (eval load)
(ensure-ontology wsmo domain "ocml:library;domains;wsmo;load.lisp" ))
(def-ontology cashew-ontology :includes (wsmo)
:type :domain
:author "barry" :allowed-editors ("john" "simonf")) |
13b2586f01ad25213fa42c1d57d92e6195cde94d8cb37010688eff7c26145173 | JackieMaHatesDogEyes/DreamOS | data.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;This program is distributed under the terms of the ;;;
;;;GNU General Public License. ;;;
Copyright ( C ) 2009 ; ; ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;
;;;Data;;;
;;;;;;;;;;... | null | https://raw.githubusercontent.com/JackieMaHatesDogEyes/DreamOS/53d56a3ff263840d3a78142cf4431cbe4fc18509/src/data.scm | scheme |
This program is distributed under the terms of the ;;;
GNU General Public License. ;;;
; ;
Data;;;
Built-in Procedures ;;;
|
(data)
(for-each
(lambda (x)
(: (car x))
(asciz (cdr x)))
messages)
(if BOOTSTRAP_FILE
(begin
(: 'bootstrap_file)
(asciz BOOTSTRAP_FILE)))
(align 4)
(: 'dream_false)
(: 'false)
(tetra BOOLEAN_FALSE)
(: 'dream_true)
(: 'true)
(tetra BOOLEAN_TRUE)
(: 'eof)
(tetra EOF)
(align 4)
(: 'string_slash)
... |
56f988f3f0ba35f5ebb3aad8b24403e38b4238806dcb87358db04f223fd0bd33 | schmee/daguerreo | specs.clj | (ns ^:no-doc daguerreo.impl.specs
(:require [clojure.spec.alpha :as s]
[clojure.spec.gen.alpha :as gen]
[clojure.test.check.generators :as tcgen])
(:import [java.util.concurrent Executor]))
(s/def :daguerreo.task/fn (s/with-gen fn? (fn [] (gen/return (fn [ctx is-active?])))))
(s/def :daguer... | null | https://raw.githubusercontent.com/schmee/daguerreo/872bab60f627c1cd38274f651c213c0d20c07000/src/daguerreo/impl/specs.clj | clojure | (ns ^:no-doc daguerreo.impl.specs
(:require [clojure.spec.alpha :as s]
[clojure.spec.gen.alpha :as gen]
[clojure.test.check.generators :as tcgen])
(:import [java.util.concurrent Executor]))
(s/def :daguerreo.task/fn (s/with-gen fn? (fn [] (gen/return (fn [ctx is-active?])))))
(s/def :daguer... | |
ba3e8bbd270252c7a36a79d9a84c23e18cdc5d19ea3b978d7a96134d66892f4e | derekmcloughlin/pearls | chap02c.hs | table [x] = [(x, 0)]
table xs = join (m - n) (table ys) (table zs)
where m = length xs
n = m `div` 2
(ys, zs) = splitAt n xs
join 0 txs [] = txs
join n [] tys = tys
join n txs@((x, c) : txs') tys@((y, d) : tys')
| x < y = (x, c + n) : join n txs' tys
| x >= y ... | null | https://raw.githubusercontent.com/derekmcloughlin/pearls/42bc6ea0fecc105386a8b75789f563d44e05b772/chap02/chap02c.hs | haskell | table [x] = [(x, 0)]
table xs = join (m - n) (table ys) (table zs)
where m = length xs
n = m `div` 2
(ys, zs) = splitAt n xs
join 0 txs [] = txs
join n [] tys = tys
join n txs@((x, c) : txs') tys@((y, d) : tys')
| x < y = (x, c + n) : join n txs' tys
| x >= y ... | |
bd6e3f0388f88a37a890df85d4dc3e12898d76f1fc153c7d6b4e0a4311a2d2a2 | grin-compiler/grin | EndToEnd.hs | # LANGUAGE TypeFamilies , LambdaCase , TypeApplications , DeriveGeneric , ScopedTypeVariables #
module Test.EndToEnd where
import CLI.Lib (mainWithArgs)
import Control.Arrow ((&&&))
import Control.Exception (catch)
import Control.Monad (forM, when)
import Data.ByteString.Char8 (ByteString)
import Data.Char (isDigit)
i... | null | https://raw.githubusercontent.com/grin-compiler/grin/44ac2958810ecee969c8028d2d2a082d47fba51b/grin/test/Test/EndToEnd.hs | haskell | input.opts
input.expected
input.out -- defined in configuration
| evaluatePipelineTest reads the input file, runs grin compiler using the
| evaluateEndToEndTest reads the input file, interprets it without any
optimization, after runs the full optimization pipeline, generates an executable and runs
the executable... | # LANGUAGE TypeFamilies , LambdaCase , TypeApplications , DeriveGeneric , ScopedTypeVariables #
module Test.EndToEnd where
import CLI.Lib (mainWithArgs)
import Control.Arrow ((&&&))
import Control.Exception (catch)
import Control.Monad (forM, when)
import Data.ByteString.Char8 (ByteString)
import Data.Char (isDigit)
i... |
3c5850d88c90caaf7c13b1a56e9c74c122d38c119ac3593b5759be39ae8a849f | dmoverton/finite-domain | Domain.hs | module Domain (
Domain,
ToDomain,
toDomain,
member,
isSubsetOf,
elems,
intersection,
difference,
Domain.null,
singleton,
isSingleton,
filterLessThan,
filterGreaterThan,
findMax,
findMin,
maxDomain
) where
import qualified Data.IntSet as IntSet
import Data... | null | https://raw.githubusercontent.com/dmoverton/finite-domain/ae4afe755c1c1880d1283b9fdae90c1dc4a03f10/src/Domain.hs | haskell | Domain constructors
toDomain a = toDomain (a, a)
Operations on Domains | module Domain (
Domain,
ToDomain,
toDomain,
member,
isSubsetOf,
elems,
intersection,
difference,
Domain.null,
singleton,
isSingleton,
filterLessThan,
filterGreaterThan,
findMax,
findMin,
maxDomain
) where
import qualified Data.IntSet as IntSet
import Data... |
4850511f395f91015a8a3d2bd8ad20de5b14465346e193d4cd686bbb2454eeba | openmusic-project/openmusic | compile.lisp | -*- Mode : Lisp ; rcs - header : " $ Header : /hope / lwhope1 - cam / hope.0 / compound/61 / LISPopengl / RCS / compile.lisp , v 1.8.12.1 2014/05/27 20:56:56 davef Exp $ " -*-
Copyright ( c ) 1987 - -2015 LispWorks Ltd. All rights reserved .
(in-package "CL-USER")
(load (current-pathname "defsys"))
(compile-sys... | null | https://raw.githubusercontent.com/openmusic-project/openmusic/9560c064512a1598cd57bcc9f0151c0815178e6f/OPENMUSIC/code/api/externals/OpenGL/opengl-lw/compile.lisp | lisp | rcs - header : " $ Header : /hope / lwhope1 - cam / hope.0 / compound/61 / LISPopengl / RCS / compile.lisp , v 1.8.12.1 2014/05/27 20:56:56 davef Exp $ " -*- |
Copyright ( c ) 1987 - -2015 LispWorks Ltd. All rights reserved .
(in-package "CL-USER")
(load (current-pathname "defsys"))
(compile-system "OPENGL" :load t)
|
bb35feafeccc3e72bd9cb25b580f42aa61d1ca87a26fc4bacbe38374e1bae5d1 | binghe/closette | package.lisp | (in-package :closette.system)
(eval-when (:compile-toplevel)
(defparameter +closette-symbols+
'(#:defclass #:defgeneric #:defmethod
#:find-class #:class-of
#:call-next-method #:next-method-p
#:slot-value #:slot-boundp #:slot-exists-p #:slot-makunbound
#:make-instance #:change-class
#:initialize-i... | null | https://raw.githubusercontent.com/binghe/closette/20ed5c8b0ef459394198e25081f39321e9df643b/package.lisp | lisp |
Class-related metaobject protocol
Necessary artifact of this implementation | (in-package :closette.system)
(eval-when (:compile-toplevel)
(defparameter +closette-symbols+
'(#:defclass #:defgeneric #:defmethod
#:find-class #:class-of
#:call-next-method #:next-method-p
#:slot-value #:slot-boundp #:slot-exists-p #:slot-makunbound
#:make-instance #:change-class
#:initialize-i... |
d0a40a7cf32558e0b81fc8fd04daf5d70880760d3d5cfc573e2c835241b10e78 | bennn/dissertation | stack.rkt | #lang typed/racket/base
;; a representation of the visible stacks
(provide
;; Card -> Stack
create-stack
;; Stack -> Card
top
Card Stack - > Stack
push
;; Stack -> N
length
;; Stack -> N
;; sum up the bulls shown on the cards of the stack
bulls)
(require "card-adapted.rkt" "stack-types.rkt")
(requir... | null | https://raw.githubusercontent.com/bennn/dissertation/779bfe6f8fee19092849b7e2cfc476df33e9357b/dissertation/scrbl/jfp-2019/benchmarks/take5/typed/stack.rkt | racket | a representation of the visible stacks
Card -> Stack
Stack -> Card
Stack -> N
Stack -> N
sum up the bulls shown on the cards of the stack
--------------------------------------------------------------------------------------------------- | #lang typed/racket/base
(provide
create-stack
top
Card Stack - > Stack
push
length
bulls)
(require "card-adapted.rkt" "stack-types.rkt")
(require (prefix-in list: (only-in racket/base length)))
(require (only-in racket/list first))
(: create-stack (-> Card Stack))
(define (create-stack c) (list c))
(: ... |
c0cb2952ca85bcc83326016803d227f9327e6df37fa8a332815cb29cc31dbaab | marigold-dev/deku | parallel.ml | module Pool = struct
type task = Task : ('a, exn) result Eio.Promise.u * (unit -> 'a) -> task
type pool = { domains : int; pending : task Eio.Stream.t }
let rec domain_loop ~sw pending =
(* TODO: handle cancelation *)
let (Task (resolver, compute)) = Eio.Stream.take pending in
( Eio.Fiber.fork ~sw @@... | null | https://raw.githubusercontent.com/marigold-dev/deku/7b118eb4e0bdda85315cf2e8242e206ebfe226fa/deku-p/src/core/stdlib/parallel.ml | ocaml | TODO: handle cancelation
TODO: maybe this should be fork daemon?
TODO: this may leak workers | module Pool = struct
type task = Task : ('a, exn) result Eio.Promise.u * (unit -> 'a) -> task
type pool = { domains : int; pending : task Eio.Stream.t }
let rec domain_loop ~sw pending =
let (Task (resolver, compute)) = Eio.Stream.take pending in
( Eio.Fiber.fork ~sw @@ fun () ->
let result = try O... |
0901a10d1084f4c9bd2791fa462dbcba074f38c4d5b52d3ff747ab6f4b06ce10 | oubiwann/star-traders | const_test.clj | (ns starlanes.const-test
(:require [clojure.test :refer :all]
[starlanes.const :as const]))
(deftest test-xgrid
(let [result const/xgrid
expected ["a" "b" "c" "d" "e"]]
(is (= result expected))))
(deftest test-ygrid
(let [result const/ygrid
expected ["1" "2" "3" "4" "5"]]
(i... | null | https://raw.githubusercontent.com/oubiwann/star-traders/8d7b85ce9ad6446f3b766cced08c120787a82352/clojure/test/starlanes/const_test.clj | clojure | (ns starlanes.const-test
(:require [clojure.test :refer :all]
[starlanes.const :as const]))
(deftest test-xgrid
(let [result const/xgrid
expected ["a" "b" "c" "d" "e"]]
(is (= result expected))))
(deftest test-ygrid
(let [result const/ygrid
expected ["1" "2" "3" "4" "5"]]
(i... | |
52e6603c44785b1d71cf721135ed1e7f7ee0e42d7e667acafd3a5570cffa4606 | scrintal/heroicons-reagent | tv.cljs | (ns com.scrintal.heroicons.mini.tv)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 20 20"
:fill "currentColor"
:aria-hidden "true"}
[:path {:d "M4 5h12v7H4V5z"}]
[:path {:fillRule "evenodd"
:d "M1 3.5A1.5 1.5 0 012.5 2h15A1.5 1.5 0 0119 3.5v10a1.5 1... | null | https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/mini/tv.cljs | clojure | (ns com.scrintal.heroicons.mini.tv)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 20 20"
:fill "currentColor"
:aria-hidden "true"}
[:path {:d "M4 5h12v7H4V5z"}]
[:path {:fillRule "evenodd"
:d "M1 3.5A1.5 1.5 0 012.5 2h15A1.5 1.5 0 0119 3.5v10a1.5 1... | |
a0a1531382af7cf2982272ab7c7fc34dda586a31695cbd20e36bfda73ac0ec90 | weavejester/ragtime | repl_test.clj | (ns ragtime.repl-test
(:require [clojure.test :refer :all]
[ragtime.core-test :refer [in-memory-db assoc-migration]]
[ragtime.repl :as repl]
[ragtime.core :as core]))
(def migrations
[(assoc-migration "a" :a 1)
(assoc-migration "b" :b 2)
(assoc-migration "c" :c 3)])
(deft... | null | https://raw.githubusercontent.com/weavejester/ragtime/e7ff40a62c4c8b4963e934151cefa7260903b331/core/test/ragtime/repl_test.clj | clojure | (ns ragtime.repl-test
(:require [clojure.test :refer :all]
[ragtime.core-test :refer [in-memory-db assoc-migration]]
[ragtime.repl :as repl]
[ragtime.core :as core]))
(def migrations
[(assoc-migration "a" :a 1)
(assoc-migration "b" :b 2)
(assoc-migration "c" :c 3)])
(deft... | |
34d82d86d74f9eeeba7afffa6e63b3b1bf0ff11beab31c6d01d80d9938424f29 | Kappa-Dev/KappaTools | tab_polymers.ml | (******************************************************************************)
(* _ __ * The Kappa Language *)
| |/ / * Copyright 2010 - 2020 CNRS - Harvard Medical School - INRIA - IRIF
(* | ' / ********************************************************************... | null | https://raw.githubusercontent.com/Kappa-Dev/KappaTools/eef2337e8688018eda47ccc838aea809cae68de7/gui/tab_polymers.ml | ocaml | ****************************************************************************
_ __ * The Kappa Language
| ' / ********************************************************************
| . \ * This file is distributed under the terms of the
|_|\_\ * GN... | | |/ / * Copyright 2010 - 2020 CNRS - Harvard Medical School - INRIA - IRIF
module Html = Tyxml_js.Html5
open Lwt.Infix
let navli () = ReactiveData.RList.empty
let tab_is_active, set_tab_is_active = React.S.create false
let tab_was_active = ref false
let site a = [a,None,Some (Public_data.Bound_to 1),None]
let... |
8c32878319dc13da2923eab52c9cfbc8a95d46c8b08b228785ae7531997ce55a | ormf/cm | sbcl.lisp | ;;; **********************************************************************
Copyright ( C ) 2002 ( )
;;; This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation ; either version 2
of the License , or... | null | https://raw.githubusercontent.com/ormf/cm/115b3645af2abfa149a94d46a2934cc57da64709/src/sbcl.lisp | lisp | **********************************************************************
This program is free software; you can redistribute it and/or
either version 2
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PART... | Copyright ( C ) 2002 ( )
modify it under the terms of the GNU General Public License
of the License , or ( at your option ) any later version .
$ Date$
(in-package :cm)
(pushnew ':metaclasses *features*)
(import '(sb-ext::load-foreign
sb-mop:slot-definition-initargs
sb-mop:slot-defini... |
a9ede988797a3f2deec3d19587818c47a774e671c9f1a2315b11df9465824ab6 | mejgun/haskell-tdlib | EmojiStatus.hs | {-# LANGUAGE OverloadedStrings #-}
-- |
module TD.Data.EmojiStatus where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified Utils as U
-- |
| Describes a custom emoji to be shown instead of the Telegram Premium badge @custom_emoji_id Identifier of the custom emoji in stickerFo... | null | https://raw.githubusercontent.com/mejgun/haskell-tdlib/dc380d18d49eaadc386a81dc98af2ce00f8797c2/src/TD/Data/EmojiStatus.hs | haskell | # LANGUAGE OverloadedStrings #
|
|
| |
module TD.Data.EmojiStatus where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified Utils as U
| Describes a custom emoji to be shown instead of the Telegram Premium badge @custom_emoji_id Identifier of the custom emoji in stickerFormatTgs format
EmojiStatus
custom_emoji... |
535620516bf0fda26e95d873a6872975eadd75d39e1ace47ccaa3cadc4733393 | CarlosMChica/HaskellBook | print1.hs | module Print1 where
main :: IO ()
main = putStrLn "Hellow World!"
| null | https://raw.githubusercontent.com/CarlosMChica/HaskellBook/86f82cf36cd00003b1a1aebf264e4b5d606ddfad/chapter3/print1.hs | haskell | module Print1 where
main :: IO ()
main = putStrLn "Hellow World!"
| |
aca7d1d8f0549c38278f700ef20101fe26430c9f7469510eab76332f3ae236fe | satori-com/mzbench | mzb_git.erl | -module(mzb_git).
-export([
get_git_short_sha1/3
]).
get_git_short_sha1(GitRepo, GitRef, Logger) ->
case filelib:is_dir(GitRepo) of
true ->
_ = (catch mzb_subprocess:exec_format("bash -c \"cd ~s && git fetch --unshallow; true\"", [GitRepo], [stderr_to_stdout], Logger));
false ->
... | null | https://raw.githubusercontent.com/satori-com/mzbench/02be2684655cde94d537c322bb0611e258ae9718/common_apps/mzbench_utils/src/mzb_git.erl | erlang | -module(mzb_git).
-export([
get_git_short_sha1/3
]).
get_git_short_sha1(GitRepo, GitRef, Logger) ->
case filelib:is_dir(GitRepo) of
true ->
_ = (catch mzb_subprocess:exec_format("bash -c \"cd ~s && git fetch --unshallow; true\"", [GitRepo], [stderr_to_stdout], Logger));
false ->
... | |
487e88b7381be6308cbd46c24aac251bed2902988d98ba5a53685192b2d5a689 | drapanjanas/pneumatic-tubes | core.cljs | (ns group-chat-app.android.core
(:require [reagent.core :as r :refer [atom]]
[re-frame.core :refer [subscribe dispatch dispatch-sync]]
[group-chat-app.events]
[group-chat-app.subs]))
(def ReactNative (js/require "react-native"))
(def app-registry (.-AppRegistry ReactNative))
(def... | null | https://raw.githubusercontent.com/drapanjanas/pneumatic-tubes/ea3834ea04e06cd2d4a03da333461a474c0475f5/examples/group-chat-app/src/group_chat_app/android/core.cljs | clojure | (ns group-chat-app.android.core
(:require [reagent.core :as r :refer [atom]]
[re-frame.core :refer [subscribe dispatch dispatch-sync]]
[group-chat-app.events]
[group-chat-app.subs]))
(def ReactNative (js/require "react-native"))
(def app-registry (.-AppRegistry ReactNative))
(def... | |
267940a8ac3f24645a21949582519e63160027ac727f715f7e593fb399c1cab5 | mirage/ocaml-cstruct | enum.ml |
* Copyright ( c ) 2016 < >
*
* Permission to use , copy , modify , and 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 AU... | null | https://raw.githubusercontent.com/mirage/ocaml-cstruct/9ef1ca60f29c06bdf68c0d756b278c7b7f06bbc9/ppx_test/enum.ml | ocaml |
* Copyright ( c ) 2016 < >
*
* Permission to use , copy , modify , and 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 AU... | |
44558b0b81a13a316de23fed41cbe6fd7bf0d07920c40e01f28ba0cc1e27be4c | haskus/packages | SnapVar.hs | -- | Snapshotable STM variables
--
A ` SnapVar ` is like a ` TVar ` except that they have a context which can
-- enable a snapshot mode. When in snapshot mode, the current values are not
erased by writes . Instead each SnapVar can have 2 values : the value at the
-- time of the snapshot and its current value.
--
--... | null | https://raw.githubusercontent.com/haskus/packages/40ea6101cea84e2c1466bc55cdb22bed92f642a2/haskus-utils/src/lib/Haskus/Utils/STM/SnapVar.hs | haskell | | Snapshotable STM variables
enable a snapshot mode. When in snapshot mode, the current values are not
time of the snapshot and its current value.
There can be only a single snapshot at a time. When the snapshot mode is
exited, the variables only keep the current value alive, not the snapshot
one.
* Snapshot
... | A ` SnapVar ` is like a ` TVar ` except that they have a context which can
erased by writes . Instead each SnapVar can have 2 values : the value at the
module Haskus.Utils.STM.SnapVar
( SnapVar
, SnapContext
, newSnapContextIO
, newSnapContext
, newSnapVarIO
, newSnapVar
, writeSnapVar
, wri... |
3ae2a1ac5be0a73b32a98a1a6ab84cca064f5f511bc9f10b426687b36ef14dee | league/yesod-crud | UserCrud.hs | # LANGUAGE FlexibleInstances , Rank2Types #
# OPTIONS_GHC -fno - warn - orphans #
module Handler.UserCrud where
import Import
import Yesod.Contrib.League.Crud
import Yesod.Contrib.League.Crud.Persist
import Yesod.Contrib.League.Crud.Sort
instance RenderMessage (CrudSubsite UserCrud) CrudMessage where
renderMessage ... | null | https://raw.githubusercontent.com/league/yesod-crud/6cf3a1871dd6471e9423348c38aff6920d5b4bce/example/Handler/UserCrud.hs | haskell | # LANGUAGE FlexibleInstances , Rank2Types #
# OPTIONS_GHC -fno - warn - orphans #
module Handler.UserCrud where
import Import
import Yesod.Contrib.League.Crud
import Yesod.Contrib.League.Crud.Persist
import Yesod.Contrib.League.Crud.Sort
instance RenderMessage (CrudSubsite UserCrud) CrudMessage where
renderMessage ... | |
394d08ecfba8631c60af1bedd6c3d75976d304d0f8e76a2c3d9ac21e9d7332a6 | matsen/pplacer | tax_id.ml | The taxonomic i d type
*
* note use of Pervasives.compare should be redone if speed needed .
*
* note use of Pervasives.compare should be redone if speed needed.
*)
open Ppatteries
exception UnknownTaxIDPrefix of char
type tax_id = TaxStr of string | NoTax
type t = tax_id
let none_str = "none"
(* *** ut... | null | https://raw.githubusercontent.com/matsen/pplacer/f40a363e962cca7131f1f2d372262e0081ff1190/pplacer_src/tax_id.ml | ocaml | *** utility ***
*** I/O ***
*** Maps and Sets *** | The taxonomic i d type
*
* note use of Pervasives.compare should be redone if speed needed .
*
* note use of Pervasives.compare should be redone if speed needed.
*)
open Ppatteries
exception UnknownTaxIDPrefix of char
type tax_id = TaxStr of string | NoTax
type t = tax_id
let none_str = "none"
let of_st... |
48dbcc5569141f08b4b2f7d06c804822e3fc5911cfdf17258732961c5edb4e2f | Disco-Dave/message-db | FunctionsSpec.hs | module MessageDb.FunctionsSpec
( spec
)
where
import Control.Monad (replicateM_)
import Data.Foldable (for_)
import Data.Maybe (fromMaybe)
import qualified Data.Set as Set
import Data.Text.Encoding (encodeUtf8)
import qualified Data.Time as Time
import qualified Database.PostgreSQL.Simple as Postgres
import qualif... | null | https://raw.githubusercontent.com/Disco-Dave/message-db/4ce82d8e2e3b9a4ee0bf769e9481ebffbcf209f9/message-db/test/MessageDb/FunctionsSpec.hs | haskell | module MessageDb.FunctionsSpec
( spec
)
where
import Control.Monad (replicateM_)
import Data.Foldable (for_)
import Data.Maybe (fromMaybe)
import qualified Data.Set as Set
import Data.Text.Encoding (encodeUtf8)
import qualified Data.Time as Time
import qualified Database.PostgreSQL.Simple as Postgres
import qualif... | |
7669aadeaa2f95aed617c5ee811d2d6c9c1bd504e36dbe95cbb05c45455b695b | reborg/clojure-essential-reference | 3.clj | < 1 >
;; #object["user$eval1935$fn__1936@146c987a"]
< 2 >
(fn [x] (.toString x)) ; <3>
;; Reflection warning - reference to field toString can't be resolved | null | https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/MutationandSideEffects/set!/3.clj | clojure | #object["user$eval1935$fn__1936@146c987a"]
<3>
Reflection warning - reference to field toString can't be resolved | < 1 >
< 2 >
|
21f0ba8512b690edcd55c7e9f732494e785368d9b9e6be057a3e631d2670e18b | sicmutils/sicmutils | double_pendulum.cljc | #_"SPDX-License-Identifier: GPL-3.0"
(ns sicmutils.examples.double-pendulum
(:refer-clojure :exclude [+ - * /])
(:require [sicmutils.env :as e :refer [up square cos + - * /]]))
(defn V
[m1 m2 l1 l2 g]
(fn [[_ [θ φ] _]]
(let [y1 (- (* l1 (cos θ)))
y2 (- y1 (* l2 (cos φ)))]
(+ (* m1 g y1)
... | null | https://raw.githubusercontent.com/sicmutils/sicmutils/f181f153f1432e9648206f903282e7cb4cdd9644/test/sicmutils/examples/double_pendulum.cljc | clojure | mass of bob1
mass of bob2
length of rod1
length of rod2
acceleration due to gravity | #_"SPDX-License-Identifier: GPL-3.0"
(ns sicmutils.examples.double-pendulum
(:refer-clojure :exclude [+ - * /])
(:require [sicmutils.env :as e :refer [up square cos + - * /]]))
(defn V
[m1 m2 l1 l2 g]
(fn [[_ [θ φ] _]]
(let [y1 (- (* l1 (cos θ)))
y2 (- y1 (* l2 (cos φ)))]
(+ (* m1 g y1)
... |
8076d93177f58f07f43533c811adce75b9e6779ac0316ec913c238eae1990d49 | sarabander/p2pu-sicp | 2.48.scm |
;; start and end are vectors
(define (make-segment start end)
(cons start end))
(define start-segment car)
(define end-segment cdr)
| null | https://raw.githubusercontent.com/sarabander/p2pu-sicp/fbc49b67dac717da1487629fb2d7a7d86dfdbe32/2.2/2.48.scm | scheme | start and end are vectors |
(define (make-segment start end)
(cons start end))
(define start-segment car)
(define end-segment cdr)
|
4d2231d3a87f4caef247309d1d565a2965fbb4a48f47ffefe9c8936b571db0cf | SchornacklabSLCU/amfinder | imgAnnotations.mli | AMFinder - img / imgAnnotations.mli
*
* MIT License
* Copyright ( c ) 2021
*
* Permission is hereby granted , free of charge , to any person obtaining a copy
* of this software and associated documentation files ( the " Software " ) , to
* deal in the Software without restriction , including wi... | null | https://raw.githubusercontent.com/SchornacklabSLCU/amfinder/1053045b431b9e9e85a7bcebea2e38cda92a8dcd/amfbrowser/sources/img/imgAnnotations.mli | ocaml | * Annotation manager.
* Returns the item at the given coordinates and annotation level.
* Iterates over items at the given coordinates and annotation level.
* Iterates over items at the given coordinates and annotation level.
* Returns the current statistics.
* Indicates whether the given tile has annotation. By d... | AMFinder - img / imgAnnotations.mli
*
* MIT License
* Copyright ( c ) 2021
*
* Permission is hereby granted , free of charge , to any person obtaining a copy
* of this software and associated documentation files ( the " Software " ) , to
* deal in the Software without restriction , including wi... |
0f896fb0cc6212dc70b64281233d600dd62137442b901a77226c8062317a0ce9 | DanielG/ghc-mod | Cpp.hs | # LANGUAGE CPP #
#undef NOTHING
#ifdef NOTHING
module WRONG_MODULE where
#else
module Cpp where
#endif
| null | https://raw.githubusercontent.com/DanielG/ghc-mod/391e187a5dfef4421aab2508fa6ff7875cc8259d/test/data/target/Cpp.hs | haskell | # LANGUAGE CPP #
#undef NOTHING
#ifdef NOTHING
module WRONG_MODULE where
#else
module Cpp where
#endif
| |
b01a8bee60cccabccee42acab85dd3082cd6d27e62bffa0460237108329bcaf8 | aeternity/aeternity | aest_external.erl | -module(aest_external).
% API
-export([start/1]).
-export([stop/1]).
-export([prepare_spec/2]).
-export([peer_from_spec/2]).
-export([setup_node/2]).
-export([delete_node/1]).
-export([start_node/1]).
-export([stop_node/2]).
-export([kill_node/1]).
-export([stop_container/2]).
-export([node_logs/1]).
-export([get_peer... | null | https://raw.githubusercontent.com/aeternity/aeternity/b7ce6ae15dab7fa22287c2da3d4405c29bb4edd7/system_test/common/helpers/aest_external.erl | erlang | API
--- Macros --------------------------------------------------------------------
--- API ----------------------------------------------------------------------- | -module(aest_external).
-export([start/1]).
-export([stop/1]).
-export([prepare_spec/2]).
-export([peer_from_spec/2]).
-export([setup_node/2]).
-export([delete_node/1]).
-export([start_node/1]).
-export([stop_node/2]).
-export([kill_node/1]).
-export([stop_container/2]).
-export([node_logs/1]).
-export([get_peer_addre... |
00916e3aff747e341f78d33d0dec1801e672704a530cfb4dd2ed3c39cbc6e29e | zenspider/schemers | exercise.5.50.scm | #!/usr/bin/env csi -s
(require rackunit)
(require-library compiler)
(import compiler)
Exercise 5.50
;; Use the compiler to compile the metacircular evaluator of section
* Note 4 - 1 : : and run this program using the register - machine
simulator . ( To compile more than one definition at a time , you can
;; pa... | null | https://raw.githubusercontent.com/zenspider/schemers/2939ca553ac79013a4c3aaaec812c1bad3933b16/sicp/ch_5/exercise.5.50.scm | scheme | Use the compiler to compile the metacircular evaluator of section
package the definitions in a `begin'.) The resulting interpreter
will run very slowly because of the multiple levels of
interpretation, but getting all the details to work is an
instructive exercise.
prolly should be ' * undefined * or somesuch | #!/usr/bin/env csi -s
(require rackunit)
(require-library compiler)
(import compiler)
Exercise 5.50
* Note 4 - 1 : : and run this program using the register - machine
simulator . ( To compile more than one definition at a time , you can
(define eval-sexp #f)
(with-input-from-file "lib/eval.scm"
(lambda ()
... |
73ae6337cc132c5cb8b672d1089d12a18271c96f1d6927ea5384eef57ed51036 | chrovis/cljam | dict.clj | (ns cljam.algo.dict
"Alpha - subject to change.
Generator of a FASTA sequence dictionary file."
(:require [clojure.java.io :as cio]
[cljam.io.dict.core :as dict-core]
[cljam.io.fasta.core :as fa-core]
[cljam.io.sequence :as cseq]))
(defn create-dict
"Creates a FASTA sequence... | null | https://raw.githubusercontent.com/chrovis/cljam/2b8e7386765be8efdbbbb4f18dbc52447f4a08af/src/cljam/algo/dict.clj | clojure | (ns cljam.algo.dict
"Alpha - subject to change.
Generator of a FASTA sequence dictionary file."
(:require [clojure.java.io :as cio]
[cljam.io.dict.core :as dict-core]
[cljam.io.fasta.core :as fa-core]
[cljam.io.sequence :as cseq]))
(defn create-dict
"Creates a FASTA sequence... | |
bb56d958d4f82b49c13b8edf9b26d7254ae20e0764a290eb21d40dac62697397 | alesaccoia/festival_flinger | cmu_us_ksp_clunits.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; ;;;
Carnegie Mellon University ; ; ;
and and ; ; ;
Copyright ( c ) 1998 - 2005 ... | null | https://raw.githubusercontent.com/alesaccoia/festival_flinger/87345aad3a3230751a8ff479f74ba1676217accd/lib/voices/us/cmu_us_ksp_cg/festvox/cmu_us_ksp_clunits.scm | scheme |
;;;
; ;
; ;
; ;
; ;
;;;
Permission is hereby granted, free of charge, to use and distribute ;;;
this software and its documentation without restriction, including ;;;
withou... |
Ensure this version of festival has been compiled with clunits module
(require_module 'clunits)
(if (assoc 'cmu_us_ksp_clunits voice-locations)
(defvar cmu_us_ksp::dir
(cdr (assoc 'cmu_us_ksp_clunits voice-locations)))
(defvar cmu_us_ksp::dir (string-append (pwd) "/")))
(if (not (probe_file (path-ap... |
97a775ac0a6b53cba3fb0bf6bb6c707a666b6a28d4179be099c4f7527089f3d0 | cram-code/cram_core | package.lisp | ;;;
Copyright ( c ) 2009 - 2010
;;; All rights reserved.
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions are met:
;;;
;;; * Redistributions of source code must retain the above copyright
;;; notice, this list o... | null | https://raw.githubusercontent.com/cram-code/cram_core/984046abe2ec9e25b63e52007ed3b857c3d9a13c/cram_execution_trace/src/package.lisp | lisp |
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redi... | Copyright ( c ) 2009 - 2010
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS "
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT OWNER OR
LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY ,... |
0d7a1911e3597df539fa3da41b7e78209cc4feffee56149a92b203d95489b65b | daveyarwood/music-theory | test_helpers.cljc | (ns music-theory.test-helpers)
(defn round
"Round a double to the given precision (number of significant digits)"
[precision d]
(let [factor (Math/pow 10 precision)]
(/ (Math/round (* d factor)) factor)))
(defn =ish
"Returns true if all arguments are within 0.01 of each other."
[& xs]
(let [[x & xs] (... | null | https://raw.githubusercontent.com/daveyarwood/music-theory/c58beb9fa6d290900afeff78ee4f86c875e393d7/test/music_theory/test_helpers.cljc | clojure | (ns music-theory.test-helpers)
(defn round
"Round a double to the given precision (number of significant digits)"
[precision d]
(let [factor (Math/pow 10 precision)]
(/ (Math/round (* d factor)) factor)))
(defn =ish
"Returns true if all arguments are within 0.01 of each other."
[& xs]
(let [[x & xs] (... | |
f100a6e2517ba72499ce8a235607bb2ef7ddf4b5eb08395e1c61211174b263a1 | benoitc/couchbeam | test_gen_changes.erl | %%% -*- erlang -*-
%%%
This file is part of couchbeam released under the MIT license .
%%% See the NOTICE for more information.
-module(test_gen_changes).
-behaviour(gen_changes).
-export([start_link/2,
init/1,
handle_change/2,
handle_call/3,
handle_cast/2,
handle_info/2... | null | https://raw.githubusercontent.com/benoitc/couchbeam/8dcba7209b040d7225aceddc2956680340937790/examples/test_gen_changes.erl | erlang | -*- erlang -*-
See the NOTICE for more information. | This file is part of couchbeam released under the MIT license .
-module(test_gen_changes).
-behaviour(gen_changes).
-export([start_link/2,
init/1,
handle_change/2,
handle_call/3,
handle_cast/2,
handle_info/2,
terminate/2]).
-export([get_changes/1]).
-record(s... |
a8b5af98176b4a21dbbd0f1ec887c0378c03357b8fc6116e30a0791e2f9c6941 | mfoemmel/erlang-otp | tv_new_table.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1998 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/tv/src/tv_new_table.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 1998 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(tv_new_table).
-export([start/2,... |
dc99c2bef08b9334af9d9f853ce85b3f2bd84335578b153d40089fde01ab1121 | ocamllabs/ocaml-modular-implicits | monad.ml | module type Monad = sig
type 'a t
val return : 'a -> 'a t
val bind : 'a t -> ('a -> 'b t) -> 'b t
end;;
let return {M : Monad} x = M.return x;;
let (>>=) {M : Monad} m k = M.bind m k;;
implicit module ListMonad = struct
type 'a t = 'a list
let return x = [x]
let bind x f =
let rec aux acc = function
... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/testsuite/tests/typing-modular_implicits/monad.ml | ocaml | Ambiguous
Various implementations of sequence to test the handling of recursion | module type Monad = sig
type 'a t
val return : 'a -> 'a t
val bind : 'a t -> ('a -> 'b t) -> 'b t
end;;
let return {M : Monad} x = M.return x;;
let (>>=) {M : Monad} m k = M.bind m k;;
implicit module ListMonad = struct
type 'a t = 'a list
let return x = [x]
let bind x f =
let rec aux acc = function
... |
1441741738d8088e55c49a91d326a78eaac38bd60667131eb6d803fed22b5775 | brendanhay/amazonka | LoggingConfiguration.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
{-# LANGUAGE StrictData #-}
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - unused - matches #
Derived fr... | null | https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-waf/gen/Amazonka/WAF/Types/LoggingConfiguration.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
| This is __AWS WAF Classic__ documentation. For more information, see
in the developer guide.
__For the latest version of AWS WAF__, use the AWS WAFV2 API and see the
<-chapter.html AWS WAF Developer Guide>.
With the latest v... | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - unused - matches #
Derived from AWS service descriptions , licensed under Apache 2.0 .
Mo... |
bfda461d9a37c5d01d9ec27bdc580cbc42d569ba3479e3fd2bb7adb211a43afb | jonase/eastwood | disable_unused_meta_on_macro.clj | (disable-warning
{:linter :unused-meta-on-macro
:if-inside-macroexpansion-of '#{clojure.core/let}
:reason "Support a deftest"})
| null | https://raw.githubusercontent.com/jonase/eastwood/ef2d2341ab0c0cf4147afb3c8a1da6c85259e793/test-resources/eastwood/config/disable_unused_meta_on_macro.clj | clojure | (disable-warning
{:linter :unused-meta-on-macro
:if-inside-macroexpansion-of '#{clojure.core/let}
:reason "Support a deftest"})
| |
da94dfeb95f3e95f84ca8e10b0e2a796f16b72891dbe6fc55e0b120e8482323b | bennn/dissertation | main.rkt | #lang racket
(require "racket_mod.rkt")
(require "racket_mod_typed.rkt")
(define los (list (s 1) (s 2)))
(set-list-of-s! los)
(displayln list-of-s)
(define los2 (list (s2 1) (s2 2)))
(set-list-of-s2! los2)
(displayln list-of-s2)
| null | https://raw.githubusercontent.com/bennn/dissertation/779bfe6f8fee19092849b7e2cfc476df33e9357b/dissertation/QA/transient-expressive/2020-02-17/main.rkt | racket | #lang racket
(require "racket_mod.rkt")
(require "racket_mod_typed.rkt")
(define los (list (s 1) (s 2)))
(set-list-of-s! los)
(displayln list-of-s)
(define los2 (list (s2 1) (s2 2)))
(set-list-of-s2! los2)
(displayln list-of-s2)
| |
6c370b61a823b3baae8795798e1010c5887cf19e330dcb6211ed27eb4846b492 | chiroptical/book-of-monads | Lib.hs | {-# LANGUAGE RankNTypes #-}
module Lib where
import Control.Monad.Managed
import Control.Monad.Trans.Resource ( runResourceT
, allocate
, release
)
impor... | null | https://raw.githubusercontent.com/chiroptical/book-of-monads/c2eff1c67a8958b28cfd2001d652f8b68e7c84df/chapter9/src/Lib.hs | haskell | # LANGUAGE RankNTypes #
Acquire Release Use
bracket = undefined
withFile :: FilePath -> IOMode -> (Handle -> IO r) -> IO r
withFile fp mode = bracket (openFile fp mode) hClose
withFile inFile ReadMode $ \inHandle ->
withFile outFile WriteMode $ \outHandle ->
Continuations
When talking ab... | module Lib where
import Control.Monad.Managed
import Control.Monad.Trans.Resource ( runResourceT
, allocate
, release
)
import System.IO
bra... |
0ee88706e38490d3ffb98a82fe36e82c0914cbfac3c827ccc011b117ad9056a7 | mvdcamme/meta-tracing-JIT | output.scm | (module output racket
(require "constants.scm")
(provide output
outputln
output-newline)
;
; Outputting
;
(define VERBOSITY_LEVEL 'd)
(define LEVELS '(uv v d e))
;;; Source: -do-i-find-the-index-of-an-element-in-a-list-in-racket
(define (index-of lst ele)
(l... | null | https://raw.githubusercontent.com/mvdcamme/meta-tracing-JIT/640af917e473f3793ab12791dcb2c80f617b8a0d/output.scm | scheme |
Outputting
Source: -do-i-find-the-index-of-an-element-in-a-list-in-racket
Outputs the given argument to the console if the given verbosity-level is higher than or equals VERBOSITY_LEVEL.
if the given verbosity-level is higher than or equals VERBOSITY_LEVEL.
if the given verbosity-level is higher than or equals V... | (module output racket
(require "constants.scm")
(provide output
outputln
output-newline)
(define VERBOSITY_LEVEL 'd)
(define LEVELS '(uv v d e))
(define (index-of lst ele)
(let loop ((lst lst)
(idx 0))
(cond ((empty? lst) #f)
((equal... |
ab2b7fbb48765b43837325b58ba95cd57783987ffff64b6032e534350a4fdd44 | wjrforcyber/SystemT | IEval.hs | {-# LANGUAGE GADTs #-}
| Evaluator for Intrinsic L3
module Lang.L3.Eval.IEval where
import Common.Types
import Lang.L3.Syntax.Intrinsic
eval :: Exp ty -> Val ty
eval EZero = VSuccN 0
eval (ESucc e) =
case eval e of
VSuccN n -> VSuccN (Succ n)
eval ETrue = VTrue
eval EFalse = VFalse
eval (EAdd e1 e2) =
case... | null | https://raw.githubusercontent.com/wjrforcyber/SystemT/0b402e5a9a335e28e8a19ba0274f1b8e40c08eaf/src/Lang/L3/Eval/IEval.hs | haskell | # LANGUAGE GADTs # |
| Evaluator for Intrinsic L3
module Lang.L3.Eval.IEval where
import Common.Types
import Lang.L3.Syntax.Intrinsic
eval :: Exp ty -> Val ty
eval EZero = VSuccN 0
eval (ESucc e) =
case eval e of
VSuccN n -> VSuccN (Succ n)
eval ETrue = VTrue
eval EFalse = VFalse
eval (EAdd e1 e2) =
case eval e1 of
VSuccN ... |
310dc694b0359f2fdc520d9f1d1997b65b1d64ebccb98c1c02ae3c955027b160 | input-output-hk/project-icarus-importer | Impl.hs | -- | This module re-exports slotting implementations.
module Pos.Slotting.Impl
( module Pos.Slotting.Impl.Simple
, module Pos.Slotting.Impl.Util
) where
import Pos.Slotting.Impl.Simple
import Pos.Slotting.Impl.Util | null | https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/infra/Pos/Slotting/Impl.hs | haskell | | This module re-exports slotting implementations. |
module Pos.Slotting.Impl
( module Pos.Slotting.Impl.Simple
, module Pos.Slotting.Impl.Util
) where
import Pos.Slotting.Impl.Simple
import Pos.Slotting.Impl.Util |
991251731c4bb5ffe446227c6ce0fc1b15316bb4214c449baf71a756feb4ba4e | jacekschae/learn-pedestal-course-files | conversations.clj | (ns cheffy.conversations
(:require [io.pedestal.http :as http]
[cheffy.interceptors :as interceptors]
[io.pedestal.interceptor :as interceptor]
[ring.util.response :as rr]
[io.pedestal.http.body-params :as bp])
(:import (java.util Date)))
(def conversation-pattern
... | null | https://raw.githubusercontent.com/jacekschae/learn-pedestal-course-files/54431873708f11a497abd2795e02d0934f019c68/increments/49-clear-notifications/src/main/cheffy/conversations.clj | clojure | (ns cheffy.conversations
(:require [io.pedestal.http :as http]
[cheffy.interceptors :as interceptors]
[io.pedestal.interceptor :as interceptor]
[ring.util.response :as rr]
[io.pedestal.http.body-params :as bp])
(:import (java.util Date)))
(def conversation-pattern
... | |
1279b25fccdaa19b5abb6e923c6c8ee58dee3bf1d6b88410559367ddb65b8a9c | kana/sicp | ex-4.26.scm | Exercise 4.26 . and disagree over the
importance of lazy evaluation for implementing things such as unless .
;;; points out that it's possible to implement unless in applicative order as
a special form . counters that , if one did that , unless would be
;;; merely syntax, not a procedure that could be us... | null | https://raw.githubusercontent.com/kana/sicp/912bda4276995492ffc2ec971618316701e196f6/ex-4.26.scm | scheme | points out that it's possible to implement unless in applicative order as
merely syntax, not a procedure that could be used in conjunction with
higher-order procedures. Fill in the details on both sides of the
argument.
Show how to implement unless as a derived expression (like cond or let),
...
...
and give a... | Exercise 4.26 . and disagree over the
importance of lazy evaluation for implementing things such as unless .
a special form . counters that , if one did that , unless would be
(define (unless? exp)
(tagged-list? exp 'unless))
(define (unless-predicate exp) (cadr exp))
(define (unless-consequent exp... |
acbf1f735e21f8c4a447697c98b975255e954c6830934678a71438880b092ac2 | scarf-sh/tie | Operation.hs | # LANGUAGE DeriveFoldable #
# LANGUAGE DeriveFunctor #
{-# LANGUAGE DeriveTraversable #-}
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE RecordWildCards #
# LANGUAGE TupleSections #
# LANGUAGE TypeApplications #
module Tie.Operat... | null | https://raw.githubusercontent.com/scarf-sh/tie/4e9764fc58b84b3682fedd8e66e64d1818c3c029/src/Tie/Operation.hs | haskell | # LANGUAGE DeriveTraversable #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
* Errors
* Path
* Dependencies
* Normalization
| HTTP Status code type
| Request body descriptor
| Response descriptor
| Response contents per media type
| Response headers
| Internal representation of a path.
| Internal re... | # LANGUAGE DeriveFoldable #
# LANGUAGE DeriveFunctor #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
# LANGUAGE TupleSections #
# LANGUAGE TypeApplications #
module Tie.Operation
( StatusCode,
Style (..),
Param (..),
Header (..),
RequestBody (..),
Res... |
0d700df9088e69c4f24968acf82e96495323cdead3cc9848014149db092d306b | nitrogen/NitrogenProject.com | demos_mobile_controls.erl | % vim: ts=4 sw=4 et
-module (demos_mobile_controls).
-include_lib ("nitrogen_core/include/wf.hrl").
-compile(export_all).
main() -> #template { file="./templates/demosmobile.html" }.
title() -> "Mobile Controls and Postbacks".
headline() -> "Mobile Controls and Postbacks".
body() ->
[
"
<p>
... | null | https://raw.githubusercontent.com/nitrogen/NitrogenProject.com/b4b3a0dbe17394608d2ee6eaa089e3ece1285075/src/demos/demos_mobile_controls.erl | erlang | vim: ts=4 sw=4 et | -module (demos_mobile_controls).
-include_lib ("nitrogen_core/include/wf.hrl").
-compile(export_all).
main() -> #template { file="./templates/demosmobile.html" }.
title() -> "Mobile Controls and Postbacks".
headline() -> "Mobile Controls and Postbacks".
body() ->
[
"
<p>
Nitrogen provid... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.