_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 |
|---|---|---|---|---|---|---|---|---|
48ca99986f3bb2bcdf054eb7cd8fd3528e07243a85a37a545cf634eec61abd0d | freedict/tools | Pretty.hs |
- Language / Ding / Pretty.hs - pretty printing of the Ding AST
- Copyright 2020,2022 Einhard Leichtfuß
-
- This file is part of ding2tei - haskell .
-
- ding2tei - haskell is free software : you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as publ... | null | https://raw.githubusercontent.com/freedict/tools/3596640e6e0582cc5fb76a342e5d8e7413aa4b34/importers/ding2tei/src/Language/Ding/Pretty.hs | haskell | -----------------------
Some helper functions
| Modify a `Doc' iff it is non-empty.
----------------------
The Pretty instances
vi: ts=2 sw=2 et |
- Language / Ding / Pretty.hs - pretty printing of the Ding AST
- Copyright 2020,2022 Einhard Leichtfuß
-
- This file is part of ding2tei - haskell .
-
- ding2tei - haskell is free software : you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as publ... |
60d2d04ab5a4799ae372377867041df0bf33fb5f13010a88970a120347284fe1 | pointslope/reagent-svg-demo | app.cljs | (ns svg.app
(:require-macros [reagent.debug :refer [log prn]]
[cljs.core.async.macros :as m :refer [go go-loop]])
(:require [reagent.core :as r :refer [atom]]
[pointslope.remit.events :as pse :refer [emit subscribe]]
[pointslope.remit.middleware :as psm :refer [event-map-m... | null | https://raw.githubusercontent.com/pointslope/reagent-svg-demo/0538f4749bc0bca91d4c7dc324d125ff2c6cce9a/src/cljs/svg/app.cljs | clojure | Data
Middleware Wrapper
Event Handlers
Components
get my component-local
Drag event handler
Drag end
Run it all | (ns svg.app
(:require-macros [reagent.debug :refer [log prn]]
[cljs.core.async.macros :as m :refer [go go-loop]])
(:require [reagent.core :as r :refer [atom]]
[pointslope.remit.events :as pse :refer [emit subscribe]]
[pointslope.remit.middleware :as psm :refer [event-map-m... |
4458bd69ae76b6a4a0ac06f0d7f2dc958f92a65cf88924b6f67ed3e99a574af6 | AshleyYakeley/Truth | NamespaceRenamable.hs | module Language.Expression.Common.Rename.NamespaceRenamable where
import Data.Shim
import Language.Expression.Common.Rename.RenameTypeSystem
import Language.Expression.Common.Rename.VarNamespaceT
import Language.Expression.Common.Rename.VarRenamerT
import Language.Expression.Common.TypeVariable
import Shapes
type Nam... | null | https://raw.githubusercontent.com/AshleyYakeley/Truth/4440fb14943e8a6ff02e760261918b1c9c535e3f/Pinafore/typed-expression/lib/Language/Expression/Common/Rename/NamespaceRenamable.hs | haskell | module Language.Expression.Common.Rename.NamespaceRenamable where
import Data.Shim
import Language.Expression.Common.Rename.RenameTypeSystem
import Language.Expression.Common.Rename.VarNamespaceT
import Language.Expression.Common.Rename.VarRenamerT
import Language.Expression.Common.TypeVariable
import Shapes
type Nam... | |
6c817133c5c1aff54cacf581473024e7e73f22f76f4772eb116af76edac54f98 | cracauer/sbcl-ita | hash.pure.lisp | This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
While most of SBCL is derived from the CMU CL system , the test
;;;; files (like this one) were written from scratch after the fork
from CMU CL .
;;;;
;;;; This software is in the public domain and is provided with
;;;;... | null | https://raw.githubusercontent.com/cracauer/sbcl-ita/f85a8cf0d1fb6e8c7b258e898b7af3233713e0b9/tests/hash.pure.lisp | lisp | more information.
files (like this one) were written from scratch after the fork
This software is in the public domain and is provided with
absolutely no warranty. See the COPYING and CREDITS files for
more information.
+MAGIC-HASH-VECTOR-VALUE+ is used to mark empty entries in the slot
change when the content... | This software is part of the SBCL system . See the README file for
While most of SBCL is derived from the CMU CL system , the test
from CMU CL .
(in-package :cl-user)
HASH - VECTOR of hash tables . It must be a value outside of the range
of SXHASH . The range of SXHASH is the non - negative fixnums .
(with-... |
b41823abd1407750c7ce594699918e4b7fcaf82bc39fc7c4478f298d5b0d07f2 | cojna/iota | Prime.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE BinaryLiterals #
module Math.Prime where
import qualified Data.List as L
smallPrimes :: (Integral i) => [i]
smallPrimes = 2 : [n | n <- [3, 5 .. 46337], all ((> 0) . rem n) $ takeWhile (\x -> x * x <= n) smallPrimes]
{-# SPECIALIZE smallPrimes :: [Int] #-}
|
> > > primeF... | null | https://raw.githubusercontent.com/cojna/iota/eff2327907d6cf2144a0da2a2959b3a82bd450fa/src/Math/Prime.hs | haskell | # LANGUAGE BangPatterns #
# SPECIALIZE smallPrimes :: [Int] #
# SPECIALIZE primeFactors :: Int -> [Int] #
# SPECIALIZE isPrime :: Int -> Bool # | # LANGUAGE BinaryLiterals #
module Math.Prime where
import qualified Data.List as L
smallPrimes :: (Integral i) => [i]
smallPrimes = 2 : [n | n <- [3, 5 .. 46337], all ((> 0) . rem n) $ takeWhile (\x -> x * x <= n) smallPrimes]
|
> > > primeFactors 60
[ 2,2,3,5 ]
> > > primeFactors 0
[ ]
> > > primeFact... |
2cf6ee9ba1c41c59bb0507ef563f64a80d33db747989d46519d8cbb488ec1103 | bondy-io/bondy | bondy_bridge_relay_sup.erl | %% =============================================================================
%% bondy_bridge_relay_sup.erl -
%%
Copyright ( c ) 2018 - 2022 Leapsight . All rights reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the Li... | null | https://raw.githubusercontent.com/bondy-io/bondy/a1267e7e5526db24f278e12315020753f3168b44/apps/bondy/src/bondy_bridge_relay_sup.erl | erlang | =============================================================================
bondy_bridge_relay_sup.erl -
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 WARRANT... | Copyright ( c ) 2018 - 2022 Leapsight . All rights reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(bondy_bridge_relay_sup).
-behaviour(supervisor).
-include("bondy.hrl").
-export([start_link/0]).
... |
416db6350a0fd4641f2aa61c3a15afb41a0080672401c710128a5d61e43fe7bf | thwfhk/lambdaQ | PrettyPrinter.hs | module PrettyPrinter where
import Syntax
import Context
import QASMSyntax
import Data.List
import Control.Monad.State
import Control.Monad.Except
----------------------------------------------------------------
printType :: Type -> String
printType TyUnit = "Unit"
printType TyBool = "Bool"
printType (TyProd ty1 ty2)... | null | https://raw.githubusercontent.com/thwfhk/lambdaQ/70c604a29471b77c448418dd8702b91089d214a8/src/Frontend/src/PrettyPrinter.hs | haskell | --------------------------------------------------------------
-------------------------------------------------------------- | module PrettyPrinter where
import Syntax
import Context
import QASMSyntax
import Data.List
import Control.Monad.State
import Control.Monad.Except
printType :: Type -> String
printType TyUnit = "Unit"
printType TyBool = "Bool"
printType (TyProd ty1 ty2) = printType ty1 ++ " * " ++ printType ty2
printType (TyArr ty1 t... |
b2fdc0281ead82f21433e7f4d88ce2d2547f7dfb6818e67c4f5ef127bb81ad4b | threatgrid/ctim | vulnerability_test.clj | (ns ctim.generators.vulnerability-test
(:require [clj-momo.test-helpers.core :as mth]
[clojure.test :refer [are deftest is testing use-fixtures]]
[clojure.test.check.clojure-test :refer [defspec]]
[ctim.schemas.vulnerability :as vulnerability]
[ctim.test-helpers
... | null | https://raw.githubusercontent.com/threatgrid/ctim/2ecae70682e69495cc3a12fd58a474d4ea57ae9c/test/ctim/generators/vulnerability_test.clj | clojure | Vulnerability
New Vulnerability | (ns ctim.generators.vulnerability-test
(:require [clj-momo.test-helpers.core :as mth]
[clojure.test :refer [are deftest is testing use-fixtures]]
[clojure.test.check.clojure-test :refer [defspec]]
[ctim.schemas.vulnerability :as vulnerability]
[ctim.test-helpers
... |
eb894dc728894e4104755f42abd99a1da9497af0a3497f2d41a3b807499f9f39 | jumarko/web-development-with-clojure | common.cljs | ;---
Excerpted from " Web Development with Clojure , Second Edition " ,
published by The Pragmatic Bookshelf .
Copyrights apply to this code . It may not be used to create training material ,
; courses, books, articles, and the like. Contact us if you are in doubt.
; We make no guarantees that this code is fit fo... | null | https://raw.githubusercontent.com/jumarko/web-development-with-clojure/dfff6e40c76b64e9fcd440d80c7aa29809601b6b/code/picture-gallery-a/src/cljs/picture_gallery/components/common.cljs | clojure | ---
courses, books, articles, and the like. Contact us if you are in doubt.
We make no guarantees that this code is fit for any purpose.
Visit for more book information.
--- | Excerpted from " Web Development with Clojure , Second Edition " ,
published by The Pragmatic Bookshelf .
Copyrights apply to this code . It may not be used to create training material ,
(ns picture-gallery.components.common
(:require [reagent.core :refer [atom]]
[reagent.session :as session]))
(de... |
9977950aabf622ee26745917722d8738c08a394e7b64de69bbad8bed815416d1 | synrc/rpc | bert_swift.erl | -module(bert_swift).
-export([parse_transform/2]).
-compile(export_all).
-include("bert.hrl").
parse_transform(Forms, _Options) -> switch(directives(Forms)),
io:format("Swift Models Generated: ~p~n",[?SWIFT]),
Forms.
directives(Forms) -> lists:flatten([ form(F) || F <- Forms ]).
switch(List) ->
File = fil... | null | https://raw.githubusercontent.com/synrc/rpc/caa55daa8f21a062248238ec5b725b33df621d92/src/bert_swift.erl | erlang | io:format("Swift ~p~n",[{List,T}]),
io:format("Generated Swift Model: ~p~n",[File]),
io:format("Generated Swift Spec: ~p~n",[File]), | -module(bert_swift).
-export([parse_transform/2]).
-compile(export_all).
-include("bert.hrl").
parse_transform(Forms, _Options) -> switch(directives(Forms)),
io:format("Swift Models Generated: ~p~n",[?SWIFT]),
Forms.
directives(Forms) -> lists:flatten([ form(F) || F <- Forms ]).
switch(List) ->
File = fil... |
70e855a4aedfc1ae839a2d24a93c34bea4eb06e0342126f4351a3f91a82943dc | tqtezos/stablecoin | Internal.hs | SPDX - FileCopyrightText : 2020 Globacap
SPDX - License - Identifier : MPL-2.0
--
-- | This is a simple implementation of a transferlist contract that is only
-- used in tests.
# OPTIONS_GHC -Wno - orphans #
module Indigo.Contracts.Transferlist.Internal
( Parameter
, Storage (..)
, mkStorage
, transferlist... | null | https://raw.githubusercontent.com/tqtezos/stablecoin/c8da01d292635523e5f7a6ca40a93c003bec7ec6/haskell/src/Indigo/Contracts/Transferlist/Internal.hs | haskell |
| This is a simple implementation of a transferlist contract that is only
used in tests. | SPDX - FileCopyrightText : 2020 Globacap
SPDX - License - Identifier : MPL-2.0
# OPTIONS_GHC -Wno - orphans #
module Indigo.Contracts.Transferlist.Internal
( Parameter
, Storage (..)
, mkStorage
, transferlistContract
) where
import Data.Set qualified as Set
import Indigo
import Lorentz.Run (Contract)
... |
574f32a3ed86d730556d247abebbd323fbdb16c56c340f3f4f05009de06413a2 | ruhler/smten | AnyMap.hs |
module Smten.Runtime.AnyMap (
AnyMap, new, lookup, insert,
) where
import Prelude hiding (lookup)
import GHC.Base (Any)
import Data.Functor ((<$>))
import System.Mem.StableName
import Unsafe.Coerce
import qualified Data.HashTable.IO as H
AnyMap
-- It maps from keys of any type to values of any type.
-- ... | null | https://raw.githubusercontent.com/ruhler/smten/16dd37fb0ee3809408803d4be20401211b6c4027/smten-base/Smten/Runtime/AnyMap.hs | haskell | It maps from keys of any type to values of any type.
Different keys and different values may have different types in the same
map.
It is up to the user to guarentee the type of value inserted in the map
for a given key is always the type of value looked up for under that given
key. |
module Smten.Runtime.AnyMap (
AnyMap, new, lookup, insert,
) where
import Prelude hiding (lookup)
import GHC.Base (Any)
import Data.Functor ((<$>))
import System.Mem.StableName
import Unsafe.Coerce
import qualified Data.HashTable.IO as H
AnyMap
type AnyMap = H.BasicHashTable (StableName Any) Any
new :: I... |
8b3eeba3b8318cce72bee7f0c29ca069917d89e70854b72c206c58fac25ba4c4 | uswitch/bifrost | main.clj | (ns uswitch.bifrost.main
(:require [uswitch.bifrost.system :refer (make-system)]
[uswitch.bifrost.version :refer (current-version current-build-number)]
[com.stuartsierra.component :refer (start)]
[clojure.tools.logging :refer (info)]
[clojure.tools.cli :refer (parse-op... | null | https://raw.githubusercontent.com/uswitch/bifrost/40a2bbb8af5c3b6d65930511c141c777a9585942/src/uswitch/bifrost/main.clj | clojure | (ns uswitch.bifrost.main
(:require [uswitch.bifrost.system :refer (make-system)]
[uswitch.bifrost.version :refer (current-version current-build-number)]
[com.stuartsierra.component :refer (start)]
[clojure.tools.logging :refer (info)]
[clojure.tools.cli :refer (parse-op... | |
213e062b67fb341fbd12e9848355cc3ba15e3bf6b7345032020ea70871bdc669 | re-ops/re-core | systems.clj | (ns re-core.persistency.systems
(:require
[xtdb.api :as xt]
[re-share.core :refer (gen-uuid)]
[re-core.model :as model]
[taoensso.timbre :refer (refer-timbre)]
[re-core.persistency.xtdb :refer [node]]
[re-core.persistency.common :refer [unflatten flatten-]]))
(refer-timbre)
(defn get-system-by-hos... | null | https://raw.githubusercontent.com/re-ops/re-core/e13490aedd6d34ff01f11b28adf359beb5c0bb5b/src/re_core/persistency/systems.clj | clojure | (ns re-core.persistency.systems
(:require
[xtdb.api :as xt]
[re-share.core :refer (gen-uuid)]
[re-core.model :as model]
[taoensso.timbre :refer (refer-timbre)]
[re-core.persistency.xtdb :refer [node]]
[re-core.persistency.common :refer [unflatten flatten-]]))
(refer-timbre)
(defn get-system-by-hos... | |
ab98d3e78985d5d453509098dad61873c756406e31ce539178ade405b16537bf | swarmpit/swarmpit | form_variables.cljs | (ns swarmpit.component.service.form-variables
(:require [material.components :as comp]
[material.component.form :as form]
[material.component.list.edit :as list]
[swarmpit.component.state :as state]
[sablono.core :refer-macros [html]]
[rum.core :as rum]))
(... | null | https://raw.githubusercontent.com/swarmpit/swarmpit/38ffbe08e717d8620bf433c99f2e85a9e5984c32/src/cljs/swarmpit/component/service/form_variables.cljs | clojure | (ns swarmpit.component.service.form-variables
(:require [material.components :as comp]
[material.component.form :as form]
[material.component.list.edit :as list]
[swarmpit.component.state :as state]
[sablono.core :refer-macros [html]]
[rum.core :as rum]))
(... | |
43fd1adf8547d948e77bd97c94b82c07107b77354ec36b1d7d3e9a656d62dc28 | acl2/acl2 | library-extensions.lisp | RISC - V Library
;
Copyright ( C ) 2023 Kestrel Institute ( )
;
License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 .
;
Author : ( acoglio on GitHub )
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(in-package "RISCV")
(include-book "ihs/basic-... | null | https://raw.githubusercontent.com/acl2/acl2/6fd484a7de945d1882c21fa68da6f48521012c7b/books/kestrel/risc-v/library-extensions.lisp | lisp | RISC - V Library
Copyright ( C ) 2023 Kestrel Institute ( )
License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 .
Author : ( acoglio on GitHub )
(in-package "RISCV")
(include-book "ihs/basic-definitions" :dir :system)
(include-book "kestrel/fty/ubyte5" :dir :system)
(include-b... | |
28b348494bafbe974b8010d9e07910b95e5d10f91c64246d90a786d05768f7a9 | nasa/Common-Metadata-Repository | config.clj | (ns cmr.metadata.proxy.config
(:require
[clojure.string :as string]
[cmr.exchange.common.config :as config]
[taoensso.timbre :as log])
(:import
(clojure.lang Keyword)))
(def config-file "config/cmr-metadata-proxy/config.edn")
(def data #'config/data)
(defn service-keys
"We need to special-case two... | null | https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/63001cf021d32d61030b1dcadd8b253e4a221662/other/cmr-exchange/metadata-proxy/src/cmr/metadata/proxy/config.clj | clojure | (ns cmr.metadata.proxy.config
(:require
[clojure.string :as string]
[cmr.exchange.common.config :as config]
[taoensso.timbre :as log])
(:import
(clojure.lang Keyword)))
(def config-file "config/cmr-metadata-proxy/config.edn")
(def data #'config/data)
(defn service-keys
"We need to special-case two... | |
dc5a64748ae84c8695436f973f6e42b92d08e43883d5b605a878ef4f49f2def0 | typelead/intellij-eta | String00005.hs | module String00005 where
instance (Show e, Show f) => Show (UntypedFeldF e f) where
show (Variable v t) = 'm':(show v `append` show t)
show (Lambda v e) = "(\\" ++ show v ++ " -> " ++ show e ++ ")"
default (Integer, Double) | null | https://raw.githubusercontent.com/typelead/intellij-eta/ee66d621aa0bfdf56d7d287279a9a54e89802cf9/plugin/src/test/resources/fixtures/eta/sources/String00005.hs | haskell | module String00005 where
instance (Show e, Show f) => Show (UntypedFeldF e f) where
show (Variable v t) = 'm':(show v `append` show t)
show (Lambda v e) = "(\\" ++ show v ++ " -> " ++ show e ++ ")"
default (Integer, Double) | |
6b67a4d01b7139e83141fc49644232b751cdcf37c19665a14aeb148b26ab816f | m0ar/safe-streaming | LClass.hs | # LANGUAGE NoImplicitPrelude #
module Control.Monad.IO.LClass where
import Control.Monad.LMonad (LMonad())
import System.IO (IO())
import Data.Linear (id)
class LMonad m => LMonadIO m where
liftIO :: IO a -> m a
instance LMonadIO IO where
liftIO = id
| null | https://raw.githubusercontent.com/m0ar/safe-streaming/126689e657c627c174521743676c771a78cd1a48/src/Control/Monad/IO/LClass.hs | haskell | # LANGUAGE NoImplicitPrelude #
module Control.Monad.IO.LClass where
import Control.Monad.LMonad (LMonad())
import System.IO (IO())
import Data.Linear (id)
class LMonad m => LMonadIO m where
liftIO :: IO a -> m a
instance LMonadIO IO where
liftIO = id
| |
e69f415e5a38ca7757157a16d15fded4f79a0a49af001045c4e97b3cde04802b | fpco/wai-middleware-consul | Main.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
import BasePrelude
import Control.Monad.IO.Class ( MonadIO(liftIO) )
import Control.Monad.Logger ( runStdoutLoggingT )
import Network.Wai.Application.Static
( staticApp, defaultWebAppSettings )
import Network.Wai.Handler.Warp ( run )
import Network.... | null | https://raw.githubusercontent.com/fpco/wai-middleware-consul/5544d7e34f779aa061888f63fcd79fd8a67f1294/example/Main.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE NoImplicitPrelude #
import BasePrelude
import Control.Monad.IO.Class ( MonadIO(liftIO) )
import Control.Monad.Logger ( runStdoutLoggingT )
import Network.Wai.Application.Static
( staticApp, defaultWebAppSettings )
import Network.Wai.Handler.Warp ( run )
import Network.Wai.Middleware.Consul ( withConsul ... |
66a6d92f0607b8508f696357645bb1a0bfd1edb1cd3d28a6bd533a8fcf669d01 | DKurilo/hackerrank | Main.hs | module Main (main) where
import System.IO
allSizes :: [Int] -> [Int]
allSizes xs
| l < 2 = []
| otherwise = [xs !! j - xs !! i | i <- [0 .. l - 2], j <- [i + 1 .. l - 1]]
where
l = length xs
main :: IO ()
main = do
hSetBuffering stdout NoBuffering
(w : h : _) <- map read . words <$> getLine
xs <- ma... | null | https://raw.githubusercontent.com/DKurilo/hackerrank/d86ccdcc213a236f1e9b0d047d09c10e20268b98/codingame/rectangle-partition/src/Main.hs | haskell | module Main (main) where
import System.IO
allSizes :: [Int] -> [Int]
allSizes xs
| l < 2 = []
| otherwise = [xs !! j - xs !! i | i <- [0 .. l - 2], j <- [i + 1 .. l - 1]]
where
l = length xs
main :: IO ()
main = do
hSetBuffering stdout NoBuffering
(w : h : _) <- map read . words <$> getLine
xs <- ma... | |
3471f364968dff654ad504756c0dc1eab4316bf252e05815c41f76d43d4f4078 | mage2tv/magento-cache-clean | run.cljs | (ns cache.run
(:require [cache.core]))
(set! *warn-on-infer* true)
(defn -main [& args]
(apply cache.core/-main args))
(set! *main-cli-fn* -main)
| null | https://raw.githubusercontent.com/mage2tv/magento-cache-clean/67d4ce3f06cb42eccceff436580cdfe0ddfc5deb/src/cache/run.cljs | clojure | (ns cache.run
(:require [cache.core]))
(set! *warn-on-infer* true)
(defn -main [& args]
(apply cache.core/-main args))
(set! *main-cli-fn* -main)
| |
66a80c9be7468df1ee83100fe01fef70dfd3a298d0ce28874ae742d21d3382af | tvraman/aster-math | precedence-definitions.lisp | ;;; -*- Mode: LISP -*- ;;;
Copyright ( C ) 1990 , 1991 , 1992 , 1993 , 1994by T. V. Raman
;;; All Rights Reserved
;;;
(in-package :aster)
;;; Contains precedence declarations for operators
;;; The declarations for the binary operators will themselves be
;;; generated by a lisp function.
;;{{{ auto... | null | https://raw.githubusercontent.com/tvraman/aster-math/6eaa1bc3b7660c76be6162dc4987d422af8c58cc/lisp/latex-parser/precedence-definitions.lisp | lisp | -*- Mode: LISP -*- ;;;
All Rights Reserved
Contains precedence declarations for operators
The declarations for the binary operators will themselves be
generated by a lisp function.
{{{ automatic generator:
Function: GENERATE-PRECEDENCE-DECLARATIONS Author: raman
}}}
{{{ precedence for ... |
Copyright ( C ) 1990 , 1991 , 1992 , 1993 , 1994by T. V. Raman
(in-package :aster)
Created : Thu Oct 29 10:21:52 1992
#+clisp
(defun generate-precedence-declarations ()
"Generate precedence declarations to a file"
(let
((filename (progn
(print "Enter filename: ")
... |
42982d054a27c41c4cb3772683a903c9ad84c75f9a6f9ca77b99d2b46dcf2ad4 | tisnik/clojure-examples | core_test.clj | (ns enlive5.core-test
(:require [clojure.test :refer :all]
[enlive5.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| null | https://raw.githubusercontent.com/tisnik/clojure-examples/984af4a3e20d994b4f4989678ee1330e409fdae3/enlive5/test/enlive5/core_test.clj | clojure | (ns enlive5.core-test
(:require [clojure.test :refer :all]
[enlive5.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| |
d44f4c92e1febe4b5b4e74aaad38785fe6b25bd98c00f53c7089423bbc9ed122 | eareese/htdp-exercises | 083-design-editor-render.rkt | #lang htdp/bsl
(require 2htdp/image)
; Design the function render, which consumes an Editor and produces an image.
The purpose of the function is to render the text within an empty scene of 200 x 20 pixels . For the cursor , use a 1 x 20 red rectangle and for the strings , black text of size 16 .
(define-struct ed... | null | https://raw.githubusercontent.com/eareese/htdp-exercises/a85ff3111d459dda0e94d9b463d01a09accbf9bf/part01-fixed-size-data/083-design-editor-render.rkt | racket | Design the function render, which consumes an Editor and produces an image.
interpretation (make-editor s t) means the text in the editor is
(string-append s t) with the cursor displayed between s and t
Editor -> Image
Editor -> Image
draw the text with cursor | #lang htdp/bsl
(require 2htdp/image)
The purpose of the function is to render the text within an empty scene of 200 x 20 pixels . For the cursor , use a 1 x 20 red rectangle and for the strings , black text of size 16 .
(define-struct editor [pre post])
Editor = ( make - editor )
(define (render ed)
(overl... |
ec92c5305fac1a537a5b364e666533072f2b214870a0fc938f96754625ec269a | karimarttila/clojure | routes.clj | (ns worldstat.backend.routes.routes
(:require [reitit.swagger-ui :as swagger-ui]
[reitit.swagger :as swagger]
[ring.util.http-response :as r]
[worldstat.backend.data.world :as world]))
;; ******************************************************************
; Curl api like:
http lo... | null | https://raw.githubusercontent.com/karimarttila/clojure/ee1261b9a8e6be92cb47aeb325f82a278f2c1ed3/statistics/worldstat/src/clj/worldstat/backend/routes/routes.clj | clojure | ******************************************************************
Curl api like:
******************************************************************
For testing purposes (has the :data payload).
For testing purposes (has post data). | (ns worldstat.backend.routes.routes
(:require [reitit.swagger-ui :as swagger-ui]
[reitit.swagger :as swagger]
[ring.util.http-response :as r]
[worldstat.backend.data.world :as world]))
http localhost:5522 / worldstat / api / version
(def my-version {:version 0.1 :date "2020-12... |
dab7f0d78654475915ed5205e578f3a6d69f0715bf0139a73467d5e3b9cabd0b | oliyh/spa-skeleton | core_test.clj | (ns spa-skeleton.core-test
(:require [clojure.test :refer :all]
[spa-skeleton.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| null | https://raw.githubusercontent.com/oliyh/spa-skeleton/50e231865721e6e146ec5eb8cd8a8c30c55f9360/test/spa_skeleton/core_test.clj | clojure | (ns spa-skeleton.core-test
(:require [clojure.test :refer :all]
[spa-skeleton.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| |
a1a4a3dbb7eb141e520053faa1fa4af43b132cd9599580753768b1dc7eb22060 | awkay/om-tutorial | J_Advanced_Queries.cljs | (ns om-tutorial.J-Advanced-Queries
(:require-macros [cljs.test :refer [is]])
(:require [om.next :as om :refer-macros [defui]]
[om.dom :as dom]
[devcards.core :as dc :refer-macros [defcard defcard-doc deftest]]
[cljs.reader :as r]
[om.next.impl.parser :as p]))
(defcar... | null | https://raw.githubusercontent.com/awkay/om-tutorial/83ca10d91380ba62458b98ccaa80fd11b9c8321d/src/tutorial/om_tutorial/J_Advanced_Queries.cljs | clojure | (ns om-tutorial.J-Advanced-Queries
(:require-macros [cljs.test :refer [is]])
(:require [om.next :as om :refer-macros [defui]]
[om.dom :as dom]
[devcards.core :as dc :refer-macros [defcard defcard-doc deftest]]
[cljs.reader :as r]
[om.next.impl.parser :as p]))
(defcar... | |
a22bf3017c3fb2b9c90339394c328c11e99a4861a412a69577e0f80e83c1328d | Quid2/top | Util.hs | {-# LANGUAGE CPP #-}
{-# LANGUAGE ForeignFunctionInterface #-}
# LANGUAGE GHCForeignImportPrim #
# LANGUAGE JavaScriptFFI #
# LANGUAGE NoMonomorphismRestriction #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Network.Top.Util(
-... | null | https://raw.githubusercontent.com/Quid2/top/0f8dfa54d977053d02396e914c00b84cc1c1c498/src/Network/Top/Util.hs | haskell | # LANGUAGE CPP #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE OverloadedStrings #
# LANGUAGE ScopedTypeVariables #
*Exceptions
*Time
*Threads
*Monads
*Logging (with native ghcjs support)
*Other
-------- Logging
-------- GHC - JS Version
-------- GHC Version
|Setup the glo... | # LANGUAGE GHCForeignImportPrim #
# LANGUAGE JavaScriptFFI #
# LANGUAGE NoMonomorphismRestriction #
module Network.Top.Util(
strictTry,try,tryE,forceE,SomeException,attempts,attempt
,milliseconds,seconds,minutes
,withTimeout
,async,cancel,threadDelay
,liftIO,forever,when,unless
,dbg,... |
0f53bad254c6a02300d82eb4be903461f9f3191d31cbc21f5efbc9b6c6780efe | ghcjs/ghcjs | overloadedlistsrun02.hs | # LANGUAGE OverloadedLists , TypeFamilies #
import qualified Data.Set as S
import GHC.Exts
main = do print ([] :: (S.Set Int))
print (['a','b','c'] :: (S.Set Char))
print (['a','c'..'g'] :: (S.Set Char))
instance Ord a => IsList (S.Set a) where
type (Item (S.Set a)) = a
fromList = S.f... | null | https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/test/ghc/overloadedlists/overloadedlistsrun02.hs | haskell | # LANGUAGE OverloadedLists , TypeFamilies #
import qualified Data.Set as S
import GHC.Exts
main = do print ([] :: (S.Set Int))
print (['a','b','c'] :: (S.Set Char))
print (['a','c'..'g'] :: (S.Set Char))
instance Ord a => IsList (S.Set a) where
type (Item (S.Set a)) = a
fromList = S.f... | |
bde219b6714dcaff7e8e4e58bcc81da8c6476f941d032c9399df7b864fb10b39 | joearms/elib1 | tryxform.erl | Copyright ( c ) 2006 - 2009
See MIT - LICENSE for licensing information .
-module(tryxform).
-compile(export_all).
test() ->
L = elib1_xml:parse_file("lorem.chap"),
elib1_misc:dump("tryx", L),
Chapter = get_node(L, "chap"),
HTML = toHTML([Chapter], [], Chapter),
file:write_file("out.html",[H... | null | https://raw.githubusercontent.com/joearms/elib1/d617d0ec70a058ef102749eadf51c024444c28d9/src/tryxform.erl | erlang | Copyright ( c ) 2006 - 2009
See MIT - LICENSE for licensing information .
-module(tryxform).
-compile(export_all).
test() ->
L = elib1_xml:parse_file("lorem.chap"),
elib1_misc:dump("tryx", L),
Chapter = get_node(L, "chap"),
HTML = toHTML([Chapter], [], Chapter),
file:write_file("out.html",[H... | |
86a425567552cec1b6ebb34f2025d88899a39acad304d236329df7c2b361cbdd | auser/beehive | bee_store.erl | %%%-------------------------------------------------------------------
%%% File : bee_store.erl
Author :
%%% Description :
%%%
Created : We d Oct 7 22:37:21 PDT 2009
%%%-------------------------------------------------------------------
-module (bee_store).
-include ("beehive.hrl").
-include ("router.h... | null | https://raw.githubusercontent.com/auser/beehive/dfe257701b21c56a50af73c8203ecac60ed21991/lib/erlang/apps/beehive_router/src/bee_store.erl | erlang | -------------------------------------------------------------------
File : bee_store.erl
Description :
-------------------------------------------------------------------
-------------------------------------------------------------------
@spec (Hostname) -> {ok, Bee, Socket}
| {error,... | Author :
Created : We d Oct 7 22:37:21 PDT 2009
-module (bee_store).
-include ("beehive.hrl").
-include ("router.hrl").
-include ("common.hrl").
-include_lib("kernel/include/inet.hrl").
-export([get_bee/1]).
get_bee(default) -> get_default_app_or_rest();
get_bee([Hostname|_Rest] = List) ->
case io_lib... |
5690ef573d52574c9fdb313bef18d1e33a4c37722b3c159969160786128da97a | bobzhang/fan | test_fan_camlp4.ml | #load "fan_camlp4.cma";
open Fan_camlp4;
| null | https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/todoml/test/test_fan_camlp4.ml | ocaml | #load "fan_camlp4.cma";
open Fan_camlp4;
| |
bfd97934c0074980271baf347b9bad9fba72d265188b54e9de1591c5ee48e93a | AccelerateHS/accelerate-examples | SmoothLife.hs | # LANGUAGE CPP #
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE TypeOperators #-}
--
-- A cellular automata simulation over a smooth domain.
--
--
-- /
--
module SmoothLife
where
import Config
import qualified Prelude as P... | null | https://raw.githubusercontent.com/AccelerateHS/accelerate-examples/a973ee423b5eadda6ef2e2504d2383f625e49821/examples/smoothlife/SmoothLife.hs | haskell | # LANGUAGE FlexibleContexts #
# LANGUAGE TypeOperators #
A cellular automata simulation over a smooth domain.
/
Smooth life
~~~~~~~~~~~
A simulation step
simulation parameters
aka. alpha_n alpha_m
initial state
Auxiliary
Equation 6: s(n,m)
~~~~~~~~~~~~~~~~~~
Also a few additional modes a... | # LANGUAGE CPP #
# LANGUAGE ScopedTypeVariables #
module SmoothLife
where
import Config
import qualified Prelude as P
import Data.Label
import Data.Array.Accelerate as A hiding ( size, clamp )
import Data.Array.Accelerate.Examples.Internal ... |
759a5c2663458f9365ac8ad1d6d802f69705c32f56bd5cfd99fec8b68b11133a | serokell/servant-util | Combinators.hs | module Servant.Util.Combinators
( module M
) where
import Servant.Util.Combinators.ErrorResponses as M
import Servant.Util.Combinators.Filtering as M
import Servant.Util.Combinators.Logging as M
import Servant.Util.Combinators.Pagination as M
import Servant.Util.Combinators.Sorting as M
import Servant.Util.Combina... | null | https://raw.githubusercontent.com/serokell/servant-util/21ce12e9bdbf37e06498e2387429a30d4a4ba992/servant-util/src/Servant/Util/Combinators.hs | haskell | module Servant.Util.Combinators
( module M
) where
import Servant.Util.Combinators.ErrorResponses as M
import Servant.Util.Combinators.Filtering as M
import Servant.Util.Combinators.Logging as M
import Servant.Util.Combinators.Pagination as M
import Servant.Util.Combinators.Sorting as M
import Servant.Util.Combina... | |
54972f4b47f6faa46f2f71f2cd87f134a1d85e925d13005000f62ddf53bb9e6a | hugit-project/hugit | resize.cljs | (ns hugit.resize
(:require
[re-frame.core :as rf]))
(defn size
"Get hash-map with the rows and cols of the screen size."
[screen]
{:rows (.-rows screen)
:cols (.-cols screen)})
(defn setup
[screen]
(.on screen "resize"
(fn handle-resize
[_]
(rf/dispatch [:merge {:terminal/... | null | https://raw.githubusercontent.com/hugit-project/hugit/15c750ed633a229b517ffe0f3e8462197e0e3b06/src/hugit/resize.cljs | clojure | (ns hugit.resize
(:require
[re-frame.core :as rf]))
(defn size
"Get hash-map with the rows and cols of the screen size."
[screen]
{:rows (.-rows screen)
:cols (.-cols screen)})
(defn setup
[screen]
(.on screen "resize"
(fn handle-resize
[_]
(rf/dispatch [:merge {:terminal/... | |
4c7da57e7b697b1cb1906c71be290aa1d2bc99f937a2e21f5e7bf873414ebfbe | CarlosMChica/HaskellBook | ChapterExercises.hs | module ChapterExercises where
import Control.Applicative
import Data.Monoid
import Test.QuickCheck
import Test.QuickCheck.Checkers
import Test.QuickCheck.Classes
newtype Identity a = Identity a deriving (Eq, Ord, Show)
instance Functor Identity where
fmap f (Iden... | null | https://raw.githubusercontent.com/CarlosMChica/HaskellBook/86f82cf36cd00003b1a1aebf264e4b5d606ddfad/chapter21/ChapterExercises.hs | haskell | QuickCheck | module ChapterExercises where
import Control.Applicative
import Data.Monoid
import Test.QuickCheck
import Test.QuickCheck.Checkers
import Test.QuickCheck.Classes
newtype Identity a = Identity a deriving (Eq, Ord, Show)
instance Functor Identity where
fmap f (Iden... |
ae5560ad12ed6c782086ee27871e618a64038adafe1e2bbc63a563fb8156e0af | pixlsus/registry.gimp.org_static | chrominium.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; chrominium.scm
Version 0.2.1 ( For The Gimp 2.0 and 2.2 and 2.4 )
A Script - Fu that create a Chrome effect with gradient shadow
;
Copyright ( C ) 2007 - 2008 < >
; All rights reserved.
; Redistribution and use in source and ... | null | https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/chrominium.scm | scheme |
chrominium.scm
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 discla... | Version 0.2.1 ( For The Gimp 2.0 and 2.2 and 2.4 )
A Script - Fu that create a Chrome effect with gradient shadow
Copyright ( C ) 2007 - 2008 < >
* Neither the name of the University of California , Berkeley nor the
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ` ` AS IS '' AND ANY
DISCLA... |
631cb033bc5b421dd58d028a0d6e332093c792e13168158f79970c9480ed7ad1 | riverford/datagrep | core_test.clj | (ns riverford.datagrep.core-test
(:require [clojure.test :refer :all]
[riverford.datagrep.core :refer :all]))
(deftest sanity-test
(are
[q ret]
(= (grep q [1 2 3]) ret)
some? [1 2 3]
1 [1]
2 [2]
3 [3]
even? [2]
'(< 2) [1]
"2" [2]
#{1 "3"} [1 3])
(are
[q r... | null | https://raw.githubusercontent.com/riverford/datagrep/e6497c13f3f1eb202bcf12045864213c6d07effd/test/riverford/datagrep/core_test.clj | clojure | (ns riverford.datagrep.core-test
(:require [clojure.test :refer :all]
[riverford.datagrep.core :refer :all]))
(deftest sanity-test
(are
[q ret]
(= (grep q [1 2 3]) ret)
some? [1 2 3]
1 [1]
2 [2]
3 [3]
even? [2]
'(< 2) [1]
"2" [2]
#{1 "3"} [1 3])
(are
[q r... | |
cd5333c02017982bef0f2043dc0e5e64e4a6a953fcacc5b95139091f8e98acbe | haroldcarr/learn-haskell-coq-ml-etc | ZScratch.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE DerivingVia #
# LANGUAGE FlexibleContexts #
# LANGUAGE InstanceSigs #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
module ZScratch where
------------------------------------------------------------------------------
import ... | null | https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/topic/monads/2020-06-hc-reader-and-monad-write-state-io/test/ZScratch.hs | haskell | # LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
----------------------------------------------------------------------------
---------------------------------------------------------------------------- | # LANGUAGE FlexibleInstances #
# LANGUAGE DerivingVia #
# LANGUAGE FlexibleContexts #
# LANGUAGE InstanceSigs #
# LANGUAGE MultiParamTypeClasses #
module ZScratch where
import Control.Monad.IO.Class
import Control.Monad.Reader.Class (MonadReader, ask)
import Control.Monad.State.Class (M... |
66e5eb1825261aabb0ee03caa7402357f78e8e291249fdf73b4b68d22f5ad204 | wilbowma/scribble-minted | minted.rkt | #lang racket/base
(require
racket/contract
(only-in rackunit require/expose)
racket/runtime-path
scribble/core
scribble/base
scribble/latex-properties
scribble/html-properties
racket/function
racket/system
racket/port
racket/list
racket/string
racket/dict
(only-in xml string->xexpr cdata))
(provide
(co... | null | https://raw.githubusercontent.com/wilbowma/scribble-minted/fc4673b6eb576fd95babaa97a3e256f4d7f1a47f/scribble-minted-lib/scribble/minted.rkt | racket | Default value #f means "try to find the path and error if not found".
Not needed at all any more, I think.
format is polymorphic to-string
Use style name as an extra CSS selector to
support multiple styles in HTML
if no initial line number, start at firstline
NOTE: could be slightly easier for for/list and #:do,... | #lang racket/base
(require
racket/contract
(only-in rackunit require/expose)
racket/runtime-path
scribble/core
scribble/base
scribble/latex-properties
scribble/html-properties
racket/function
racket/system
racket/port
racket/list
racket/string
racket/dict
(only-in xml string->xexpr cdata))
(provide
(co... |
89328b922c5893c1e7c312f48c4a74ddcd70b9487e781babc0e2f8c3291d5795 | gerritjvv/fileape | native_gzip.clj | (ns fileape.native-gzip
(:refer-clojure :exclude [write])
(:require [clojure.core.async :refer [chan <!! >!! dropping-buffer]])
(:import [java.io OutputStream FileOutputStream BufferedOutputStream DataOutputStream]
[org.apache.hadoop.io.compress Compressor GzipCodec]
[org.apache.hadoop.co... | null | https://raw.githubusercontent.com/gerritjvv/fileape/be8859fea1745e572463b658f8eb057aa46fe46d/src/fileape/native_gzip.clj | clojure | use a channel as a cache, the dropping buffer is not required but
helps for sanity that if we put back an item the put back will never block | (ns fileape.native-gzip
(:refer-clojure :exclude [write])
(:require [clojure.core.async :refer [chan <!! >!! dropping-buffer]])
(:import [java.io OutputStream FileOutputStream BufferedOutputStream DataOutputStream]
[org.apache.hadoop.io.compress Compressor GzipCodec]
[org.apache.hadoop.co... |
c631b901fd111712d86468e53fbf9084a49303d94ffcfb30e4584097a60e88a7 | patrickt/possession | Color.hs | module Data.Color
( Color (..)
, toVty
, settingTo
) where
import Raw.Types (Color (..))
import Graphics.Vty qualified as Vty
toVty :: Color -> Vty.Color
toVty = \case
Black -> Vty.black
Grey -> Vty.rgbColor @Int 221 221 221
White -> Vty.white
Red -> Vty.red
Yellow -> Vty.brightYellow
Gree... | null | https://raw.githubusercontent.com/patrickt/possession/4b920fc84733b57b2ed2f29cd0037676f99f855e/src/Data/Color.hs | haskell | module Data.Color
( Color (..)
, toVty
, settingTo
) where
import Raw.Types (Color (..))
import Graphics.Vty qualified as Vty
toVty :: Color -> Vty.Color
toVty = \case
Black -> Vty.black
Grey -> Vty.rgbColor @Int 221 221 221
White -> Vty.white
Red -> Vty.red
Yellow -> Vty.brightYellow
Gree... | |
a917df61ab8cd7519d41b3506f1baba5613a754219d9d8b6209c89dbd89dfd1d | haskell/ghc-builder | TimeMaster.hs |
module TimeMaster (timeMaster) where
import ServerMonad
import Control.Concurrent.MVar
import Data.Time.LocalTime
import System.Posix.Env
timeMaster :: TimeMasterVar -> IO ()
timeMaster tmvar
= do (timezone, mv) <- takeMVar tmvar
lt <- getLocalTimeInTimezone timezone
putMVar mv lt
timeMaster tmva... | null | https://raw.githubusercontent.com/haskell/ghc-builder/ef90aa7da7ec017d59d875e5bfe5d6b281d766f7/server/TimeMaster.hs | haskell |
module TimeMaster (timeMaster) where
import ServerMonad
import Control.Concurrent.MVar
import Data.Time.LocalTime
import System.Posix.Env
timeMaster :: TimeMasterVar -> IO ()
timeMaster tmvar
= do (timezone, mv) <- takeMVar tmvar
lt <- getLocalTimeInTimezone timezone
putMVar mv lt
timeMaster tmva... | |
83c98824c6c8d014e166855d084b63bc58eb895af0241cff1fadb41f793c962c | jtdaugherty/tracy | Area.hs | module Tracy.Lights.Area
( areaLight
)
where
import Control.Lens
import Data.Colour
import Data.Maybe
import qualified Data.Vector as V
import Linear
import Tracy.Types
import Tracy.Util
areaLight :: Bool -> Object -> Maybe Double -> Light
areaLight sh o power =
let ali = case o^.areaLightImpl of
... | null | https://raw.githubusercontent.com/jtdaugherty/tracy/ad36ea16a3b9cda5071ca72374d6e1c1b415d520/src/Tracy/Lights/Area.hs | haskell | module Tracy.Lights.Area
( areaLight
)
where
import Control.Lens
import Data.Colour
import Data.Maybe
import qualified Data.Vector as V
import Linear
import Tracy.Types
import Tracy.Util
areaLight :: Bool -> Object -> Maybe Double -> Light
areaLight sh o power =
let ali = case o^.areaLightImpl of
... | |
879c7ba5cd3db9cf1238674cc26274958a2528e7efb576b34b9391d70218cd68 | databrary/databrary | Types.hs | # LANGUAGE TypeFamilies , OverloadedStrings #
module Model.Token.Types
( Token(..)
, AccountToken(..)
, LoginToken(..)
, Session(..)
, Upload(..)
, makeUpload
) where
import qualified Data.ByteString as BS
import Data.Int (Int64)
import Has (Has(..))
import Model.Kind
import Model.Time
import Model.Id.T... | null | https://raw.githubusercontent.com/databrary/databrary/685f3c625b960268f5d9b04e3d7c6146bea5afda/src/Model/Token/Types.hs | haskell | these are signed version of Id Token | # LANGUAGE TypeFamilies , OverloadedStrings #
module Model.Token.Types
( Token(..)
, AccountToken(..)
, LoginToken(..)
, Session(..)
, Upload(..)
, makeUpload
) where
import qualified Data.ByteString as BS
import Data.Int (Int64)
import Has (Has(..))
import Model.Kind
import Model.Time
import Model.Id.T... |
cf8f06ed4748b5e53feb6607dd1629e8eeb767ec204bbf88696f75634bba4121 | jserot/lascar | moore.mli | (**********************************************************************)
(* *)
LASCAr
(* *)
Copyright ( c ) 2017 - prese... | null | https://raw.githubusercontent.com/jserot/lascar/79bd11cd0d47545bccfc3a3571f37af065915c83/src/lib/moore.mli | ocaml | ********************************************************************
This source code is licensed under the lic... | LASCAr
Copyright ( c ) 2017 - present , . All rights reserved .
open Utils
* machines .
A machine M is a LTSA for which
- state attributes are output variable valuations
- transition labels are input variable valuations
... |
f25ccf458d05406af11eeabfb3079632d268e226ee134b9aa57fdb15f1d0c773 | dmwit/universe | Traversable.hs | # LANGUAGE CPP #
#if __GLASGOW_HASKELL__ >=704
{-# LANGUAGE Safe #-}
#elif __GLASGOW_HASKELL__ >=702
# LANGUAGE Trustworthy #
#endif
-- | A 'Foldable' instance for functions, given the input is 'Finite', and
a ' ' instance for functions , given the input is ' ' and
-- 'Finite'.
module Data.Universe.Instances.Traver... | null | https://raw.githubusercontent.com/dmwit/universe/3a63cca98c313db47b82a3ec5ac11b1e72f48758/universe-reverse-instances/src/Data/Universe/Instances/Traversable.hs | haskell | # LANGUAGE Safe #
| A 'Foldable' instance for functions, given the input is 'Finite', and
'Finite'. | # LANGUAGE CPP #
#if __GLASGOW_HASKELL__ >=704
#elif __GLASGOW_HASKELL__ >=702
# LANGUAGE Trustworthy #
#endif
a ' ' instance for functions , given the input is ' ' and
module Data.Universe.Instances.Traversable () where
import Control.Applicative
import Data.Foldable
import Data.Map ((!), fromList)
import Data.Mo... |
887c97147b6a0029de82792b8d6260f6aba74b49bb0ae86592f424356ccc6bf8 | alphagov/govuk-guix | postgresql.scm | (define-module (gds services utils databases postgresql)
#:use-module (ice-9 match)
#:use-module (guix gexp)
#:use-module (guix records)
#:use-module (gnu packages databases)
#:use-module (gnu packages compression)
#:use-module (gnu packages pv)
#:export (<postgresql-connection-config>
postgre... | null | https://raw.githubusercontent.com/alphagov/govuk-guix/dea8c26d2ae882d0278be5c745e23abb25d4a4e2/gds/services/utils/databases/postgresql.scm | scheme |
The user in the database connection
might not exist, so use postgres
instead
The user in the database connection
might not exist, so use postgres
instead | (define-module (gds services utils databases postgresql)
#:use-module (ice-9 match)
#:use-module (guix gexp)
#:use-module (guix records)
#:use-module (gnu packages databases)
#:use-module (gnu packages compression)
#:use-module (gnu packages pv)
#:export (<postgresql-connection-config>
postgre... |
be5947e1e49f83694e7fb93923d699ab2f75acf3cb4e9d825c145a4fed0b1625 | gedge-platform/gedge-platform | cuttlefish_escript.erl | %% -------------------------------------------------------------------
%%
%% cuttlefish_escript: used by sh scripts to parse configs
%%
Copyright ( c ) 2013 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use th... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/cuttlefish/src/cuttlefish_escript.erl | erlang | -------------------------------------------------------------------
cuttlefish_escript: used by sh scripts to parse configs
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See ... | Copyright ( c ) 2013 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(... |
ed24032de750aa67b738b7d5c1c5df8926c273ad39dfc571b3279fe0f80e1b66 | NorfairKing/exchangerates | Gen.hs | # OPTIONS_GHC -fno - warn - orphans #
module ExchangeRates.Types.Gen where
import TestImport
import Numeric.Natural
import ExchangeRates.Types
-- Until genvalidity has these.
instance GenUnchecked Natural where
genUnchecked = fromInteger . abs <$> genValid -- Cannot even generate wrong ones
shrinkUnchecked... | null | https://raw.githubusercontent.com/NorfairKing/exchangerates/6ee3ee31ed479259900ae728e6c4caa968e0dcda/test/ExchangeRates/Types/Gen.hs | haskell | Until genvalidity has these.
Cannot even generate wrong ones | # OPTIONS_GHC -fno - warn - orphans #
module ExchangeRates.Types.Gen where
import TestImport
import Numeric.Natural
import ExchangeRates.Types
instance GenUnchecked Natural where
shrinkUnchecked _ = []
instance GenValid Natural where
genValid = fromInteger . abs <$> genValid
instance GenUnchecked Rate
i... |
2fe09f9f89c8748d26f89a7b89bf139ee3040b4844f7918687c408880427b141 | dbuenzli/remat | req.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2015 . All rights reserved .
Distributed under the BSD3 license , see license at the end of the file .
% % NAME%% release % % ---------------------------------------------------------------------------
Cop... | null | https://raw.githubusercontent.com/dbuenzli/remat/28d572e77bbd1ad46bbfde87c0ba8bd0ab99ed28/src-www/req.ml | ocaml | Global request montitoring
Base types
Requests
avoid leaks
FIXME not possible to get more info ? | ---------------------------------------------------------------------------
Copyright ( c ) 2015 . All rights reserved .
Distributed under the BSD3 license , see license at the end of the file .
% % NAME%% release % % ---------------------------------------------------------------------------
Cop... |
a266d55416d46daedb25a9e71a00112bcd06fc47b9b0e02829b012f159904231 | gfngfn/Sesterl | outputIdentifier.ml |
type space =
| ReprSpace of {
number : int;
main : IdentifierScheme.t;
}
type local =
| ReprLocal of {
number : int;
hint : IdentifierScheme.t option;
}
| ReprUnused
type global =
| ReprGlobal of {
number : int;
function_name : IdentifierScheme.t;
... | null | https://raw.githubusercontent.com/gfngfn/Sesterl/a8700cb36a44a6d9e4a6ada1c505b7d6cda71f04/src/outputIdentifier.ml | ocaml |
Format.printf "attempted to output G%d(dummy)\n" r.number; (* for debug |
type space =
| ReprSpace of {
number : int;
main : IdentifierScheme.t;
}
type local =
| ReprLocal of {
number : int;
hint : IdentifierScheme.t option;
}
| ReprUnused
type global =
| ReprGlobal of {
number : int;
function_name : IdentifierScheme.t;
... |
a2ebee6be897e9f70f73f57b61acc1210d9f68fe2d988a9375af7a94301d95ac | chrovis/cljam | writer_test.clj | (ns cljam.io.bam-index.writer-test
"Tests for cljam.io.bam-index."
(:require [clojure.test :refer [deftest is testing]]
[cljam.io.bam-index.writer :as writer]))
(def update-last-pointer 29229056)
(def input-index-1 {0 {:meta-data {:first-offset 97
:last-offset 555
... | null | https://raw.githubusercontent.com/chrovis/cljam/2b8e7386765be8efdbbbb4f18dbc52447f4a08af/test/cljam/io/bam_index/writer_test.clj | clojure | unit test
update-last-pointer | (ns cljam.io.bam-index.writer-test
"Tests for cljam.io.bam-index."
(:require [clojure.test :refer [deftest is testing]]
[cljam.io.bam-index.writer :as writer]))
(def update-last-pointer 29229056)
(def input-index-1 {0 {:meta-data {:first-offset 97
:last-offset 555
... |
6f48ccc3860685f70aa95fa8ca5a98704aa4c2d9823f9fe6286b1da211d8708a | commercialhaskell/stack | Main.hs | import StackTest
main :: IO ()
main = do
stackCleanFull
stack ["build", "--dry-run"]
| null | https://raw.githubusercontent.com/commercialhaskell/stack/255cd830627870cdef34b5e54d670ef07882523e/test/integration/tests/1884-url-to-tarball/Main.hs | haskell | import StackTest
main :: IO ()
main = do
stackCleanFull
stack ["build", "--dry-run"]
| |
917e7ac5799a8b0fc77d5f9d9290a22359f360005736d0473be539b9238d5d18 | valderman/haste-compiler | AST.hs | | Haste 's intermediate JavaScript representation .
module Haste.AST (
module Constr, module Op, module Optimize, module Trav, module Opts,
PPOpts (..), pretty, runPP, prettyProg,
Arity, Comment, Name (..), Var (..), LHS, Call,
Lit, Exp, Stm, Alt, Module (..),
foreignModule, moduleOf, pkgOf, black... | null | https://raw.githubusercontent.com/valderman/haste-compiler/47d942521570eb4b8b6828b0aa38e1f6b9c3e8a8/src/Haste/AST.hs | haskell | | Haste 's intermediate JavaScript representation .
module Haste.AST (
module Constr, module Op, module Optimize, module Trav, module Opts,
PPOpts (..), pretty, runPP, prettyProg,
Arity, Comment, Name (..), Var (..), LHS, Call,
Lit, Exp, Stm, Alt, Module (..),
foreignModule, moduleOf, pkgOf, black... | |
4dacc36ac43b216d1277ff6359b95a0ed30f9ef7c3c2fbf9de2e8d85d48d94ab | prg-titech/Kani-CUDA | main.rkt | #lang rosette
(require "../../lang.rkt"
"vec-add-baseline.rkt"
"vec-add.rkt")
(define SIZEX 3)
(define SIZE (* SIZEX SIZEX))
(define A (make-array (for/vector ([i SIZE]) (make-element i)) SIZE))
(define B (make-array (for/vector ([i SIZE]) (make-element i)) SIZE))
(define C (make-array (for/vector (... | null | https://raw.githubusercontent.com/prg-titech/Kani-CUDA/e97c4bede43a5fc4031a7d2cfc32d71b01ac26c4/Emulator/Examples/vec-add/main.rkt | racket | (print-matrix C SIZEX SIZEX)
(print-matrix C SIZEX SIZEX) | #lang rosette
(require "../../lang.rkt"
"vec-add-baseline.rkt"
"vec-add.rkt")
(define SIZEX 3)
(define SIZE (* SIZEX SIZEX))
(define A (make-array (for/vector ([i SIZE]) (make-element i)) SIZE))
(define B (make-array (for/vector ([i SIZE]) (make-element i)) SIZE))
(define C (make-array (for/vector (... |
001fe2930f9d20f8028c75db7562396dc50960f0e1ae75abb2cd34ace0a4e088 | hasktorch/hasktorch | AutogradSpec.hs | # LANGUAGE DataKinds #
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PartialTypeSignatures #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDe... | null | https://raw.githubusercontent.com/hasktorch/hasktorch/cf0ed1aba9c41123ba46f7c0788a4df10fbfe1ef/hasktorch/test/Torch/Typed/AutogradSpec.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE GADTs #
# OPTIONS_GHC -Wno-partial-type-signatures #
# OPTIONS_GHC -fplugin GHC.TypeLits.Extra.Solver #
# OPTIONS_GHC -fplugin GHC.TypeLits.Normalise #
it "works in a data-parallel setting" $ do
model <- sample spec
output <- forwardConcurrently' @'[ '( 'C... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PartialTypeSignatures #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeApplications #
# LANGUAGE TypeF... |
27814af86fc31f88ec90b88ef4d54ad1262613716ca71558fe83ff2c2d2e8bd9 | scicloj/tablecloth.time | converters_test.clj | (ns tablecloth.time.api.converters-test
(:require [clojure.test :refer [testing deftest is function?]]
[tablecloth.time.api :refer [down-to-nearest ->seconds convert-to
->minutes ->hours ->days ->weeks-end
->months-end ->qua... | null | https://raw.githubusercontent.com/scicloj/tablecloth.time/40fa204c96d7fa48f4050e3a55c80f44248dc238/test/tablecloth/time/api/converters_test.clj | clojure | (ns tablecloth.time.api.converters-test
(:require [clojure.test :refer [testing deftest is function?]]
[tablecloth.time.api :refer [down-to-nearest ->seconds convert-to
->minutes ->hours ->days ->weeks-end
->months-end ->qua... | |
59fb1068d8cc013df00bf169f0095b4a99b2f31fdec561d95615df04ce029cf9 | Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library | PostTransfersIdReversals.hs | {-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE MultiWayIf #-}
CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
{-# LANGUAGE OverloadedStrings #-}
-- | Contains the different functions to run the operation postTransfersIdReversals
module St... | null | https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Operations/PostTransfersIdReversals.hs | haskell | # LANGUAGE ExplicitForAll #
# LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
| Contains the different functions to run the operation postTransfersIdReversals
| > POST /v1/transfers/{id}/reversals
\<p>When you create a new reversal, you must specify a transfer to create it on.\<\/p>
\<p>Once entirely revers... | CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
module StripeAPI.Operations.PostTransfersIdReversals where
import qualified Control.Monad.Fail
import qualified Control.Monad.Trans.Reader
import qualified Data.Aeson
import qualified Dat... |
ffd29af4d19d8b381d7bbd84e0245aadb23df83dd8d86b0bda2246a8e7940f0a | landakram/kiwi-desktop | subs.cljs | (ns kiwi.page.subs
(:require
[re-frame.core :as re-frame :refer [reg-sub]]))
(reg-sub
:current-page
(fn [db _]
(get-in db [:route-state :page])))
(reg-sub
:permalinks
(fn [db _]
(get-in db [:route-state :permalinks])))
| null | https://raw.githubusercontent.com/landakram/kiwi-desktop/cc7d0a5f28430f39d43dffb26850183601fd28f9/src/cljs/kiwi/page/subs.cljs | clojure | (ns kiwi.page.subs
(:require
[re-frame.core :as re-frame :refer [reg-sub]]))
(reg-sub
:current-page
(fn [db _]
(get-in db [:route-state :page])))
(reg-sub
:permalinks
(fn [db _]
(get-in db [:route-state :permalinks])))
| |
da8888ddf752f104c8bf356a7d4b82ada5506b1805c027b07cca8d0169fe0cc9 | FrankC01/clasew | spreads.clj | (ns
^{:author "Frank V. Castellucci"
:doc "Clojure AppleScriptEngine Wrapper - common Spreadsheet DSL"}
clasew.spreads
(:require [clasew.utility :as util]))
True / False strings for sending into AppleScript ( converted in script )
(defonce create "true")
(defonce no-create "false")
(defonce open ... | null | https://raw.githubusercontent.com/FrankC01/clasew/1e5a444bccd4f34c68a1e5d1ec2121a36fd8c959/src/clasew/spreads.clj | clojure | Well know handler map
Pure helpers
letters in ascii alphabet
"A"
Low level DSL functions ----------------------------------------------------
High level support
High level DSL functions ---------------------------------------------------
Set the header row count
Chain Sugar ---------------------------... | (ns
^{:author "Frank V. Castellucci"
:doc "Clojure AppleScriptEngine Wrapper - common Spreadsheet DSL"}
clasew.spreads
(:require [clasew.utility :as util]))
True / False strings for sending into AppleScript ( converted in script )
(defonce create "true")
(defonce no-create "false")
(defonce open ... |
edece0957c74c88a6cde472d24437d158700bf8bde79ca67cb9ebe22026a7ffa | EFanZh/EOPL-Exercises | exercise-1.27-test.rkt | #lang racket/base
(require rackunit)
(require "../solutions/exercise-1.27.rkt")
(check-equal? (flatten '(a b c)) '(a b c))
(check-equal? (flatten '((a) () (b ()) () (c))) '(a b c))
(check-equal? (flatten '((a b) c (((d)) e))) '(a b c d e))
(check-equal? (flatten '(a b (() (c)))) '(a b c))
(check-equal? (flatten '()) ... | null | https://raw.githubusercontent.com/EFanZh/EOPL-Exercises/11667f1e84a1a3e300c2182630b56db3e3d9246a/tests/exercise-1.27-test.rkt | racket | #lang racket/base
(require rackunit)
(require "../solutions/exercise-1.27.rkt")
(check-equal? (flatten '(a b c)) '(a b c))
(check-equal? (flatten '((a) () (b ()) () (c))) '(a b c))
(check-equal? (flatten '((a b) c (((d)) e))) '(a b c d e))
(check-equal? (flatten '(a b (() (c)))) '(a b c))
(check-equal? (flatten '()) ... | |
46d1dd4b5512b57d3741ba90a806a56cbfd946000fa3fa48bbb64f716b82b567 | AnthonySuper/jordan | Internal.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE DerivingVia #
# LANGUAGE FlexibleContexts #
# LANGUAGE InstanceSigs #
# LANGUAGE LambdaCase #
# LANGUAGE OverloadedLabels #
# LANGUAGE OverloadedLists #
# LANGUAGE ScopedTypeVariables #
-- | Internal module that provides JSON parser and serializers that convert to OpenAPI document... | null | https://raw.githubusercontent.com/AnthonySuper/jordan/ec4e0f771fd54b38f53891e6ae996eb6bb0f1f51/jordan-openapi/lib/Jordan/OpenAPI/Internal.hs | haskell | | Internal module that provides JSON parser and serializers that convert to OpenAPI documentation.
Note that this module is full of internal-use-only functions and should probably n ever actually be imported.
| Declare with a phantom type parameter.
| Fmap ignores argument
| Applicative combines declarations.
| ... | # LANGUAGE DeriveGeneric #
# LANGUAGE DerivingVia #
# LANGUAGE FlexibleContexts #
# LANGUAGE InstanceSigs #
# LANGUAGE LambdaCase #
# LANGUAGE OverloadedLabels #
# LANGUAGE OverloadedLists #
# LANGUAGE ScopedTypeVariables #
module Jordan.OpenAPI.Internal where
import Control.Applicative (Alternative (..))
import Cont... |
56517b2c199d93db0c17f0d7a9c9603165c23db2d406abcbd5d7a82f4de0c1f3 | input-output-hk/cardano-sl | LimitsSpec.hs | -- | Test on functions trimming data to given limit.
module Test.Pos.Core.LimitsSpec
( spec
) where
import Universum
import qualified Data.HashMap.Strict as HM
import Serokell.Data.Memory.Units (fromBytes)
import Test.Hspec (Spec, describe)
import Test.Hspec.QuickChec... | null | https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/core/test/Test/Pos/Core/LimitsSpec.hs | haskell | | Test on functions trimming data to given limit. |
module Test.Pos.Core.LimitsSpec
( spec
) where
import Universum
import qualified Data.HashMap.Strict as HM
import Serokell.Data.Memory.Units (fromBytes)
import Test.Hspec (Spec, describe)
import Test.Hspec.QuickCheck (prop)
import Test.QuickCheck (arbitrary,... |
a0f9664c1116426aee5f9b380acee520ec04e59b27681a371ea70231e79e5296 | noteed/mojito | Types.hs | # LANGUAGE GeneralizedNewtypeDeriving , FlexibleContexts , MultiParamTypeClasses , FlexibleInstances #
module Language.Mojito.Syntax.Types where
import Prelude hiding ((<>))
import Data.List (intersperse)
import Text.PrettyPrint.HughesPJClass
-- Simple Types
-- t = C t1 .. tn | a t1 .. tn
data Simple =
TyCon Str... | null | https://raw.githubusercontent.com/noteed/mojito/257b2486037a0878d324f91ccf39cefe37af189a/Language/Mojito/Syntax/Types.hs | haskell | Simple Types
t = C t1 .. tn | a t1 .. tn
Or Simple [Simple], which would give an arity ?
Occur check: tests if a type variable appears in a given
type.
Is it faster ?
Occur check: tests if a type variable appears in a given
type.
occurs :: String -> Simple -> Bool
occurs a t = a `elem` tv t
fargs (-> a b c) ... | # LANGUAGE GeneralizedNewtypeDeriving , FlexibleContexts , MultiParamTypeClasses , FlexibleInstances #
module Language.Mojito.Syntax.Types where
import Prelude hiding ((<>))
import Data.List (intersperse)
import Text.PrettyPrint.HughesPJClass
data Simple =
TyCon String
| TyVar String
deriving (Show, Eq)
ins... |
f2a22d9fe4d657604840a276f5305593f5b54a3bbeb12ccd46b05354e4e723f8 | simmsb/calamity | Guild.hs | # LANGUAGE TemplateHaskell #
-- | The generic guild channel type
module Calamity.Types.Model.Channel.Guild (
GuildChannel (..),
module Calamity.Types.Model.Channel.Guild.Category,
module Calamity.Types.Model.Channel.Guild.Text,
module Calamity.Types.Model.Channel.Guild.Voice,
) where
import {-# SOURCE #-} Cal... | null | https://raw.githubusercontent.com/simmsb/calamity/be310255b446e87e7432673de1fbc67ef46de3ae/calamity/Calamity/Types/Model/Channel/Guild.hs | haskell | | The generic guild channel type
# SOURCE #
# SOURCE # | # LANGUAGE TemplateHaskell #
module Calamity.Types.Model.Channel.Guild (
GuildChannel (..),
module Calamity.Types.Model.Channel.Guild.Category,
module Calamity.Types.Model.Channel.Guild.Text,
module Calamity.Types.Model.Channel.Guild.Voice,
) where
import Calamity.Types.Model.Channel.ChannelType
import Calami... |
9a5e28c2d13338d3182ebf15485b061ceea9dfc7a4f64f76f2fdc8722bacfbb1 | lasp-lang/partisan | prop_partisan_hbbft.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2019 . All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the... | null | https://raw.githubusercontent.com/lasp-lang/partisan/fd048fc1b34309d9fa41450434a7e7b3b2fa1fb8/test/prop_partisan_hbbft.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2019 . All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(prop_partisan_hbbft)... |
43e13d454b3ab5feee93d735cd5654b15376ad1d8d340631fda64905d5d735e2 | ctford/Idris-Elba-Dev | Evaluate.hs | # LANGUAGE MultiParamTypeClasses , FlexibleInstances ,
PatternGuards #
PatternGuards #-}
module Idris.Core.Evaluate(normalise, normaliseTrace, normaliseC, normaliseAll,
rt_simplify, simplify, specialise, hnf, convEq, convEq',
Def(..), CaseInfo(..), CaseDefs(.... | null | https://raw.githubusercontent.com/ctford/Idris-Elba-Dev/e915e1d6b7a5921ba43d2572a9ad9b980619b8ee/src/Idris/Core/Evaluate.hs | haskell | not Strict!
VALUES (as HOAS) ---------------------------------------------------------
For frozen let bindings when simplifying
| VLazy Env [Value] Term
THE EVALUATOR ------------------------------------------------------------
The environment is assumed to be "locally named" - i.e., not de Bruijn
ind... | # LANGUAGE MultiParamTypeClasses , FlexibleInstances ,
PatternGuards #
PatternGuards #-}
module Idris.Core.Evaluate(normalise, normaliseTrace, normaliseC, normaliseAll,
rt_simplify, simplify, specialise, hnf, convEq, convEq',
Def(..), CaseInfo(..), CaseDefs(.... |
2d85671fa24a0071525d81f6ab6c4aa6b347b110b1c0c54afbd5d3d9eae55d24 | tanders/cluster-engine | 5d.lisp | (in-package cluster-engine) (setf *random-state* (make-random-state t))
(print
(cluster-engine::ClusterEngine 12 t nil
(cluster-engine::R-pitches-one-voice #'(lambda (x y z w) (equal x w))
0 :pitches)
'((4 4))
'(((1/4) (1/8) (1/16) (3/8))
((60) (62 67) (64) (66 67) (67) (69) (71) (72)))
)
)
| null | https://raw.githubusercontent.com/tanders/cluster-engine/064ad4fd107f8d9a3dfcaf260524c2ab034c6d3f/test_files/5d.lisp | lisp | (in-package cluster-engine) (setf *random-state* (make-random-state t))
(print
(cluster-engine::ClusterEngine 12 t nil
(cluster-engine::R-pitches-one-voice #'(lambda (x y z w) (equal x w))
0 :pitches)
'((4 4))
'(((1/4) (1/8) (1/16) (3/8))
((60) (62 67) (64) (66 67) (67) (69) (71) (72)))
)
)
| |
8534d1a2f385d2130c1c90ec9cf484927faa8acc8e37a6498b8ec63265140a4e | passy/coding-puzzles | Main.hs | module Main where
import Control.Applicative ((<$>))
import Control.Monad (liftM, replicateM, when)
import qualified Data.Foldable as F
import Data.IORef (newIORef, readIORef, writeIORef)
import Data.Set ((\\))
import qualified Data.Set ... | null | https://raw.githubusercontent.com/passy/coding-puzzles/686bd0775ee5a98004229d44c913376d033b13de/hackerrank/no-prefix-set/Main.hs | haskell | | Removes all (key, value) pairs from the given list where the key
matches the given one.
| Adds the specified (key, value) pair to the given list, removing any
existing pair with the same key already present.
Create a new node with just the current char
in it
Append the current key to the key of the
parent nod... | module Main where
import Control.Applicative ((<$>))
import Control.Monad (liftM, replicateM, when)
import qualified Data.Foldable as F
import Data.IORef (newIORef, readIORef, writeIORef)
import Data.Set ((\\))
import qualified Data.Set ... |
fcf2dc4e81a229a60d52b0b526146c4c6cf7a40831c039b4dda649e6be0b7d8c | stepcut/plugins | B.hs | module B where
b = "b"
| null | https://raw.githubusercontent.com/stepcut/plugins/52c660b5bc71182627d14c1d333d0234050cac01/testsuite/make/makeall001/B.hs | haskell | module B where
b = "b"
| |
f62857af4ec5b5de7dd5793e57c4b70a3d2a862845075d06a76dfcd74947cd5e | batterseapower/test-framework | Statistics.hs | module Test.Framework.Runners.Console.Statistics (
showFinalTestStatistics
) where
import Test.Framework.Runners.Statistics
import Test.Framework.Runners.Console.Colors
import Test.Framework.Runners.Console.Table
import Text.PrettyPrint.ANSI.Leijen
import Data.List
-- | Displays statistics as a string ... | null | https://raw.githubusercontent.com/batterseapower/test-framework/eefad382c3377d734aa3f0df4f84e4077b8362d6/core/Test/Framework/Runners/Console/Statistics.hs | haskell | | Displays statistics as a string something like this:
@
Properties Total
@ | module Test.Framework.Runners.Console.Statistics (
showFinalTestStatistics
) where
import Test.Framework.Runners.Statistics
import Test.Framework.Runners.Console.Colors
import Test.Framework.Runners.Console.Table
import Text.PrettyPrint.ANSI.Leijen
import Data.List
Passed 9 9
Failed 1 ... |
919e6ae3589f973bc8e4c3c2ba549c5e4097f1bb22390ced114223a2c7a38534 | fogfish/pts | pts_ns_sup.erl | %%
Copyright ( c ) 2012 - 2013 ,
%% All Rights Reserved.
%%
%% This library is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License , version 3.0
as published by the Free Software Foundation ( the " License " ) .
%%
Software distributed under... | null | https://raw.githubusercontent.com/fogfish/pts/f98c594f1e596f81b5e54c9791bf69568327fba2/src/pts_ns_sup.erl | erlang |
All Rights Reserved.
This library is free software; you can redistribute it and/or modify
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
License along with this library; if not, write to the ... | Copyright ( c ) 2012 - 2013 ,
it under the terms of the GNU Lesser General Public License , version 3.0
as published by the Free Software Foundation ( the " License " ) .
Software distributed under the License is distributed on an " AS IS "
You should have received a copy of the GNU Lesser General Pub... |
0787b7554ebe902ec43550585bc0f69765e5f0353c33b1b55080fc2ed9a8a7f3 | tmattio/spin | filename.mli | val check_suffix : string -> string -> bool
val chop_extension : string -> string
val chop_suffix : string -> string -> string
val current_dir_name : string
val is_implicit : string -> bool
val is_relative : string -> bool
val parent_dir_name : string
val dir_sep : string
val quote : string -> string
val temp_... | null | https://raw.githubusercontent.com/tmattio/spin/092ab5979d4f1d01f538743443b70465a2d5ed23/lib/spin_std/filename.mli | ocaml | val check_suffix : string -> string -> bool
val chop_extension : string -> string
val chop_suffix : string -> string -> string
val current_dir_name : string
val is_implicit : string -> bool
val is_relative : string -> bool
val parent_dir_name : string
val dir_sep : string
val quote : string -> string
val temp_... | |
964afb79be1f3e2eaf180d88550feee88729e23bec97fe3c4b6f178a637387dc | JoeKennedy/fantasy | GeneralSettings.hs | module Handler.League.GeneralSettings where
import Import
import Handler.League.Setup
import Handler.League.Layout
----------
-- Form --
----------
generalSettingsForm :: Int -> UserId -> SeasonId -> Series -> GeneralSettings -> Form GeneralSettings
generalSettingsForm teamsCount currentUserId seasonId series general... | null | https://raw.githubusercontent.com/JoeKennedy/fantasy/eb9dc9bf6074be5c5ca951e323c6497676424dda/Handler/League/GeneralSettings.hs | haskell | --------
Form --
--------
----------
Routes --
---------- | module Handler.League.GeneralSettings where
import Import
import Handler.League.Setup
import Handler.League.Layout
generalSettingsForm :: Int -> UserId -> SeasonId -> Series -> GeneralSettings -> Form GeneralSettings
generalSettingsForm teamsCount currentUserId seasonId series generalSettings extra = do
let total... |
b9cc37be216bb16e540ef0c2d49e9346a6a2ac6654be9b9e869e616732c385b4 | cuichaox/dml | dml.seq.grid.lisp |
(defpackage :dml.seq.grid
(:use :cl)
(:export #:grid
#:fit-left
#:fit-right
#:fit-up
#:fit-down
#:get-width
#:get-height
#:get-x-by-index
#:get-y-by-index))
(in-package :dml.seq.grid)
(defconstant +min-x-gap+ 8.0)
(defconstan... | null | https://raw.githubusercontent.com/cuichaox/dml/6f71a2ce9b2cfa295f2db4e17446935f9136b0b1/src/dml.seq.grid.lisp | lisp |
(defpackage :dml.seq.grid
(:use :cl)
(:export #:grid
#:fit-left
#:fit-right
#:fit-up
#:fit-down
#:get-width
#:get-height
#:get-x-by-index
#:get-y-by-index))
(in-package :dml.seq.grid)
(defconstant +min-x-gap+ 8.0)
(defconstan... | |
9111e941dda13f2e889aa855da3b186424dc90907f46b4d89d56b149c84b56c4 | rudymatela/tankode | Utils.hs | -- |
-- |
Module : Tankode . Palette . Utils
Copyright : ( c ) 2017
License : LGPL 2.1 ( see the file LICENSE )
--
Utilities to build colour palettes .
module Tankode.Palette.Utils (mkMaker, Colour, (%)) where
import Colour (fromHSL, fromHCL, Colour)
import Data.Ratio
project :: Rational -> ... | null | https://raw.githubusercontent.com/rudymatela/tankode/299ec6f78a9a18a8fc902be911a556d0497c30e1/runner/src/Tankode/Palette/Utils.hs | haskell | |
|
| Module : Tankode . Palette . Utils
Copyright : ( c ) 2017
License : LGPL 2.1 ( see the file LICENSE )
Utilities to build colour palettes .
module Tankode.Palette.Utils (mkMaker, Colour, (%)) where
import Colour (fromHSL, fromHCL, Colour)
import Data.Ratio
project :: Rational -> (Rational,Rat... |
bf7df110fc75b647f32432c00e78316218009b9abf3ac63d1c6918d9fe4c296e | kototama/picobit | test-substring.scm | (display (substring "foobar" 2 4))
| null | https://raw.githubusercontent.com/kototama/picobit/8bdfc092266803bc6b1151177a7e668c9b050bea/tests/test-substring.scm | scheme | (display (substring "foobar" 2 4))
| |
09f9d2ab24937e83f7b44125fd5e8d11c0c2646c3a11d68e86751b134e593b86 | jbclements/RSound | sub-sampling.rkt | #lang racket
(require rsound
rsound/draw
ffi/vector)
;; no testing:
(module* test racket/base)
(define song-chunk
(rs-read/clip
"/Users/clements/clements/teaching/video-game-music/earworm-2011.wav"
0 (* 44100 30)))
#;(play song-chunk)
(define msr signal->rsound)
(define (quantize q num)
... | null | https://raw.githubusercontent.com/jbclements/RSound/c699db1ffae4cf0185c46bdc059d7879d40614ce/rsound/examples/sub-sampling.rkt | racket | no testing:
(play song-chunk)
given a sound and a multiplier, do "fake resampling"
by choosing a rounded sample from the original
given a factor and a sound, resample the sound (using simple rounding)
octave higher and half as long. | #lang racket
(require rsound
rsound/draw
ffi/vector)
(module* test racket/base)
(define song-chunk
(rs-read/clip
"/Users/clements/clements/teaching/video-game-music/earworm-2011.wav"
0 (* 44100 30)))
(define msr signal->rsound)
(define (quantize q num)
(/ (/ (floor (* q (* num 32768.0)... |
ca40ab510436e1a79a33556530b678137b693ecc427aa4f277330cf883dc7586 | pallix/lacij | node.clj | Copyright © 2010 - 2013 Fraunhofer Gesellschaft
Licensed under the EPL V.1.0
(ns ^{:doc "Node record and functions."}
lacij.model.node)
(defrecord Node
[id view inedges outedges])
(defn inout-edges
[node]
(into (:inedges node) (:outedges node)))
(defn create-node
[id view]
(Node. id view #{} #{})) | null | https://raw.githubusercontent.com/pallix/lacij/ee9b7dcda13f25f7460acb5995b7970a7564c11e/src/lacij/model/node.clj | clojure | Copyright © 2010 - 2013 Fraunhofer Gesellschaft
Licensed under the EPL V.1.0
(ns ^{:doc "Node record and functions."}
lacij.model.node)
(defrecord Node
[id view inedges outedges])
(defn inout-edges
[node]
(into (:inedges node) (:outedges node)))
(defn create-node
[id view]
(Node. id view #{} #{})) | |
2d8cdf58bfd6217f893cdb9648399e5ecfd0d4e01bbdb44caf5f7970eb94ea40 | kayhide/wakame | RowPolymorphism.hs | # LANGUAGE AllowAmbiguousTypes #
module Wakame.Examples.RowPolymorphism where
import Prelude
import Data.Kind (Type)
import GHC.TypeLits (KnownSymbol, Symbol)
import Wakame
-- * Row polymorphism
--
-- Theoretically, all row-polymorphic operations can be described as a
composition of the 3 basic functions :
--
-- ... | null | https://raw.githubusercontent.com/kayhide/wakame/4d16ecf2221655300b5db588c2775cfc0b8d92cd/test/examples/Wakame/Examples/RowPolymorphism.hs | haskell | * Row polymorphism
Theoretically, all row-polymorphic operations can be described as a
- select_l :: {l} -> {l :: a | r} -> a
- add_l :: {l} -> a -> {absent(l) :: a | r} -> {l :: a | r}
- remove_l :: {l} -> {l :: a | r} -> {absent(l) :: a | r}
This module shows how to implement these functions. | # LANGUAGE AllowAmbiguousTypes #
module Wakame.Examples.RowPolymorphism where
import Prelude
import Data.Kind (Type)
import GHC.TypeLits (KnownSymbol, Symbol)
import Wakame
composition of the 3 basic functions :
select ::
forall (l :: Symbol) (a :: Type) r.
( IsRow r
, KnownSymbol l
, Nub (Of r) '[ '(l,... |
aa14d7b95196742e0c7e501a72dfea0c45d3581132abf7cfdbaf2c8115650f2c | Haskell-OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator | Spec.hs | {-# LANGUAGE OverloadedStrings #-}
import Control.Monad.Trans.Reader
import qualified Data.Aeson.KeyMap as KeyMap
import Data.ByteString.Char8
import Data.Either
import Lib
import Network.HTTP.Client.Internal
import Network.HTTP.Simple
import Network.HTTP.Types
import OpenAPI
import Test.Hspec
import Test.MonadHTTP
s... | null | https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator/af8435def9f3dff36180d1520b5c60200c532d2a/testing/level2/petstore-running-example/test/Spec.hs | haskell | # LANGUAGE OverloadedStrings # |
import Control.Monad.Trans.Reader
import qualified Data.Aeson.KeyMap as KeyMap
import Data.ByteString.Char8
import Data.Either
import Lib
import Network.HTTP.Client.Internal
import Network.HTTP.Simple
import Network.HTTP.Types
import OpenAPI
import Test.Hspec
import Test.MonadHTTP
succeededResponse :: Response ByteSt... |
0240a8b928d032ef7cfaa8d8a653e7c8c827fac865757662bb48086f6ffd1ba7 | damballa/parkour | printers.clj | (ns parkour.cser.printers
(:import [java.io Writer]
[java.util.regex Pattern]
[clojure.lang Var]))
(defn class-print
"Tagged literal printer for Java classes."
[^Class x ^Writer w]
(doto w
(.append "#parkour/class ")
(.append (.getName x))))
(defn var-print
"Tagged literal prin... | null | https://raw.githubusercontent.com/damballa/parkour/2b3c5e1987e18b4c4284dfd4fcdaba267a4d7fbc/src/clojure/parkour/cser/printers.clj | clojure | (ns parkour.cser.printers
(:import [java.io Writer]
[java.util.regex Pattern]
[clojure.lang Var]))
(defn class-print
"Tagged literal printer for Java classes."
[^Class x ^Writer w]
(doto w
(.append "#parkour/class ")
(.append (.getName x))))
(defn var-print
"Tagged literal prin... | |
434ffe98f2f189fad2f42a143efb15d5444c347a3ad2db77026e532325ea45b6 | stackbuilders/atomic-write | LazyText.hs | -- |
Module : System . AtomicWrite . Writer . LazyText
Copyright : © 2015 - 2019 Stack Builders Inc.
License : MIT
--
Maintainer : Stack Builders < >
-- Stability : experimental
-- Portability : portable
--
-- Provides functionality to dump the contents of a Text
-- to a file.
modu... | null | https://raw.githubusercontent.com/stackbuilders/atomic-write/50976b9d249134d05191c4e430343594fdb034fb/src/System/AtomicWrite/Writer/LazyText.hs | haskell | |
Stability : experimental
Portability : portable
Provides functionality to dump the contents of a Text
to a file.
| Creates a file atomically on POSIX-compliant
systems while preserving permissions.
^ The path where the file will be updated or created
^ The content to write to the file
| Creates or mod... | Module : System . AtomicWrite . Writer . LazyText
Copyright : © 2015 - 2019 Stack Builders Inc.
License : MIT
Maintainer : Stack Builders < >
module System.AtomicWrite.Writer.LazyText (atomicWriteFile, atomicWriteFileWithMode) where
import System.AtomicWrite.Internal (atomic... |
5830ef2d0f07f3b59869456ecea92785f898430327b01b4df9a6e754bc36aca6 | exoscale/pithos | util_test.clj | (ns io.pithos.util-test
(:require [clojure.test :refer :all]
[io.pithos.util :refer [inc-prefix to-bytes parse-uuid
string->pattern]]))
(deftest inc-prefix-test
(testing "nil prefix"
(is (= nil (inc-prefix nil))))
(testing "empty prefix"
(is (= nil (inc-p... | null | https://raw.githubusercontent.com/exoscale/pithos/54790f00fbfd330c6196d42e5408385028d5e029/test/io/pithos/util_test.clj | clojure | (ns io.pithos.util-test
(:require [clojure.test :refer :all]
[io.pithos.util :refer [inc-prefix to-bytes parse-uuid
string->pattern]]))
(deftest inc-prefix-test
(testing "nil prefix"
(is (= nil (inc-prefix nil))))
(testing "empty prefix"
(is (= nil (inc-p... | |
4d294cf489a666cfb3bf21ee597b5c064b53fd6b604822f17f0202bbcf4b4b49 | robert-strandh/Second-Climacs | null-analyzer.lisp | (cl:in-package #:second-climacs-base)
;;; A NULL-ANALYZER is an analyzer that does no analysis.
(defclass null-analyzer (analyzer) ())
(defmethod update-analyzer-from-buffer ((analyzer null-analyzer) buffer)
(declare (ignorable analyzer) (ignore buffer))
nil)
| null | https://raw.githubusercontent.com/robert-strandh/Second-Climacs/e49ff97abb07a76a05f7a4467b0e79168cfce057/Code/Base/null-analyzer.lisp | lisp | A NULL-ANALYZER is an analyzer that does no analysis. | (cl:in-package #:second-climacs-base)
(defclass null-analyzer (analyzer) ())
(defmethod update-analyzer-from-buffer ((analyzer null-analyzer) buffer)
(declare (ignorable analyzer) (ignore buffer))
nil)
|
adb78a5770f3281bac3f8467c41b81304387ac5d791678831cfb7136e437b76e | district0x/district-ui-router | events.cljs | (ns district.ui.router.events
(:require
[re-frame.core :refer [reg-event-fx trim-v]]
;; Effects
[day8.re-frame.async-flow-fx]
[district0x.re-frame.window-fx]
[district.ui.router.effects :as effects]
;; Local
[district.ui.router.queries :as queries]))
(def interceptors [trim-v])
(reg-event... | null | https://raw.githubusercontent.com/district0x/district-ui-router/211d1346c1ed9b2e8cc5d956e0a9130591f289d7/src/district/ui/router/events.cljs | clojure | Effects
Local
Initial :on-navigate is fired before ::start | (ns district.ui.router.events
(:require
[re-frame.core :refer [reg-event-fx trim-v]]
[day8.re-frame.async-flow-fx]
[district0x.re-frame.window-fx]
[district.ui.router.effects :as effects]
[district.ui.router.queries :as queries]))
(def interceptors [trim-v])
(reg-event-fx
::start
intercepto... |
7339e0d50eccf1f37cc33cf47ca0f879c788f2e9d9400997e1befac07f9db661 | snapframework/snap-server | Session.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE CPP #
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
module Snap.Internal.Http.Server.Session
( httpAcceptLoop
, httpSession
, snapToServerHandler
, ... | null | https://raw.githubusercontent.com/snapframework/snap-server/f9c6e00630a8a78705aceafa0ac046ae70e1310e/src/Snap/Internal/Http/Server/Session.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE DeriveDataTypeable #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------... | # LANGUAGE CPP #
# LANGUAGE ScopedTypeVariables #
module Snap.Internal.Http.Server.Session
( httpAcceptLoop
, httpSession
, snapToServerHandler
, BadRequestException(..)
, LengthRequiredException(..)
, TerminateSessionException(..)
) where
#if !MIN_VERSION_base(4,8,0)
import C... |
e2a3f113eee36f64eec59728ca607a44f7d0da095418eeb4c64a00bb86f3bee3 | gvolpe/haskell-book-exercises | intermission.hs | data Mood = Blah | Woot deriving (Eq, Show)
changeMood :: Mood -> Mood
changeMood Woot = Blah
changeMood Blah = Woot
--changeMood x = if (x == Blah) then Woot else Blah
| null | https://raw.githubusercontent.com/gvolpe/haskell-book-exercises/5c1b9d8dc729ee5a90c8709b9c889cbacb30a2cb/chapter4/intermission.hs | haskell | changeMood x = if (x == Blah) then Woot else Blah | data Mood = Blah | Woot deriving (Eq, Show)
changeMood :: Mood -> Mood
changeMood Woot = Blah
changeMood Blah = Woot
|
211aa0bad130e0465b2f32bca247764bdf73cea9a480ba4a225a07deaba3e5d0 | pbrisbin/tee-io | PGDatabaseURL.hs | module Network.PGDatabaseURL
( parsePGConnectionString
) where
import Prelude
import Data.Maybe (isJust)
import Data.String (IsString(..))
import Network.HTTP.Base
( host
, parseURIAuthority
, password
, port
, uriToAuthorityString
, user
)
import Network.URI (parseURI, uriPath, ur... | null | https://raw.githubusercontent.com/pbrisbin/tee-io/26f4643a7f44fafb9bf92f1c1f82a60309dc8b66/src/Network/PGDatabaseURL.hs | haskell | module Network.PGDatabaseURL
( parsePGConnectionString
) where
import Prelude
import Data.Maybe (isJust)
import Data.String (IsString(..))
import Network.HTTP.Base
( host
, parseURIAuthority
, password
, port
, uriToAuthorityString
, user
)
import Network.URI (parseURI, uriPath, ur... | |
3bdebeb820ca86e05ec8bbcebe9810056afd657d9a068dc6e32c76a36fafc1a9 | input-output-hk/plutus | Main.hs | # OPTIONS_GHC -Wall #
# LANGUAGE DataKinds #
# LANGUAGE ExistentialQuantification #
{-# LANGUAGE TypeFamilies #-}
module Main where
type Constant = ()
type Builtin = ()
data Name = Name
data TyName = TyName
data Kind = Kind
data Type = Type
Note [ Encoding ]
' TypedTerm ' has t... | null | https://raw.githubusercontent.com/input-output-hk/plutus/1af96af28f45030c94e11138a2f13869e9e63b79/doc/notes/untyped-plutus-core/representation/src/Main.hs | haskell | # LANGUAGE TypeFamilies #
' TyAbs ' only exists if @typity@ is ' Typed ' .
' Delay ' only exists if @typity@ is ' Untyped ' .
When @typity@ is ' Typed ' , typity@ computes to ' Type ' .
When @typity@ is ' Untyped ' , typity@ computes to ' ( ) ' , i.e. " no type " .
'TyAbs' only exists if @typity... | # OPTIONS_GHC -Wall #
# LANGUAGE DataKinds #
# LANGUAGE ExistentialQuantification #
module Main where
type Constant = ()
type Builtin = ()
data Name = Name
data TyName = TyName
data Kind = Kind
data Type = Type
Note [ Encoding ]
' TypedTerm ' has the following constructors that ' UntypedTer... |
d60e9fec7bd591087d3ea964d13f8145865ad462ca7ef2b0562aca89f84055fa | kmi/irs | new.lisp | Mode : Lisp ; Package :
;;; Plans ontology.
Author
Translated from owl with OWL2OCML Translator ( Author : )
(in-package "OCML")
(in-ontology Plans) | null | https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/ontologies/domains/plans/new.lisp | lisp | Package :
Plans ontology. |
Author
Translated from owl with OWL2OCML Translator ( Author : )
(in-package "OCML")
(in-ontology Plans) |
098043c8ca9d56033412ddedf5cc614978d6498ade375e0c999101a45eab9ffa | typedclojure/typedclojure | dep_two.cljs | (ns cljs.core.typed.test.dep-two
(:require [cljs.core.typed :as t]
[cljs.core.typed.test.dep-one :as one]))
(def b (inc one/a))
| null | https://raw.githubusercontent.com/typedclojure/typedclojure/068414dedc166c31ac696217c8d6476cf4c993a5/typed/cljs.checker/test/cljs/core/typed/test/dep_two.cljs | clojure | (ns cljs.core.typed.test.dep-two
(:require [cljs.core.typed :as t]
[cljs.core.typed.test.dep-one :as one]))
(def b (inc one/a))
| |
a00d81beb0cb041782a181b6392a3dda54df7146dc57c1d7f0b76cef1c627938 | eggzilla/RNAlien | CMstatParser.hs | -- | This module contains parsing functions for Infernal programs
module Biobase.RNAlien.CMstatParser (
module Biobase.RNAlien.Types,
parseCMstat,
readCMstat
)
where
import Text.ParserCombinators.Parsec
import ... | null | https://raw.githubusercontent.com/eggzilla/RNAlien/026b8885482561eb89b738a954829f37050cee4b/Biobase/RNAlien/CMstatParser.hs | haskell | | This module contains parsing functions for Infernal programs
| parse from input filePath
|
module Biobase.RNAlien.CMstatParser (
module Biobase.RNAlien.Types,
parseCMstat,
readCMstat
)
where
import Text.ParserCombinators.Parsec
import Biobase.RNAlien.Types
parseCMstat :: String -> Either ParseError ... |
fbfc6ebf3b38bc1998db52549f32b7c68ae7bc881fd5118e80e1c42c4f95adb3 | hidaris/thinking-dumps | tests.rkt | #lang racket
(provide test-list)
;;;;;;;;;;;;;;;; tests ;;;;;;;;;;;;;;;;
(define test-list
'(
;; simple arithmetic
(positive-const "11" 11)
(negative-const "-33" -33)
(simple-arith-1 "(- 44 33)" 11)
;; nested arithmetic
(nested-arith-left "(- (- 44 33) 22)" -11)
(n... | null | https://raw.githubusercontent.com/hidaris/thinking-dumps/3fceaf9e6195ab99c8315749814a7377ef8baf86/eopl-solutions/chap3/3-08/tests.rkt | racket | tests ;;;;;;;;;;;;;;;;
simple arithmetic
nested arithmetic
simple variables
simple unbound variables
simple conditionals
test dynamic typechecking
make sure that the test and both arms get evaluated
properly.
and make sure the other arm doesn't get evaluated.
simple let
check nested let and shadowing
check... | #lang racket
(provide test-list)
(define test-list
'(
(positive-const "11" 11)
(negative-const "-33" -33)
(simple-arith-1 "(- 44 33)" 11)
(nested-arith-left "(- (- 44 33) 22)" -11)
(nested-arith-right "(- 55 (- 22 11))" 44)
(test-var-1 "x" 10)
(test-var-2 "(- x 1)" ... |
ff9d835e8f5177ba157d9c4d095f2c440a03f76c621d1a670821e89034af73fb | cljfx/cljfx | scroll_bar.clj | (ns cljfx.fx.scroll-bar
"Part of a public API"
(:require [cljfx.composite :as composite]
[cljfx.lifecycle :as lifecycle]
[cljfx.coerce :as coerce]
[cljfx.fx.control :as fx.control])
(:import [javafx.scene.control ScrollBar]
[javafx.geometry Orientation]))
(set! *war... | null | https://raw.githubusercontent.com/cljfx/cljfx/543f7409290051e9444771d2cd86dadeb8cdce33/src/cljfx/fx/scroll_bar.clj | clojure | overrides
definitions | (ns cljfx.fx.scroll-bar
"Part of a public API"
(:require [cljfx.composite :as composite]
[cljfx.lifecycle :as lifecycle]
[cljfx.coerce :as coerce]
[cljfx.fx.control :as fx.control])
(:import [javafx.scene.control ScrollBar]
[javafx.geometry Orientation]))
(set! *war... |
fa7019078a33550ee63fd168fba7d7febc04980159fe74b2ce643252d23e89b7 | calyau/maxima | lll.lisp | ; file lll.lisp
Maxima Interface
(defun maxima::$latticereduce (L) ; L is maxima list of maxima lists
(if (or
(not (listp L))
(< (length L) 2)
(not (equal (apply 'max (mapcar 'length (cdr L)))
(apply 'min (mapcar 'length (cdr L))) )) )
(maxima::merror "Latticereduce n... | null | https://raw.githubusercontent.com/calyau/maxima/9352a3f5c22b9b5d0b367fddeb0185c53d7f4d02/share/contrib/lll.lisp | lisp | file lll.lisp
L is maxima list of maxima lists
f is vetor of n vectors
L ist list of integers
x is a list of floats or doubles
x ist float
x is float or double
nn: maximal search degree
a solution has been found
loop
let
defun
fails
works | Maxima Interface
(if (or
(not (listp L))
(< (length L) 2)
(not (equal (apply 'max (mapcar 'length (cdr L)))
(apply 'min (mapcar 'length (cdr L))) )) )
(maxima::merror "Latticereduce needs a list lists as input"))
(let* ((vs (mapcar 'cdr (cdr L)))
(n (lengt... |
2fe9b7813af186525978e561a9252c3a6c7ecefe3f31f7a97bcd02cc0ae71d95 | cryptosense/pkcs11 | pkcs11_CK_ECDH1_DERIVE_PARAMS.ml | open Ctypes
open Ctypes_helpers
type _t
type t = _t structure
let t : t typ = structure "CK_ECDH1_DERIVE_PARAMS"
let ( -: ) typ label = smart_field t label typ
let kdf = Pkcs11_CK_EC_KDF_TYPE.t -: "kdf"
let ulSharedDataLen = ulong -: "ulSharedDataLen"
let pSharedData = Reachable_ptr.typ Pkcs11_CK_BYTE.typ -: "pS... | null | https://raw.githubusercontent.com/cryptosense/pkcs11/93c39c7a31c87f68f0beabf75ef90d85a782a983/driver/pkcs11_CK_ECDH1_DERIVE_PARAMS.ml | ocaml | open Ctypes
open Ctypes_helpers
type _t
type t = _t structure
let t : t typ = structure "CK_ECDH1_DERIVE_PARAMS"
let ( -: ) typ label = smart_field t label typ
let kdf = Pkcs11_CK_EC_KDF_TYPE.t -: "kdf"
let ulSharedDataLen = ulong -: "ulSharedDataLen"
let pSharedData = Reachable_ptr.typ Pkcs11_CK_BYTE.typ -: "pS... | |
ba97ec63f9662ff7b3733b138df2d51706b762f4f00551e61804b3afda848993 | mirage/ocaml-cstruct | tests.mli | (* empty *)
| null | https://raw.githubusercontent.com/mirage/ocaml-cstruct/9ef1ca60f29c06bdf68c0d756b278c7b7f06bbc9/lib_test/tests.mli | ocaml | empty |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.