_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 |
|---|---|---|---|---|---|---|---|---|
7eb3c94924c0b6b7a62836584cd0865af18d7fc83d8f113036445fbd4fe0efb7 | technomancy/lein-scalac | project.clj | (defproject test-project "0.1.0"
:description "test project with some scala"
:dependencies [[org.clojure/clojure "1.4.0"]
[org.scala-lang/scala-library "2.9.1"]]
:scala-source-path "scala"
:plugins [[lein-scalac "0.1.0"]]
:prep-tasks ["scalac"]
for Leiningen 1.x you need this instead :
;;... | null | https://raw.githubusercontent.com/technomancy/lein-scalac/3a29c7ecc740cbc28139cd9affb79f97f03ec8e2/test-project/project.clj | clojure | :hooks [leiningen.hooks.scalac] | (defproject test-project "0.1.0"
:description "test project with some scala"
:dependencies [[org.clojure/clojure "1.4.0"]
[org.scala-lang/scala-library "2.9.1"]]
:scala-source-path "scala"
:plugins [[lein-scalac "0.1.0"]]
:prep-tasks ["scalac"]
for Leiningen 1.x you need this instead :
:m... |
7383c173fce0b2efea7c4aa1aeb009535c1009ebd1cea206238686feae364f7e | semilin/layoup | RSNTBJ.lisp |
(MAKE-LAYOUT :NAME "RSNTBJ" :MATRIX (APPLY #'KEY-MATRIX 'NIL) :SHIFT-MATRIX NIL
:KEYBOARD NIL) | null | https://raw.githubusercontent.com/semilin/layoup/27ec9ba9a9388cd944ac46206d10424e3ab45499/data/layouts/RSNTBJ.lisp | lisp |
(MAKE-LAYOUT :NAME "RSNTBJ" :MATRIX (APPLY #'KEY-MATRIX 'NIL) :SHIFT-MATRIX NIL
:KEYBOARD NIL) | |
7f8ba9be82fc22d552838d49f21bb5471e900dff9eafc5fbc50450d47e456fb5 | LonoCloud/synthread | synthread.cljc | (ns lonocloud.synthread
(:refer-clojure :exclude [defn defmacro])
#?(:clj (:require [lonocloud.synthread.binding :as binding]))
(#?(:clj :require :cljs :require-macros)
[lonocloud.synthread.cloaking :refer [defn defmacro decloak]]))
;; Section 1: macros that do not update the topic.
;; Generall... | null | https://raw.githubusercontent.com/LonoCloud/synthread/9d116f63163a3f6efad826e7c854da61b422257c/src/lonocloud/synthread.cljc | clojure | Section 1: macros that do not update the topic.
Generally control flow macros.
=> {:foo :bar}"
=> {:foo 0}"
=> [1 4 9]"
Section 3: special binding macros for both updating a subtopic
and binding a result based on the subtopic.
Warning: keep this at the bottom of the namespace. | (ns lonocloud.synthread
(:refer-clojure :exclude [defn defmacro])
#?(:clj (:require [lonocloud.synthread.binding :as binding]))
(#?(:clj :require :cljs :require-macros)
[lonocloud.synthread.cloaking :refer [defn defmacro decloak]]))
(defmacro ^:cloaked do
"Thread topic through body. Semantically identic... |
890f99542a85ca8a96636128c20f772e31f75c6ad9cbd67a3795f413931b4acd | danneu/captain-githook | handler.clj | (ns captain-githook.handler
(:require [captain-githook.util :as util]
[captain-githook.repo :as repo]
[captain-githook.clansi :as clansi]
[compojure.handler :as handler]
[ring.adapter.jetty :refer [run-jetty]]
[compojure.route :as route]
[clojure... | null | https://raw.githubusercontent.com/danneu/captain-githook/24aabccc31d12464143732c62c8dae419955c50e/src/captain_githook/handler.clj | clojure |
Trying to win an award for the worst abstraction in the world.
; ; ; ; ; ; ; ; ; ; ; ; L;;O::L ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;
Routes ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Server ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | (ns captain-githook.handler
(:require [captain-githook.util :as util]
[captain-githook.repo :as repo]
[captain-githook.clansi :as clansi]
[compojure.handler :as handler]
[ring.adapter.jetty :refer [run-jetty]]
[compojure.route :as route]
[clojure... |
cb632877bfd1ba7eb79a788d944ae671c8bab9f2bb84f85bc62a06a6a1e0ed63 | schmidt73/guidescan-web | config.clj | (ns guidescan-web.config
(:require [clojure.edn :as edn]
[clojure.java.io :as io]
[taoensso.timbre :as timbre]
[com.stuartsierra.component :as component]))
(defrecord Configuration [config-file config]
component/Lifecycle
(start [this]
(when (nil? config)
(timbre/inf... | null | https://raw.githubusercontent.com/schmidt73/guidescan-web/130f189c88aadcce7a2d857943d16be54f789059/src/guidescan_web/config.clj | clojure | (ns guidescan-web.config
(:require [clojure.edn :as edn]
[clojure.java.io :as io]
[taoensso.timbre :as timbre]
[com.stuartsierra.component :as component]))
(defrecord Configuration [config-file config]
component/Lifecycle
(start [this]
(when (nil? config)
(timbre/inf... | |
7cd4c1c7b66d7ff162452d988193aaac6781d30c260fc4cdcb95bd52a692dbec | amnh/poy5 | chromCS.ml | POY 5.1.1 . A phylogenetic analysis program using Dynamic Homologies .
Copyright ( C ) 2014 , , , Ward Wheeler ,
and the American Museum of Natural History .
(* *)
(* This program is free softwa... | null | https://raw.githubusercontent.com/amnh/poy5/da563a2339d3fa9c0110ae86cc35fad576f728ab/src/chromCS.ml | ocaml |
This program is free software; you can redistribute it and/or modify
(at your option) any later version.
This progra... | POY 5.1.1 . A phylogenetic analysis program using Dynamic Homologies .
Copyright ( C ) 2014 , , , Ward Wheeler ,
and the American Museum of Natural History .
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; ... |
5addc24ccf27d608009cb2a056b6b309455d9db8261796b1a5f38c0428c9c869 | strojure/fitter | project.clj | (defproject com.github.strojure/fitter "1.1.1-74-SNAPSHOT"
:description "System component management library for Clojure"
:url ""
:license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
:url "-2.0/"}
:dependencies [[org.clojure/clojure "1.11.1" :scope "provided"]]
:profiles {:... | null | https://raw.githubusercontent.com/strojure/fitter/613d649db49f14887d27d19f631c5536e446c023/project.clj | clojure | (defproject com.github.strojure/fitter "1.1.1-74-SNAPSHOT"
:description "System component management library for Clojure"
:url ""
:license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
:url "-2.0/"}
:dependencies [[org.clojure/clojure "1.11.1" :scope "provided"]]
:profiles {:... | |
9ec1a589e37d04cfb83d063c9434f2056a7397910cb2ff246fcaea2d73597de8 | wireapp/wire-server | Server.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# OPTIONS_GHC -fno - warn - warnings - deprecations #
-- This file is part of the Wire Server implementation.
--
Copyright ( C ) 2022 Wire Swiss GmbH < >
--
-- This program is free software: you can redistribute it and/or modify it under
the term... | null | https://raw.githubusercontent.com/wireapp/wire-server/5e72f944c9ea3eb9f59e342d08cafd7416009548/libs/wai-utilities/src/Network/Wai/Utilities/Server.hs | haskell | # LANGUAGE OverloadedStrings #
This file is part of the Wire Server implementation.
This program is free software: you can redistribute it and/or modify it under
later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANT... | # LANGUAGE ScopedTypeVariables #
# OPTIONS_GHC -fno - warn - warnings - deprecations #
Copyright ( C ) 2022 Wire Swiss GmbH < >
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option ) any
You should have received... |
e427895cda918af3179a3a2ae6c0c6600ce14e0089823cdb34d163b3ee98b97e | patricoferris/ocaml-multicore-monorepo | scheduler.ml | ----------------------------------------------------------------------------
* Copyright ( c ) 2019
*
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are met :
*
* 1... | null | https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/72eb11aff57211c5d2e2a4762f5808edb59aad26/duniverse/dream/src/vendor/h2/lib/scheduler.ml | ocaml | inbound flow control, what the client is allowed to send.
From RFC7540§5.3.1:
* A stream that is not dependent on any other stream is given a stream
* dependency of 0x0. In other words, the non-existent stream 0 forms
* the root of the tree.
From RFC7540§5.3.1:
* An exclusive ... | ----------------------------------------------------------------------------
* Copyright ( c ) 2019
*
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are met :
*
* 1... |
d812af973ca0776bba1270eefe4f3f42bf860e945cf6c363aa7bd4606fd865a1 | qfpl/state-machine-testing-course | Main.hs | module Main where
import CoffeeMachineTests (stateMachineTests)
import Test.Tasty (TestTree, defaultMain, testGroup)
tests :: TestTree
tests = testGroup "Coffee Machine - Level 06" [stateMachineTests]
main :: IO ()
main = defaultMain tests
| null | https://raw.githubusercontent.com/qfpl/state-machine-testing-course/98a93d0f71928e48afb1f6a5489818e12e1740e8/level06/Main.hs | haskell | module Main where
import CoffeeMachineTests (stateMachineTests)
import Test.Tasty (TestTree, defaultMain, testGroup)
tests :: TestTree
tests = testGroup "Coffee Machine - Level 06" [stateMachineTests]
main :: IO ()
main = defaultMain tests
| |
52456d2be6b0aa093345df976c93d3df39417982d10743e1542cee6cd6c5f86a | schemedoc/implementation-metadata | unlikely.scm | (title "Unlikely Scheme")
(tagline "small, more or less R5RS-compliant interpreter")
(written-in "C++")
(person "Marijn Haverbeke")
(website "/")
(github "marijnh/uscheme")
| null | https://raw.githubusercontent.com/schemedoc/implementation-metadata/6280d9c4c73833dc5bd1c9bef9b45be6ea5beb68/schemes/unlikely.scm | scheme | (title "Unlikely Scheme")
(tagline "small, more or less R5RS-compliant interpreter")
(written-in "C++")
(person "Marijn Haverbeke")
(website "/")
(github "marijnh/uscheme")
| |
923748cac528666881498591153df497c29d0d1fa924962aaf89c0c676a45ecb | turion/rhine | Periodic.hs | {-# LANGUAGE Arrows #-}
# LANGUAGE DataKinds #
-- transformers
import Control.Monad.IO.Class
-- rhine
import Control.Monad.Schedule
import FRP.Rhine
type MyClock = Periodic '[500, 1000]
everyNowAndThen :: Monad m => ClSF m MyClock arbitrary String
everyNowAndThen = sinceInitS >>> proc time ->
returnA -< unwords [... | null | https://raw.githubusercontent.com/turion/rhine/f997c3593f65361461f62b474661501a5b8ef879/rhine-examples/src/Periodic.hs | haskell | # LANGUAGE Arrows #
transformers
rhine | # LANGUAGE DataKinds #
import Control.Monad.IO.Class
import Control.Monad.Schedule
import FRP.Rhine
type MyClock = Periodic '[500, 1000]
everyNowAndThen :: Monad m => ClSF m MyClock arbitrary String
everyNowAndThen = sinceInitS >>> proc time ->
returnA -< unwords ["It's now", show time, "o'clock."]
mainRhine :: ... |
7502914af09a7294fc7af0289e6b1f5bbf4b282f44cfd8464f90ee80b37334ff | anmonteiro/lumo | core.cljs | (ns libs-test.core
(:require [tabby]))
(enable-console-print!)
(println (tabby/hello))
| null | https://raw.githubusercontent.com/anmonteiro/lumo/6709c9f1b7b342c8108e6ed6e034e19dc786f00b/src/test/cljs_build/libs_test/core.cljs | clojure | (ns libs-test.core
(:require [tabby]))
(enable-console-print!)
(println (tabby/hello))
| |
0676e2e445e1cbec5716774a875251b33a5693d25c757200c745636bf74e6f54 | ku-fpg/blank-canvas | Line_Join.hs | {-# LANGUAGE OverloadedStrings #-}
module Line_Join where
import Graphics.Blank
( 578,200 )
main :: IO ()
main = blankCanvas 3000 $ \ context -> do
send context $ do
lineWidth 25;
-- miter line join (left)
beginPath();
moveTo(99, 150);
lineTo(149, 50);
lin... | null | https://raw.githubusercontent.com/ku-fpg/blank-canvas/39915c17561106ce06e1e3dcef85cc2e956626e6/wiki-suite/Line_Join.hs | haskell | # LANGUAGE OverloadedStrings #
miter line join (left)
round line join (middle)
bevel line join (right) | module Line_Join where
import Graphics.Blank
( 578,200 )
main :: IO ()
main = blankCanvas 3000 $ \ context -> do
send context $ do
lineWidth 25;
beginPath();
moveTo(99, 150);
lineTo(149, 50);
lineTo(199, 150);
lineJoin "miter";
stroke();
... |
176deb2342dcb6cdf294871827a00079043598b39061deed6c1aaad6102441c4 | keechma/entitydb | core.cljs | (ns entitydb.core
(:require [entitydb.util :as util :refer [update-values]]
[entitydb.relations :as relations]
[clojure.set :as set]))
(declare get-item-by-id)
(declare insert-named-item)
(declare insert-collection)
(declare insert-related)
(declare get-named-item)
(declare get-collection)
(d... | null | https://raw.githubusercontent.com/keechma/entitydb/3fe9c48c40da7b9c7a617ec362ebe4b0caa3a823/src/entitydb/core.cljs | clojure | Returns the new version of the entity-db with the item inserted
inserted into the store
Returns the new version of the entity-db with the entity saved in the store and
referenced from the `:current` named item slot.
Returns the entity referenced from the `:current` named slot.
Returns the new version of entity db... | (ns entitydb.core
(:require [entitydb.util :as util :refer [update-values]]
[entitydb.relations :as relations]
[clojure.set :as set]))
(declare get-item-by-id)
(declare insert-named-item)
(declare insert-collection)
(declare insert-related)
(declare get-named-item)
(declare get-collection)
(d... |
2906075ab70204db9459f3e1f62a4864bba4041685b40840ea68a6e74f8d4e5d | turion/has-transformers | Has.hs | {-# LANGUAGE RankNTypes #-}
# LANGUAGE KindSignatures #
module Control.Monad.Trans.Has where
import "transformers" Control.Monad.Trans.Class
| The transformer stack @m@ contains the transformer
Explicitly , @m = t1 ( t2 ( t3 ... ( tN m) ... ))@ ,
and @t@ is one of these @t1 , t2 , ... @s .
Explicitly, @m =... | null | https://raw.githubusercontent.com/turion/has-transformers/4732d8c7b793b7c1517955ef168ed57e8a51629c/src/Control/Monad/Trans/Has.hs | haskell | # LANGUAGE RankNTypes #
| If the transformer is outermost,
the action can be inserted as-is.
| If the target transformer @t@ is under a different layer @t1@, 'lift' once.
# Overlappable # | # LANGUAGE KindSignatures #
module Control.Monad.Trans.Has where
import "transformers" Control.Monad.Trans.Class
| The transformer stack @m@ contains the transformer
Explicitly , @m = t1 ( t2 ( t3 ... ( tN m) ... ))@ ,
and @t@ is one of these @t1 , t2 , ... @s .
Explicitly, @m = t1 (t2 (t3 ... (tN m)...))@... |
7fae33b135d3c3e031d9fff63355fcc9f731c97ed61817ef7662dff93f6744eb | just-sultanov/ant-design | design.cljs | (ns ant.design
"A ClojureScript library for Ant Design."
(:refer-clojure :exclude [comment empty list])
(:require
[cljsjs.antd]
[ant.design.utils :refer [component]]))
;;
;; Components API
;;
(def affix (component "Affix"))
(def alert (component "Alert"))
(def anchor (component "Anchor"))
(def anchor-li... | null | https://raw.githubusercontent.com/just-sultanov/ant-design/234e6f2cf5a315bae5a0e8bbaa51a2f61ae2bc02/src/ant/design.cljs | clojure |
Components API
| (ns ant.design
"A ClojureScript library for Ant Design."
(:refer-clojure :exclude [comment empty list])
(:require
[cljsjs.antd]
[ant.design.utils :refer [component]]))
(def affix (component "Affix"))
(def alert (component "Alert"))
(def anchor (component "Anchor"))
(def anchor-link (component "Anchor.Li... |
2c1ffc9c411f31669f0b00493cca6f7019def222d9007e9b11f2e3bb367a7a25 | clj-commons/rewrite-clj | subedit.cljc | (ns ^:no-doc rewrite-clj.zip.subedit
(:require [rewrite-clj.custom-zipper.core :as zraw]
[rewrite-clj.zip.base :as base]
[rewrite-clj.zip.options :as options])
#?(:cljs (:require-macros [rewrite-clj.zip.subedit])) )
#?(:clj (set! *warn-on-reflection* true))
;; ## Edit Scope
(defn- path
... | null | https://raw.githubusercontent.com/clj-commons/rewrite-clj/3b9b433b4f9657df60b3fd7d021c0b2e55553d64/src/rewrite_clj/zip/subedit.cljc | clojure | ## Edit Scope | (ns ^:no-doc rewrite-clj.zip.subedit
(:require [rewrite-clj.custom-zipper.core :as zraw]
[rewrite-clj.zip.base :as base]
[rewrite-clj.zip.options :as options])
#?(:cljs (:require-macros [rewrite-clj.zip.subedit])) )
#?(:clj (set! *warn-on-reflection* true))
(defn- path
"Generate a seq r... |
3f84611d06e0e098fa4353e2d7edcf31cc341465f938fc83c10cee21c26fe2cd | ygmpkk/house | Nondet.hs | -----------------------------------------------------------------------------
-- |
Copyright : ( c ) OGI at OHSU , 2003
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer :
-- Stability : experimental
-- Portability : non-portable (multi-param classes, functional dependenci... | null | https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/libraries/monads/Unstable/Control/Monad/Nondet.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : experimental
Portability : non-portable (multi-param classes, functional dependencies)
The implementation of the nondeterminism and backtra... | Copyright : ( c ) OGI at OHSU , 2003
module Unstable.Control.Monad.Nondet (
Nondet,
runNondet, runNondets,
module T, N.MonadPlus(..)
) where
import Unstable.Control.Monad.Identity
import qualified Unstable.Control.Monad.NondetT as N
import Unstable.Control.Monad.Trans as T
type Nondet = N.NondetT... |
1fee11c6d9e20f7e400cfb9524a6122f4f819d003af34e16cec4e0219085ce90 | MinaProtocol/mina | sigs.mli | (** Type definitions and module signatures for library Pickles_types *)
(** {1 Serialization} *)
* { 2 To and from S - expressions }
module Sexpable = Core_kernel.Sexpable
* { 2 To and from binary format }
module Binable = Core_kernel.Binable
* { 2 Serialization to and from JSON }
* Serialization to and from S - e... | null | https://raw.githubusercontent.com/MinaProtocol/mina/92bf0214febdd037c2ab54463e500414fa8e37c6/src/lib/pickles_types/sigs.mli | ocaml | * Type definitions and module signatures for library Pickles_types
* {1 Serialization}
* {1 Modules implementing comparison and equality functions }
* Module types for types that have the whole gamut of transformations /
functions |
* { 2 To and from S - expressions }
module Sexpable = Core_kernel.Sexpable
* { 2 To and from binary format }
module Binable = Core_kernel.Binable
* { 2 Serialization to and from JSON }
* Serialization to and from S - expressions or binary formats are directly
imported from respectively { ! Core_kernel . Sexp... |
eba580617928f9448bebeb7e2b64b67018f8172a6c870ad0de63fc64b22827bc | facebook/flow | leb128_tests.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/flow/741104e69c43057ebd32804dd6bcc1b5e97548ea/src/common/leb128/__tests__/leb128_tests.ml | ocaml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | |
d621b66f2fd038a109e382ea689e239de4ecd781afbf5ac98b91a7cc709439eb | hspec/HUnit | TerminalTest.hs | -- TerminalTest.hs
module TerminalTest (terminalTests) where
import Test.HUnit.Terminal
import Test.HUnit
try :: String -> String -> String -> Test
try lab inp exp' = lab ~: terminalAppearance inp ~?= exp'
terminalTests :: Test
terminalTests = test [
try "empty" "" "",
try "end in \\n" "abc\ndef\n" "abc\nde... | null | https://raw.githubusercontent.com/hspec/HUnit/f28ba094f18504579fa29efe247af3a31108cd3c/tests/TerminalTest.hs | haskell | TerminalTest.hs |
module TerminalTest (terminalTests) where
import Test.HUnit.Terminal
import Test.HUnit
try :: String -> String -> String -> Test
try lab inp exp' = lab ~: terminalAppearance inp ~?= exp'
terminalTests :: Test
terminalTests = test [
try "empty" "" "",
try "end in \\n" "abc\ndef\n" "abc\ndef\n",
try "not ... |
080cdaf42eea9a4534468884f334b9e9bf2afef1e892214618fc82a10d524ffd | Helium4Haskell/helium | CollectFunctionBindings.hs | | Module : CollectFunctionBindings
License : GPL
Maintainer :
Stability : experimental
Portability : portable
License : GPL
Maintainer :
Stability : experimental
Portability : portable
-}
module Helium.Parser.CollectFunctionBindings whe... | null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/src/Helium/Parser/CollectFunctionBindings.hs | haskell | | Module : CollectFunctionBindings
License : GPL
Maintainer :
Stability : experimental
Portability : portable
License : GPL
Maintainer :
Stability : experimental
Portability : portable
-}
module Helium.Parser.CollectFunctionBindings whe... | |
06ce2ce64689359c596aec0e7dbde7f8328f0feb9b1674eecba64a7cab97200b | ucsd-progsys/liquidhaskell | Unusedtyvars.hs | module Unusedtyvars () where
data F a b c = F (Int -> b -> c)
data F a b c = F ( x::(Int - > b - > c ) ) @
@ bar : : F { v : Int| v > = 0 } b c @
bar :: F Int b c
bar = undefined
@ foo : : F { v : Int| v > = 0 } b c - > Int @
foo :: F Int b c -> Int
foo = undefined
{-@ hoo :: Int @-}
hoo = foo bar
| null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/20cd67af038930cb592d68d272c8eb1cbe3cb6bf/tests/pos/Unusedtyvars.hs | haskell | @ hoo :: Int @ | module Unusedtyvars () where
data F a b c = F (Int -> b -> c)
data F a b c = F ( x::(Int - > b - > c ) ) @
@ bar : : F { v : Int| v > = 0 } b c @
bar :: F Int b c
bar = undefined
@ foo : : F { v : Int| v > = 0 } b c - > Int @
foo :: F Int b c -> Int
foo = undefined
hoo = foo bar
|
c3ea43657264511d7514a3f4999f1a785ae641513873905df6c8431199081943 | mkawalec/emailparse | BodyDecoder.hs | module Network.Mail.Parse.Decoders.BodyDecoder where
import qualified Data.ByteString.Char8 as BSC
import Codec.MIME.Parse (parseMIMEType)
import Codec.MIME.Type
import Data.Either.Combinators (mapLeft, fromRight')
import Data.Either.Utils (maybeToEither)
import Data.Either (isRight)
import Data.List (find)
import... | null | https://raw.githubusercontent.com/mkawalec/emailparse/c5533707c7339bcebd616e1f7cdb442ca2d16626/src/Network/Mail/Parse/Decoders/BodyDecoder.hs | haskell | |Remove transfer encoding from a string of bytes
|Transform a string of bytes with a given encoding
|Reverse content transfer encoding applied to the body.
|Given a set of headers it tries to figure out
the transfer encoding and charset and normalizes
It will recover from errors, wherever possible | module Network.Mail.Parse.Decoders.BodyDecoder where
import qualified Data.ByteString.Char8 as BSC
import Codec.MIME.Parse (parseMIMEType)
import Codec.MIME.Type
import Data.Either.Combinators (mapLeft, fromRight')
import Data.Either.Utils (maybeToEither)
import Data.Either (isRight)
import Data.List (find)
import... |
579c17fe92fdf2322467518119ee595851a257963a4d1c87e1d54a145e44c9b2 | gsakkas/rite | 2339.ml |
let rec clone x n =
let accum = [] in
let rec helper accum n =
if n < 1 then accum else helper (x :: accum) (n - 1) in
helper accum n;;
let padZero l1 l2 =
let (a,b) = ((List.length l1), (List.length l2)) in
if a < b then List.append ((clone 0 b) - a) l1;;
fix
let rec clone x n =
let = [ ] i... | null | https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/data/sp14/2339.ml | ocaml |
let rec clone x n =
let accum = [] in
let rec helper accum n =
if n < 1 then accum else helper (x :: accum) (n - 1) in
helper accum n;;
let padZero l1 l2 =
let (a,b) = ((List.length l1), (List.length l2)) in
if a < b then List.append ((clone 0 b) - a) l1;;
fix
let rec clone x n =
let = [ ] i... | |
628d2a0d2e62c8b9a9ea7383847dbe4e91130de48b967b8cefecc4ddf2fb5b58 | metabase/metabase | database.clj | (ns metabase.models.database
(:require
[medley.core :as m]
[metabase.db.util :as mdb.u]
[metabase.driver :as driver]
[metabase.driver.impl :as driver.impl]
[metabase.driver.util :as driver.u]
[metabase.models.interface :as mi]
[metabase.models.permissions :as perms]
[metabase.models.permission... | null | https://raw.githubusercontent.com/metabase/metabase/07f174deaaf3ee7794e17c3aa9ebf94250b04d8e/src/metabase/models/database.clj | clojure | ----------------------------------------------- Entity & Lifecycle -----------------------------------------------
this is done this way to avoid circular dependencies
TODO - something like NSNotificationCenter in Objective-C would be really really useful here so things that want to
implement behavior when an objec... | (ns metabase.models.database
(:require
[medley.core :as m]
[metabase.db.util :as mdb.u]
[metabase.driver :as driver]
[metabase.driver.impl :as driver.impl]
[metabase.driver.util :as driver.u]
[metabase.models.interface :as mi]
[metabase.models.permissions :as perms]
[metabase.models.permission... |
a8df9ade8022bed9e372c303c3e8b22cf75c242076fbbb62f7e98a6d7c952af1 | Simre1/haskell-game | Texture.hs | # LANGUAGE TypeFamilies , FlexibleContexts , FlexibleInstances , GADTs , MultiParamTypeClasses , ScopedTypeVariables , AllowAmbiguousTypes , EmptyDataDecls #
module Graphics.GPipe.Internal.Texture where
import Graphics.GPipe.Internal.Format
import Graphics.GPipe.Internal.Expr
import Graphics.GPipe.Internal.Context
imp... | null | https://raw.githubusercontent.com/Simre1/haskell-game/272a0674157aedc7b0e0ee00da8d3a464903dc67/GPipe-Core/GPipe-Core/src/Graphics/GPipe/Internal/Texture.hs | haskell | Use last for all sync actions, keeping 0.. for async drawcalls
--------------------------------------------------------------------
Samplers
| A GADT for sample filters, where 'SamplerFilter' cannot be used for integer textures.
| Used instead of 'Format' for shadow samplers. These samplers have specialized sampler... | # LANGUAGE TypeFamilies , FlexibleContexts , FlexibleInstances , GADTs , MultiParamTypeClasses , ScopedTypeVariables , AllowAmbiguousTypes , EmptyDataDecls #
module Graphics.GPipe.Internal.Texture where
import Graphics.GPipe.Internal.Format
import Graphics.GPipe.Internal.Expr
import Graphics.GPipe.Internal.Context
imp... |
b1d84ea69ab0f9b46f5955eccd6af5a29bd70ae436c5ce57cc82abda10a2c435 | lathe/punctaffy-for-racket | hyperparameter.rkt | #lang parendown racket/base
punctaffy / hypersnippet / hyperparameter
;
Utilities for Racket parameters that allow the dynamic extents to be
; hypersnippet-shaped sections of the execution timeline.
Copyright 2018 , 2022 The Lathe Authors
;
Licensed under the Apache License , Version 2.0 ( the " License "... | null | https://raw.githubusercontent.com/lathe/punctaffy-for-racket/47cf41144735645428818ba0f99711f10816c059/punctaffy-lib/hypersnippet/hyperparameter.rkt | racket |
hypersnippet-shaped sections of the execution timeline.
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,
either express or implied. See the License for the specific
languag... | #lang parendown racket/base
punctaffy / hypersnippet / hyperparameter
Utilities for Racket parameters that allow the dynamic extents to be
Copyright 2018 , 2022 The Lathe Authors
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND ... |
761761a196985e9c6186f41ca8438eb9352cf2c6a8f44b5fee518022ace757b6 | hspec/sensei | ReadHandleSpec.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ViewPatterns #
module ReadHandleSpec (spec) where
import Helper
import Test.QuickCheck
import qualified Data.ByteString as B
import ReadHandle
chunkByteString :: (Int, Int) -> ByteString -> Gen [ByteString]
chunkByteString size = go
where
... | null | https://raw.githubusercontent.com/hspec/sensei/a539c6372de8c58701b1c57a067c438e28f802da/test/ReadHandleSpec.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE ViewPatterns #
module ReadHandleSpec (spec) where
import Helper
import Test.QuickCheck
import qualified Data.ByteString as B
import ReadHandle
chunkByteString :: (Int, Int) -> ByteString -> Gen [ByteString]
chunkByteString size = go
where
go "" = return []
go xs = d... |
9d7f80438344bb7d7a7cd7ecac4c01a2f3776304509bcf6b083b3d475b64f33a | spawnfest/eep49ers | wxGraphicsContext.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2021 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/wx/src/gen/wxGraphicsContext.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 2008 - 2021 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(wxGraphicsContext).
-include("wxe.hrl").
-export([clip/2,clip/5,concatTransform/2,create/0,create/1,createBr... |
837b8d310a76969fedecbcc69218bb88794c97f6529a2eb651171cf2bc33ae2b | onyx-platform/onyx-datomic | input_log_test.clj | (ns onyx.plugin.input-log-test
(:require [aero.core :refer [read-config]]
[clojure.test :refer [deftest is testing]]
[onyx api
[job :refer [add-task]]
[test-helper :refer [with-test-env]]]
[onyx.datomic.api :as d]
[onyx.plugin datomic
... | null | https://raw.githubusercontent.com/onyx-platform/onyx-datomic/85b8c1dcaab9e86b9661c2f181fe08d5795f9607/test/onyx/plugin/input_log_test.clj | clojure | (ns onyx.plugin.input-log-test
(:require [aero.core :refer [read-config]]
[clojure.test :refer [deftest is testing]]
[onyx api
[job :refer [add-task]]
[test-helper :refer [with-test-env]]]
[onyx.datomic.api :as d]
[onyx.plugin datomic
... | |
7951d59157d72507dc5c1a7add4e86d2c0c7d086c6e43f61919ca75f60687c5d | odis-labs/onix | Nix_filter.ml | let relop_kind_to_nix_string (relop_kind : OpamParserTypes.relop) =
match relop_kind with
| `Eq -> "=="
| `Neq -> "!="
| `Geq -> ">="
| `Gt -> ">"
| `Leq -> "<="
| `Lt -> "<"
let opam_filter_to_nix_string ?custom (t : OpamTypes.filter) =
let custom ~context ~paren t =
match custom with
| None -... | null | https://raw.githubusercontent.com/odis-labs/onix/81cc82953ef062425656ac9bf80474f2ce642f5b/src/onix_lock_nix/Nix_filter.ml | ocaml | let args' = OpamFilter.single_command dummy_env args in | let relop_kind_to_nix_string (relop_kind : OpamParserTypes.relop) =
match relop_kind with
| `Eq -> "=="
| `Neq -> "!="
| `Geq -> ">="
| `Gt -> ">"
| `Leq -> "<="
| `Lt -> "<"
let opam_filter_to_nix_string ?custom (t : OpamTypes.filter) =
let custom ~context ~paren t =
match custom with
| None -... |
6c4b239b512f2e9f0a36ca91bae4a28f0c9f8e5e86c1cfbe9918b98f60bee75d | mbj/stratosphere | S3FileLocationProperty.hs | module Stratosphere.Transfer.Workflow.S3FileLocationProperty (
module Exports, S3FileLocationProperty(..),
mkS3FileLocationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Transfer.Wo... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/transfer/gen/Stratosphere/Transfer/Workflow/S3FileLocationProperty.hs | haskell | # SOURCE # | module Stratosphere.Transfer.Workflow.S3FileLocationProperty (
module Exports, S3FileLocationProperty(..),
mkS3FileLocationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
data S3... |
12dadd4164c0a38cc63b2a7962c5b76d449ff2f516749551f633f688d0ee78d0 | backtracking/ocaml-bazaar | trie.ml | (**************************************************************************)
(* *)
Copyright ( C )
(* *)
(* This software is free software;... | null | https://raw.githubusercontent.com/backtracking/ocaml-bazaar/e62c9139eeef1d00c0ef4628f7c8b6a66808cec1/trie.ml | ocaml | ************************************************************************
This software is free software; you can redistribute it and/or
described in file LICENSE.... | Copyright ( C )
modify it under the terms of the GNU Library General Public
License version 2.1 , with the special exception on linking
module type S = sig
type key
type +'a t
val empty : 'a t
val is_empty : 'a t -> bool
val add : key -> 'a ... |
f3dbfeeb9b341157e6709412dd1847a73dd67ba9eaf7295c4c73210d1a1e629f | ekmett/lca | Monoidal.hs | # LANGUAGE CPP #
-----------------------------------------------------------------------------
-- |
-- Module : Data.LCA.Online.Monoidal
Copyright : ( C ) 2012 - 2015
-- License : BSD-style (see the file LICENSE)
--
Maintainer : < >
-- Stability : experimental
-- Portability : portable
... | null | https://raw.githubusercontent.com/ekmett/lca/1bf6772b7c87067b62605efa906e34c7d00729ec/src/Data/LCA/Online/Monoidal.hs | haskell | ---------------------------------------------------------------------------
|
Module : Data.LCA.Online.Monoidal
License : BSD-style (see the file LICENSE)
Stability : experimental
Portability : portable
Provides online calculation of the the lowest common ancestor in /O(log h)/
by compressing th... | # LANGUAGE CPP #
Copyright : ( C ) 2012 - 2015
Maintainer : < >
Algorithms used here assume that the key values chosen for @k@ are
This version provides access to a monoidal \"summary\ " of the
module Data.LCA.Online.Monoidal
( Path
, toList, fromList
, map, mapHom, mapWithKey
, traverse, ... |
6997eb558684e8eb9bc56c121351e41b3db8c9f2b5dbb55d4df261234b806885 | v-kolesnikov/sicp | 2_52.clj | (ns sicp.chapter02.2-52
(:require [sicp.chapter02.2-45 :refer [right-split up-split]]
[sicp.chapter02.2-46 :refer [make-vect]]
[sicp.chapter02.2-49 :refer [segments->painter wave-painter]]
[sicp.chapter02.2-50 :refer [flip-horiz rotate-counterclockwise-180
... | null | https://raw.githubusercontent.com/v-kolesnikov/sicp/4298de6083440a75898e97aad658025a8cecb631/src/sicp/chapter02/2_52.clj | clojure | (ns sicp.chapter02.2-52
(:require [sicp.chapter02.2-45 :refer [right-split up-split]]
[sicp.chapter02.2-46 :refer [make-vect]]
[sicp.chapter02.2-49 :refer [segments->painter wave-painter]]
[sicp.chapter02.2-50 :refer [flip-horiz rotate-counterclockwise-180
... | |
20b04f4641b47d2a82b0b4b621524690dee3ecefd8f0085c3e0f72745121c457 | richhickey/clojure-contrib | complex_numbers.clj | ;; Complex numbers
by
last updated May 4 , 2009
Copyright ( c ) , 2009 . All rights reserved . The use
and distribution terms for this software are covered by the Eclipse
;; Public License 1.0 (-1.0.php)
;; which can be found in the file epl-v10.html at the root of this
;; distribution. By using this s... | null | https://raw.githubusercontent.com/richhickey/clojure-contrib/40b960bba41ba02811ef0e2c632d721eb199649f/src/main/clojure/clojure/contrib/complex_numbers.clj | clojure | Complex numbers
Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this
distribution. By using this software in any fashion, you are
agreeing to be bound by the terms of this license. You must not
remove this notice, or any other, from this software.
Complex numbers are r... |
by
last updated May 4 , 2009
Copyright ( c ) , 2009 . All rights reserved . The use
and distribution terms for this software are covered by the Eclipse
(ns
#^{:author "Konrad Hinsen"
:doc "Complex numbers
NOTE: This library is in evolution. Most math functions are
not... |
fb472d19cedff7fa6cb00242a01be84bba84d365ae96234af6ff01af6b199720 | richmit/mjrcalc | exp-PrimePairs.lisp | ;; -*- Mode:Lisp; Syntax:ANSI-Common-LISP; Coding:us-ascii-unix; fill-column:158 -*-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;; @file exp-PrimePairs.lisp
@author < >
@brief F... | null | https://raw.githubusercontent.com/richmit/mjrcalc/96f66d030034754e7d3421688ff201f4f1db4833/exp-PrimePairs.lisp | lisp | -*- Mode:Lisp; Syntax:ANSI-Common-LISP; Coding:us-ascii-unix; fill-column:158 -*-
@file exp-PrimePairs.lisp
@std Common Lisp
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
and/or other materials pro... | @author < >
@brief Find composite numbers which are the product of two primes that are a distance of d apart where d in [ 1 , 150].@EOL
@parblock
Copyright ( c ) 1992,1994,1997,1998,2004,2008,2012,2015 , < > All rights reserved .
1 . Redistributions of source code must retain the above c... |
d6e39b993a92defde03f945c99c08f82fae25b933644cc2011f1517b98a5cc56 | jackfirth/racket-expect | data-set.rkt | #lang racket/base
(require expect
expect/rackunit
fancy-app
racket/function
racket/set
(only-in rackunit test-case))
(define expect-exp-set-pred-fault
(expect-exp-faults 'not-a-set
(expect-fault #:expected (make-pred-attribute set?)
... | null | https://raw.githubusercontent.com/jackfirth/racket-expect/9530df30537ae05400b6a3add9619e5f697dca52/tests/data/data-set.rkt | racket | #lang racket/base
(require expect
expect/rackunit
fancy-app
racket/function
racket/set
(only-in rackunit test-case))
(define expect-exp-set-pred-fault
(expect-exp-faults 'not-a-set
(expect-fault #:expected (make-pred-attribute set?)
... | |
1555fba92512e494908082670381128a95b9a5cb52d9f62f88e33394be2fda71 | melange-re/melange | inner_call.ml |
Js.log (Inner_define.N.add 1 2)
open Inner_define
let f x =
N0.f1 x , N0.f2 x x, N0.f3 x x x,
N1.f2 x x
| null | https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/test/inner_call.ml | ocaml |
Js.log (Inner_define.N.add 1 2)
open Inner_define
let f x =
N0.f1 x , N0.f2 x x, N0.f3 x x x,
N1.f2 x x
| |
3e1b559feb519bca40a01e1d6a90fbd7cc190936b91fe57595e899325ba60c1e | hpyhacking/openpoker | protocol_test.erl | -module(protocol_test).
-import(protocol, [write/1, read/1]).
-include("openpoker.hrl").
-include("openpoker_test.hrl").
-define(REG_GAME, {game, 1}).
-define(REG_PLAYER, {player, 1}).
id_to_game_test_() -> {setup, fun setup_game/0, fun cleanup/1, fun () ->
?assert(is_pid((turn(#cmd_watch{game = 1}))#cmd_watc... | null | https://raw.githubusercontent.com/hpyhacking/openpoker/643193c94f34096cdcfcd610bdb1f18e7bf1e45e/test/unit/protocol_test.erl | erlang | -module(protocol_test).
-import(protocol, [write/1, read/1]).
-include("openpoker.hrl").
-include("openpoker_test.hrl").
-define(REG_GAME, {game, 1}).
-define(REG_PLAYER, {player, 1}).
id_to_game_test_() -> {setup, fun setup_game/0, fun cleanup/1, fun () ->
?assert(is_pid((turn(#cmd_watch{game = 1}))#cmd_watc... | |
8dea9439515db5c1c0428f87fd2e31df4be38807e451d7f65fcac707046a7ab3 | alsonkemp/turbinado-website | PageType.hs | DO NOT EDIT THIS FILE
THIS FILE IS AUTOMAGICALLY GENERATED AND YOUR CHANGES WILL BE EATEN BY THE GENERATOR OVERLORD
All changes should go into the Model file ( e.g. App / Models / ExampleModel.hs )
THIS FILE IS AUTOMAGICALLY GENERATED AND YOUR CHANGES WILL BE EATEN BY THE GENERATOR OVERLORD
All ch... | null | https://raw.githubusercontent.com/alsonkemp/turbinado-website/310f38dd7d13cdb838e2ea6181c61521021c32b5/App/Models/Bases/PageType.hs | haskell | The data type for this model | DO NOT EDIT THIS FILE
THIS FILE IS AUTOMAGICALLY GENERATED AND YOUR CHANGES WILL BE EATEN BY THE GENERATOR OVERLORD
All changes should go into the Model file ( e.g. App / Models / ExampleModel.hs )
THIS FILE IS AUTOMAGICALLY GENERATED AND YOUR CHANGES WILL BE EATEN BY THE GENERATOR OVERLORD
All ch... |
6bee442f761fb3c368d67e8018805ff70e73acfebf290c8b32a88ab0ccb1ffe0 | alavrik/piqi-erlang | test.erl | -module(test).
-compile([export_all, nowarn_export_all]).
-include("person_piqi.hrl").
run([Filename]) ->
% Read the existing person book Piq format
{ok, Bytes} = file:read_file(Filename),
Person = person_piqi:parse_person(Bytes, 'piq'),
io:format("~n~nErlang from Piq: ~n~n~p~n", [Person]),
Pr... | null | https://raw.githubusercontent.com/alavrik/piqi-erlang/063ecc4f8fd54543acf01953b0a63b2b7ebf17a9/examples/untyped-json-xml/src/test.erl | erlang | Read the existing person book Piq format | -module(test).
-compile([export_all, nowarn_export_all]).
-include("person_piqi.hrl").
run([Filename]) ->
{ok, Bytes} = file:read_file(Filename),
Person = person_piqi:parse_person(Bytes, 'piq'),
io:format("~n~nErlang from Piq: ~n~n~p~n", [Person]),
Protobuf = person_piqi:gen_person(Person, 'pb'),
... |
ff1772ff53f3ed3ea834f1c2e88587385e8c5dd0fe850c75729e0129c25d913e | inhabitedtype/ocaml-aws | types.ml | open Aws.BaseTypes
type calendar = CalendarLib.Calendar.t
module PolicyDescriptorType = struct
type t = { arn : String.t option }
let make ?arn () = { arn }
let parse xml =
Some { arn = Aws.Util.option_bind (Aws.Xml.member "arn" xml) String.parse }
let to_query v =
Aws.Query.List
(Aws.Util.li... | null | https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/b6d5554c5d201202b5de8d0b0253871f7b66dab6/libraries/sts/lib/types.ml | ocaml | open Aws.BaseTypes
type calendar = CalendarLib.Calendar.t
module PolicyDescriptorType = struct
type t = { arn : String.t option }
let make ?arn () = { arn }
let parse xml =
Some { arn = Aws.Util.option_bind (Aws.Xml.member "arn" xml) String.parse }
let to_query v =
Aws.Query.List
(Aws.Util.li... | |
b080ec6ecfbeeb8cb96462c87d9d67113d18d9e3b3db56b5ccae00c887b37fb1 | ethereum/act | create.act.parsed.hs | [Definition (AlexPn 439 9 16) "Modest" constructor() [] (Creates [AssignVal (StorageVar (AlexPn 661 16 10) uint256 "x") (IntLit (AlexPn 666 16 15) 1),AssignVal (StorageVar (AlexPn 680 17 13) address "y") (EnvExp (AlexPn 685 17 18) Caller)]) [] [] []]
| null | https://raw.githubusercontent.com/ethereum/act/36b65b71eea22ebe4287f066190ecf47f4394fa3/tests/frontend/pass/creation/create.act.parsed.hs | haskell | [Definition (AlexPn 439 9 16) "Modest" constructor() [] (Creates [AssignVal (StorageVar (AlexPn 661 16 10) uint256 "x") (IntLit (AlexPn 666 16 15) 1),AssignVal (StorageVar (AlexPn 680 17 13) address "y") (EnvExp (AlexPn 685 17 18) Caller)]) [] [] []]
| |
c3208c8581b1f35816279d2c7f7405a62a336d3b26f86bd579d8de0a3fc148f6 | iconnect/regex | Sequence.hs | # LANGUAGE CPP #
#if __GLASGOW_HASKELL__ >= 800
{-# LANGUAGE TemplateHaskellQuotes #-}
#else
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
#endif
module Text.RE.ZeInternals.SearchReplace.PCRE.Sequence
( ed
, edMultilineSensitive
, edMultiline... | null | https://raw.githubusercontent.com/iconnect/regex/68752790a8f75986b917b71cf0e8e22cd3a28a3d/Text/RE/ZeInternals/SearchReplace/PCRE/Sequence.hs | haskell | # LANGUAGE TemplateHaskellQuotes #
# LANGUAGE QuasiQuotes #
# LANGUAGE TemplateHaskell #
| @[ed| ... \/\/\/ ... |]@, is equivalent to @[edMultilineSensitive| ... \/\/\/ ... |]@,
| @[edMS| ... \/\/\/ ... |]@ is a shorthand for @[edMultilineSensitive| ... \/\/\/ ... |]@
| @[edBS| ... \/\... | # LANGUAGE CPP #
#if __GLASGOW_HASKELL__ >= 800
#else
#endif
module Text.RE.ZeInternals.SearchReplace.PCRE.Sequence
( ed
, edMultilineSensitive
, edMultilineInsensitive
, edBlockSensitive
, edBlockInsensitive
, edMS
, edMI
, edBS
, edBI
, ed_
) where
import qualified Data... |
4d88757de097a0b01db69318a8e7ffd52cbbc678c85c4760be0c312e9e3cebda | mransan/ocaml-protoc | example05.ml | let () =
(* Create OCaml value of generated type *)
let details = Hashtbl.create 100 in
Hashtbl.add details "foo" "bar";
Hashtbl.add details "blah" "blah";
let person =
Example05_types.
{
name = "John Doe";
id = 1234l;
email = Some "";
phone = [ "123-456-7890" ];
... | null | https://raw.githubusercontent.com/mransan/ocaml-protoc/e43b509b9c4a06e419edba92a0d3f8e26b0a89ba/src/examples/example05.ml | ocaml | Create OCaml value of generated type
Output the protobuf message to a file | let () =
let details = Hashtbl.create 100 in
Hashtbl.add details "foo" "bar";
Hashtbl.add details "blah" "blah";
let person =
Example05_types.
{
name = "John Doe";
id = 1234l;
email = Some "";
phone = [ "123-456-7890" ];
details;
}
in
Create a Protob... |
b6d5b8e7248a988dec781478ae15c0b52ccde988dd6096d5bfda3a50d38f6b77 | mflatt/shrubbery-rhombus-0 | typeset-rhombus.rkt | #lang racket/base
(require shrubbery/print
shrubbery/syntax-color
scribble/racket
syntax/parse
racket/list
shrubbery/property
(only-in scribble/core
element
element?
content?
paragraph
... | null | https://raw.githubusercontent.com/mflatt/shrubbery-rhombus-0/b6ee40b64b19623d5a8c1ee735378761fd25110a/scribble/private/typeset-rhombus.rkt | racket | "pretty" prints to a single line, currently assuming that the input was
originally on a single line
detect `root.field` paths
Go back to a string, then parse again using the
colorer. Why didn't we use a string to start with?
Because having `rhm` work on implicitly quoted syntax
means that you get nice editor sup... | #lang racket/base
(require shrubbery/print
shrubbery/syntax-color
scribble/racket
syntax/parse
racket/list
shrubbery/property
(only-in scribble/core
element
element?
content?
paragraph
... |
c41aec2d4dcf5a1e79e15e9c128d90f9ffb17ca62e3c65f6f9785fcf38440909 | lagenorhynque/clj-rest-api | core.clj | (ns clj-rest-api.util.core
(:require
[camel-snake-kebab.core :as csk]
[camel-snake-kebab.extras :refer [transform-keys]]))
(defn ->kebab-case [v]
(csk/->kebab-case v :separator \_))
(defn ->snake_case [v]
(csk/->snake_case v :separator \-))
(defn transform-keys-to-kebab [coll]
(transform-keys ->kebab-c... | null | https://raw.githubusercontent.com/lagenorhynque/clj-rest-api/0a1c14cb902498b1ecc6bd3bc7c1ff9f4c4b4c36/src/clj_rest_api/util/core.clj | clojure | (ns clj-rest-api.util.core
(:require
[camel-snake-kebab.core :as csk]
[camel-snake-kebab.extras :refer [transform-keys]]))
(defn ->kebab-case [v]
(csk/->kebab-case v :separator \_))
(defn ->snake_case [v]
(csk/->snake_case v :separator \-))
(defn transform-keys-to-kebab [coll]
(transform-keys ->kebab-c... | |
2821a829fe0b26a8e4c857c537355762558dfa8c891579d97816a26eedc3f708 | inria-parkas/sundialsml | cvsDiurnal_FSA_kry.ml |
* -----------------------------------------------------------------
* $ Revision : 1.3 $
* $ Date : 2009/02/17 02:48:46 $
* -----------------------------------------------------------------
* Programmer(s ): and and
* @ LLNL
* ------------------------------------------------... | null | https://raw.githubusercontent.com/inria-parkas/sundialsml/a1848318cac2e340c32ddfd42671bef07b1390db/examples/cvodes/serial/cvsDiurnal_FSA_kry.ml | ocaml | Problem Constants
number of species
coefficients in initial profiles
initial time
number of output times
pi
grid boundaries in x
grid midpoints in x,z
mx = number of x mesh points
mm = mx*mz
scalar relative tolerance
value of C1 or C2 at which tolerances
change from relative to abso... |
* -----------------------------------------------------------------
* $ Revision : 1.3 $
* $ Date : 2009/02/17 02:48:46 $
* -----------------------------------------------------------------
* Programmer(s ): and and
* @ LLNL
* ------------------------------------------------... |
e11180a1b76f54d3ceb3c6e5c1b19e6dbd3ce8d92ec3ed80fe07dbf6ab208ee3 | OlivierSohn/hamazed | NonBlocking.hs | {-# OPTIONS_HADDOCK hide #-}
# LANGUAGE NoImplicitPrelude #
module Imj.Input.NonBlocking
( -- * Non-blocking read
tryGetKeyThenFlush
, stdinIsReady
) where
import Imj.Prelude
import System.IO( hReady
, stdin)
import Imj.Input.Types
import ... | null | https://raw.githubusercontent.com/OlivierSohn/hamazed/6c2b20d839ede7b8651fb7b425cb27ea93808a4a/imj-base/src/Imj/Input/NonBlocking.hs | haskell | # OPTIONS_HADDOCK hide #
* Non-blocking read |
# LANGUAGE NoImplicitPrelude #
module Imj.Input.NonBlocking
tryGetKeyThenFlush
, stdinIsReady
) where
import Imj.Prelude
import System.IO( hReady
, stdin)
import Imj.Input.Types
import Imj.Input.Blocking
callIf :: IO a -> IO Bool -> I... |
05357c4a8a933d08674b0592733c593dd06445fc4967e17070a5b2a7743cd8b9 | wdebeaum/DeepSemLex | tiresome.lisp | ;;;;
W::tiresome
;;;;
(define-words :pos W::adj :templ CENTRAL-ADJ-TEMPL
:words (
(W::tiresome
(SENSES
((meta-data :origin cardiac :entry-date 20090422 :change-date 20090821 :comments nil :wn ("difficult%3:00:00"))
(EXAMPLE "It's tiresome [for him]")
)
(TEMPL adj-content-affected-optional-xp-... | null | https://raw.githubusercontent.com/wdebeaum/DeepSemLex/ce0e7523dd2b1ebd42b9e88ffbcfdb0fd339aaee/trips/src/LexiconManager/Data/new/tiresome.lisp | lisp | W::tiresome
(define-words :pos W::adj :templ CENTRAL-ADJ-TEMPL
:words (
(W::tiresome
(SENSES
((meta-data :origin cardiac :entry-date 20090422 :change-date 20090821 :comments nil :wn ("difficult%3:00:00"))
(EXAMPLE "It's tiresome [for him]")
)
(TEMPL adj-content-affected-optional-xp-templ)
... | |
c736071713b2a99c1c0f3b98e4c9d808fd2ecf2711ff1bd370be4a74abe0a816 | ndmitchell/uniplate | DataInc.hs | import Data.Generics.Uniplate.Internal.Data
import Data.Data
instance Data a => Uniplate a where
uniplate = uniplateData $ fromOracle answer
where answer = hitTest (undefined :: a) (undefined :: a)
descend = descendData $ fromOracle answer
where answer = hitTest (undefined :: a) (undefined :: ... | null | https://raw.githubusercontent.com/ndmitchell/uniplate/7d3039606d7a083f6d77f9f960c919668788de91/Data/Generics/Uniplate/Internal/DataInc.hs | haskell | import Data.Generics.Uniplate.Internal.Data
import Data.Data
instance Data a => Uniplate a where
uniplate = uniplateData $ fromOracle answer
where answer = hitTest (undefined :: a) (undefined :: a)
descend = descendData $ fromOracle answer
where answer = hitTest (undefined :: a) (undefined :: ... | |
b0968d70155fff33817cc44285f93b36220c3d77eff91dc95d0f69dc8d86ca10 | seagreen/unison-code-explorer | UCE.hs | module UCE where
import Concur.Replica (Attr (..), Attrs, HTML, VDOM (..), clientDriver)
import qualified Concur.Replica.Run
import qualified Data.Map.Strict as Map
import qualified Network.Wai as Wai
import qualified Network.Wai.Middleware.Static as Static
import Network.WebSockets (defaultConnectionOptions)
import q... | null | https://raw.githubusercontent.com/seagreen/unison-code-explorer/9183f7ed4ee5d72a464ed5e3a041cd4733ccd353/src/UCE.hs | haskell | module UCE where
import Concur.Replica (Attr (..), Attrs, HTML, VDOM (..), clientDriver)
import qualified Concur.Replica.Run
import qualified Data.Map.Strict as Map
import qualified Network.Wai as Wai
import qualified Network.Wai.Middleware.Static as Static
import Network.WebSockets (defaultConnectionOptions)
import q... | |
9a249316cb6e408cd0d103eb84c5b8bfbe907828c016c3b11fd227c96058bf42 | jasonrudolph/one-rep-max | docs.clj | (ns script.docs
"Provides a `-main` function which will generate the documentation for
the website, the documentation that you are viewing at this very
moment."
(:require [net.cgrand.enlive-html :as html]
[clojure.java.io :as io]))
(defn- uberdoc-content
"Accepts a relative path for an HTML file ... | null | https://raw.githubusercontent.com/jasonrudolph/one-rep-max/8bdc8eccd4f36cf91b0dd57b0a378efb1b24f7a3/src/lib/clj/script/docs.clj | clojure | (ns script.docs
"Provides a `-main` function which will generate the documentation for
the website, the documentation that you are viewing at this very
moment."
(:require [net.cgrand.enlive-html :as html]
[clojure.java.io :as io]))
(defn- uberdoc-content
"Accepts a relative path for an HTML file ... | |
c912604685832c43c8df542ed9bfac74d57808bbe98300d5abed474ab758f9b7 | RichiH/git-annex | Messages.hs | git - annex remote messages
-
- Copyright 2013 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2013 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
module Remote.Helper.Messages where
import A... | null | https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Remote/Helper/Messages.hs | haskell | # LANGUAGE TypeSynonymInstances, FlexibleInstances # | git - annex remote messages
-
- Copyright 2013 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2013 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Remote.Helper.Messages where
import Annex.Common
import qualified Git
import qualified Types.R... |
7eb30f42fee2d6109fc0f0f4d5f79511d1f5e8a644007e58a5045b3f5e6787ff | leo-project/leo_gateway | leo_nfs_mount3_server.erl | %%======================================================================
%%
Leo Gateway
%%
Copyright ( c ) 2012 - 2015 Rakuten , Inc.
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a... | null | https://raw.githubusercontent.com/leo-project/leo_gateway/7bac8912b762688f0ef237b31fee17e30e3888a3/src/leo_nfs_mount3_server.erl | erlang | ======================================================================
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permis... | Leo Gateway
Copyright ( c ) 2012 - 2015 Rakuten , Inc.
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(leo_nfs_mount3... |
d905266c05db52bc070a7afb9f9f822b4175985a26aa0f018886efce87f6bd01 | slyrus/retrospectiff | package.lisp |
(cl:defpackage #:retrospectiff.constants
(:export #:+field-type-slong+
#:+x-resolution-tag+
#:+field-type-sshort+
#:+field-type-undefined+
#:+photometric-interpretation-tag+
#:+photometric-interpretation-palette-color+
#:+field-type-long+
#... | null | https://raw.githubusercontent.com/slyrus/retrospectiff/c2a69d77d5010f8cdd9045b3e36a08a73da5d321/package.lisp | lisp |
(cl:defpackage #:retrospectiff.constants
(:export #:+field-type-slong+
#:+x-resolution-tag+
#:+field-type-sshort+
#:+field-type-undefined+
#:+photometric-interpretation-tag+
#:+photometric-interpretation-palette-color+
#:+field-type-long+
#... | |
e6c113c6938ff88157dc4c5147deebfb15402ecb2e200757a5799da204d16789 | jyh/metaprl | czf_itt_sep.mli |
* Empty set .
*
* ----------------------------------------------------------------
*
* This file is part of MetaPRL , a modular , higher order
* logical framework that provides a logical programming
* environment for OCaml and other languages .
*
* See the file doc / htmlman / default.html or... | null | https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/czf/czf_itt_sep.mli | ocaml | ***********************************************************************
* TERMS *
***********************************************************************
***********************************************************************
* REWRITES ... |
* Empty set .
*
* ----------------------------------------------------------------
*
* This file is part of MetaPRL , a modular , higher order
* logical framework that provides a logical programming
* environment for OCaml and other languages .
*
* See the file doc / htmlman / default.html or... |
26e8d2db65a585880384b44be2771a2bd66323455123496b4c7cbe1f4100f0aa | sunng87/rigui | platform.clj | (ns rigui.timer.platform
(:require [rigui.utils :refer [now]])
(:import [java.util.concurrent Delayed DelayQueue ExecutorService Executors TimeUnit]))
(def ^:dynamic *dry-run* false)
(defn- core-count []
(.availableProcessors (Runtime/getRuntime)))
(defonce ^{:private true} worker-pool
(Executors/newFixedThr... | null | https://raw.githubusercontent.com/sunng87/rigui/1c695b8259dc8dd4a527298e8dbb9e0f738e517c/src/rigui/timer/platform.clj | clojure | (ns rigui.timer.platform
(:require [rigui.utils :refer [now]])
(:import [java.util.concurrent Delayed DelayQueue ExecutorService Executors TimeUnit]))
(def ^:dynamic *dry-run* false)
(defn- core-count []
(.availableProcessors (Runtime/getRuntime)))
(defonce ^{:private true} worker-pool
(Executors/newFixedThr... | |
fa9e050fffcd5bd4a3bdda7674c1507eb1f5edec6b435824faa61d9b09655d01 | tek/ribosome | NvimMenuState.hs | module Ribosome.Menu.Data.NvimMenuState where
import Ribosome.Menu.Data.CursorIndex (CursorIndex)
import Ribosome.Menu.Data.CursorLine (CursorLine)
import Ribosome.Menu.Data.MenuView (MenuView)
data NvimMenuState =
NvimMenuState {
view :: MenuView,
cursorIndex :: CursorIndex,
indexes :: [(Int, Bool)]
... | null | https://raw.githubusercontent.com/tek/ribosome/a676b4f0085916777bfdacdcc761f82d933edb80/packages/menu/lib/Ribosome/Menu/Data/NvimMenuState.hs | haskell | module Ribosome.Menu.Data.NvimMenuState where
import Ribosome.Menu.Data.CursorIndex (CursorIndex)
import Ribosome.Menu.Data.CursorLine (CursorLine)
import Ribosome.Menu.Data.MenuView (MenuView)
data NvimMenuState =
NvimMenuState {
view :: MenuView,
cursorIndex :: CursorIndex,
indexes :: [(Int, Bool)]
... | |
12f4a725a28bee1cdc2d823e9f61fcef93313a52308818af63a4a4b7f12ec0cb | CardanoSolutions/ogmios | Ogmios.hs | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
# LANGUAGE DerivingVia #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE TypeApplications #
# LANGUAGE UndecidableInstances #
# OPTIONS_... | null | https://raw.githubusercontent.com/CardanoSolutions/ogmios/317c826d9d0388cb7efaf61a34085fc7c1b12b06/server/src/Ogmios.hs | haskell | * App
* Environment
* Command & Options
* Logging
App
| Main application monad.
| Application runner with an instantiated environment. See 'newEnvironment'.
| The runtime does not let the application terminate gracefully when a
to cleanup sub-processes.
Environment
| Environment of the application, carr... | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
# LANGUAGE DerivingVia #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE TypeApplications #
# LANGUAGE UndecidableInstances #
# OPTIONS_... |
8c59be885459f9dd36d59caf0da031e02123689023a58322acbc3c3d23d15936 | robert-strandh/SICL | function-tree.lisp | (cl:in-package #:cleavir-ast-function-tree)
(defclass lexical-location-occurrence ()
((%parent :initarg :parent :reader parent)
(%child-number :initarg :child-number :reader child-number)
(%node :initarg :node :reader node)))
(defun make-lexical-location-occurrence (parent child-number node)
(make-instance ... | null | https://raw.githubusercontent.com/robert-strandh/SICL/a7298f30929c487bd097298058dac6878e85c278/Code/Cleavir/AST-transformations/Function-tree/function-tree.lisp | lisp | When processing is done, this slot will contain a single
instance of LEXICAL-LOCATION-OCCURRENCE corresponding to the
When processing is done, this slot will contain a list of
instances of LEXICAL-LOCATION-OCCURRENCE corresponding to the
occurrences of the LEXICAL-AST in the left-hand side of a
SETQ-AST.
When pr... | (cl:in-package #:cleavir-ast-function-tree)
(defclass lexical-location-occurrence ()
((%parent :initarg :parent :reader parent)
(%child-number :initarg :child-number :reader child-number)
(%node :initarg :node :reader node)))
(defun make-lexical-location-occurrence (parent child-number node)
(make-instance ... |
c07d13da3ffb84b91301cefea99c00db86a99c16ec04b2111be64d2a7bfbcc1b | err0r500/realworld-app-simple-haskell | UserRegistrationSpec.hs | module Usecase.Specs.UserRegistrationSpec
( spec,
)
where
import qualified Adapter.EmailChecker as MailChecker
import qualified Adapter.Fake.Logger as Logger
import qualified Adapter.Fake.UUID as Uuid
import qualified Adapter.Storage.InMem.User as InMem
import qualified Data.UUID as UUID
import qualified Domain.Us... | null | https://raw.githubusercontent.com/err0r500/realworld-app-simple-haskell/e499fd2eb03f6bcde5ac99a136d1907700cf026d/test/Usecase/Specs/UserRegistrationSpec.hs | haskell | module Usecase.Specs.UserRegistrationSpec
( spec,
)
where
import qualified Adapter.EmailChecker as MailChecker
import qualified Adapter.Fake.Logger as Logger
import qualified Adapter.Fake.UUID as Uuid
import qualified Adapter.Storage.InMem.User as InMem
import qualified Data.UUID as UUID
import qualified Domain.Us... | |
924edbd382c0bc68b7cb9b8d76852c4ac6457059071c317de824fd1a6cc24ce0 | tonymorris/geo-osm | NameL.hs | -- -- | Values with a @name@ string accessor.
module Data.Geo.OSM.Lens.NameL where
import Control.Lens.Lens
class NameL a where
nameL ::
Lens' a String
| null | https://raw.githubusercontent.com/tonymorris/geo-osm/776542be2fd30a05f0f9e867128eca5ad5d66bec/src/Data/Geo/OSM/Lens/NameL.hs | haskell | -- | Values with a @name@ string accessor. | module Data.Geo.OSM.Lens.NameL where
import Control.Lens.Lens
class NameL a where
nameL ::
Lens' a String
|
24643468898ea58d9c55b9f983ac97a39ffeadc306187967cf1efbda6198c646 | glv2/cl-monero-tools | cryptonight.lisp | ;;;; This file is part of monero-tools
Copyright 2018
Distributed under the GNU GPL v3 or later .
;;;; See the file LICENSE for terms of use and distribution.
(in-package :monero-tools)
(defun cryptonight (data variant height)
(declare (type (simple-array (unsigned-byte 8) (*)) data)
(type fixnu... | null | https://raw.githubusercontent.com/glv2/cl-monero-tools/ab972ac3a7c5489cf23e3bdaa5d390d5cff1732b/monero-tools/crypto/cryptonight.lisp | lisp | This file is part of monero-tools
See the file LICENSE for terms of use and distribution.
from the DATA.
the mixing buffer.
conses a bignum, which slows down the loop a lot.
smaller integers solves this problem.
Iteration 1
Iteration 2
the TEXT buffer. TEXT was originally created with the output | Copyright 2018
Distributed under the GNU GPL v3 or later .
(in-package :monero-tools)
(defun cryptonight (data variant height)
(declare (type (simple-array (unsigned-byte 8) (*)) data)
(type fixnum variant height)
(optimize (speed 3) (space 0) (safety 0) (debug 0)))
(when (and (= va... |
e5fbee7396ab49c0c32cb769fde0b2179ad0a6946c4e9a8b22a602b95165c892 | fragnix/fragnix | GHC.Event.IntTable.hs | {-# LINE 1 "GHC.Event.IntTable.hs" #-}
# LANGUAGE Trustworthy #
# LANGUAGE BangPatterns , NoImplicitPrelude , RecordWildCards #
{-# OPTIONS_GHC -Wno-name-shadowing #-}
module GHC.Event.IntTable
(
IntTable
, new
, lookup
, insertWith
, reset
, delete
, updateWith
) where
import Da... | null | https://raw.githubusercontent.com/fragnix/fragnix/b9969e9c6366e2917a782f3ac4e77cce0835448b/builtins/base/GHC.Event.IntTable.hs | haskell | # LINE 1 "GHC.Event.IntTable.hs" #
# OPTIONS_GHC -Wno-name-shadowing #
A very simple chained integer-keyed mutable hash table. We use
shrink. The "hash function" is the identity function.
# UNPACK #
# UNPACK #
# UNPACK #
| @insertWith f k v table@ inserts @k@ into @table@ with value @v@.
| Used to undo the effect o... | # LANGUAGE Trustworthy #
# LANGUAGE BangPatterns , NoImplicitPrelude , RecordWildCards #
module GHC.Event.IntTable
(
IntTable
, new
, lookup
, insertWith
, reset
, delete
, updateWith
) where
import Data.Bits ((.&.), shiftL, shiftR)
import Data.IORef (IORef, newIORef, readIORef, ... |
64a7989fdd7ae50ab9936a0e71ef205572111884be19b3a54fc8f145302f9dff | fmi-lab/fp-elective-2017 | task-3.scm | (require rackunit rackunit/text-ui)
(define (average a b)
(/ (+ a b) 2.0))
(define (approx-zero? x eps)
(< (abs x) eps))
(define (binary-search f a b eps)
(define (helper a b iteration)
(let* ((mid (average a b))
(f-mid (f mid)))
(cond ((or (approx-zero? f-mid eps)
(approx... | null | https://raw.githubusercontent.com/fmi-lab/fp-elective-2017/e88d5c0319b6d03c0ecd8a12a2856fb1bf5dcbf3/homework/01/task-3.scm | scheme | (require rackunit rackunit/text-ui)
(define (average a b)
(/ (+ a b) 2.0))
(define (approx-zero? x eps)
(< (abs x) eps))
(define (binary-search f a b eps)
(define (helper a b iteration)
(let* ((mid (average a b))
(f-mid (f mid)))
(cond ((or (approx-zero? f-mid eps)
(approx... | |
1702a8c27ce51f92b589c4a0bce8b95cab16cac3fa97803a1caf23dee7a0da7c | samoht/camloo | int.scm | ;; Le module
(module
__caml_int
(import
__caml_arg
__caml_baltree
__caml_char
__caml_eq
__caml_exc
__caml_fchar
__caml_filename
__caml_float
__caml_fstring
__caml_fvect
__caml_genlex
__caml_hashtbl
__caml_io
__caml_lexing
__caml_list
__caml_map
__... | null | https://raw.githubusercontent.com/samoht/camloo/29a578a152fa23a3125a2a5b23e325b6d45d3abd/src/runtime/Llib.bootstrap/int.scm | scheme | Le module
Les variables globales
Les expressions globales | (module
__caml_int
(import
__caml_arg
__caml_baltree
__caml_char
__caml_eq
__caml_exc
__caml_fchar
__caml_filename
__caml_float
__caml_fstring
__caml_fvect
__caml_genlex
__caml_hashtbl
__caml_io
__caml_lexing
__caml_list
__caml_map
__caml_pair
... |
65e0411157f9a69229c8bc16b682e9febf62d773a90f5b5dc911c5eb7005694e | potapenko/playphraseme-site | cors.clj | (ns playphraseme.api.middleware.cors
(:require [clojure.pprint :refer :all]))
(defn cors-mw
"Cross-origin Resource Sharing (CORS) middleware. Allow requests from all
origins, all http methods and Authorization and Content-Type headers."
[handler]
(fn [request]
(let [response (handler request)]
(->... | null | https://raw.githubusercontent.com/potapenko/playphraseme-site/d50a62a6bc8f463e08365dca96b3a6e5dde4fb12/src/clj/playphraseme/api/middleware/cors.clj | clojure | (ns playphraseme.api.middleware.cors
(:require [clojure.pprint :refer :all]))
(defn cors-mw
"Cross-origin Resource Sharing (CORS) middleware. Allow requests from all
origins, all http methods and Authorization and Content-Type headers."
[handler]
(fn [request]
(let [response (handler request)]
(->... | |
481417091a6ec75cfc2f3b310adbbf2d2c0a88cbc4962676b8f329e852ea0189 | aeolus-project/zephyrus | read_stateful_abstract_io.mli | (****************************************************************************)
(* *)
This file is part of Zephyrus .
(* *)
Z... | null | https://raw.githubusercontent.com/aeolus-project/zephyrus/0b52de4038bbab724e6a9628430165a7f09f77ae/src/output/read_stateful_abstract_io.mli | ocaml | **************************************************************************
(at your option) any later version.
... | This file is part of Zephyrus .
Zephyrus 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
Zephyru... |
3d7f5132a8326961e804d4dcaedb02237c80f9599d00e719589c2dc524c61fa0 | faryabib/NatMethods_TooManyCells_analysis | purity_cellranger.hs | #!/usr/bin/env stack
{- stack
script
--resolver lts-10.0
--package async
--package bytestring
--package cassava
--package containers
--package diversity
--package foldl
--package inline-r
--package system-filepath
--package text
--package text-show
--package turtle
--package vector
-}
{-# L... | null | https://raw.githubusercontent.com/faryabib/NatMethods_TooManyCells_analysis/40ba77440ab08e44b64d27b76496735d310fd2cb/purity_cellranger.hs | haskell | stack
script
--resolver lts-10.0
--package async
--package bytestring
--package cassava
--package containers
--package diversity
--package foldl
--package inline-r
--package system-filepath
--package text
--package text-show
--package turtle
--package vector
# LANGUAGE OverloadedStrings #
... | #!/usr/bin/env stack
# LANGUAGE QuasiQuotes #
import Data.Maybe (fromJust, isJust)
import Data.Monoid ((<>))
import Math.Diversity.Diversity (diversity)
import TextShow (showt)
import Turtle
import qualified Control.Foldl as Fold
import qualified Data.ByteString.Lazy.Char8 as B
import qualified Data.Csv as CSV
import... |
e0435758349ce2161ff887d2e6d82841ccc1a2bd0ef1c0ce5742b66e6526139e | janestreet/memtrace_viewer | substring_heavy_hitters.ml | open! Core
open Memtrace_viewer_common
A generalized suffix tree based on Ukkonen 's algorithm
combined with lossy counting .
combined with lossy counting. *)
module type Char = sig
include Hashable.S_plain
include Comparable.S_plain with type t := t
include Sexpable.S with type t := t
val dummy : ... | null | https://raw.githubusercontent.com/janestreet/memtrace_viewer/280d57dd520ed755497169e46b5fd0b11401d482/server/src/substring_heavy_hitters.ml | ocaml | Need to do this up top because we can't invoke a generative functor (namely
[Identifier.Make]) from an applicative one (our own [Make]).
Upper bound on how much has been squashed along the edge to the parent. A node
may be created and squashed again any number of times; this is a bound on how
mu... | open! Core
open Memtrace_viewer_common
A generalized suffix tree based on Ukkonen 's algorithm
combined with lossy counting .
combined with lossy counting. *)
module type Char = sig
include Hashable.S_plain
include Comparable.S_plain with type t := t
include Sexpable.S with type t := t
val dummy : ... |
4f38e55e38f126b57d197daed7c5eb88b09e16d7f0a62940c38cf0112657dac4 | haskell/text | Unsafe.hs | # LANGUAGE CPP , MagicHash , UnboxedTuples #
-- |
-- Module : Data.Text.Unsafe
Copyright : ( c ) 2009 , 2010 , 2011
-- License : BSD-style
-- Maintainer :
-- Portability : portable
--
-- A module containing unsafe 'Text' operations, for very very careful
-- use in heavily tested code.
module Data.Text... | null | https://raw.githubusercontent.com/haskell/text/3488190f25e1ee5a5dea6b1a593d8a5819e76a1e/src/Data/Text/Unsafe.hs | haskell | |
Module : Data.Text.Unsafe
License : BSD-style
Maintainer :
Portability : portable
A module containing unsafe 'Text' operations, for very very careful
use in heavily tested code.
| /O(1)/ A variant of 'head' for non-empty 'Text'. 'unsafeHead'
omits the check for the empty case, so there is an obli... | # LANGUAGE CPP , MagicHash , UnboxedTuples #
Copyright : ( c ) 2009 , 2010 , 2011
module Data.Text.Unsafe
(
inlineInterleaveST
, inlinePerformIO
, unsafeDupablePerformIO
, Iter(..)
, iter
, iterArray
, iter_
, reverseIter
, reverseIterArray
, reverseIter_
, unsaf... |
9679ea06f80a2260317f1fb4a68b81ea2d03c342dd0b21b439a9d6f644262e6e | mfoemmel/erlang-otp | reltool_server.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public Lic... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/reltool/src/reltool_server.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(reltool_server).
-export([
star... |
5522010186be0fa684d07600f51e9d740b49fb57e0712cc22dde53d0ea9d6447 | program-repair-project/bug-localizer | localizer.ml | module F = Format
module LineCoverage = Coverage.LineCoverage
module LineCoverageInst = Coverage.LineCoverage2
module BugLocation = struct
type t = Cil.location * float * float * float * int
let pp fmt (l, score_neg, score_pos, score, score_time) =
F.fprintf fmt "%s:%d\t%f %f %f %d" l.Cil.file l.Cil.line scor... | null | https://raw.githubusercontent.com/program-repair-project/bug-localizer/4fadda6044c9e30ff802f330d07299f347701397/src/localizer.ml | ocaml | let bic_locations = spec_localizer work_dir bug_desc () in | module F = Format
module LineCoverage = Coverage.LineCoverage
module LineCoverageInst = Coverage.LineCoverage2
module BugLocation = struct
type t = Cil.location * float * float * float * int
let pp fmt (l, score_neg, score_pos, score, score_time) =
F.fprintf fmt "%s:%d\t%f %f %f %d" l.Cil.file l.Cil.line scor... |
aad3e956234c8e21b417a4c3357d87354c51b0da997cdc5a85115efb44fc0bfe | yrashk/erlang | proc_lib.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1996 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/yrashk/erlang/e1282325ed75e52a98d58f5bd9fb0fa27896173f/lib/stdlib/src/proc_lib.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 1996 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(proc_lib).
Then a process termin... |
e21a7d87a899cade056659da4ede99e6afb9e77dccd51a45e276d7e550341bc4 | cbaggers/varjo | ubo-ssbo-tests.lisp | (in-package :varjo.tests)
(5am:in-suite ubo-ssbo-tests)
;;------------------------------------------------------------
;; Helper data
(v-defstruct some-data ()
(ints (:int 1000)))
(v-defstruct outer-one ()
(data (some-data 10)))
;;------------------------------------------------------------
;; Tests
(5am:def-t... | null | https://raw.githubusercontent.com/cbaggers/varjo/9e77f30220053155d2ef8870ceba157f75e538d4/tests/ubo-ssbo-tests.lisp | lisp | ------------------------------------------------------------
Helper data
------------------------------------------------------------
Tests
note that we dont even have to call ham for this to happen! | (in-package :varjo.tests)
(5am:in-suite ubo-ssbo-tests)
(v-defstruct some-data ()
(ints (:int 1000)))
(v-defstruct outer-one ()
(data (some-data 10)))
(5am:def-test ubo-0 (:suite ubo-ssbo-tests)
(finishes-p
(compile-vert ((vert pos-col) &uniform (the-data some-data :ubo)) :410 nil
(v! 1 2 3 4))))
(5... |
48d0bc3dc1bbc156a2f626765327aa7528badd7aafd259b102dcd31a8173682c | plai-group/daphne | free_vars.clj | (ns daphne.free-vars
(:require [clojure.set :as set]))
(defn dispatch-free-vars
[exp _]
(cond (and (seq? exp)
(= (first exp) 'let))
:let
(map? exp)
:map
(or (vector? exp) (seq? exp))
:seq
(symbol? exp)
:symbol
:else :unrelated))
(d... | null | https://raw.githubusercontent.com/plai-group/daphne/b0f43fbb9c856116ec44419fea91c4011072dd74/src/daphne/free_vars.clj | clojure | (ns daphne.free-vars
(:require [clojure.set :as set]))
(defn dispatch-free-vars
[exp _]
(cond (and (seq? exp)
(= (first exp) 'let))
:let
(map? exp)
:map
(or (vector? exp) (seq? exp))
:seq
(symbol? exp)
:symbol
:else :unrelated))
(d... | |
95f112043a58907f198d23d3f1128884fdf4d781a45cdbd1da40d4c76ddcdd31 | DanielG/ghc-mod | Info.hs | for HscInterpreted
module Info () where
fib :: Int -> Int
fib 0 = 0
fib 1 = 1
fib n = fib (n - 1) + fib (n - 2)
| null | https://raw.githubusercontent.com/DanielG/ghc-mod/391e187a5dfef4421aab2508fa6ff7875cc8259d/test/data/cabal-project/Info.hs | haskell | for HscInterpreted
module Info () where
fib :: Int -> Int
fib 0 = 0
fib 1 = 1
fib n = fib (n - 1) + fib (n - 2)
| |
434e56bda3f36555f2c3fbe2dcbbc760964d1710a046b1b365d66f2b73f72ffd | vollcheck/aoc | core.clj | (ns day01
(:require [clojure.string :as str]))
(def filename "input.txt")
(defn process-instr [instr]
((fn [[s int]]
(vector s (Integer/parseUnsignedInt int)))
(str/split instr #" ")))
(defn load-input []
(->> filename
(slurp)
(str/split-lines)
(map process-instr)
(into [])... | null | https://raw.githubusercontent.com/vollcheck/aoc/c78c8a8330a045fb11600e4deb9beb055e298651/src/y21/day02/core.clj | clojure | (ns day01
(:require [clojure.string :as str]))
(def filename "input.txt")
(defn process-instr [instr]
((fn [[s int]]
(vector s (Integer/parseUnsignedInt int)))
(str/split instr #" ")))
(defn load-input []
(->> filename
(slurp)
(str/split-lines)
(map process-instr)
(into [])... | |
21ca1e02c3c1c315a62f856f23bff74285b3ca26296cc675a113841fcd327e42 | yokolet/hiccup-samples | core.clj | (ns hiccup-templating.core
(:require [compojure.core :refer [defroutes GET ANY]]
[compojure.route :as route]
[compojure.handler :as handler]
[ring.adapter.jetty :as jetty]
[hiccup-templating.views.layout :as layout]
[hiccup-templating.views.contents :as cont... | null | https://raw.githubusercontent.com/yokolet/hiccup-samples/8f5d4854a4c4825dc987507a07e6e0f9512ea0d3/src/hiccup_templating/core.clj | clojure | (ns hiccup-templating.core
(:require [compojure.core :refer [defroutes GET ANY]]
[compojure.route :as route]
[compojure.handler :as handler]
[ring.adapter.jetty :as jetty]
[hiccup-templating.views.layout :as layout]
[hiccup-templating.views.contents :as cont... | |
330e04b4d25f224043b8a9b1754b5d563a13b3ad8a4396539af0fbe4ab8b83f6 | Helium4Haskell/helium | TupleMatch.hs | module TupleMatch where
main :: Int
main = let (x, y) = (13, x) in x + y
-- let (Tup x y) = Tup 13 x in x+y
| null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/simple/correct/TupleMatch.hs | haskell | let (Tup x y) = Tup 13 x in x+y | module TupleMatch where
main :: Int
main = let (x, y) = (13, x) in x + y
|
727eaea298f836debf96cd6282df79e0bd44fa459425a7095c54af7d0c85dae2 | Clojure2D/clojure2d-examples | arrive_6_2.clj | (ns NOC.ch06.arrive-6-2
(:require [clojure2d.core :refer :all]
[fastmath.core :as m]
[fastmath.vector :as v])
(:import fastmath.vector.Vec2))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(def ^:const ^double maxspeed 4.0)
(def ^:const ^double maxforce 0.1)
(def ^... | null | https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/9de82f5ac0737b7e78e07a17cf03ac577d973817/src/NOC/ch06/arrive_6_2.clj | clojure | (ns NOC.ch06.arrive-6-2
(:require [clojure2d.core :refer :all]
[fastmath.core :as m]
[fastmath.vector :as v])
(:import fastmath.vector.Vec2))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(def ^:const ^double maxspeed 4.0)
(def ^:const ^double maxforce 0.1)
(def ^... | |
98a8f956be548982b462a275cf9e1c6c54804c7e74237194baa1ac5981f569ab | facebookincubator/hsthrift | Typeable.hs | Copyright ( c ) Facebook , Inc. and its affiliates .
module Util.Typeable
( cast1
) where
import Data.Maybe
import Data.Typeable
import Unsafe.Coerce
| A simpler variant of Data . Typeable.gcast1
# INLINE cast1 #
cast1 :: (Typeable t, Typeable t') => t a -> Maybe (t' a)
cast1 x = r
where
r = if typeOf1... | null | https://raw.githubusercontent.com/facebookincubator/hsthrift/d3ff75d487e9d0c2904d18327373b603456e7a01/common/util/Util/Typeable.hs | haskell | Copyright ( c ) Facebook , Inc. and its affiliates .
module Util.Typeable
( cast1
) where
import Data.Maybe
import Data.Typeable
import Unsafe.Coerce
| A simpler variant of Data . Typeable.gcast1
# INLINE cast1 #
cast1 :: (Typeable t, Typeable t') => t a -> Maybe (t' a)
cast1 x = r
where
r = if typeOf1... | |
1c9ed974d689568e6515ee94d75272c3cfd30abdbf37ddcaabe7a009d699d583 | clingen-data-model/genegraph | loss_intolerance.clj | (ns genegraph.transform.loss-intolerance
(:require [genegraph.database.load :as l]
[genegraph.database.query :as q]
[genegraph.transform.common-score :as com]
[clojure.data.csv :as csv]
[clojure.java.io :as io]
[clojure.string :as str]
[io.pedest... | null | https://raw.githubusercontent.com/clingen-data-model/genegraph/8c217e4c3820b3bd0a0937a6e331a6e6a49b8c14/src/genegraph/transform/loss_intolerance.clj | clojure | "select ?s where { ?s a :so/ProteinCodingGene . ?s :owl/same-as ?ensembl }" {:ensembl "URI" } | (ns genegraph.transform.loss-intolerance
(:require [genegraph.database.load :as l]
[genegraph.database.query :as q]
[genegraph.transform.common-score :as com]
[clojure.data.csv :as csv]
[clojure.java.io :as io]
[clojure.string :as str]
[io.pedest... |
dd54da9cce85e2bf48c72630d3d33abf65d5179004e34ec74c911a82e7c6f9e2 | cushon/project-euler | 15.rkt | #lang racket
Find the number of manhattan paths from the top left to bottom right corners of
a 20x20 grid .
(define (solve)
(define mem (make-hash))
(define (routes a b)
(if (> a b) (routes b a)
(cond
[(and (= a 1) (= b 1)) 2]
[(or (= a 0) (= b 0)) 1]
[(hash-has-... | null | https://raw.githubusercontent.com/cushon/project-euler/d7fcbfff0cd59b2c3691293ff35bb2043b409f68/15.rkt | racket | #lang racket
Find the number of manhattan paths from the top left to bottom right corners of
a 20x20 grid .
(define (solve)
(define mem (make-hash))
(define (routes a b)
(if (> a b) (routes b a)
(cond
[(and (= a 1) (= b 1)) 2]
[(or (= a 0) (= b 0)) 1]
[(hash-has-... | |
1bc061ee8938205a105161b6eaf6396935f1ce6299e4ea172f08a4527207792d | titola/incudine | fft.lisp | Incudine version of CLM
Copyright ( c ) 2017 - 2021
;;;
;;; This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
;;; (at your option) any later version.
;;;
... | null | https://raw.githubusercontent.com/titola/incudine/776d9047cebc3d0a307208514f3ae6085eb2c5cd/contrib/cudere-clm/fft.lisp | lisp |
This program is free software; you can redistribute it and/or modify
either version 2 of the License , or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR... | Incudine version of CLM
Copyright ( c ) 2017 - 2021
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
Foundation , Inc. , 51 Franklin St , Fifth Floor , Boston , MA 02110 - 1301 USA
(in-package :cudere-clm.sys)
(defin... |
1543e68e8c00ad70ffeecfc2cbc927386b8721fd6b55d121bdacbd6e1319576f | mabragor/cl-dsl | cl-dsl.lisp | ;;;; cl-dsl.lisp
This is part of CL - DSL package , see COPYING for details on usage .
(in-package #:cl-dsl)
(defun with-macrolets (would-be-macrolets body)
`(macrolet ,(mapcar (lambda (x)
`(,(intern (string x)) (&rest args) `(,',x ,@args)))
would-be-macrolets)
,@body))
(defun with-flets (would-... | null | https://raw.githubusercontent.com/mabragor/cl-dsl/697fa5aead8865be10f41923a8c0bb35494c4280/cl-dsl.lisp | lisp | cl-dsl.lisp |
This is part of CL - DSL package , see COPYING for details on usage .
(in-package #:cl-dsl)
(defun with-macrolets (would-be-macrolets body)
`(macrolet ,(mapcar (lambda (x)
`(,(intern (string x)) (&rest args) `(,',x ,@args)))
would-be-macrolets)
,@body))
(defun with-flets (would-be-flets body)
... |
6f3d6017b49098d17b02f3213210263f5874654db3f22e6fa5e6af33e1710540 | sellout/quid-pro-quo | ccl-advice.lisp | (in-package #:quid-pro-quo)
(defmacro defcontract (name type lambda-list &body body)
"This macro makes it possible to add pre- and postconditions to non-generic
functions as well."
(multiple-value-bind (remaining-forms declarations doc-string)
(parse-body body :documentation t)
`(ccl:advise ,name
... | null | https://raw.githubusercontent.com/sellout/quid-pro-quo/c35156d5883efb15e21ad4db932a57e353f4d329/src/ccl-advice.lisp | lisp | (in-package #:quid-pro-quo)
(defmacro defcontract (name type lambda-list &body body)
"This macro makes it possible to add pre- and postconditions to non-generic
functions as well."
(multiple-value-bind (remaining-forms declarations doc-string)
(parse-body body :documentation t)
`(ccl:advise ,name
... | |
d9c49fba81337bb2f8b462a601b237fdcd3a70ec9ec8e26f919eb69338ca8203 | CATechnologiesTest/arete | viewer.clj | (ns engine.viewer
(:gen-class)
(:require [clojure.pprint :as pprint]
[clojure.stacktrace :as st]
[clojure.set :as set]
[clojure.string :as str]
[clojure.walk :as walk]
[flatland.ordered.set :as ordered]
[clojure.java.io :as io]
[eng... | null | https://raw.githubusercontent.com/CATechnologiesTest/arete/1ccaa554abd3ee4499cbe2381af2ed2af33fb420/src/engine/viewer.clj | clojure | This file contains support for post-mortem rule debugging. If a rule engine
is configured to record to a file, this program can be run against the
Match UUIDs
matches
Evaluate a left hand side and return partial matches
Generate a string representing a group of wmes, instantiations, etc.
Actions available in the... | (ns engine.viewer
(:gen-class)
(:require [clojure.pprint :as pprint]
[clojure.stacktrace :as st]
[clojure.set :as set]
[clojure.string :as str]
[clojure.walk :as walk]
[flatland.ordered.set :as ordered]
[clojure.java.io :as io]
[eng... |
27e6f429b420cc81720aff4c15549893be9b7656a80eaf5b239e60998b09a26f | hidaris/thinking-dumps | a7-6.rkt | #lang racket
(define cps
(lambda (e)
(letrec ([simpl? (lambda (e) (memq e '(zero? add1 sub1)))]
[end-cont (lambda (v) v)]
[cont0 (lambda (v) `(k ,v))] ;; `(lambda (x) x) `(if t a b) => (k x) (k a) (k b)
[fv (let ([n -1])
(lambda ()
(s... | null | https://raw.githubusercontent.com/hidaris/thinking-dumps/ce13154e2d9e3140197b2230e7cea2f8be2ae84c/c311/a7-6.rkt | racket | `(lambda (x) x) `(if t a b) => (k x) (k a) (k b)
(if (if ...) ...)
(lambda (v) `(k ,v))
tail call
'(lambda (c) (g c))
=> '(lambda (c k) ,(cps ,(g c) k0))
=> '(lambda (c k) (g c k))
yinwang's test
var
no lambda (will generate identity functions to return to the toplevel)
if stand-alone (tail)
if inside if-te... | #lang racket
(define cps
(lambda (e)
(letrec ([simpl? (lambda (e) (memq e '(zero? add1 sub1)))]
[end-cont (lambda (v) v)]
[fv (let ([n -1])
(lambda ()
(set! n (+ 1 n))
(string->symbol (string-append "v" (number->string n)))))]... |
d94ebdb8e4582739c0ef373c66610e2f79e414f18b4042c0eb1b3bba4c506d09 | NorfairKing/intray | AccountUUID.hs | module Intray.Data.AccountUUID
( AccountUUID,
module Data.UUID.Typed,
)
where
import Data.UUID.Typed
import Intray.Data.UUID ()
type AccountUUID = UUID User
data User
| null | https://raw.githubusercontent.com/NorfairKing/intray/f8ed32c79d8b3159a4c82cd8cc5c5aeeb92c2c90/intray-data/src/Intray/Data/AccountUUID.hs | haskell | module Intray.Data.AccountUUID
( AccountUUID,
module Data.UUID.Typed,
)
where
import Data.UUID.Typed
import Intray.Data.UUID ()
type AccountUUID = UUID User
data User
| |
9117de7b7b589dc762a1ed0358231fd91038ab8368b9ea6cb516ffbe1e4a5071 | vehicle-lang/vehicle | Debug.hs | # LANGUAGE CPP #
#if nothunks
{-# LANGUAGE BangPatterns #-}
#endif
#if ghcDebug
#else
# LANGUAGE ExistentialQuantification #
#endif
module Vehicle.Syntax.Debug
( -- * Export 'ghc-debug-stub'
Box (Box),
saveClosures,
pause,
resume,
* Export ' '
unsafeCheckThunks,
)
where
-- Imp... | null | https://raw.githubusercontent.com/vehicle-lang/vehicle/c94dbb26585db6adb661d714efdb32bff39e6a7e/vehicle-syntax/src/Vehicle/Syntax/Debug.hs | haskell | # LANGUAGE BangPatterns #
* Export 'ghc-debug-stub'
Import ghc-debug-stub:
Import nothunks and helpers:
so we do not need to define anything.
Define unsafeCheckThunks:
If we find a thunk, we throw an error.
We cannot check for thunks, so we do nothing. | # LANGUAGE CPP #
#if nothunks
#endif
#if ghcDebug
#else
# LANGUAGE ExistentialQuantification #
#endif
module Vehicle.Syntax.Debug
Box (Box),
saveClosures,
pause,
resume,
* Export ' '
unsafeCheckThunks,
)
where
#if ghcDebug
import GHC.Debug.Stub (Box (Box), pause, resume, saveClosures)
#endif... |
dd44fe5ef7a36414aa038855e3546ab6f77b10b4942937d4ab177fae501bd11f | ocaml/ocaml | typemod.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml/ocaml/9453a903c818dfef161e0534cbef441b1950625c/typing/typemod.mli | 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 Types
module Signature_names : sig
type t
val simplify: Env.t -> t -> signature -> signature
... |
36e35e9c7e54313afac6e57031df3095298b9ca564975be0677082a263a44878 | Ledest/otpbp | otpbp_pg2.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1997 - 2017 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/Ledest/otpbp/120df10117df9d25a0f96e28fdffa9ca65a2c4aa/src/otpbp_pg2.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 1997 - 2017 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(otpbp_pg2).
-ifndef(HAVE_pg2__start_0).
-export([create/1,
delete/1,
join/2,
leav... |
9479b54486f176e5b6c0f8cfb2b7bdee8d4009b956ec6b8a5d12cdd47fd3872b | google/proto-lens | dependent_test.hs | module Main (main) where
import Data.ProtoLens (defMessage)
import Test.Tasty (defaultMain, testGroup)
import Test.Tasty.HUnit (testCase, (@=?))
import Proto.Dependent (Dependent)
import Proto.Lib (LibMessage)
main :: IO ()
main = defaultMain $ testGroup "tests"
[ testCase "LibMessage" $ (defMessage :: LibMessag... | null | https://raw.githubusercontent.com/google/proto-lens/081815877430afc1db669ca5e4edde1558b5fd9d/proto-lens-tests/tests/dependent_test.hs | haskell | module Main (main) where
import Data.ProtoLens (defMessage)
import Test.Tasty (defaultMain, testGroup)
import Test.Tasty.HUnit (testCase, (@=?))
import Proto.Dependent (Dependent)
import Proto.Lib (LibMessage)
main :: IO ()
main = defaultMain $ testGroup "tests"
[ testCase "LibMessage" $ (defMessage :: LibMessag... | |
985c6dcdf80611ce3402fd44cb00d9696d60d099015367d7dd84417e0c36a9bb | tonyg/kali-scheme | dispatch2.scm |
(define-local-syntax (define-primitive id nargs)
(let ((args (reverse (list-tail '(z y x) (- '3 nargs)))))
`(define (,id . ,args)
(call-primitively ,id . ,args))))
(define-primitive + 2)
(define-primitive - 2)
(define-primitive * 2)
(define-primitive < 2)
(define-primitive make-vector 2)
(define-primiti... | null | https://raw.githubusercontent.com/tonyg/kali-scheme/79bf76b4964729b63fce99c4d2149b32cb067ac0/ps-compiler/prescheme/test/dispatch2.scm | scheme |
(define-local-syntax (define-primitive id nargs)
(let ((args (reverse (list-tail '(z y x) (- '3 nargs)))))
`(define (,id . ,args)
(call-primitively ,id . ,args))))
(define-primitive + 2)
(define-primitive - 2)
(define-primitive * 2)
(define-primitive < 2)
(define-primitive make-vector 2)
(define-primiti... | |
f1fe067187ad3ca956a2c580d78fb1c8a9a4cecfff32777221198ff48a8ff538 | dgtized/shimmers | triangle_gradient.cljs | (ns shimmers.sketches.triangle-gradient
(:require
[reagent-keybindings.keyboard :as kb]
[shimmers.common.svg :as csvg]
[shimmers.common.svg-export :as svg-export]
[shimmers.common.ui.controls :as ctrl]
[shimmers.math.deterministic-random :as dr]
[shimmers.math.geometry.triangle :as triangle]
[shi... | null | https://raw.githubusercontent.com/dgtized/shimmers/269cdd06a734d5e786825ef6b43a66d155595cca/src/shimmers/sketches/triangle_gradient.cljs | clojure | (ns shimmers.sketches.triangle-gradient
(:require
[reagent-keybindings.keyboard :as kb]
[shimmers.common.svg :as csvg]
[shimmers.common.svg-export :as svg-export]
[shimmers.common.ui.controls :as ctrl]
[shimmers.math.deterministic-random :as dr]
[shimmers.math.geometry.triangle :as triangle]
[shi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.