_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 |
|---|---|---|---|---|---|---|---|---|
0586e8bd46b447d5da6f4c683f3a3fc56df480b3bd035640eeb3b40927b411b7 | spechub/Hets | Sign.hs | {-# LANGUAGE DeriveDataTypeable #-}
|
Module : ./HolLight / Sign.hs
Description : HolLight signature
Copyright : ( c ) , DFKI GmbH 2010
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : experimental
Portability : portable
Module : ./HolLi... | null | https://raw.githubusercontent.com/spechub/Hets/bbaa9dd2d2e5eb1f2fd3ec6c799a6dde7dee6da2/HolLight/Sign.hs | haskell | # LANGUAGE DeriveDataTypeable # | |
Module : ./HolLight / Sign.hs
Description : HolLight signature
Copyright : ( c ) , DFKI GmbH 2010
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : experimental
Portability : portable
Module : ./HolLight/Sign.hs
Description : HolLight ... |
0926063c01537a01092f02444849be05d47ca889ff05135a69df8dc0ae27f6ab | rescript-lang/rescript-compiler | parmatch.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/rescript-lang/rescript-compiler/5da6c88fb9237fbc4d61640187b82627690ccf39/jscomp/ml/parmatch.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Misc
open Asttypes
open Types
open Typedtree
Utilities for building patterns
let make_pat de... |
d74422302dbb570d38bf126016a89ba62e70468cdfe723066a0e50caf68ce30b | michiakig/LispInSmallPieces | chap9e.scm | $ I d : chap9e.scm , v 4.0 1995/07/10
;;;(((((((((((((((((((((((((((((((( L i S P ))))))))))))))))))))))))))))))))
;;; This file is part of the files that accompany the book:
LISP Implantation Semantique Programmation ( InterEditions , France )
By Christian Queinnec < >
;;; Newest version may be retriev... | null | https://raw.githubusercontent.com/michiakig/LispInSmallPieces/0a2762d539a5f4c7488fffe95722790ac475c2ea/src/chap9e.scm | scheme | (((((((((((((((((((((((((((((((( L i S P ))))))))))))))))))))))))))))))))
This file is part of the files that accompany the book:
Newest version may be retrieved from:
Check the README file before using this file.
(((((((((((((((((((((((((((((((( L i S P ))))))))))))))))))))))))))))))))
Convert Programs back to Sch... | $ I d : chap9e.scm , v 4.0 1995/07/10
LISP Implantation Semantique Programmation ( InterEditions , France )
By Christian Queinnec < >
( IP 128.93.2.54 ) ftp.inria.fr : INRIA / Projects / icsla / Books / LiSP*.tar.gz
(define-generic (->Scheme (e) r))
(define-method (->Scheme (e Reference) r)
(v... |
4a2fe20215e5e472090549b6d34bcb119c177456a0897aa8856148984ff13e42 | oconn/re-frame-notifier | modal.cljs | (ns re-frame-notifier.components.modal
(:require [re-frame-notifier.helpers :refer [action-and-close]]))
(defn modal-component
[{:keys [component
component-props
hide-dismiss
dismiss-button-class
modal-container-class
modal-component-container-class
... | null | https://raw.githubusercontent.com/oconn/re-frame-notifier/bcc4b9e4529f640292d6e218e784b37f2204dc48/src/cljs/re_frame_notifier/components/modal.cljs | clojure | (ns re-frame-notifier.components.modal
(:require [re-frame-notifier.helpers :refer [action-and-close]]))
(defn modal-component
[{:keys [component
component-props
hide-dismiss
dismiss-button-class
modal-container-class
modal-component-container-class
... | |
470e9005d977c24ca18c9d0274b1130cc2435bb2a838b97b1fe64799dab763ec | clash-lang/clash-compiler | CharTest.hs | module CharTest where
import Clash.Prelude
import Clash.Explicit.Testbench
import Data.Char
topEntity :: (Int,Char) -> (Int,Char,Char)
topEntity (i,c) = (ord c,chr i,'λ')
{-# NOINLINE topEntity #-}
testBench :: Signal System Bool
testBench = done
where
testInput = stimuliGenerator clk rst $(listToVecTH [(... | null | https://raw.githubusercontent.com/clash-lang/clash-compiler/8e461a910f2f37c900705a0847a9b533bce4d2ea/tests/shouldwork/Basic/CharTest.hs | haskell | # NOINLINE topEntity # | module CharTest where
import Clash.Prelude
import Clash.Explicit.Testbench
import Data.Char
topEntity :: (Int,Char) -> (Int,Char,Char)
topEntity (i,c) = (ord c,chr i,'λ')
testBench :: Signal System Bool
testBench = done
where
testInput = stimuliGenerator clk rst $(listToVecTH [(0::Int,'a'),(3,' '),(8,'\t'... |
748362e37d063da1a5a19e0df4cb10afb818f17992ec764571d910449fadfedb | binaryage/cljs-devtools | toolbox.cljs | (ns devtools.tests.toolbox
(:require [cljs.test :refer-macros [deftest testing is are]]
[devtools.tests.utils.test :refer [js-equals is-header is-body has-body? unroll remove-empty-styles pref-str]]
[devtools.formatters.core :refer [header-api-call has-body-api-call body-api-call]]
... | null | https://raw.githubusercontent.com/binaryage/cljs-devtools/d07fc6d404479b1ddd32cecc105009de77e3cba7/test/src/tests/devtools/tests/toolbox.cljs | clojure | -- envelope ---------------------------------------------------------------------------------------------------------------
-- force-format ----------------------------------------------------------------------------------------------------------- | (ns devtools.tests.toolbox
(:require [cljs.test :refer-macros [deftest testing is are]]
[devtools.tests.utils.test :refer [js-equals is-header is-body has-body? unroll remove-empty-styles pref-str]]
[devtools.formatters.core :refer [header-api-call has-body-api-call body-api-call]]
... |
61fdfcfd10e2c3abdf11eda444380c7763721de802ba9917286887fddbc253fb | input-output-hk/cardano-wallet | HWWallets.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
# LANGUAGE OverloadedLabels #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
module Test.Integration.Scenario.CLI.Shelley.HWWallets
( spec
) where
import Prelude
import Cardano.Wallet.Api.Types
( ApiAddress
... | null | https://raw.githubusercontent.com/input-output-hk/cardano-wallet/80756f919d7811219e23632bbe59214e0f5e25f5/lib/wallet/integration/src/Test/Integration/Scenario/CLI/Shelley/HWWallets.hs | haskell | create a wallet
send transaction to the wallet
delete wallet
restore wallet from account public key
make sure funds are there
create wallet from pubKey with funds
cannot update pass
can update wallet name
create wallet from pubKey with funds
get fee
arbitrary but known
create wallet from mnemonics
create wa... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
# LANGUAGE OverloadedLabels #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
module Test.Integration.Scenario.CLI.Shelley.HWWallets
( spec
) where
import Prelude
import Cardano.Wallet.Api.Types
( ApiAddress
... |
82e557f11f1cfe024fe529aac80771f3b105b835162f4365ed465326e574b487 | qkrgud55/ocamlmulti | primitive.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/qkrgud55/ocamlmulti/74fe84df0ce7be5ee03fb4ac0520fb3e9f4b6d1f/typing/primitive.ml | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ I d : primitive.ml 11156 2011 - 07 ... |
339245e127842dfc7931353f88dd12423019d1428c35d1b133d5ce8a3a4338fa | tweag/ormolu | invalid-haddock-weird-out.hs | # LANGUAGE TemplateHaskell #
foo = foo
\| # $ {
| null | https://raw.githubusercontent.com/tweag/ormolu/54642a7966d1d0787ba84636a2eb52f6729f600e/data/examples/other/invalid-haddock-weird-out.hs | haskell | # LANGUAGE TemplateHaskell #
foo = foo
\| # $ {
| |
349c0d141cd0a92e96520a328089b6abe9af74a2f3ff646f2faff9bbe70c81e5 | softlab-ntua/bencherl | math_pos_SUITE.erl | 2011 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
% you may not use this file except in compliance with the License.
% You may obtain a copy of the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, software
distribu... | null | https://raw.githubusercontent.com/softlab-ntua/bencherl/317bdbf348def0b2f9ed32cb6621e21083b7e0ca/app/scalaris/test/math_pos_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 gov... | 2011 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
@doc Test suite for the math_pos module .
@version $ I d : math_pos_SUITE.erl 2618 2011 - 12 - 29 14:35:15Z $
-mod... |
8e915a2edff361f8882d1d4208929508aebaed98dc5b546ca5a38f80c91e9272 | thephoeron/quipper-language | Main.hs | This file is part of Quipper . Copyright ( C ) 2011 - 2014 . Please see the
-- file COPYRIGHT for a list of authors, copyright holders, licensing,
-- and other details. All rights reserved.
--
-- ======================================================================
-- |
Author :
--
An implementation of th... | null | https://raw.githubusercontent.com/thephoeron/quipper-language/15e555343a15c07b9aa97aced1ada22414f04af6/Algorithms/BF/Main.hs | haskell | file COPYRIGHT for a list of authors, copyright holders, licensing,
and other details. All rights reserved.
======================================================================
|
finding whether a winning strategy exists in a game of Hex.
\[image hex2.png]
The algorithm consists of eigenvalue analysis... | This file is part of Quipper . Copyright ( C ) 2011 - 2014 . Please see the
Author :
An implementation of the Boolean Formula algorithm , applied to
\[image hex1.png ]
Hex , for which the red player has won , as well as two extra nodes being
* , , , , and
. AND - OR formula of size /N/ ca... |
717801a99ad4ac1143c930a2ec777ca3a8b0808349590f01ccf5d457ef266f84 | danidiaz/dep-t | Env.hs | # LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE DataKinds #
# LANGUAGE DefaultSignatures #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
{-# LANGUAGE GADTs #-}
# LANGUAGE ImportQualifiedPost #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE P... | null | https://raw.githubusercontent.com/danidiaz/dep-t/45306a26250c3e8331336b0814dbbd2dd12b5928/lib/Dep/Env.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE GADTs #
# LANGUAGE RankNTypes #
| This module provides helpers for building dependency injection
environments composed of records.
It's not necessary when defining the record components themselves, in that
case "Dep.Has" should suffice.
>>> :{
type Logger :: (Type -> Type... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
# LANGUAGE DefaultSignatures #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE ImportQualifiedPost #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE S... |
1bc08d1f4098c1510333c6b1142c2c88ac4fbc4bbe5c8c267050e7838dbe546c | ucsd-progsys/nate | jg_memo.ml | (*************************************************************************)
(* *)
(* Objective Caml LablTk library *)
(* *)
,... | null | https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/otherlibs/labltk/browser/jg_memo.ml | ocaml | ***********************************************************************
Objective Caml LablTk library
... | , Kyoto University RIMS
Copyright 1999 Institut National de Recherche en Informatique et
en Automatique and Kyoto University . All rights reserved .
This file is distributed under the terms of the GNU Library
$ I d : jg_memo.ml , v 1.8 2001/12/0... |
f5f5fe2dace5e1a26d82b7c6deb391a93a0f66ba2cd4e18046239357fc8d94cd | uhc/uhc | SwitchCombinator.hs | -----------------------------------------------------------------------------
-- | License : GPL
--
-- Maintainer :
-- Stability : provisional
-- Portability : portable
-----------------------------------------------------------------------------
module Top.Solver.SwitchCombinator where
import ... | null | https://raw.githubusercontent.com/uhc/uhc/8eb6914df3ba2ba43916a1a4956c6f25aa0e07c5/EHC/src/top/Solver/SwitchCombinator.hs | haskell | ---------------------------------------------------------------------------
| License : GPL
Maintainer :
Stability : provisional
Portability : portable
---------------------------------------------------------------------------
temporary*
* For now, ignore the ambiguous predicate messages ... |
module Top.Solver.SwitchCombinator where
import Top.Interface.Basic
import Top.Solver
|The first solver is used to solve the constraint set . If this fails ( at least one
error is returned ) , then the second solver takes over .
(|>>|) :: ConstraintSolver constraint info -> ConstraintSolver constraint info ... |
2f503fe664bcee62308f7eb2ae430937019c75116405320771065e28966e34de | dimitri/AdventOfCode | d02.lisp | (in-package :advent/2019)
(defparameter *input/d2*
(uiop:read-file-string
(asdf:system-relative-pathname :advent "2019/d02.input")))
(defparameter *test/input/d2*
"1,9,10,3,2,3,11,0,99,30,40,50")
(defun read-program (program-string &optional (separator #\,))
(coerce
(loop :for start := 0 :then (when end ... | null | https://raw.githubusercontent.com/dimitri/AdventOfCode/fcb9f5e9d7e75c82efffc4069c0c54c5cce2d180/2019/d02.lisp | lisp | (in-package :advent/2019)
(defparameter *input/d2*
(uiop:read-file-string
(asdf:system-relative-pathname :advent "2019/d02.input")))
(defparameter *test/input/d2*
"1,9,10,3,2,3,11,0,99,30,40,50")
(defun read-program (program-string &optional (separator #\,))
(coerce
(loop :for start := 0 :then (when end ... | |
1e839d6ae4f4a22ce497651a6c0da7dfe7343974c2a04819dff3c18a44aedfb0 | day8/re-com | progress_bar.cljs | (ns re-demo.progress-bar
(:require [re-com.core :refer [at h-box v-box box gap line label title progress-bar slider checkbox p]]
[re-com.progress-bar :refer [progress-bar-parts-desc progress-bar-args-desc]]
[re-demo.utils :refer [panel-title title2 title3 parts-table args-table g... | null | https://raw.githubusercontent.com/day8/re-com/07451b1d19c59eb185548efe93e2d00b5d3eab89/src/re_demo/progress_bar.cljs | clojure | (ns re-demo.progress-bar
(:require [re-com.core :refer [at h-box v-box box gap line label title progress-bar slider checkbox p]]
[re-com.progress-bar :refer [progress-bar-parts-desc progress-bar-args-desc]]
[re-demo.utils :refer [panel-title title2 title3 parts-table args-table g... | |
cf0df0e1e85750561a83b7db0562c8c3db6fea6e1604b698ab4a070ec6aca28d | sunng87/rigui | core.cljc | (ns rigui.core
(:require [rigui.units :as unit]
[rigui.impl :as impl]
[rigui.utils :as u])
#?(:clj (:import [rigui.impl TimingWheels Task]
[java.util.concurrent ExecutorService])))
#?(:clj (extend-protocol unit/Convert
java.lang.Long
(to-millis [this] ... | null | https://raw.githubusercontent.com/sunng87/rigui/1c695b8259dc8dd4a527298e8dbb9e0f738e517c/src/rigui/core.cljc | clojure | (ns rigui.core
(:require [rigui.units :as unit]
[rigui.impl :as impl]
[rigui.utils :as u])
#?(:clj (:import [rigui.impl TimingWheels Task]
[java.util.concurrent ExecutorService])))
#?(:clj (extend-protocol unit/Convert
java.lang.Long
(to-millis [this] ... | |
ae22a92c2831d11f12dad3075526979daf8dd6568c44b76aff7d07c5cff323f2 | racketscript/racketscript | environment.rkt | #lang typed/racket/base
(require racket/format
racket/match
"config.rkt")
(provide name-in-module
*quoted-binding-ident-name*)
(define *quoted-binding-ident-name* '__rjs_quoted__)
(: name-in-module (-> Symbol Symbol Symbol))
(define (name-in-module mod name)
(match mod
['core (strin... | null | https://raw.githubusercontent.com/racketscript/racketscript/f94006d11338a674ae10f6bd83fc53e6806d07d8/racketscript-compiler/racketscript/compiler/environment.rkt | racket | #lang typed/racket/base
(require racket/format
racket/match
"config.rkt")
(provide name-in-module
*quoted-binding-ident-name*)
(define *quoted-binding-ident-name* '__rjs_quoted__)
(: name-in-module (-> Symbol Symbol Symbol))
(define (name-in-module mod name)
(match mod
['core (strin... | |
932ac1c2b467b300fd56c58eff74c38c5cb7fbce5a175c6d88da50b96296fef2 | paurkedal/ocaml-caqti | main_eio_unix.ml | Copyright ( C ) 2022 < >
*
* This library is free software ; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or ( at your
* option ) any later version , with the ... | null | https://raw.githubusercontent.com/paurkedal/ocaml-caqti/d0acb83a5ab48d99c97e01133b997c080a7b39ae/testsuite/main_eio_unix.ml | ocaml | Copyright ( C ) 2022 < >
*
* This library is free software ; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or ( at your
* option ) any later version , with the ... | |
dd006c8693a456d63ebc90bca9b2711254e2766dfaa5a546d59baac17907839b | diku-dk/futhark | Simplify.hs | # LANGUAGE TypeFamilies #
# OPTIONS_GHC -fno - warn - orphans #
module Futhark.IR.SOACS.Simplify
( simplifySOACS,
simplifyLambda,
simplifyFun,
simplifyStms,
simplifyConsts,
simpleSOACS,
simplifySOAC,
soacRules,
HasSOAC (..),
simplifyKnownIterationSOAC,
removeReplicateMapping,
... | null | https://raw.githubusercontent.com/diku-dk/futhark/9e4ab92f81fdb22c020e719d53a51142ad8ce2da/src/Futhark/IR/SOACS/Simplify.hs | haskell | instance of this class for the simplification rules to work.
Any certificates attached to a trivial Stm in the body might as
| Remove all arguments to the map that are simply replicates.
These can be turned into free variables instead.
| Like 'removeReplicateMapping', but for 'Scatter'.
This result has been retur... | # LANGUAGE TypeFamilies #
# OPTIONS_GHC -fno - warn - orphans #
module Futhark.IR.SOACS.Simplify
( simplifySOACS,
simplifyLambda,
simplifyFun,
simplifyStms,
simplifyConsts,
simpleSOACS,
simplifySOAC,
soacRules,
HasSOAC (..),
simplifyKnownIterationSOAC,
removeReplicateMapping,
... |
aee89bf01e8afdba0462a3f7754df70d4216dc084a5abae3475667560e522275 | arohner/spectrum | invoke_wrong_type_fnarg.clj | (ns spectrum.examples.bad.invoke-wrong-type-fnarg
(:require [clojure.spec.alpha :as s]))
(s/fdef foo :args (s/cat :x keyword?) :ret string?)
(defn foo [x]
"foo")
(s/fdef bad :args (s/cat :x integer?) :ret string?)
(defn bad [x]
(foo x))
| null | https://raw.githubusercontent.com/arohner/spectrum/72b47a91a5ce4567eed547507d25b2528f48c2d1/test/spectrum/examples/bad/invoke_wrong_type_fnarg.clj | clojure | (ns spectrum.examples.bad.invoke-wrong-type-fnarg
(:require [clojure.spec.alpha :as s]))
(s/fdef foo :args (s/cat :x keyword?) :ret string?)
(defn foo [x]
"foo")
(s/fdef bad :args (s/cat :x integer?) :ret string?)
(defn bad [x]
(foo x))
| |
8ab6c7f9c08a8fd9c6d2337baa7d667148fa7efc8f400b4922f5108b6ed51290 | AndrasKovacs/ELTE-func-lang | Lesson03.hs | module Lesson03 where
extra a fájl alján , máshoz
rendes megszokott láncolt lista
listSum :: Num a => List a -> a
listSum Nil = 0
listSum (Cons x xs) = x + listSum xs
t =
\
\
adat4 adat5
t =
adat1
/ \
adat2 ... | null | https://raw.githubusercontent.com/AndrasKovacs/ELTE-func-lang/efbf8a00ddde1ac897e5ae9a838de989da25f6f9/2021-22-2/gyak_2/Lesson03.hs | haskell | ^ Eq a => BinaryTree a -> BinaryTree a -> Bool
adat4
adat5
adat4
adat5
------------------------------------
RoseTree Foldable
------------------------------------
map :: (a -> b) -> [a] -> [b]
sima map (List map)
tree map (BinaryTree-n)
Maybe map
Either map (szintén)
Functor:
típusa, típusok típusa ((,),... | module Lesson03 where
extra a fájl alján , máshoz
rendes megszokott láncolt lista
listSum :: Num a => List a -> a
listSum Nil = 0
listSum (Cons x xs) = x + listSum xs
t =
\
\
adat4 adat5
t =
adat1
/ \
adat2 ... |
9e0298165df7b63cb56c69cbc6cb5feef33a4bf8f4b4b2ed047478485940366a | screenshotbot/screenshotbot-oss | test-builds.lisp | ;;;; Copyright 2018-Present Modern Interpreters Inc.
;;;;
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(defpackage :screenshotbot/phabricator/test-builds
(:use #:cl
#:fiveam)
(... | null | https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/c6069de545afd906a5c9d0600daec7009df79078/src/screenshotbot/phabricator/test-builds.lisp | lisp | Copyright 2018-Present Modern Interpreters Inc.
We'll immediately send the message in this case
We'll immediately send the message in this case | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(defpackage :screenshotbot/phabricator/test-builds
(:use #:cl
#:fiveam)
(:import-from #:util/store
#:with-test-stor... |
26894364329feb523b5246901417d383e004c45c0619ebe731880803939bc590 | kronkltd/jiksnu | provider_methods_test.cljs | (ns jiksnu.app.provider-methods-test
(:require [cljs.test :refer-macros [async deftest is testing]]
[jiksnu.app.provider-methods :as methods]
jiksnu.main
[taoensso.timbre :as timbre]))
(declare $http)
(declare $q)
(declare $rootScope)
(declare app)
(declare Users)
(declare $httpBa... | null | https://raw.githubusercontent.com/kronkltd/jiksnu/8c91e9b1fddcc0224b028e573f7c3ca2f227e516/test-cljs/jiksnu/app/provider_methods_test.cljs | clojure | route: streams-api/collection :post | (ns jiksnu.app.provider-methods-test
(:require [cljs.test :refer-macros [async deftest is testing]]
[jiksnu.app.provider-methods :as methods]
jiksnu.main
[taoensso.timbre :as timbre]))
(declare $http)
(declare $q)
(declare $rootScope)
(declare app)
(declare Users)
(declare $httpBa... |
cf2c47f88b09e87eeb5dfe105bb6f77b7ce74b7cdcdd5f00440103f71c9427d1 | PixelsCamp/pixelscamp-quiz-stage | logger.clj | (ns pixelsquiz.logger
(:gen-class))
(require '[simple-time.core :as time])
(require '[clojure.string :refer [join upper-case]])
(def colors {:reset "\033[0m"
:default "\033[39m"
:black "\033[30m"
:white "\033[37m" :bright-white "\033[37;1m"
:red "\03... | null | https://raw.githubusercontent.com/PixelsCamp/pixelscamp-quiz-stage/102e6688aac9e72515cc532cc1815de351981fab/src/pixelsquiz/logger.clj | clojure | (ns pixelsquiz.logger
(:gen-class))
(require '[simple-time.core :as time])
(require '[clojure.string :refer [join upper-case]])
(def colors {:reset "\033[0m"
:default "\033[39m"
:black "\033[30m"
:white "\033[37m" :bright-white "\033[37;1m"
:red "\03... | |
3f81284ab0d156c5beec71fef8d69c59c0e79f39ee55ef6329266bedf5c51320 | silentsignal/DirBustErl | dirbusterl_sup.erl | @author author < >
YYYY author .
%% @doc Supervisor for the dirbusterl application.
-module(dirbusterl_sup).
-author('author <>').
-behaviour(supervisor).
%% External exports
-export([start_link/0, upgrade/0]).
%% supervisor callbacks
-export([init/1]).
( ) - > ServerRet
%% @doc API for starting the sup... | null | https://raw.githubusercontent.com/silentsignal/DirBustErl/bbdfdebb93241036500794e7055aae45a7ac9514/src/dirbusterl_sup.erl | erlang | @doc Supervisor for the dirbusterl application.
External exports
supervisor callbacks
@doc API for starting the supervisor.
@doc Add processes if necessary.
@doc supervisor callback.
@doc return the priv dir | @author author < >
YYYY author .
-module(dirbusterl_sup).
-author('author <>').
-behaviour(supervisor).
-export([start_link/0, upgrade/0]).
-export([init/1]).
( ) - > ServerRet
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
@spec upgrade ( ) - > ok
upgrade() ->
{ok, {_,... |
95baaf1754337b76f0e3fdb151af1330a790ae1a48d69b71a3240e4ce4d9dd0f | michaelt/tagless | TTF.hs | -- * Essentially, Haskell98!
# LANGUAGE NoMonomorphismRestriction #
* Typed tagless - final interpreters for PCF
-- * Higher-order abstract syntax
-- based on the code accompanying the paper by
, , and
module TTF where
The language is simply - typed lambda - calculus with fixpoint and
constants . I... | null | https://raw.githubusercontent.com/michaelt/tagless/05ca14710d0704fb1e5a52ee6887f0d52a3c0372/TTF.hs | haskell | * Essentially, Haskell98!
* Higher-order abstract syntax
based on the code accompanying the paper by
The language is just expressive enough for the power function.
We define the language by parts, to emphasize modularity.
The core plus the fixpoint is the language described in the paper
* Core language
int lite... | # LANGUAGE NoMonomorphismRestriction #
* Typed tagless - final interpreters for PCF
, , and
module TTF where
The language is simply - typed lambda - calculus with fixpoint and
constants . It is essentially PCF .
, ,
Guarded Recursive Datatype Constructors , POPL2003
which is used ... |
53b504b881767eee858e1660d49307faa6b21427648768f9e3c941e269bdda58 | parapluu/Concuerror | concuerror_options_tests.erl | -module(concuerror_options_tests).
-include_lib("eunit/include/eunit.hrl").
-define(M, concuerror_options).
%%==============================================================================
lint_option_specs_test_() ->
LintSpec =
fun(OptionSpec) ->
fun() ->
{Keywords, _} = ?M:get_keywords_a... | null | https://raw.githubusercontent.com/parapluu/Concuerror/152a5ccee0b6e97d8c3329c2167166435329d261/test/concuerror_options_tests.erl | erlang | ============================================================================== | -module(concuerror_options_tests).
-include_lib("eunit/include/eunit.hrl").
-define(M, concuerror_options).
lint_option_specs_test_() ->
LintSpec =
fun(OptionSpec) ->
fun() ->
{Keywords, _} = ?M:get_keywords_and_related(OptionSpec),
OptionName = element(1, OptionSpec),
... |
5edb6ed3996c85ac01d8dd295f57924201d8f3f35ba53a274c6e0ab25d1c7190 | CryptoKami/cryptokami-core | Plugin.hs | # LANGUAGE CPP #
{-# LANGUAGE RankNTypes #-}
-- | Auxx plugin.
module Plugin
( auxxPlugin
, rawExec
) where
import Universum
#if !(defined(mingw32_HOST_OS))
import System.Exit (ExitCode (ExitSuccess))
import System.Posix.Process (exitImmediately)
#endif
imp... | null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/auxx/src/Plugin.hs | haskell | # LANGUAGE RankNTypes #
| Auxx plugin.
--------------------------------------------------------------------------
Plugin implementation
--------------------------------------------------------------------------
--------------------------------------------------------------------------
Extra logging
-----------------... | # LANGUAGE CPP #
module Plugin
( auxxPlugin
, rawExec
) where
import Universum
#if !(defined(mingw32_HOST_OS))
import System.Exit (ExitCode (ExitSuccess))
import System.Posix.Process (exitImmediately)
#endif
import Data.Constraint (Dict(..))
impor... |
1d2f71ff6a68ad50ec1595cbf2f00c0ac457a1c964dd383463e15d7d3cb099e5 | cuter-testing/cuter | cuter_codeserver_tests.erl | -*- erlang - indent - level : 2 -*-
%%------------------------------------------------------------------------------
-module(cuter_codeserver_tests).
-include_lib("eunit/include/eunit.hrl").
-include_lib("include/cuter_macros.hrl").
-include_lib("test/utest/include/types.hrl").
This should be provided by EUnit
-... | null | https://raw.githubusercontent.com/cuter-testing/cuter/8a21578adc297711e0659a0c109314a25e2044b2/test/utest/src/cuter_codeserver_tests.erl | erlang | ------------------------------------------------------------------------------
types_and_specs:foo/0
types_and_specs:f11/1, f12/1
===================================================================
Helper functions
=================================================================== | -*- erlang - indent - level : 2 -*-
-module(cuter_codeserver_tests).
-include_lib("eunit/include/eunit.hrl").
-include_lib("include/cuter_macros.hrl").
-include_lib("test/utest/include/types.hrl").
This should be provided by EUnit
-define(MODS_LIST, [lists, dict, orddict, ets, os, string, filelib, beam_lib, cerl... |
74ac990b41b086defc663579a72d54a98e99b9901d03894e6965c6379a13dce9 | iand675/Zoom | Task.hs | {-# LANGUAGE DeriveDataTypeable #-}
module Zoom.Task where
import Zoom.Demand
import Data.Typeable
import Control.Monad.State
type TaskTransformer a s = StateT s IO a
data Task s = Task { desc :: String
, task :: TaskTransformer () s
, enableIf :: TaskTransformer Bool ... | null | https://raw.githubusercontent.com/iand675/Zoom/245c28c61f93654e9a5d84d797ab6cca795cee0a/Zoom/Task.hs | haskell | # LANGUAGE DeriveDataTypeable # | module Zoom.Task where
import Zoom.Demand
import Data.Typeable
import Control.Monad.State
type TaskTransformer a s = StateT s IO a
data Task s = Task { desc :: String
, task :: TaskTransformer () s
, enableIf :: TaskTransformer Bool s
, dependsOn :: ... |
e231f759aedeb10ae4d40d3a652c73692b8abe55e2829e980ce2db69be5d35f0 | elastic/beefheart | Fastly.hs | module Beefheart.Fastly
( autodiscoverServices
, fastlyReq
) where
import RIO
import Control.Lens hiding (argument)
import Data.Aeson
import Data.Aeson.Lens
import Network.HTTP.Req
import Beefheart.Types
import Beefheart.Utils
-- |Retrieve a JSON response from Fastly. This function's signature errs on t... | null | https://raw.githubusercontent.com/elastic/beefheart/dbcf8167fa54f6f916e32af37031a7bb2384f299/src/Beefheart/Fastly.hs | haskell | |Retrieve a JSON response from Fastly. This function's signature errs on the
member of the `FromJSON` typeclass. Although this makes the function very
generic, a type annotation may be necessary when called in order to nudge the
compiler in the right direction.
^ We wrap various request parameters in a record to a... | module Beefheart.Fastly
( autodiscoverServices
, fastlyReq
) where
import RIO
import Control.Lens hiding (argument)
import Data.Aeson
import Data.Aeson.Lens
import Network.HTTP.Req
import Beefheart.Types
import Beefheart.Utils
loosey - goosey side of polymorphism , so the ` JsonResponse ` need only be... |
1b879a54b53b38240555cc6784ef5c49d4aac7c0fd206a2d827b8188e909b1b4 | ghc/packages-Cabal | Rec.hs | module Rec(A(..), B(..)) where
import A
import B
| null | https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-testsuite/PackageTests/Backpack/Includes4/impl/Rec.hs | haskell | module Rec(A(..), B(..)) where
import A
import B
| |
a66c0d1895c08e9322ee0106b1d8c3c09f74f0b1e17821baf7a85a21ea27af33 | jrheard/voke | events.cljs | (ns voke.events
"A super-simple synchronous pub/sub system."
(:require [cljs.spec :as s]))
Specs
; TODO instead of :event/foo, do ::foo (aka :voke.events/foo)
(s/def :event/type #{:movement :entity-added :entity-removed :contact :damage})
(s/def :event/event (s/keys :req [:event/type]))
; A map of {:event/typ... | null | https://raw.githubusercontent.com/jrheard/voke/15b272955d214ce0c531fb2b8d645feb217255c2/src/voke/events.cljs | clojure | TODO instead of :event/foo, do ::foo (aka :voke.events/foo)
A map of {:event/type -> [event-handler-fn]}.
Public | (ns voke.events
"A super-simple synchronous pub/sub system."
(:require [cljs.spec :as s]))
Specs
(s/def :event/type #{:movement :entity-added :entity-removed :contact :damage})
(s/def :event/event (s/keys :req [:event/type]))
(def ^:private registry (atom {}))
(defn publish-event [event]
(doseq [handler (... |
6cb7db79e35cc338edf6a6fca46b5b3cd89a6c158653c52e0c7f85044b6145f5 | Vetd-Inc/vetd-app | app.cljs | (ns vetd-app.app
(:require [vetd-app.core :as core]
[cljs.spec.alpha :as s]
[expound.alpha :as expound]))
(def app-loaded? (volatile! false))
;;ignore println statements in prod
#_(set! *print-fn* (fn [& _]))
(defn load-app []
(when-not @app-loaded?
(vreset! app-loaded? true)
(set... | null | https://raw.githubusercontent.com/Vetd-Inc/vetd-app/9b33b1443b9d84d39305a63fc58119f8e014cf11/src/cljs/app/vetd_app/app.cljs | clojure | ignore println statements in prod | (ns vetd-app.app
(:require [vetd-app.core :as core]
[cljs.spec.alpha :as s]
[expound.alpha :as expound]))
(def app-loaded? (volatile! false))
#_(set! *print-fn* (fn [& _]))
(defn load-app []
(when-not @app-loaded?
(vreset! app-loaded? true)
(set! s/*explain-out* expound/printer)
... |
ab42e7bfd9441b49d73c8a92f12a6357e42d0b9350570f4836e12f9971e2530b | project-fifo/vmwebadm | utils.cljs | (ns server.utils
(:require
[cljs.nodejs :as node]
[server.storage :as storage]
[clojure.string :as c.s]))
(def crypto (node/require "crypto"))
(defn clj->js
"Recursively transforms ClojureScript maps into Javascript objects,
other ClojureScript colls into JavaScript arrays, and ClojureScript
keywor... | null | https://raw.githubusercontent.com/project-fifo/vmwebadm/55d83bbc0ac6db8ea1d784c73d91bf4f228fa04a/src/server/utils.cljs | clojure | (ns server.utils
(:require
[cljs.nodejs :as node]
[server.storage :as storage]
[clojure.string :as c.s]))
(def crypto (node/require "crypto"))
(defn clj->js
"Recursively transforms ClojureScript maps into Javascript objects,
other ClojureScript colls into JavaScript arrays, and ClojureScript
keywor... | |
afe448996512e835b7161d708809de6b721aabb46ca0318390dbc36b3ed72f9e | minoki/unboxing-vector | Foo.hs | # LANGUAGE TypeFamilies #
# LANGUAGE DeriveGeneric #
# LANGUAGE MultiParamTypeClasses #
module Foo
(Foo -- the constructor is not exported!
,mkFoo
) where
import Data.Vector.Unboxing (Unboxable(..))
import qualified Data.Vector.Unboxed as U
import qualified Data.Vector.Unboxed.Mutable as UM
import qualified Data.... | null | https://raw.githubusercontent.com/minoki/unboxing-vector/ca13ee80eb92e2a9a650eddbb75e8c5ebb03dfc1/test-deriving-via/Foo.hs | haskell | the constructor is not exported!
needs MultiParamTypeClasses here
needs MultiParamTypeClasses here
... enormous! | # LANGUAGE TypeFamilies #
# LANGUAGE DeriveGeneric #
# LANGUAGE MultiParamTypeClasses #
module Foo
,mkFoo
) where
import Data.Vector.Unboxing (Unboxable(..))
import qualified Data.Vector.Unboxed as U
import qualified Data.Vector.Unboxed.Mutable as UM
import qualified Data.Vector.Generic as G
import qualified Data.V... |
690c524e86f74c13d19ac52aa87f5f707738ac8dddd031bd08631306e65803f5 | crategus/cl-cffi-gtk | application-cmdline.lisp | Example Application Cmdline - 2021 - 10 - 7
(in-package :gio-example)
(defun application-cmdline (&rest argv)
(let ((app (make-instance 'g-application
:application-id
"com.crategus.application-cmdline"
:flags :handles-command-line... | null | https://raw.githubusercontent.com/crategus/cl-cffi-gtk/7f5a09f78d8004a71efa82794265f2587fff98ab/demo/gio-example/application-cmdline.lisp | lisp | Print info about the application
Return the exit status
Run the application | Example Application Cmdline - 2021 - 10 - 7
(in-package :gio-example)
(defun application-cmdline (&rest argv)
(let ((app (make-instance 'g-application
:application-id
"com.crategus.application-cmdline"
:flags :handles-command-line... |
3b8154025aa17982b686bed9649f7e97e5d138062d58c41ef9271d85611a1dec | migamake/homplexity | Metric.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
-- | Class for defining code metrics, and its simplest implementation - number of lines of code.
module Language.Haskell.Homplexity.Metric (
Metric (..)
... | null | https://raw.githubusercontent.com/migamake/homplexity/ddc2af9f988f1dbcc266c2f804fe6c599180be09/lib/Language/Haskell/Homplexity/Metric.hs | haskell | | Class for defining code metrics, and its simplest implementation - number of lines of code.
| Metric can be computed on a set of @CodeFragment@ fragments
and then shown.
| Number of lines of code
(example metric)
| Proxy for passing @LOC@ type as parameter.
remove duplicate lines within the same file
group by... | # LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
module Language.Haskell.Homplexity.Metric (
Metric (..)
, LOC
, locT
, measureAs
, measureFor
) where
import Data.Data
import ... |
e92f5ed566b0301a91a2b8b7da1b06c001690320de304871474a474b07c2dd92 | hiroshi-unno/coar | minimalityChecker.ml | open Core
open Common
open Common.Ext
open Common.Util
open Ast
open Ast.Ident
open Ast.Logic
module Make (Config : Config.ConfigType) : OptimalityChecker.OptimalityCheckerType = struct
let config = Config.config
module Debug = Debug.Make (val Debug.Config.(if config.verbose then enable else disable))
let _ = De... | null | https://raw.githubusercontent.com/hiroshi-unno/coar/90a23a09332c68f380efd4115b3f6fdc825f413d/lib/OptPCSat/minimalityChecker.ml | ocaml | Solver.reset (); | open Core
open Common
open Common.Ext
open Common.Util
open Ast
open Ast.Ident
open Ast.Logic
module Make (Config : Config.ConfigType) : OptimalityChecker.OptimalityCheckerType = struct
let config = Config.config
module Debug = Debug.Make (val Debug.Config.(if config.verbose then enable else disable))
let _ = De... |
fb8f25e64272540a92c9efea65d5bf690e3066084c6b1c329969d86299a86b1e | sionescu/iolib | os-unix.lisp | ;;;; -*- Mode: Lisp; indent-tabs-mode: nil -*-
;;;
;;; --- OS interface.
;;;
(in-package :iolib/os)
;;;; Environment access
(defclass environment ()
((variables :initarg :variables
:initform (make-hash-table :test #'equal)
:accessor environment-variables)))
(defmethod print-object ((en... | null | https://raw.githubusercontent.com/sionescu/iolib/dac715c81db55704db623d8b2cfc399ebcf6175f/src/os/os-unix.lisp | lisp | -*- Mode: Lisp; indent-tabs-mode: nil -*-
--- OS interface.
Environment access
copy variables
Current directory
File-path manipulations
File kind
only conditions of type FILE-ERROR, either by
POSIX-ERRORS subclass FILE-ERROR
or it is a broken symlink
Temporary files
Symbolic and hard links
... |
(in-package :iolib/os)
(defclass environment ()
((variables :initarg :variables
:initform (make-hash-table :test #'equal)
:accessor environment-variables)))
(defmethod print-object ((env environment) stream)
(print-unreadable-object (env stream :type t :identity nil)
(let ((keys ... |
8ed92c13f2912c013ea207d7dc4da30546c93a1039a0dcd6336d23713818c049 | OCamlPro/OCamlPro-OCaml-Branch | knucleotide2.ml | The Computer Language Benchmarks Game
* /
*
* contributed by Troestler modified by
* optimized by
* /
*
* contributed by Troestler Christophe
* modified by Mauricio Fernandez
* optimized by Fabrice Le Fessant
*)
type t = Size of int | Dna of string
type entry = {
mutable count : int;
... | null | https://raw.githubusercontent.com/OCamlPro/OCamlPro-OCaml-Branch/3a522985649389f89dac73e655d562c54f0456a5/shootout-benchmark/03-knucleotide/knucleotide2.ml | ocaml | read all non empty lines
from :
handler :
let t0 = Sys.time () in
let t0 = Sys.time () in
Printf.fprintf stderr "[%d->%d]\n%!" chunk inchunk; | The Computer Language Benchmarks Game
* /
*
* contributed by Troestler modified by
* optimized by
* /
*
* contributed by Troestler Christophe
* modified by Mauricio Fernandez
* optimized by Fabrice Le Fessant
*)
type t = Size of int | Dna of string
type entry = {
mutable count : int;
... |
f7ff087689950055cf6733b4b69444269eb885e316fe13a9d6327e2ca9f4a487 | metosin/malli | experimental_test.clj | (ns malli.experimental-test
(:require [clojure.test :refer [deftest is testing]]
[malli.dev]
[malli.experimental :as mx]
[malli.instrument :as mi]))
;; normal, no-args
(mx/defn f1 [] 1)
;; normal, args
(mx/defn f2 [x] x)
;; schematized, arg
(mx/defn f3 [x :- :int] x)
;; schemat... | null | https://raw.githubusercontent.com/metosin/malli/04c39f20966f226b07d2c8ad860854d73cf4b1ac/test/malli/experimental_test.clj | clojure | normal, no-args
normal, args
schematized, arg
schematized, many args
schematized, nested keywords args
multi-arity
input | (ns malli.experimental-test
(:require [clojure.test :refer [deftest is testing]]
[malli.dev]
[malli.experimental :as mx]
[malli.instrument :as mi]))
(mx/defn f1 [] 1)
(mx/defn f2 [x] x)
(mx/defn f3 [x :- :int] x)
(mx/defn f4 :- [:int {:min 0}]
"int int -> int functions"
[x ... |
0458c15e1fdc08b65118dee4039a588a3c9a4c73b0589826ea407f1aaf08f151 | VisionsGlobalEmpowerment/webchange | handler.clj | (ns webchange.test.class.handler
(:require [clojure.test :refer :all]
[ring.mock.request :as mock]
[webchange.test.fixtures.core :as f]
[webchange.handler :as handler]
[mount.core :as mount]
[clojure.data.json :as json]
[clojure.tools.logging :as... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/8b64c57a4ba384d08d2f078648c36b6f70039d5d/test/clj/webchange/test/class/handler.clj | clojure | (ns webchange.test.class.handler
(:require [clojure.test :refer :all]
[ring.mock.request :as mock]
[webchange.test.fixtures.core :as f]
[webchange.handler :as handler]
[mount.core :as mount]
[clojure.data.json :as json]
[clojure.tools.logging :as... | |
c3b2f8c8637b6fb9250bb34494b9c698638f6f3168cbbcaea887e7d91bffe696 | ocamllabs/ocaml-effects | predef.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-effects/36008b741adc201bf9b547545344507da603ae31/typing/predef.ml | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
open Path
open Types
open Btype
let b... |
8306fc7fda94826f80ca545afcf9402a27f4399562f851849e7de42cf8075a92 | phadej/vec | Internal.hs | # LANGUAGE BangPatterns #
{-# LANGUAGE CPP #-}
# LANGUAGE DeriveFoldable #
# LANGUAGE DeriveFunctor #
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE InstanceSigs #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTy... | null | https://raw.githubusercontent.com/phadej/vec/a5b674d52469969c2a0c77973f787d48aaf33479/ral/src/Data/RAList/NonEmpty/Internal.hs | haskell | # LANGUAGE CPP #
# LANGUAGE DeriveTraversable #
# LANGUAGE FlexibleContexts #
# LANGUAGE Safe #
# LANGUAGE ScopedTypeVariables #
* Showing
* Construction
* Indexing
* Conversions
* Folding
* Mapping
$setup
-------------------------------------------------------------... | # LANGUAGE BangPatterns #
# LANGUAGE DeriveFoldable #
# LANGUAGE DeriveFunctor #
# LANGUAGE InstanceSigs #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
module Data.RAList.NonEmpty.Internal (
NERAList (..),
NERAList' (..),
explicitShow,
expli... |
8e024b4e8be8a6b4af7a02b3906e42f46409332c4db3f05abfdce184a4f72fa0 | ghc/testsuite | tcrun050.hs | # LANGUAGE UnboxedTuples #
module Main where
type T a = Int -> (# Int, Int #)
# NOINLINE g #
--g :: (# Int, Int #) -> (# Int, Int #)
g t = case t of r -> (r :: (# Int, Int #))
# NOINLINE f #
f :: T a -> T a
f t = \x -> case t x of r -> r
main = print $ case f (\x -> g (# x, x + 1 #)) 10 of (# y, z #) -> y + z | null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_run/tcrun050.hs | haskell | g :: (# Int, Int #) -> (# Int, Int #) | # LANGUAGE UnboxedTuples #
module Main where
type T a = Int -> (# Int, Int #)
# NOINLINE g #
g t = case t of r -> (r :: (# Int, Int #))
# NOINLINE f #
f :: T a -> T a
f t = \x -> case t x of r -> r
main = print $ case f (\x -> g (# x, x + 1 #)) 10 of (# y, z #) -> y + z |
7f704dfad95349f735257e9154cf1bd6dc09a30459657ee17a45e898836299ad | cicakhq/potato | timer.lisp | (in-package :potato.common.timer)
(declaim #.potato.common::*compile-decl*)
(deftype timer-trigger () '(and real (satisfies plusp)))
(defclass checked-receptacle-sorted-list (potato.common:receptacle-sorted-list)
()
(:documentation "Special version of receptacle-sorted-list which
verifies that removed objects ac... | null | https://raw.githubusercontent.com/cicakhq/potato/88b6c92dbbc80a6c9552435604f7b1ae6f2a4026/src/common/timer.lisp | lisp | Don't use the checked sorted list in production. See the note about the race condition in the class documentation
Used to debug possible errors in the red-black implementation
ELSE: No timers, wait indefinitely | (in-package :potato.common.timer)
(declaim #.potato.common::*compile-decl*)
(deftype timer-trigger () '(and real (satisfies plusp)))
(defclass checked-receptacle-sorted-list (potato.common:receptacle-sorted-list)
()
(:documentation "Special version of receptacle-sorted-list which
verifies that removed objects ac... |
d7725f334cd5d2628c8239825a5893bdd49ddd3cf1841d74b47809a4ea45d54a | avsm/platform | gen_gen.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2014 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
% % NAME%% % % ---------------------------------------------------------------------------
Copyright (c) ... | null | https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/uucp.12.0.0%2Bdune/support/gen_gen.ml | ocaml | ---------------------------------------------------------------------------
Copyright ( c ) 2014 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
% % NAME%% % % ---------------------------------------------------------------------------
Copyright (c) ... | |
232b901f98829d09e53f2e9acfc2714471e2a30169bc12d1798b96d3c23bdb35 | nixz/cl-vr | xyz200-1.lisp | (in-package #:cl-vr)
(defparameter *xyz200-1* (make-instance 'geometry))
(SPHERE *XYZ200-1* 111 9 0 4.565920e+00)
(SPHERE *XYZ200-1* 152 44 0 9.886751e-01)
(SPHERE *XYZ200-1* 12 46 0 6.150961e+00)
(SPHERE *XYZ200-1* 166 47 0 3.569577e+00)
(SPHERE *XYZ200-1* 46 54 0 1.041509e+01)
(SPHERE *XYZ200-1* 2 61 0 1.003890... | null | https://raw.githubusercontent.com/nixz/cl-vr/145aa3505a09e996101972faaed6250fa1164d07/data/xyz200-1.lisp | lisp | (in-package #:cl-vr)
(defparameter *xyz200-1* (make-instance 'geometry))
(SPHERE *XYZ200-1* 111 9 0 4.565920e+00)
(SPHERE *XYZ200-1* 152 44 0 9.886751e-01)
(SPHERE *XYZ200-1* 12 46 0 6.150961e+00)
(SPHERE *XYZ200-1* 166 47 0 3.569577e+00)
(SPHERE *XYZ200-1* 46 54 0 1.041509e+01)
(SPHERE *XYZ200-1* 2 61 0 1.003890... | |
c3e6104371af933a53b5ee0324f171bb5fefc14c41d1db00e91a5e9338e3e706 | clojerl/clojerl | clojerl.IKVReduce.erl | %%% Code generate by scripts/generate-protocols
-module('clojerl.IKVReduce').
-include("clojerl.hrl").
-include("clojerl_int.hrl").
-clojure(true).
-protocol(true).
-export(['kv-reduce'/3]).
-export([?SATISFIES/1]).
-export([?EXTENDS/1]).
-callback 'kv-reduce'(any(), any(), any()) -> any().
-optional_callbacks(['kv... | null | https://raw.githubusercontent.com/clojerl/clojerl/aa35847ca64e1c66224867ca4c31ca6de95bc898/src/erl/lang/protocols/clojerl.IKVReduce.erl | erlang | Code generate by scripts/generate-protocols | -module('clojerl.IKVReduce').
-include("clojerl.hrl").
-include("clojerl_int.hrl").
-clojure(true).
-protocol(true).
-export(['kv-reduce'/3]).
-export([?SATISFIES/1]).
-export([?EXTENDS/1]).
-callback 'kv-reduce'(any(), any(), any()) -> any().
-optional_callbacks(['kv-reduce'/3]).
'kv-reduce'(Coll, Fun, Init) ->
... |
c2ef03e2f437485b3df263e5451b3e3f739d484dc81a533cb0605b37a902887f | practicalli/practicalli.github.io | landing_page.cljs | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Practicalli Website
;;
;; A ClojureScript single page app with reagent
Created with template
;; /
;;
Author(s ):
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(ns ^:figwheel-hooks practicalli.landing-page
(:require
[goog.dom :as gdom]
[reagent.dom :as rd... | null | https://raw.githubusercontent.com/practicalli/practicalli.github.io/27fe0233e8334495527b5afdfe3814b5e14aa9d5/src/practicalli/landing_page.cljs | clojure |
Practicalli Website
A ClojureScript single page app with reagent
/
Practicalli
simple debug statement for each build
Website structure
System configuration code
conditionally start your application based on the presence of an "app" element
this is particularly helpful for testing this ns without launch... | Created with template
Author(s ):
(ns ^:figwheel-hooks practicalli.landing-page
(:require
[goog.dom :as gdom]
[reagent.dom :as rdom]
[practicalli.books :as books]
[practicalli.content :as content]
[practicalli.data :as data]))
(println (js/Date.) "Reloading: src/practicalli_landing... |
533a86ead28c46155353a0ad5501d1b077c241671accd5463d999c9fa57bfaf6 | webyrd/n-grams-for-synthesis | test-postlude.scm | (newline)
(display "correct tests: ")
(display *correct-count*)
(newline)
(display "failed tests: ")
(display *failed-count*)
(newline)
| null | https://raw.githubusercontent.com/webyrd/n-grams-for-synthesis/b53b071e53445337d3fe20db0249363aeb9f3e51/datasets/srfi/srfi-77/arithmetic-reference/test-postlude.scm | scheme | (newline)
(display "correct tests: ")
(display *correct-count*)
(newline)
(display "failed tests: ")
(display *failed-count*)
(newline)
| |
7a9aaa23d0e5a699890cb304e37cd29bf763823115c93a927acd2cf2c529e755 | frenetic-lang/netcore-1.0 | TestEndToEnd.hs | module Tests.Frenetic.Slices.TestEndToEnd where
import Test.Framework
import Test.Framework.TH
import Test.Framework.Providers.QuickCheck2
import Test.HUnit hiding (Node)
import Test.Framework.Providers.HUnit
import Frenetic.Pattern hiding (intersect)
import Tests.Frenetic.Util
import Frenetic.NetCore hiding (Switch)
... | null | https://raw.githubusercontent.com/frenetic-lang/netcore-1.0/976b08b740027e8ed19f2d55b1e77f663bee6f02/testsuite/Tests/Frenetic/Slices/TestEndToEnd.hs | haskell | Here begins the heavyweight tests on autogenerated complete graphs. These
All the following test operators have a "reflexive" version for testing
properties. This speeds up testing dramatically compared to testing unary
properties within the pairwise test.
No need to repeat compilation correctness testing, so do... | module Tests.Frenetic.Slices.TestEndToEnd where
import Test.Framework
import Test.Framework.TH
import Test.Framework.Providers.QuickCheck2
import Test.HUnit hiding (Node)
import Test.Framework.Providers.HUnit
import Frenetic.Pattern hiding (intersect)
import Tests.Frenetic.Util
import Frenetic.NetCore hiding (Switch)
... |
caeb3051e834a0249052d4981dabeb02495bac4572f8794c62bcaad322681574 | vincent-hugot/qtest | directives.ml | first in the original file
let _id1 x = x;;
$ T _ id1
_ id1 true
_ id1 ( 2 = 2 )
_ id1 ( 3 + 1 = 4 )
_id1 true
_id1 (2 = 2)
_id1 (3 + 1 = 4)
*)
# 8 "another_file.ml"
(* then in another file *)
let _id2 x = x;;
(*$T _id2
_id2 true
*)
# 3 "with_different_lines.ml"
let _id3 x = x;;
$ T _ id3
... | null | https://raw.githubusercontent.com/vincent-hugot/qtest/77ce69df3ff40d1e611ca2a636892cf516e395a4/tests/directives.ml | ocaml | then in another file
$T _id2
_id2 true
in the middle of things | first in the original file
let _id1 x = x;;
$ T _ id1
_ id1 true
_ id1 ( 2 = 2 )
_ id1 ( 3 + 1 = 4 )
_id1 true
_id1 (2 = 2)
_id1 (3 + 1 = 4)
*)
# 8 "another_file.ml"
let _id2 x = x;;
# 3 "with_different_lines.ml"
let _id3 x = x;;
$ T _ id3
_ id3 true
_ id3 ( 5 + 1 = 6 )
_id3 true
_... |
4a150ad834a5c64e6245f14b28e015cabfb9dc8bffd787c6a2131c6caf653788 | aysylu/loom | cljs.clj | (ns loom.cljs
(:refer-clojure :exclude (extend)))
;; What's going on here?
;;
;; Loom uses `extend` extensively to provide protocol implementations for its
;; various graph types. ClojureScript does not offer `extend` (only
;; `extend-type` and `extend-protocol` are available). I did not want to
;; refactor all the... | null | https://raw.githubusercontent.com/aysylu/loom/bb9068c5c5f4c3cf66344bf1b966cfd730e92693/src/loom/cljs.clj | clojure | What's going on here?
Loom uses `extend` extensively to provide protocol implementations for its
various graph types. ClojureScript does not offer `extend` (only
`extend-type` and `extend-protocol` are available). I did not want to
refactor all the graph type definitions to use `extend-type` (either to
duplicat... | (ns loom.cljs
(:refer-clojure :exclude (extend)))
fns that could be provided to ` extend ` in Clojure ) . Further , the protocol
from the perspective of a Clojure consumer ( which might base other graph
using ` def - protocol - impls ` , which behaves just as ` def ` in Clojure . But in
ClojureScript , ` def... |
09ffa9cd8d3cfd4bd9561605f05b7efb47ae33df8fcc40983634aee8658eb4f8 | karlhof26/gimp-scheme | Mura_Meister_Line_Feedback.scm | Copies Rel 1
Created by
; Comments directed to or
;
License :
; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
; (at your option) a... | null | https://raw.githubusercontent.com/karlhof26/gimp-scheme/fecb89875adf04e76f4b58e20d2206dc5cd26393/Mura_Meister_Line_Feedback.scm | scheme | Comments directed to or
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR... | Copies Rel 1
Created by
License :
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
To view a copy of the GNU General Public License
Rel 1 : Initial release based on #p193028
(define (script-fu-mura-m... |
389adef7b720928fc0634bff22141109f5bda584e417d08fdf28765b6d5c2bd7 | fetburner/Coq2SML | evar_tactics.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/tactics/evar_tactics.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
The instantiate tactic | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Term
open Util
open Evar... |
bea922a3bff04cf1358613795e158364dde1c9f01070da99ca0764f6495ea92a | acl2/acl2 | guards@useless-runes.lsp | (RP::LEMMA1
(219 3 (:DEFINITION RP::RP-TERMP))
(177 7 (:DEFINITION RP::IS-RP$INLINE))
(148 2 (:DEFINITION RP::EX-FROM-RP))
(82 82 (:REWRITE DEFAULT-CDR))
(60 60 (:REWRITE DEFAULT-CAR))
(33 2 (:REWRITE RP::RP-TERMP-SINGLE-STEP-3))
(32 3 (:REWRITE RP::NOT-INCLUDE-RP))
(30 30 (:META RP::BINARY-OR**/AND**-GUARD-MET... | null | https://raw.githubusercontent.com/acl2/acl2/f64742cc6d41c35f9d3f94e154cd5fd409105d34/books/projects/rp-rewriter/proofs/.sys/guards%40useless-runes.lsp | lisp | (RP::LEMMA1
(219 3 (:DEFINITION RP::RP-TERMP))
(177 7 (:DEFINITION RP::IS-RP$INLINE))
(148 2 (:DEFINITION RP::EX-FROM-RP))
(82 82 (:REWRITE DEFAULT-CDR))
(60 60 (:REWRITE DEFAULT-CAR))
(33 2 (:REWRITE RP::RP-TERMP-SINGLE-STEP-3))
(32 3 (:REWRITE RP::NOT-INCLUDE-RP))
(30 30 (:META RP::BINARY-OR**/AND**-GUARD-MET... | |
97d76c2dc8cb373c5dedb5ef07b308a88a2a463abce26bada700ed4357b6a559 | ktahar/ocaml-lp | poly.mli | (** Module for polynomial expression. *)
* Type for the polynomial with order up to two ( quadratic ) .
type t
(** Type for the polynomial classified by orders. *)
type classified = {const: t; linear: t; quad: t}
(** Type for the decomposed expression of the polynomial. *)
type decomposed =
{ const: float
; lcs:... | null | https://raw.githubusercontent.com/ktahar/ocaml-lp/2ee56e7994f46a97536e11c27456663d930e1579/src/lp/poly.mli | ocaml | * Module for polynomial expression.
* Type for the polynomial classified by orders.
* Type for the decomposed expression of the polynomial.
* Make monomial of a constant value.
* Make monomial of a variable.
You can optionally set its bounds ([lb] and [ub]) and whether it is an [integer].
By default, it bec... |
* Type for the polynomial with order up to two ( quadratic ) .
type t
type classified = {const: t; linear: t; quad: t}
type decomposed =
{ const: float
; lcs: float list
; lvs: Var.t list
; qcs: float list
; qv0s: Var.t list
; qv1s: Var.t list }
val c : float -> t
val var : ?integer:bool -> ?lb:float -... |
89689b25f8b6e619c667932175e45c01c6431c9670fdc52a6185365452b52df0 | doublecrowngaming/dataflower | DataflowSpec.hs | {-# LANGUAGE RecursiveDo #-}
# LANGUAGE ScopedTypeVariables #
module DataflowSpec (spec) where
import Control.Concurrent.STM.TVar (newTVarIO, readTVarIO)
import Control.Monad (void, (>=>))
import Dataflow
import qualified Dataflow.Operators as DF (fanout, m... | null | https://raw.githubusercontent.com/doublecrowngaming/dataflower/b6d0c69d3d97eb4f60379e5ddb8b13518317c552/test/DataflowSpec.hs | haskell | # LANGUAGE RecursiveDo # | # LANGUAGE ScopedTypeVariables #
module DataflowSpec (spec) where
import Control.Concurrent.STM.TVar (newTVarIO, readTVarIO)
import Control.Monad (void, (>=>))
import Dataflow
import qualified Dataflow.Operators as DF (fanout, map)
import Prelude
import ... |
295df4c6ae855dd924784d657a23fc4eccc8ea337aeb1fb1d694fdce8260491a | jeffshrager/biobike | load.lisp | ;;; -*- mode: Lisp; Syntax: Common-Lisp; Package: user; -*-
(in-package :cl-user)
;;; +=========================================================================+
| Copyright ( c ) 2002 , 2003 , 2004 JP , , |
;;; | |
;;; | Permission i... | null | https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/Scripts/load.lisp | lisp | -*- mode: Lisp; Syntax: Common-Lisp; Package: user; -*-
+=========================================================================+
| |
| Permission is hereby granted, free of charge, to any person obtaining |
| a copy of this software and a... |
(in-package :cl-user)
| Copyright ( c ) 2002 , 2003 , 2004 JP , , |
| " Software " ) , to deal in the Software without restriction , including |
| distribute , sublicense , and/or sell copies of the Software , and to |
| permit persons to whom the Software is furnished to do so , subject ... |
dbbb0e5c96df4f937e5f7e2a70df38d25fede803f492059eab27c340f99089b7 | RefactoringTools/HaRe | UniqueNames.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE DeriveDataTypeable #-}
module UniqueNames where
import SrcLoc1(SrcLoc(..),loc0,HasSrcLoc)
import SrcLocPretty()
import HsName (Id,ModuleName)
import PrettyPrint
import HasBaseName
--import NoEq
import qualified SrcLoc1 as L
import Data.Maybe... | null | https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/old/tools/base/defs/UniqueNames.hs | haskell | # LANGUAGE DeriveDataTypeable #
import NoEq
Types to decorate identifiers to make them unique
for unique names generated in the scope pass
unique top level names (original names)
for unique variables generated by the type checker
for names made unique by their defining occurence in the source
unique by name + a s... | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
module UniqueNames where
import SrcLoc1(SrcLoc(..),loc0,HasSrcLoc)
import SrcLocPretty()
import HsName (Id,ModuleName)
import PrettyPrint
import HasBaseName
import qualified SrcLoc1 as L
import Data.Maybe(fromMaybe)
import Data.Generics
data Orig
der... |
9eaea4487521f9dc65f2e5da185817bf4193fe360ea7c8ccd0c163f2e7aaa6bc | SRI-CSL/f3d | image-pkg.lisp | (in-package :cl-user)
(defpackage :img (:use :common-lisp :qffi :lcl :lx :ev-pathnames :common-symbols)
;;(:import-from :common-symbols "TRANSFORM-MATRIX")
(:export "IMAGE-DIMENSIONS" "IMAGE-X-DIM" "IMAGE-Y-DIM"
"IMAGE-ELEMENT-TYPE"
"IMAGE-BLOCK-X-DIM" "IMAGE-BLOCK-Y-DIM" "IMAGE-BLOCK-DIMS"
... | null | https://raw.githubusercontent.com/SRI-CSL/f3d/93285f582198bfbab33ca96ff71efda539b1bec7/f3d-core/img/image-pkg.lisp | lisp | (:import-from :common-symbols "TRANSFORM-MATRIX")
needed for defpackage :ic in cme-pkg-def.lisp | (in-package :cl-user)
(defpackage :img (:use :common-lisp :qffi :lcl :lx :ev-pathnames :common-symbols)
(:export "IMAGE-DIMENSIONS" "IMAGE-X-DIM" "IMAGE-Y-DIM"
"IMAGE-ELEMENT-TYPE"
"IMAGE-BLOCK-X-DIM" "IMAGE-BLOCK-Y-DIM" "IMAGE-BLOCK-DIMS"
"IMAGE-ID"
"IMAGE-ELEMENT-SIZE" "MAKE-IMAGE"
... |
3f09e7520a5168c4388bc20bb7a37bae590d51b9a0943d1c50b13a01e3e1f058 | tatut/ripley | game.clj | (ns tictactoe.game
"Tictactoe game logic")
(def new-game
"Empty game state for new game."
{:board (vec (repeat 9 nil))
:turn :x
:winner nil})
(def ^:private winning-moves
"Set of winning moves. Each winning move is a set
of board positions that need to be held."
#{#{0 1 2} #{3 4 5} #{6 7 8} ; rows
... | null | https://raw.githubusercontent.com/tatut/ripley/40906e2b780cefe5be10a1ac54c348955d672608/examples/tictactoe/src/tictactoe/game.clj | clojure | rows
cols
diagonals
Return winner and move, if any
If there are no empty slots, return tie
tried to play when winner is already determined, do nothing
tried to play on other players turn, do nothing
if played position is not empty, do nothing
play this position
comment | (ns tictactoe.game
"Tictactoe game logic")
(def new-game
"Empty game state for new game."
{:board (vec (repeat 9 nil))
:turn :x
:winner nil})
(def ^:private winning-moves
"Set of winning moves. Each winning move is a set
of board positions that need to be held."
(defn winner
"Return the player (:x ... |
52180b7423a5e6d303d75c3d4ac04b6b7af629996e9598cf032a113e013377b4 | elpinal/modules | Impl.hs | # LANGUAGE DataKinds #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE ImplicitParams #
# OPTIONS_GHC -fplugin = Polysemy . Plugin #
module Language.Modules.Ros2018.Internal.Impl
( runFailure
, typecheck
, equalType
) where
import qualified Data.Map.Lazy as Map
import qualified Data.Text as T
import Polys... | null | https://raw.githubusercontent.com/elpinal/modules/aa8f2725a770edb06626aeaf8716da90dfa06823/src/Language/Modules/Ros2018/Internal/Impl.hs | haskell | Assumes input types have the base kind. | # LANGUAGE DataKinds #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE ImplicitParams #
# OPTIONS_GHC -fplugin = Polysemy . Plugin #
module Language.Modules.Ros2018.Internal.Impl
( runFailure
, typecheck
, equalType
) where
import qualified Data.Map.Lazy as Map
import qualified Data.Text as T
import Polys... |
db36f22e31054c4c184402d82095b8b67e9e1bfe953dc7185dc9e8301d606736 | jyh/metaprl | m_x86_coalesce.mli |
* Coalesce lets .
*
* ----------------------------------------------------------------
*
* @begin[license ]
* Copyright ( C ) 2003 , Caltech
*
* 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 ... | null | https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/experimental/compile/m_x86_coalesce.mli | ocaml |
* -*-
* Local Variables:
* Caml-master: "compile"
* End:
* -*-
|
* Coalesce lets .
*
* ----------------------------------------------------------------
*
* @begin[license ]
* Copyright ( C ) 2003 , Caltech
*
* 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 ... |
8fc3746b0a86d2ddb59ec3d2fb05b79b728abcf7abf42c3729565038801c0e1e | GaloisInc/lua-bc | Pretty.hs | module Language.Lua.Bytecode.Pretty where
import Language.Lua.Bytecode
import Language.Lua.Bytecode.Debug(lookupLocalName)
import Language.Lua.Bytecode.FunId
import Text.PrettyPrint
import Data.Maybe(fromMaybe)
import Data.Text.Lazy()
import Data.Text.Encoding(decodeUtf8With)
import Data.Text.Encoding.Error(lenientDe... | null | https://raw.githubusercontent.com/GaloisInc/lua-bc/ad82f2b1e9e672d4eea96ed268aeec620541ec02/src/Language/Lua/Bytecode/Pretty.hs | haskell | This is written like this so that `lkp` memoizes. | module Language.Lua.Bytecode.Pretty where
import Language.Lua.Bytecode
import Language.Lua.Bytecode.Debug(lookupLocalName)
import Language.Lua.Bytecode.FunId
import Text.PrettyPrint
import Data.Maybe(fromMaybe)
import Data.Text.Lazy()
import Data.Text.Encoding(decodeUtf8With)
import Data.Text.Encoding.Error(lenientDe... |
04c68c1703442567d672ae30a23bbd923c44ab1e008220de0a5e4048a686dd7e | McParen/croatoan | define_key.lisp | (in-package :de.anvi.ncurses)
;; define_key
;; define a keycode
;; -island.net/ncurses/man/define_key.3x.html
;;; C prototypes
;; int define_key(const char *definition, int keycode);
;;; Low-level CFFI wrappers
(cffi:defcfun ("define_key" define-key) :int (definition :string) (keycode :int))
| null | https://raw.githubusercontent.com/McParen/croatoan/413e8855b78a2e408f90efc38e8485f880691684/ncurses/define_key.lisp | lisp | define_key
define a keycode
-island.net/ncurses/man/define_key.3x.html
C prototypes
int define_key(const char *definition, int keycode);
Low-level CFFI wrappers | (in-package :de.anvi.ncurses)
(cffi:defcfun ("define_key" define-key) :int (definition :string) (keycode :int))
|
4f27e97684c019afbc8ece6b974c3f7b0f761297be9080de10e0418c034ba909 | dinosaure/multipart_form | rfc2046.ml | open Angstrom
From RFC 2046
: = DIGIT / ALPHA / " ' " / " ( " / " ) " /
" + " / " _ " / " , " / " - " / " . " /
" / " / " : " / " = " / " ? "
bcharsnospace := DIGIT / ALPHA / "'" / "(" / ")" /
"+" / "_" / "," / "-" / "." /
... | null | https://raw.githubusercontent.com/dinosaure/multipart_form/93359bf43655db10e011f19d554b7c04f5463bff/lib/rfc2046.ml | ocaml | NOTE: this parser terminate at the boundary, however it does not consume it.
impossible case?
impossible case?
see [preambule]. | open Angstrom
From RFC 2046
: = DIGIT / ALPHA / " ' " / " ( " / " ) " /
" + " / " _ " / " , " / " - " / " . " /
" / " / " : " / " = " / " ? "
bcharsnospace := DIGIT / ALPHA / "'" / "(" / ")" /
"+" / "_" / "," / "-" / "." /
... |
83bd016c25ea08e7289b764de8fcc8a3b43f0ed6b12def026dfc1b9cf9450b3c | haskell-tools/haskell-tools | InExpr.hs | # LANGUAGE ParallelListComp ,
MultiWayIf ,
TupleSections
#
MultiWayIf,
TupleSections
#-}
module InExpr where
import Definitions
{-# ANN module "HLint: ignore Redundant lambda" #-}
{-# ANN module "HLint: ignore Redundant bracket" #-}
... | null | https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/builtin-refactorings/test/ExtensionOrganizerTest/ParallelListCompTest/InExpr.hs | haskell | # ANN module "HLint: ignore Redundant lambda" #
# ANN module "HLint: ignore Redundant bracket" #
# ANN module "HLint: ignore Redundant if" #
* ParallelListComp, ParallelListComp *
* ParallelListComp *
* ParallelListComp *
* ParallelListComp *
* ParallelListComp *
* ParallelListComp *
* ParallelListComp *
* ParallelList... | # LANGUAGE ParallelListComp ,
MultiWayIf ,
TupleSections
#
MultiWayIf,
TupleSections
#-}
module InExpr where
import Definitions
* ParallelListComp , TupleSections *
x14 = ( \case { _ - > 5 } ) @Int ( ( \case { _ ... |
6788f01b0ac942b6f1bd03a7eacfc947375b2b91517d91e5dfc8a9181a4c4f66 | vasilisp/inez | script_main.ml | open Core.Std
open Async.Std
open Ocaml_plugin.Std
let _ =
let file = Sys.argv.(1) in
don't_wait_for (
Ocaml_plugin.Shell.set_defaults ~verbose:false ~echo:false ();
Ocaml_compiler.Side_effect.load_ocaml_src_files [file]
~custom_warnings_spec:"@a-4-9-29-32-33-34-44" >>=
function
| Error e... | null | https://raw.githubusercontent.com/vasilisp/inez/3bbbbb82a12918c1557f5fb0b49a8c73ab8d6da1/frontend/script_main.ml | ocaml | open Core.Std
open Async.Std
open Ocaml_plugin.Std
let _ =
let file = Sys.argv.(1) in
don't_wait_for (
Ocaml_plugin.Shell.set_defaults ~verbose:false ~echo:false ();
Ocaml_compiler.Side_effect.load_ocaml_src_files [file]
~custom_warnings_spec:"@a-4-9-29-32-33-34-44" >>=
function
| Error e... | |
d62f5c29057901387a223bbc196e0d5eb71dc7623bd6a0e3e784300c052e5e8e | lab-79/dspec | util.clj | (ns lab79.dspec.util
(:require [clojure.spec :as s]))
; TODO s/fdef commented out until we can figure out how to spec a higher order
; function whose input function can take on any number or args. Currently,
; clojure.spec does not apparently support specs to handle functions that can
; take 0 or non-0 length args,... | null | https://raw.githubusercontent.com/lab-79/dspec/26f88e74066e381c8569d175c1bd5948a8005bd0/src/clj/lab79/dspec/util.clj | clojure | TODO s/fdef commented out until we can figure out how to spec a higher order
function whose input function can take on any number or args. Currently,
clojure.spec does not apparently support specs to handle functions that can
take 0 or non-0 length args, against a function that has 0 arity.
(s/fdef arity
:... | (ns lab79.dspec.util
(:require [clojure.spec :as s]))
: ret any ? )
: ret any ? ) )
: ret boolean ? )
(defn arity
"Returns the arity -- i.e., the number of arguments -- of a function f."
[f]
(-> f class .getDeclare... |
30691618594e9c079f0c902ed3b7e4fcc6429c17f8cc92d1ecde2497713e0f24 | tarides/ocaml-jit | clitop.mli | val main :
name:string ->
eval_phrase:(bool -> Format.formatter -> Parsetree.toplevel_phrase -> bool) ->
loop:(Format.formatter -> unit) ->
unit ->
unit
| null | https://raw.githubusercontent.com/tarides/ocaml-jit/fe2fce1a5bb89acf5f7239917f6098d53c2c14ec/clitop/clitop.mli | ocaml | val main :
name:string ->
eval_phrase:(bool -> Format.formatter -> Parsetree.toplevel_phrase -> bool) ->
loop:(Format.formatter -> unit) ->
unit ->
unit
| |
3a6a17bd85164af5e72204ee1188ed6c1a740d4183ca62d0306b09d69177cc6b | ghc/packages-dph | TracePrim.hs | | When ` tracePrimEnabled ` , DPH programs will print out what flat array
-- primitives they're using at runtime. See `tracePrim` for details.
module Data.Array.Parallel.Base.TracePrim
( tracePrim
, TracePrim(..))
where
import Data.Array.Parallel.Base.Config
import qualified Debug.Trace
-- | Print... | null | https://raw.githubusercontent.com/ghc/packages-dph/64eca669f13f4d216af9024474a3fc73ce101793/dph-base/Data/Array/Parallel/Base/TracePrim.hs | haskell | primitives they're using at runtime. See `tracePrim` for details.
| Print tracing information to console.
in @dph-prim-par@:"Data.Array.Parallel.Unlifted"
Tracing is only enabled when `tracePrimEnabled` is `True`.
otherwise it's a no-op.
| Records information about the use of a flat array primiti... | | When ` tracePrimEnabled ` , DPH programs will print out what flat array
module Data.Array.Parallel.Base.TracePrim
( tracePrim
, TracePrim(..))
where
import Data.Array.Parallel.Base.Config
import qualified Debug.Trace
This function is used to wrap the calls to DPH primitives defined
tracePrim ... |
40c223b2757247452b61373efa251e1784bba9c7a76bbfff2a8b8d601de191e7 | ddssff/cabal-debian | Finalize.hs | -- | Compute the debianization of a cabal package.
# LANGUAGE CPP , FlexibleContexts , FlexibleInstances , OverloadedStrings , ScopedTypeVariables , TemplateHaskell #
module Debian.Debianize.Finalize
( debianize
, debianizeWith
, debianizeWebsite
-- , finalizeDebianization -- external use deprecated - u... | null | https://raw.githubusercontent.com/ddssff/cabal-debian/763270aed987f870762e660f243451e9a34e1325/src/Debian/Debianize/Finalize.hs | haskell | | Compute the debianization of a cabal package.
, finalizeDebianization -- external use deprecated - used in test script
description,
environment and the cabal package description in (and possibly the
debian/changelog file) from the current directory, then runs
@customize@ and finalizes the debianization so it is ... | # LANGUAGE CPP , FlexibleContexts , FlexibleInstances , OverloadedStrings , ScopedTypeVariables , TemplateHaskell #
module Debian.Debianize.Finalize
( debianize
, debianizeWith
, debianizeWebsite
, watchAtom
) where
import Control.Lens hiding ((<.>))
import Control.Monad (unless, when)
import Cont... |
17bbd7a07967704540f7f3a4effca5978a1ef3794b0aaeba99ce39a7959d968a | danieljharvey/mimsa | LLVMSpec.hs | {-# LANGUAGE OverloadedStrings #-}
module Test.LLVM.LLVMSpec (spec) where
import qualified Calc.Compile.RunLLVM as Run
import Calc.Compile.ToLLVM
import Calc.Parser
import Data.Foldable (traverse_)
import Data.Text (Text)
import qualified LLVM.AST as LLVM
import Test.Hspec
-- run the code, get the output, die
run ::... | null | https://raw.githubusercontent.com/danieljharvey/mimsa/296ab9bcbdbaf682fa76921ce3c80d4bbafb52ae/llvm-calc/test/Test/LLVM/LLVMSpec.hs | haskell | # LANGUAGE OverloadedStrings #
run the code, get the output, die |
module Test.LLVM.LLVMSpec (spec) where
import qualified Calc.Compile.RunLLVM as Run
import Calc.Compile.ToLLVM
import Calc.Parser
import Data.Foldable (traverse_)
import Data.Text (Text)
import qualified LLVM.AST as LLVM
import Test.Hspec
run :: LLVM.Module -> IO Text
run = fmap Run.rrResult . Run.run
testCompileIR... |
37f9eba8c1a515d9917b86c5eb2c294d32e34e9f7902c7ddc2224c5d05062275 | lojic/LearningRacket | ch-04.rkt | #lang racket
(require rackunit)
(define (add3 n)
(+ 3 n))
(check-equal? (add3 2)
4)
| null | https://raw.githubusercontent.com/lojic/LearningRacket/eb0e75b0e16d3e0a91b8fa6612e2678a9e12e8c7/realm-of-racket/ch-04.rkt | racket | #lang racket
(require rackunit)
(define (add3 n)
(+ 3 n))
(check-equal? (add3 2)
4)
| |
083198009010589ec3f512673715d88611543710910cfa4f747c822befaa020a | amnh/PCG | Nexus.hs | ------------------------------------------------------------------------------
-- |
Module : TestSuite . GeneratedTests . Nexus
Copyright : ( c ) 2015 - 2021 Ward Wheeler
-- License : BSD-style
--
-- Maintainer :
-- Stability : provisional
-- Portability : portable
--
----------------------... | null | https://raw.githubusercontent.com/amnh/PCG/9341efe0ec2053302c22b4466157d0a24ed18154/lib/file-parsers/test/TestSuite/GeneratedTests/Nexus.hs | haskell | ----------------------------------------------------------------------------
|
License : BSD-style
Maintainer :
Stability : provisional
Portability : portable
---------------------------------------------------------------------------
|
the files that it is expected to accept and fails to parse the... | Module : TestSuite . GeneratedTests . Nexus
Copyright : ( c ) 2015 - 2021 Ward Wheeler
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeFamilies #
module TestSuite.GeneratedTests.Nexus
( testSuite
) where
import Data.Map (toList)
import File.Format.Nexus
import Test.Cus... |
294a8a77f155277add3b7be115d313859a8027812482b4b1903a520b373a061c | adamschoenemann/clofrp | Experiments.hs | # LANGUAGE DeriveFunctor #
# LANGUAGE TypeApplications #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE StandaloneDeriving #
{-# LANGUAGE ImpredicativeTypes #-}
module CloFRP.Experiments where
-- This is just to keep some experiments around
-- Primitive recursion e... | null | https://raw.githubusercontent.com/adamschoenemann/clofrp/c26f86aec2cdb8fa7fd317acd13f7d77af984bd3/library/CloFRP/Experiments.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE RankNTypes #
# LANGUAGE ImpredicativeTypes #
This is just to keep some experiments around
Primitive recursion encoded with functors
F[μX. F[X]] -> (μX. F[X])
(μX. F[X]) -> F[μX. F[X]]
fmap f x =
case x of
Z -> Z
S x' -> S (f x')
primitive recursion
(F[(... | # LANGUAGE DeriveFunctor #
# LANGUAGE TypeApplications #
# LANGUAGE FlexibleInstances #
# LANGUAGE StandaloneDeriving #
module CloFRP.Experiments where
data Fix f = Into (f (Fix f))
out :: Fix f -> f (Fix f)
out (Into f) = f
data NatF a = Z | S a deriving Show
instance Functor NatF where
fmap f Z = Z
fmap f (... |
ec285ff494756d2a7c3103a2c2dc9bc1ccdafe3d7d0aba70cd42af01cd9be7ce | athos/Bigmouth | subscription.clj | (ns bigmouth.routes.subscription
(:require [bigmouth.models.account :as account]
[bigmouth.models.subscription :as subs]
[bigmouth.specs :as specs]
[clojure.spec.alpha :as s]
[org.httpkit.client :as http]
[pandect.utils.convert :as conv]
[ring.ut... | null | https://raw.githubusercontent.com/athos/Bigmouth/d7a43cc0317175eabb3be22a1211caf34011eb2e/src/bigmouth/routes/subscription.clj | clojure | (ns bigmouth.routes.subscription
(:require [bigmouth.models.account :as account]
[bigmouth.models.subscription :as subs]
[bigmouth.specs :as specs]
[clojure.spec.alpha :as s]
[org.httpkit.client :as http]
[pandect.utils.convert :as conv]
[ring.ut... | |
e8e4469c4070d4bf5f6cefe652725c9f5cde22600cb1b654dfb4f9a661dca32e | isovector/algebra-checkers | Main.hs | # LANGUAGE GADTs #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TemplateHaskell #-}
# LANGUAGE TypeApplications #
# OPTIONS_GHC -fno - warn - orphans #
{ - # OPTIONS_GHC -ddump - splices # - }
-- module Main where
import Data.F... | null | https://raw.githubusercontent.com/isovector/algebra-checkers/40ed33d23ff36a78cef133d02cd9e44e4f7101f9/test/Main.hs | haskell | # LANGUAGE RankNTypes #
# LANGUAGE TemplateHaskell #
module Main where
main :: IO ()
main = quickBatch $ mconcat
[ deno_not2 `denotationFor` not2
, deno_and2 `denotationFor` and2
]
model = Temp | # LANGUAGE GADTs #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeApplications #
# OPTIONS_GHC -fno - warn - orphans #
{ - # OPTIONS_GHC -ddump - splices # - }
import Data.Function
import Data.List (nub)
import Data.Monoid
import qualified Data.Set as ... |
7b9be617d9e1414f055132ad0b8aae59c52fc250292839034fe2db750dd3b0f1 | squest/clojure-tutorial | project.clj | (defproject sscom "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
[http-kit "2.1.18"]
[ring "1.4.0"]
[ring/ring-defaults "0.1.5"... | null | https://raw.githubusercontent.com/squest/clojure-tutorial/5cf97832cb226928f63f043a56328c9a79c4a321/sscom/project.clj | clojure | (defproject sscom "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
[http-kit "2.1.18"]
[ring "1.4.0"]
[ring/ring-defaults "0.1.5"... | |
8e82960a7a2af7306897265f4bd83dbfb865b3936c03cba6bedffc1cee8bb822 | damballa/parkour | nline_test.clj | (ns parkour.io.nline-test
(:require [clojure.test :refer :all]
[clojure.string :as str]
[clojure.java.io :as io]
[clojure.core.reducers :as r]
[parkour (conf :as conf) (fs :as fs) (wrapper :as w)
(mapreduce :as mr)]
[parkour.io (dsink :a... | null | https://raw.githubusercontent.com/damballa/parkour/2b3c5e1987e18b4c4284dfd4fcdaba267a4d7fbc/test/parkour/io/nline_test.clj | clojure | (ns parkour.io.nline-test
(:require [clojure.test :refer :all]
[clojure.string :as str]
[clojure.java.io :as io]
[clojure.core.reducers :as r]
[parkour (conf :as conf) (fs :as fs) (wrapper :as w)
(mapreduce :as mr)]
[parkour.io (dsink :a... | |
782ff9ebdcfb851222253b09ed27f909d0d3adf42784e1ce205203d0406c6630 | thheller/shadow-cljs | host.cljs | (ns demo.selfhost.host
(:require [cognitect.transit :as transit]
[cljs.env :as env]
[cljs.js]
[shadow.js]
))
these should be helper fns somewhere , worker has them too
(defn transit-read [txt]
(let [r (transit/reader :json)]
(transit/read r txt)))
(defn transi... | null | https://raw.githubusercontent.com/thheller/shadow-cljs/ba0a02aec050c6bc8db1932916009400f99d3cce/src/dev/demo/selfhost/host.cljs | clojure | FIXME: should not eval if if provides are loaded
(js/console.log "worker message" e) | (ns demo.selfhost.host
(:require [cognitect.transit :as transit]
[cljs.env :as env]
[cljs.js]
[shadow.js]
))
these should be helper fns somewhere , worker has them too
(defn transit-read [txt]
(let [r (transit/reader :json)]
(transit/read r txt)))
(defn transi... |
fd09edeae1d5066c80d41762cad7b921fc14399cd6902429aee0ca12ef922cb6 | mbenelli/klio | format#.scm | (namespace ("format#" format))
| null | https://raw.githubusercontent.com/mbenelli/klio/33c11700d6080de44a22a27a5147f97899583f6e/klio/format%23.scm | scheme | (namespace ("format#" format))
| |
245f2ffb4e43e43af66a8b2bd9bcdbb588bb3c4e3df2c8bfc983d01fee105b14 | CLowcay/hgbc | Elements.hs | {-# LANGUAGE OverloadedStrings #-}
module HGBC.Debugger.HTML.Elements
( html,
head,
title,
charset,
meta,
link,
script,
inlineScript,
body,
h,
nav,
innerNav,
br,
p,
table,
tr,
td,
tdspan,
th,
ul,
ulid,
div,
divclass,
divclass... | null | https://raw.githubusercontent.com/CLowcay/hgbc/76a8cf91f3c3b160eadf019bc8fc75ef07601c2f/main/src/HGBC/Debugger/HTML/Elements.hs | haskell | # LANGUAGE OverloadedStrings # |
module HGBC.Debugger.HTML.Elements
( html,
head,
title,
charset,
meta,
link,
script,
inlineScript,
body,
h,
nav,
innerNav,
br,
p,
table,
tr,
td,
tdspan,
th,
ul,
ulid,
div,
divclass,
divclassid,
focusDiv,
spanclass,
... |
d496444e523e9fc4d3b32e845fbe47e091ed672b9c992f211bd9df3a45a1f9fd | reanimate/reanimate | doc_queryNow.hs | #!/usr/bin/env stack
-- stack runghc --package reanimate
{-# LANGUAGE OverloadedStrings #-}
module Main(main) where
import Reanimate
import Reanimate.Builtin.Documentation
import qualified Data.Text as T
main :: IO ()
main = reanimate $ docEnv $ scene $ do
now <- play drawCircle *> queryNow
play $ staticFrame... | null | https://raw.githubusercontent.com/reanimate/reanimate/5ea023980ff7f488934d40593cc5069f5fd038b0/examples/doc_queryNow.hs | haskell | stack runghc --package reanimate
# LANGUAGE OverloadedStrings # | #!/usr/bin/env stack
module Main(main) where
import Reanimate
import Reanimate.Builtin.Documentation
import qualified Data.Text as T
main :: IO ()
main = reanimate $ docEnv $ scene $ do
now <- play drawCircle *> queryNow
play $ staticFrame 1 $ scale 2 $ withStrokeWidth 0.05 $
mkText $ "Now=" <> T.pack (... |
6cf6de9ff2b3f2f01d5dfefc06d4d94ea4366ada4ac12ffa24263abf8434c818 | def-/ghc-vis | dll2.hs | data DList a = DLNode (DList a) a (DList a)
rot :: Integer -> [a] -> [a]
rot n xs | n < 0 = rot (n+1) ((last xs):(init xs))
| n == 0 = xs
| n > 0 = rot (n-1) (tail xs ++ [head xs])
mkDList :: [a] -> DList a
mkDList [] = error "Must have at least one element."
mkDList xs = DLNode (... | null | https://raw.githubusercontent.com/def-/ghc-vis/7b93f3aa80c8e5dad356f62babec861a67e20948/docs/dll2.hs | haskell | data DList a = DLNode (DList a) a (DList a)
rot :: Integer -> [a] -> [a]
rot n xs | n < 0 = rot (n+1) ((last xs):(init xs))
| n == 0 = xs
| n > 0 = rot (n-1) (tail xs ++ [head xs])
mkDList :: [a] -> DList a
mkDList [] = error "Must have at least one element."
mkDList xs = DLNode (... | |
fd50dd56da3231f7e50bc75730f3bb9c307732333dc4efea7113b351aaead3f8 | xh4/web-toolkit | request.lisp | (in-package :http-test)
(in-suite :http-test)
(test read-request-line
(it
(with-input-from-lines (stream '("GET / HTTP/1.1"))
(is (equal '("GET" "/" "HTTP/1.1") (http::read-request-line stream)))))
(it
(with-input-from-lines (stream '("GET /"))
(is (equal nil (http::read-request-line stream))... | null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/test/http/request.lisp | lisp | (in-package :http-test)
(in-suite :http-test)
(test read-request-line
(it
(with-input-from-lines (stream '("GET / HTTP/1.1"))
(is (equal '("GET" "/" "HTTP/1.1") (http::read-request-line stream)))))
(it
(with-input-from-lines (stream '("GET /"))
(is (equal nil (http::read-request-line stream))... | |
8e12a15e67f0e8b29e2e373f69fde2477a87496edf1bca2942990e64d9aad4b9 | LightAndLight/sized-hkts | Function.hs | {-# language FlexibleContexts #-}
# language PatternSynonyms #
# language QuantifiedConstraints #
module Check.Function
(checkFunction)
where
import Bound.Var (unvar)
import Control.Lens.Getter (use)
import Control.Lens.Indexed (ifoldlM)
import Control.Lens.Setter ((.~))
import Control.Monad.Except (MonadError)
impo... | null | https://raw.githubusercontent.com/LightAndLight/sized-hkts/d12fedb34e7ea82be66f200e9ecf7fcf611cce53/src/Check/Function.hs | haskell | # language FlexibleContexts #
locally, we assume that each type variable is sized
include all the local axioms that weren't simplified | # language PatternSynonyms #
# language QuantifiedConstraints #
module Check.Function
(checkFunction)
where
import Bound.Var (unvar)
import Control.Lens.Getter (use)
import Control.Lens.Indexed (ifoldlM)
import Control.Lens.Setter ((.~))
import Control.Monad.Except (MonadError)
import Control.Monad.State.Strict (eva... |
113a5fc573b9ad72ada55a64b93183591f71d5584ab46f8f591ff0000beb3b4b | jyh/metaprl | pmn_core_logic.ml |
* Logical rules for core .
*
* ----------------------------------------------------------------
*
* @begin[license ]
* Copyright ( C ) 2005 Mojave Group , Caltech
*
* This program is free software ; you can redistribute it and/or
* modify it under the terms of the GNU General Public License ... | null | https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/poplmark/naive/pmn_core_logic.ml | ocaml |
* Subtyping rules.
* Expression typing rules.
!
* @docoff
*
* -*-
* Local Variables:
* Caml-master: "compile"
* End:
* -*-
|
* Logical rules for core .
*
* ----------------------------------------------------------------
*
* @begin[license ]
* Copyright ( C ) 2005 Mojave Group , Caltech
*
* This program is free software ; you can redistribute it and/or
* modify it under the terms of the GNU General Public License ... |
5d3cde078ca76edcff2453effbf710125f081c6c276cae467fa52ddd6d9085c6 | kowainik/prolens | Data.hs | module Test.Data
( -- * Lenses
Haskeller (..)
, nameL
, knowledgeL
, Knowledge (..)
, syntaxL
, me
-- * Prisms
, Grade (..)
, _Mark
, gradeMark
, gradeOther
-- * Generators
, genFun
, genFunction
, genForget
, genHaskeller
, genInt
,... | null | https://raw.githubusercontent.com/kowainik/prolens/5d0f9311c87f59b851f932e1e37b70d519f5c39e/test/Test/Data.hs | haskell | * Lenses
* Prisms
* Generators
# INLINE _Mark #
Generators | module Test.Data
Haskeller (..)
, nameL
, knowledgeL
, Knowledge (..)
, syntaxL
, me
, Grade (..)
, _Mark
, gradeMark
, gradeOther
, genFun
, genFunction
, genForget
, genHaskeller
, genInt
, genKnowledge
, genName
) where
import Test.Hspec... |
5525f04ad8d4c557623f643cc337c8d4edfcf3d0e29f90bd2901258c71554feb | aryx/xix | plan9.ml | open Common
(*****************************************************************************)
(* Prelude *)
(*****************************************************************************)
Port ( partial ) of the Plan9 API to OCaml .
* This is similar to unix.ml , but for Plan9 .
*
* I just binded the necessa... | null | https://raw.githubusercontent.com/aryx/xix/60ce1bd9a3f923e0e8bb2192f8938a9aa49c739c/lib_system/plan9/plan9.ml | ocaml | ***************************************************************************
Prelude
***************************************************************************
***************************************************************************
Types and constants
************************************************************... | open Common
Port ( partial ) of the Plan9 API to OCaml .
* This is similar to unix.ml , but for Plan9 .
*
* I just binded the necessary API for rio to work :
* bind , mount , errstr , and a few types for protocol_9P.ml .
*
* less : provide full API in syscall.h and libc.h that is not
* alread... |
ef7797ad1ff7f6d408c98bdb1ae4ce2ba147ed407fbaffb66c857bfe079c24cb | xvw/muhokama | state_test.ml | open Alcotest
open Models.User.State
open Lib_test
let test_all =
test
~about:"all & pp_filter"
~desc:"test for [all] and [pp_filter]"
(fun () ->
let computed = Fmt.str "%a" (pp_filter ()) all
and expected = "true" in
same string ~expected ~computed)
;;
let test_active =
test
~about:"a... | null | https://raw.githubusercontent.com/xvw/muhokama/dcfa488169677ff7f1a3ed71182524aeb0b13c53/test/unit/model/state_test.ml | ocaml | open Alcotest
open Models.User.State
open Lib_test
let test_all =
test
~about:"all & pp_filter"
~desc:"test for [all] and [pp_filter]"
(fun () ->
let computed = Fmt.str "%a" (pp_filter ()) all
and expected = "true" in
same string ~expected ~computed)
;;
let test_active =
test
~about:"a... | |
9384c2eb53157f6f6ab8666c6a669e656fb30c48bb11aa6b5a018bd5af2bd38f | dmjio/envy | Test.hs | # LANGUAGE DeriveGeneric #
module Main where
import System.Envy
import GHC.Generics
data PGConfig = PGConfig {
connectHost :: String -- "PG_HOST"
, connectPort :: Int -- "PG_PORT"
} deriving (Generic, Show)
instance DefConfig PGConfig where
defConfig = PGConfig "localhost" 5432
instance FromEnv PGConfi... | null | https://raw.githubusercontent.com/dmjio/envy/26cd335322aa007a7b01df7d7d29cbc87b2d639b/examples/Test.hs | haskell | "PG_HOST"
"PG_PORT" | # LANGUAGE DeriveGeneric #
module Main where
import System.Envy
import GHC.Generics
data PGConfig = PGConfig {
} deriving (Generic, Show)
instance DefConfig PGConfig where
defConfig = PGConfig "localhost" 5432
instance FromEnv PGConfig where
fromEnv = gFromEnvCustom (Option 7 "PG")
creates instance for ret... |
d1e805204c38bdda6a542516f09859e77b7aaf6e5c6b3857ce7dda7a33c017a9 | furkan3ayraktar/clojure-polylith-realworld-example-app | core.clj | (ns clojure.realworld.log.core
(:require [taoensso.timbre :as timbre]))
(defmacro info [args]
`(timbre/log! :info :p ~args))
(defmacro warn [args]
`(timbre/log! :warn :p ~args))
(defmacro error [args]
`(timbre/log! :error :p ~args))
| null | https://raw.githubusercontent.com/furkan3ayraktar/clojure-polylith-realworld-example-app/2f16552fb4e9a56e24e21795cbb038433085453c/components/log/src/clojure/realworld/log/core.clj | clojure | (ns clojure.realworld.log.core
(:require [taoensso.timbre :as timbre]))
(defmacro info [args]
`(timbre/log! :info :p ~args))
(defmacro warn [args]
`(timbre/log! :warn :p ~args))
(defmacro error [args]
`(timbre/log! :error :p ~args))
| |
eab1a164b414cf62e96ef259e949c2eec04be99005bde09a1efa9b057e010d4c | RickMoynihan/lein-tools-deps | resolve_alias.clj | (ns foo.resolve-alias
(:require [clojure.core.cache :as cache]
[clojure.core.async :as async])
(:gen-class))
(defn -main [& _]
(cache/fifo-cache-factory {:a 1 :b 2})
(async/chan)
(println "✓ Tested lein-tools-deps :resolve-aliases"))
| null | https://raw.githubusercontent.com/RickMoynihan/lein-tools-deps/ee3acdfb9b03b1891618acb8eaee5956886f1743/example/src/foo/resolve_alias.clj | clojure | (ns foo.resolve-alias
(:require [clojure.core.cache :as cache]
[clojure.core.async :as async])
(:gen-class))
(defn -main [& _]
(cache/fifo-cache-factory {:a 1 :b 2})
(async/chan)
(println "✓ Tested lein-tools-deps :resolve-aliases"))
| |
7a1d98164e20ea5d2e754d7d8c2fa18b545a53db504dc984456c2afb443abc57 | ghc/testsuite | tc227.hs | -- Ensure that tuple instances are brought into scope
See Trac # 1385
module ShouldCompile where
foo = (1,True) == (2,False)
| null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_compile/tc227.hs | haskell | Ensure that tuple instances are brought into scope | See Trac # 1385
module ShouldCompile where
foo = (1,True) == (2,False)
|
e126a1b117347d4bed6d29d222659ce7857f1e5420c09b96f99af3173e35e305 | TheLortex/mirage-monorepo | longident.mli | * Long identifiers , used in parsetrees .
(** The long identifier type *)
type t = Ocaml_common.Longident.t =
| Lident of string
| Ldot of t * string
| Lapply of t * t
val flatten : t -> string list
* Flatten a long identifier built upon [ ] and [ ] . Raise when hitting
[ Lapply ] .
[Lapply].*)
val... | null | https://raw.githubusercontent.com/TheLortex/mirage-monorepo/b557005dfe5a51fc50f0597d82c450291cfe8a2a/duniverse/ppxlib/astlib/longident.mli | ocaml | * The long identifier type | * Long identifiers , used in parsetrees .
type t = Ocaml_common.Longident.t =
| Lident of string
| Ldot of t * string
| Lapply of t * t
val flatten : t -> string list
* Flatten a long identifier built upon [ ] and [ ] . Raise when hitting
[ Lapply ] .
[Lapply].*)
val parse : string -> t
* a string... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.