_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 |
|---|---|---|---|---|---|---|---|---|
9c503b82e5a6c551157598f1c3604a5ed3aceef78567210b434b1869ad4271a3 | discus-lang/ddc | TransformDownX.hs |
-- | General purpose tree walking boilerplate.
module DDC.Core.Transform.TransformDownX
( TransformDownMX(..)
, transformDownX
, transformDownX')
where
import DDC.Core.Module
import DDC.Core.Exp.Annot
import DDC.Type.Env (KindEnv, TypeEnv)
import Data.Functor.Identity
import Control... | null | https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-core/DDC/Core/Transform/TransformDownX.hs | haskell | | General purpose tree walking boilerplate.
| Top-down rewrite of all core expressions in a thing.
^ The worker function is given the current
kind and type environments.
^ Initial kind environment.
^ Initial type environment.
^ Transform this thing.
^ The worker function is given the current
kind and ty... |
module DDC.Core.Transform.TransformDownX
( TransformDownMX(..)
, transformDownX
, transformDownX')
where
import DDC.Core.Module
import DDC.Core.Exp.Annot
import DDC.Type.Env (KindEnv, TypeEnv)
import Data.Functor.Identity
import Control.Monad
import qualified DDC.Type.Env as Env
... |
f245b3a9cda9d8baf0018d3705be1f51df94cd32494254de21fd4edc4eec40cf | nubank/umschreiben-clj | variables_test.clj | (ns umschreiben-clj.variables-test
(:require [clojure.test :refer [are deftest is testing]]
[matcher-combinators.test :refer [match? thrown-match?]]
[rewrite-clj.node :as n]
[rewrite-clj.parser :as p]
[rewrite-clj.zip :as z]
[umschreiben-clj.test-utils :refe... | null | https://raw.githubusercontent.com/nubank/umschreiben-clj/e32863caf66aba5bd9f7f61d2b046fe1cbcc51e2/test/umschreiben_clj/variables_test.clj | clojure | `:refer` to do a refer?
breaking
read-string turns into the proper reader macro at emission time
breaking
breaking
we don't actually know what is in a.namespace. could be lower-case symbol | (ns umschreiben-clj.variables-test
(:require [clojure.test :refer [are deftest is testing]]
[matcher-combinators.test :refer [match? thrown-match?]]
[rewrite-clj.node :as n]
[rewrite-clj.parser :as p]
[rewrite-clj.zip :as z]
[umschreiben-clj.test-utils :refe... |
78b03a83386b62c49f30bf2ee2bd8966eb6ad329461549d2e19cd1b846363803 | someodd/waffle | Jump.hs | -- | Does the heavy-lifting, the actual stuff for `MenuJumpMode`.
module BrickApp.ModeAction.Menu.Jump where
FIXME
import Brick.Widgets.List ( listMoveTo )
import Brick.Widgets.Edit as E
import BrickApp.Types
-- REDUNDANT CODE/DUPLICATE
| Used by ` jumpNextLink ` and `... | null | https://raw.githubusercontent.com/someodd/waffle/71586b271878df4cb2368ae3bd6e2961cb79fa15/src/BrickApp/ModeAction/Menu/Jump.hs | haskell | | Does the heavy-lifting, the actual stuff for `MenuJumpMode`.
REDUNDANT CODE/DUPLICATE
menu that uses the updated list position.
FIXME: fromJust is very bad!
this should be a generic util function or something in repr just for status editor | module BrickApp.ModeAction.Menu.Jump where
FIXME
import Brick.Widgets.List ( listMoveTo )
import Brick.Widgets.Edit as E
import BrickApp.Types
| Used by ` jumpNextLink ` and ` jumpPrevLink ` for creating a new
updateMenuPosition :: Menu -> Int -> Menu
updateMenuPositio... |
d724bafc1c33a375b941322acc2482ce441a638c78dda3d99b3a878a7a049867 | inventi/seed | command.clj | (ns seed.core.command
(:require [seed.core.aggregate :as aggregate]
[clojure.core.async :as async :refer [go-loop chan close! >! <! go]]
[seed.core.util :refer [get-namespace error]]
[clojure.tools.logging :as log]
[clojure.spec :as s]
[clojure.spec.test :as stes... | null | https://raw.githubusercontent.com/inventi/seed/0a0088a587d6b147215694dcba585b6782eeec80/src/seed/core/command.clj | clojure | (ns seed.core.command
(:require [seed.core.aggregate :as aggregate]
[clojure.core.async :as async :refer [go-loop chan close! >! <! go]]
[seed.core.util :refer [get-namespace error]]
[clojure.tools.logging :as log]
[clojure.spec :as s]
[clojure.spec.test :as stes... | |
74e761fd558757c0d6d0351a9aaa99a217c8864f302851f42447d6ed8219e616 | bobzhang/fan | parse_fan.mli |
(** For side effects *)
(* exported mainly for unit test *)
val fill_parsers : unit -> unit
| null | https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/cold/parse_fan.mli | ocaml | * For side effects
exported mainly for unit test |
val fill_parsers : unit -> unit
|
1a1a7c126a357e72c72dce57526fb24d1b46673382413ac7e01bc5249148ff7e | jiangpengnju/htdp2e | intervals_sample_UFO.v3.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname intervals_sample_UFO.v3) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor rep... | null | https://raw.githubusercontent.com/jiangpengnju/htdp2e/d41555519fbb378330f75c88141f72b00a9ab1d3/fixed-size-data/intervals-enumerations-itemizations/intervals_sample_UFO.v3.rkt | racket | about the language level of this file in a form that our tools can easily process.
Sample Problem: Design a program that simulates the descent of a UFO.
that say "descending" when the UFO's height is above
It swithes to "closing in" below that.
And finally, when the UFO has reached the bottom of the canvas, the st... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname intervals_sample_UFO.v3) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
Add a status line , POSITIONED AT ( 20 , 20 ) ... |
1a2d9a9ba8bb19fea01bf1a712df2d1c473e2061a9385dd37fa196273cc816f1 | gsakkas/rite | 20060316-19:34:40-21991f746ce1d63c2b7ecd57ca2fccea.seminal.ml | exception Unimplemented
type exp = Int of int
| Var of string
| Plus of exp * exp
| Times of exp * exp
type stmt = Skip
| Assign of string * exp
| Seq of stmt * stmt
| If of exp * stmt * stmt
| While of exp * stmt
| Saveheap... | null | https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/features/data/seminal/20060316-19%3A34%3A40-21991f746ce1d63c2b7ecd57ca2fccea.seminal.ml | ocaml |
################################
#######################################################################################################################
** Function Tests ** | exception Unimplemented
type exp = Int of int
| Var of string
| Plus of exp * exp
| Times of exp * exp
type stmt = Skip
| Assign of string * exp
| Seq of stmt * stmt
| If of exp * stmt * stmt
| While of exp * stmt
| Saveheap... |
04f1b2e19f00bfbbd35884e068f60de689582631018ff2a409996258405b586e | B-Lang-org/bsc | GenBin.hs | # LANGUAGE FlexibleInstances #
# OPTIONS_GHC -Werror -fwarn - incomplete - patterns #
module GenBin(genBinFile, readBinFile) where
import Control.Monad(when)
import Position
import Pragma
import Error(internalError, ErrMsg(..), ErrorHandle, bsError)
import ISyntax
import ISyntaxUtil(icUndet)
import CSyntax
import Unde... | null | https://raw.githubusercontent.com/B-Lang-org/bsc/93be312c41ad82edb0a004dadb7fbf231bb4de4d/src/comp/GenBin.hs | haskell | .bo file tag -- change this whenever the .bo format changes
See also GenABin.header
----------
----------
Bin CFixity
----------
Bin CDefn
----------
----------
Bin CInternalSummand
----------
Bin COriginalSummand
----------
----------
----------
----------
----------
----------
----------
Here we u... | # LANGUAGE FlexibleInstances #
# OPTIONS_GHC -Werror -fwarn - incomplete - patterns #
module GenBin(genBinFile, readBinFile) where
import Control.Monad(when)
import Position
import Pragma
import Error(internalError, ErrMsg(..), ErrorHandle, bsError)
import ISyntax
import ISyntaxUtil(icUndet)
import CSyntax
import Unde... |
6710752edefc8dd8b057e68279e7372cf045f4fc90b395449012b41e098cec99 | GaloisInc/cbmc-reporter | Report.hs | # LANGUAGE NamedFieldPuns #
{-# LANGUAGE BangPatterns #-}
# LANGUAGE GeneralizedNewtypeDeriving #
-- TODO:
-- XXX on error in thread, kill everything.
-- XXX prove each assertion only once?
Dependence on timeout . Not clear how to remove it , since does n't
-- have a good mechanism to guarantee killing an extern... | null | https://raw.githubusercontent.com/GaloisInc/cbmc-reporter/09e2563ed177aa291e62abc6470379265714b9af/src/Report.hs | haskell | # LANGUAGE BangPatterns #
TODO:
XXX on error in thread, kill everything.
XXX prove each assertion only once?
have a good mechanism to guarantee killing an external process.
function: It's location, did it succeed or fail. Filepaths must be relative
to the curent directory.
import Text.Show.Pretty
import Debug.Tr... | # LANGUAGE NamedFieldPuns #
# LANGUAGE GeneralizedNewtypeDeriving #
Dependence on timeout . Not clear how to remove it , since does n't
| Parses the ( standard ) output CBMC and prints to standard out for each
module Main
where
import ParseXML
import CmdLine
import ParseSrcs
import Prelude hiding (init)
... |
650591da8310fc01978d1df7e48898e2fcf6a1642971f98b2935e93c35fe8a99 | camlp5/camlp5 | plexer.ml | (* camlp5r *)
(* plexer.ml,v *)
Copyright ( c ) INRIA 2007 - 2017
#load "pa_lexer.cmo";
open Versdep;
value simplest_raw_strings = ref False ;
value no_quotations = ref False;
value error_on_unknown_keywords = ref False;
value dollar_for_antiquotation = ref True;
value specific_space_dot = ref False;
value force... | null | https://raw.githubusercontent.com/camlp5/camlp5/9e8155f8ae5a584bbb4ad96d10d6fec63ed8204c/lib/plexer.ml | ocaml | camlp5r
plexer.ml,v
let hex_float_literal =
'0' ['x' 'X']
['0'-'9' 'A'-'F' 'a'-'f'] ['0'-'9' 'A'-'F' 'a'-'f' '_']*
('.' ['0'-'9' 'A'-'F' 'a'-'f' '_']* )?
(['p' 'P'] ['+' '-']? ['0'-'9'] ['0'-'9' '_']* )?
let literal_modifier = ['G'-'Z' 'g'-'z']
let hex_float_literal =
'0' ['x' 'X']
['0'-'9' 'A'-'F' 'a... | Copyright ( c ) INRIA 2007 - 2017
#load "pa_lexer.cmo";
open Versdep;
value simplest_raw_strings = ref False ;
value no_quotations = ref False;
value error_on_unknown_keywords = ref False;
value dollar_for_antiquotation = ref True;
value specific_space_dot = ref False;
value force_antiquot_loc = ref False;
type... |
213a71ab95b50d90c34bd91b3ee213b9d824293fef9d1f4de811f5879cce142c | typedclojure/typedclojure | recur_non_seq_rest.clj | (ns clojure.core.typed.test.fail.recur-non-seq-rest
(:require [typed.clojure :as t]))
(t/ann recur-args-fail [t/Num * -> t/Any])
(defn recur-args-fail [& args]
(recur [1 2 3]))
| null | https://raw.githubusercontent.com/typedclojure/typedclojure/5fd7cdf7941c6e7d1dd5df88bf44474fa35e1fca/typed/clj.checker/test/clojure/core/typed/test/fail/recur_non_seq_rest.clj | clojure | (ns clojure.core.typed.test.fail.recur-non-seq-rest
(:require [typed.clojure :as t]))
(t/ann recur-args-fail [t/Num * -> t/Any])
(defn recur-args-fail [& args]
(recur [1 2 3]))
| |
55ceb526232ec9a4f50fcd8da23751e83992ac9a5e711c24c9b62c0aee68ddfd | ksrky/Plato | Core.hs | module Plato.Syntax.Core where
import Plato.Types.Name
----------------------------------------------------------------
-- Syntax
----------------------------------------------------------------
data Term
= TmVar Int Int
| TmApp Term Term
| TmAbs Name Ty Term
| TmTApp Term Ty
|... | null | https://raw.githubusercontent.com/ksrky/Plato/02b1a043efa92cf2093ff7d721a607d8abe9d876/src/Plato/Syntax/Core.hs | haskell | --------------------------------------------------------------
Syntax
-------------------------------------------------------------- | module Plato.Syntax.Core where
import Plato.Types.Name
data Term
= TmVar Int Int
| TmApp Term Term
| TmAbs Name Ty Term
| TmTApp Term Ty
| TmTAbs Name Term
| TmLet Name Term Term
| TmFix Term
| TmFold Ty
| TmUnfold Ty
| TmProj Term Name
... |
839c81200999da7c209e45724e9318bb68c6163f3cceb30aa765bd8c3fa9dc0c | kuchma19/hi | Action.hs | # LANGUAGE BlockArguments #
module HW3.Action where
import Control.Exception.Base (Exception)
import Data.Set (Set)
import GHC.Base (ap, liftM)
data HiPermission =
AllowRead
| AllowWrite
| AllowTime
deriving (Eq, Show, Ord, Enum, Bounded)
newtype PermissionException = PermissionRequired HiPermission
der... | null | https://raw.githubusercontent.com/kuchma19/hi/7d4d06acbd73deb625c48a91de269bebe9c2a3fb/hw3/src/HW3/Action.hs | haskell | # LANGUAGE BlockArguments #
module HW3.Action where
import Control.Exception.Base (Exception)
import Data.Set (Set)
import GHC.Base (ap, liftM)
data HiPermission =
AllowRead
| AllowWrite
| AllowTime
deriving (Eq, Show, Ord, Enum, Bounded)
newtype PermissionException = PermissionRequired HiPermission
der... | |
25a6220a5546347a86ebd66b57beaffded5857c02c94142c30cdf8a5733658ae | fractalide/fractalide | clone.rkt | #lang racket/base
(require fractalide/modules/rkt/rkt-fbp/agent)
(define-agent
#:input '("in") ; in port
#:output-array '("out") ; out array port
(let* ([msg (recv (input "in"))])
(for ([(k v) (output-array "out")])
(send v msg))))
| null | https://raw.githubusercontent.com/fractalide/fractalide/9c54ec2615fcc2a1f3363292d4eed2a0fcb9c3a5/modules/rkt/rkt-fbp/agents/clone.rkt | racket | in port
out array port | #lang racket/base
(require fractalide/modules/rkt/rkt-fbp/agent)
(define-agent
(let* ([msg (recv (input "in"))])
(for ([(k v) (output-array "out")])
(send v msg))))
|
bf265a634a6e7b030474cc3bc1df2668eb2e3eb6154a6146571ea21bce6f2cc5 | akmontoya/MEMORE | memore_V2.1.sps | * Encoding: UTF-8.
/* MEMORE for SPSS Version 2.1*/.
/* Copyright 2019 */.
/* by Amanda Kay Montoya */.
/* akmontoya.com*/.
/* Documentation available online at akmontoya.com */.
/* or by email to */.
preserve.
set printback=off.
/* Permission is hereby granted, free of charge, to any person obtaining a copy of t... | null | https://raw.githubusercontent.com/akmontoya/MEMORE/baf3fd7ea1f5f68c883dcf5a66815b6927cb7f65/memore_V2.1.sps | scheme | 3 } .
-1,1/2}.
-1 } .
-1 } .
MAKE(last/3 , 1 , modmeans(1,i)+modsds(1,i ) ) } .
MAKE(last/5 , 1 , pctnum(5,i ) ) } .
(-1*bquad - sqrt(bquad**2 - 4*cquad*aquad))/(2*aquad)}.
mnamemat} /title = "Variables: " /rnames = varrlabs /format = a8.
wnamemat} /title = "Variables: " /rnames = varrlabs /format = a8.
... | * Encoding: UTF-8.
/* MEMORE for SPSS Version 2.1*/.
/* Copyright 2019 */.
/* by Amanda Kay Montoya */.
/* akmontoya.com*/.
/* Documentation available online at akmontoya.com */.
/* or by email to */.
preserve.
set printback=off.
/* Permission is hereby granted, free of charge, to any person obtaining a copy of t... |
5f881dc7d2cfe141390a4c2806cc881a31afbbf427dc54bb204500ced454a8e9 | nkaretnikov/OOHaskell | Heterogeneous.hs |
( C ) 2004 - 2005 , Oleg Kiselyov &
's overlooked object system
module Heterogeneous where
import Shape
import Circle
import Rectangle
class ScribbleLoop l
where
scribbleLoop :: l -> IO ()
instance ScribbleLoop ()
where
scribbleLoop _ = return ()
instance (Shape h, ScribbleLoop t) => ScribbleLoo... | null | https://raw.githubusercontent.com/nkaretnikov/OOHaskell/ddf42cfa62f8bd27643ff6db136dec6c14466232/repository/shapes/Haskell/Shapes7/Heterogeneous.hs | haskell | Handle the shapes polymorphically
Handle rectangle-specific instance |
( C ) 2004 - 2005 , Oleg Kiselyov &
's overlooked object system
module Heterogeneous where
import Shape
import Circle
import Rectangle
class ScribbleLoop l
where
scribbleLoop :: l -> IO ()
instance ScribbleLoop ()
where
scribbleLoop _ = return ()
instance (Shape h, ScribbleLoop t) => ScribbleLoo... |
4851fc4f513d836e0eee3f194b6443d8e821e3d161962b76a3d0edf7f11d88e8 | ocaml-omake/omake | lm_thread.mli | open Lm_thread_sig
module Mutex : MutexSig
module Condition : ConditionSig with type mutex = Mutex.t
module Thread : ThreadSig
module State : StateSig
val debug_lock : bool ref
module Synchronize : sig
val synchronize : ('a -> 'b) -> 'a -> 'b
end
| null | https://raw.githubusercontent.com/ocaml-omake/omake/08b2a83fb558f6eb6847566cbe1a562230da2b14/src/libmojave/lm_thread.mli | ocaml | open Lm_thread_sig
module Mutex : MutexSig
module Condition : ConditionSig with type mutex = Mutex.t
module Thread : ThreadSig
module State : StateSig
val debug_lock : bool ref
module Synchronize : sig
val synchronize : ('a -> 'b) -> 'a -> 'b
end
| |
28c64a80c313caed43b3f431ef2c5d2b503630c7b3419d43264de90eaca180f0 | dmiller/clr.core.logic | logic.clj | Copyright ( c ) , , contributors . 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 software in any fashion, you are agreeing... | null | https://raw.githubusercontent.com/dmiller/clr.core.logic/385e105b887e769ea934fcd127e7f520c0e101dd/src/main/clojure/clojure/core/logic.clj | clojure | 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 software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) , , contributors . All rights reserved .
(ns clojure.core.logic
(:refer-clojure :exclude [==])
(:use [clojure.core.logic.protocols])
(:require [clojure.set :as set]
[clojure.string :as string])
[clojure.core.logic.protocols
IBindable ITreeTerm IVar ITree... |
02d549c9d970095451460f0a372b34262ad052caf2f53b22f4b69296c2b766c6 | UChicago-PL/smyth | uneval.mli | * Live bidirectional example checking via live unevaluation , as defined in
{ b Figure 6 } of the ICFP 2020 paper .
{b Figure 6} of the ICFP 2020 paper. *)
open Lang
val minimal_uneval : bool ref
(** Whether or not unevaluation should proceed in the "minimal" mode.
Minimal mode uses {e U-Case-Guess} and... | null | https://raw.githubusercontent.com/UChicago-PL/smyth/08fea281f70d3ee604fde9dde140c8a570d6905d/lib/smyth/uneval.mli | ocaml | * Whether or not unevaluation should proceed in the "minimal" mode.
Minimal mode uses {e U-Case-Guess} and not {e U-Case};
non-minimal mode does the opposite.
* Live bidirectional example checking.
* Live unevaluation. | * Live bidirectional example checking via live unevaluation , as defined in
{ b Figure 6 } of the ICFP 2020 paper .
{b Figure 6} of the ICFP 2020 paper. *)
open Lang
val minimal_uneval : bool ref
val check :
hole_ctx
-> datatype_ctx
-> hole_filling
-> exp
-> worlds
-> constraints Nond... |
0f725fcf59608b39e4ade11fc2ab8cbe1024c402f4ca92d9130aea56f54f7f8e | sulami/spielwiese | example.hs | module Main where
import Light
asciiLight :: Int -> Char
asciiLight n = " .:-=+*#" !! (n `mod` 8)
printGrid :: Grid -> IO ()
printGrid [] = return ()
printGrid (x:xs) = do putStrLn $ map (asciiLight . snd) x
printGrid xs
main = do let grid = [ [ ((x,y),0) | x <- [0..10] ] | y <- [0..10] ]
... | null | https://raw.githubusercontent.com/sulami/spielwiese/da354aa112d43d7ec5f258f4b5afafd7a88c8aa8/hLight/example.hs | haskell | module Main where
import Light
asciiLight :: Int -> Char
asciiLight n = " .:-=+*#" !! (n `mod` 8)
printGrid :: Grid -> IO ()
printGrid [] = return ()
printGrid (x:xs) = do putStrLn $ map (asciiLight . snd) x
printGrid xs
main = do let grid = [ [ ((x,y),0) | x <- [0..10] ] | y <- [0..10] ]
... | |
9e1c54e06eed51b7739b0f02baf242e2bc768be75d078e84c43e0d7048bd8cd0 | mvaldesdeleon/haskell-book | bench1.hs | module Main where
import Criterion.Main
infixl 9 !?
_ !? n
| n < 0 = Nothing
[] !? _ = Nothing
(x:_) !? 0 = Just x
(_:xs) !? n = xs !? (n - 1)
myList :: [Int]
myList = [1 .. 9999]
main :: IO ()
main =
defaultMain
[ bench "index list 9999" $ whnf (myList !!) 9998
, bench "index list maybe inde... | null | https://raw.githubusercontent.com/mvaldesdeleon/haskell-book/ee4a70708041686abe2f1d951185786119470eb4/ch28/bench1.hs | haskell | module Main where
import Criterion.Main
infixl 9 !?
_ !? n
| n < 0 = Nothing
[] !? _ = Nothing
(x:_) !? 0 = Just x
(_:xs) !? n = xs !? (n - 1)
myList :: [Int]
myList = [1 .. 9999]
main :: IO ()
main =
defaultMain
[ bench "index list 9999" $ whnf (myList !!) 9998
, bench "index list maybe inde... | |
38f91e8cdcb59c494a8beac98ec2871aedb349f09367b1832d4a8a6c4f5571ba | well-typed-lightbulbs/ocaml-esp32 | exn_raise.ml | (* TEST
* arch_power
** native
*** ocamlopt.byte
ocamlopt_flags = "-flarge-toc"
**** run
*)
GPR#8506
This is n't guaranteed to fail even without the fix from # 8506 , because
the @ha relocation on the TOC entry for the exception handler 's address
might be zero , in which case the linker op... | null | https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/testsuite/tests/arch-power/exn_raise.ml | ocaml | TEST
* arch_power
** native
*** ocamlopt.byte
ocamlopt_flags = "-flarge-toc"
**** run
|
GPR#8506
This is n't guaranteed to fail even without the fix from # 8506 , because
the @ha relocation on the TOC entry for the exception handler 's address
might be zero , in which case the linker optimises the code sequence to one
that will not fail .
This isn't guaranteed to fail even wi... |
e700721f796b6c15fb75060497d4c5abc50a55d73b52a2b536b903a095185563 | ccin2p3/samplerr | fatrpm.clj | (ns leiningen.fatrpm
(:refer-clojure :exclude [replace])
(:use [clojure.java.shell :only [sh]]
[clojure.java.io :only [file delete-file writer copy]]
[clojure.string :only [join capitalize trim-newline replace]]
[leiningen.uberjar :only [uberjar]]
[leiningen.tar :only [md5]])
(:imp... | null | https://raw.githubusercontent.com/ccin2p3/samplerr/84c16a5a551574475b06d30b389fddcba7bd91b6/tasks/leiningen/fatrpm.clj | clojure | Jar
Move
MD5 | (ns leiningen.fatrpm
(:refer-clojure :exclude [replace])
(:use [clojure.java.shell :only [sh]]
[clojure.java.io :only [file delete-file writer copy]]
[clojure.string :only [join capitalize trim-newline replace]]
[leiningen.uberjar :only [uberjar]]
[leiningen.tar :only [md5]])
(:imp... |
0d22d19f7462f87811cc2000f7457964ce57507df7a1f512f8234f3c674cc01e | dmitryvk/sbcl-win32-threads | backend-parms.lisp | that part of the parms.lisp file from original CMU CL which is defined in
terms of the BACKEND structure
;;;;
FIXME : When we break up the BACKEND structure , this might be mergeable
;;;; back into the parms.lisp file.
This software is part of the SBCL system . See the README file for
;;;; more information.
;;... | null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/src/compiler/x86/backend-parms.lisp | lisp |
back into the parms.lisp file.
more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
compiler constants
general have our C runtime code running to ask, so instead we set
Actually any informati... | that part of the parms.lisp file from original CMU CL which is defined in
terms of the BACKEND structure
FIXME : When we break up the BACKEND structure , this might be mergeable
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
wr... |
ecfd40e8e732b52682fe7191756b8484719c32c494ffd7638bfd2999ca0a0c3f | ghc/ghc | TestSettings.hs | -- | We create a file <root>/test/ghcconfig containing configuration of test
-- | compiler. We need to search this file for required keys and setting
| required for testsuite e.g. WORDSIZE , HOSTOS etc .
module Oracles.TestSettings
( TestSetting (..), testSetting, testRTSSettings
, getCompilerPath, getBinaryDire... | null | https://raw.githubusercontent.com/ghc/ghc/be9dd9b03479070ba6387c251541f4569392c4bb/hadrian/src/Oracles/TestSettings.hs | haskell | | We create a file <root>/test/ghcconfig containing configuration of test
| compiler. We need to search this file for required keys and setting
| Lookup a test setting in @ghcconfig@ file.
| To obtain RTS ways supported in @ghcconfig@ file, use 'testRTSSettings'.
| Get the RTS ways of the test compiler
| Director... | | required for testsuite e.g. WORDSIZE , HOSTOS etc .
module Oracles.TestSettings
( TestSetting (..), testSetting, testRTSSettings
, getCompilerPath, getBinaryDirectory, isInTreeCompiler
, stageOfTestCompiler
) where
import Base
import Hadrian.Oracles.TextFile
import Oracles.Setting (topDirectory, setting, ... |
5fdcf9ddafee060853ac0a9b9315d54274d9f164d59cadb28c001f6f7904eb02 | racket/racket-pkg-website | static.rkt | #lang racket/base
(provide rendering-static-page?
static-render!
static-put-file!
static-delete-file!
static-finish-update!
extra-files-paths)
(require racket/match)
(require racket/system)
(require racket/path)
(require racket/port)
(require racket/promise)
(require racke... | null | https://raw.githubusercontent.com/racket/racket-pkg-website/b3832655eebd8c0dac2e4ca058f5d4abaaeea431/src/static.rkt | racket |
Config
Either 'aws-s3 or 'file
Must end in "/"
Relevant to static-output-type 'file only
Relevant to static-output-type 'file only
Static rendering daemon -- Interface
Not found -> delete the file
Static rendering daemon -- Implementation
---------------------------------------- 'file
-----------------------... | #lang racket/base
(provide rendering-static-page?
static-render!
static-put-file!
static-delete-file!
static-finish-update!
extra-files-paths)
(require racket/match)
(require racket/system)
(require racket/path)
(require racket/port)
(require racket/promise)
(require racke... |
e01c2f30140f1e0b94d071770ecefd62f6bbf15f56986a507cc70792d7c7b180 | gdevanla/haskell-lox | main1.hs | # LANGUAGE NoImplicitPrelude #
# LANGUAGE TemplateHaskell #
import Import
import System.Environment
import System.IO (print)
import Run
import RIO.Process
import Options.Applicative.Simple
import qualified Paths_haskell_lox
import Data.Char
import FunctionsAndTypesForParsing (parseWithEof, parseWithLeftOver, regularPa... | null | https://raw.githubusercontent.com/gdevanla/haskell-lox/43fe7155b50a5f4eaaad75e7cb4e6e5aed58701f/app/main1.hs | haskell | # LANGUAGE NoImplicitPrelude #
# LANGUAGE TemplateHaskell #
import Import
import System.Environment
import System.IO (print)
import Run
import RIO.Process
import Options.Applicative.Simple
import qualified Paths_haskell_lox
import Data.Char
import FunctionsAndTypesForParsing (parseWithEof, parseWithLeftOver, regularPa... | |
82d21e46755886bba0b504e1a8c326a13593dca36610250a488271c17db12b94 | jimrthy/frereth | development_preload.cljs | (ns tracker.development-preload
(:require
[com.fulcrologic.fulcro.algorithms.timbre-support :as ts]
[taoensso.timbre :as log]))
(js/console.log "Turning logging to :debug (in app.development-preload)")
(log/set-level! :debug)
(log/merge-config! {:output-fn ts/prefix-output-fn
:appenders {... | null | https://raw.githubusercontent.com/jimrthy/frereth/e1c4a5c031355ff1ff3bb60741eb03dff2377e1d/apps/racing/sonic-forces/tracker/src/main/tracker/development_preload.cljs | clojure | (ns tracker.development-preload
(:require
[com.fulcrologic.fulcro.algorithms.timbre-support :as ts]
[taoensso.timbre :as log]))
(js/console.log "Turning logging to :debug (in app.development-preload)")
(log/set-level! :debug)
(log/merge-config! {:output-fn ts/prefix-output-fn
:appenders {... | |
1b0dbfdb59f1058c299406b3110bc96ea256d27b165dbdc82834bc1cbb2f328b | geophf/1HaskellADay | Solution.hs | module Y2018.M04.D25.Solution where
-
Today is a fun little number theory diversion brought to you by @fermatslibrary
The last digit of any integer n^5 is n itself
Proof :
Neat .
Proof this for the first 100 Integers :
-
Today is a fun little number theory diversion brought to you by @fermatslibra... | null | https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2018/M04/D25/Solution.hs | haskell | }
}
} | module Y2018.M04.D25.Solution where
-
Today is a fun little number theory diversion brought to you by @fermatslibrary
The last digit of any integer n^5 is n itself
Proof :
Neat .
Proof this for the first 100 Integers :
-
Today is a fun little number theory diversion brought to you by @fermatslibra... |
dedb17003fffe43d35dc2ae47f4f428064634471ad827934e3fa5fe4ce737e39 | yzh44yzh/erma | relations_tests.erl | -module(relations_tests).
-include("erma.hrl").
-include_lib("eunit/include/eunit.hrl").
relations_test_() ->
test_utils:generate(
[{
%%
{select, ["email.email", "address.state", "account.name"], "user",
[{joins, [{left, "email"},
{left, <<"address">>},
... | null | https://raw.githubusercontent.com/yzh44yzh/erma/454f127fcf6df0407de2f357f40a1d57f016d694/test/relations_tests.erl | erlang | -module(relations_tests).
-include("erma.hrl").
-include_lib("eunit/include/eunit.hrl").
relations_test_() ->
test_utils:generate(
[{
{select, ["email.email", "address.state", "account.name"], "user",
[{joins, [{left, "email"},
{left, <<"address">>},
... | |
bc700a4d64a0cade0a5faf1f1af89e00fa86108107a6787c6478062bf6815c7b | TrustInSoft/tis-interpreter | Lang.ml | Modified by TrustInSoft
(**************************************************************************)
(* *)
This file is part of WP plug - in of Frama - C.
(* ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/wp/Lang.ml | ocaml | ************************************************************************
alternatives)
... | Modified by TrustInSoft
This file is part of WP plug - in of Frama - C.
Copyright ( C ) 2007 - 2015
CEA ( Commissariat a l'energie atomique et aux energies
Lesser General Public License as published by the Free Soft... |
285629fc91134b00bd0ec765f94d3572afac9119a4dff6fc02903129c8ffd98a | commsor/titanoboa | ext-dependencies.clj | ;;NOTE: this is a sample used for demonstration and testing purposes
{:coordinates [[nil]]
:require [[nil]]
:import [[nil]]
:repositories {"central" "/"
"clojars" ""}} | null | https://raw.githubusercontent.com/commsor/titanoboa/ffe3e1e58f89169092d7b6a3a45e1707a0ecc9ee/resources/ext-dependencies.clj | clojure | NOTE: this is a sample used for demonstration and testing purposes | {:coordinates [[nil]]
:require [[nil]]
:import [[nil]]
:repositories {"central" "/"
"clojars" ""}} |
0a3713e3c5165695217266ed659e57942cd56e21dfa10a1c8e565c71c29a5d49 | hspec/hspec-expectations | ExpectationsSpec.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE FlexibleContexts #
module Test.Hspec.ExpectationsSpec (spec) where
import Control.Exception
import Test.HUnit.Lang
import Test.Hspec (Spec, describe, it)
import Test.Hspec.Expectations hiding (HasCallStack)
import Data.CallS... | null | https://raw.githubusercontent.com/hspec/hspec-expectations/55f00d0fd98421cf67c4726e8272ec1d33f2c6f2/test/Test/Hspec/ExpectationsSpec.hs | haskell | # LANGUAGE ConstraintKinds # | # LANGUAGE FlexibleContexts #
module Test.Hspec.ExpectationsSpec (spec) where
import Control.Exception
import Test.HUnit.Lang
import Test.Hspec (Spec, describe, it)
import Test.Hspec.Expectations hiding (HasCallStack)
import Data.CallStack
expectationFailed :: HasCal... |
67460399aa32fb64bed3ed82281f39f2ec8d2b0e5981d98fd3bd0ec72dd1d8f1 | ijvcms/chuanqi_dev | active_lib.erl | %%%-------------------------------------------------------------------
@author yubing
( C ) 2016 , < COMPANY >
%%% @doc 开服活动信息
%%%
%%% @end
Created : 23 . 二月 2016 18:06
%%%-------------------------------------------------------------------
-module(active_lib).
-include("common.hrl").
-include("record.hrl").
-in... | null | https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/business/active/active_lib.erl | erlang | -------------------------------------------------------------------
@doc 开服活动信息
@end
-------------------------------------------------------------------
----------------------------------------------------------------------------
对外接口
----------------------------------------------------------------------------
初... | @author yubing
( C ) 2016 , < COMPANY >
Created : 23 . 二月 2016 18:06
-module(active_lib).
-include("common.hrl").
-include("record.hrl").
-include("config.hrl").
-include("cache.hrl").
-include("db_record.hrl").
-include("proto.hrl").
-include("language_config.hrl").
-include("log_type_config.hrl").
-include("b... |
99ff6ea014a11293b64bd782b9db8e719eea5a0608701786ae18b1e273561be6 | FundingCircle/DaD | medley.clj | (ns dad.medley
(:require [clojure.set :as set :refer [union]]
[clojure.string :refer [lower-case]]))
(set! *warn-on-reflection* true)
(def case-insensitive-sorted-map
"Be careful when using this! If any keys are the same except for casing, one will be lost."
(sorted-map-by (fn [a b] (compare (lower-... | null | https://raw.githubusercontent.com/FundingCircle/DaD/ec41633cf991392ff63ec4251ba900a84264eead/src/dad/medley.clj | clojure | (ns dad.medley
(:require [clojure.set :as set :refer [union]]
[clojure.string :refer [lower-case]]))
(set! *warn-on-reflection* true)
(def case-insensitive-sorted-map
"Be careful when using this! If any keys are the same except for casing, one will be lost."
(sorted-map-by (fn [a b] (compare (lower-... | |
9b3a6625dcc0163f021bccfc312f604afe085d4d9ee55c40749d7ce8248668cd | plewto/Cadejo | lfo_amp_panel.clj | (ns cadejo.instruments.algo.editor.lfo-amp-panel
(:use [cadejo.instruments.algo.algo-constants])
(:require [cadejo.util.math :as math])
(:require [cadejo.ui.util.lnf :as lnf])
(:require [cadejo.ui.util.sgwr-factory :as sfactory])
(:require [sgwr.components.line :as line])
(:require [sgwr.components.text :a... | null | https://raw.githubusercontent.com/plewto/Cadejo/2a98610ce1f5fe01dce5f28d986a38c86677fd67/src/cadejo/instruments/algo/editor/lfo_amp_panel.clj | clojure | rules | (ns cadejo.instruments.algo.editor.lfo-amp-panel
(:use [cadejo.instruments.algo.algo-constants])
(:require [cadejo.util.math :as math])
(:require [cadejo.ui.util.lnf :as lnf])
(:require [cadejo.ui.util.sgwr-factory :as sfactory])
(:require [sgwr.components.line :as line])
(:require [sgwr.components.text :a... |
0cbc95661366929fdb58a57620f1e9afae0cd1526dde85d9ecc90f99dc2d25d4 | racehub/om-bootstrap | input.cljs | (ns om-bootstrap.input
(:require [clojure.string :as string]
[om.core :as om]
[om-bootstrap.types :as t]
[om-bootstrap.util :as u]
[om-tools.dom :as d :include-macros true]
[schema.core :as s :include-macros true]))
# # Bootstrap Inputs for Om
;;
;; The f... | null | https://raw.githubusercontent.com/racehub/om-bootstrap/18fb7f67c306d208bcb012a1b765ac1641d7a00b/src/om_bootstrap/input.cljs | clojure |
The following fields come from converting:
-bootstrap/react-bootstrap/blob/master/src/Input.jsx
inputs.
-bootstrap/react-bootstrap
QUESTION: Do we need the :key field here? :ref makes sense, not
sure about :key.
of a specific key?
you'll get back a class string that
These bad dawgs need to be abstracted... | (ns om-bootstrap.input
(:require [clojure.string :as string]
[om.core :as om]
[om-bootstrap.types :as t]
[om-bootstrap.util :as u]
[om-tools.dom :as d :include-macros true]
[schema.core :as s :include-macros true]))
# # Bootstrap Inputs for Om
React Bo... |
43772681e53f0b31ec5a59c21f544230fafa943d977e9fecd63070d4e1c9934a | jbracker/supermonad | ScopeLevel.hs | # LANGUAGE RebindableSyntax #
{-# OPTIONS_GHC -fplugin Control.Supermonad.Plugin #-}
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* H M T C ... | null | https://raw.githubusercontent.com/jbracker/supermonad/2595396a225a65b1dce6ed9a1ce59960f392a55b/examples/monad/hmtc/supermonad/ScopeLevel.hs | haskell | # OPTIONS_GHC -fplugin Control.Supermonad.Plugin #
| ScopeLevel: Definition of and operation on scope level
Scope level
:: Int
:: ScopeLvl
:: ScopeLvl -> Int
:: ScopeLvl -> Int
:: ScopeLvl -> ScopeLvl
:: ScopeLvl -> ScopeLvl
----------------------------------------------------------------------------
Scope lev... | # LANGUAGE RebindableSyntax #
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* H M T C *
* ... |
0b0e737b1afaee9d3024d2eed731d6f0e48ae702a59dd361ed78b3e52f8747d8 | peerdrive/peerdrive | peerdrive_worker_sup.erl | PeerDrive
Copyright ( C ) 2011 < jan DOT kloetzke AT freenet DOT de >
%%
%% This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
%% (at your option) any la... | null | https://raw.githubusercontent.com/peerdrive/peerdrive/94389e2536cc9b1a0c168ec56ba3912910eb0c35/server/apps/peerdrive/src/peerdrive_worker_sup.erl | erlang |
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public... | PeerDrive
Copyright ( C ) 2011 < jan DOT kloetzke AT freenet DOT de >
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
-module(peerdrive_worker_sup).
-... |
effb273243fb6177f0ab6f9c6df680b295beef8d31b3db2959c940a0a1e79dcc | 2600hz-archive/whistle | rebar_core.erl | -*- erlang - indent - level : 4;indent - tabs - mode : nil -*-
%% ex: ts=4 sw=4 et
%% -------------------------------------------------------------------
%%
rebar : Erlang Build Tools
%%
Copyright ( c ) 2009 ( )
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%% of this softw... | null | https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/utils/rebar/src/rebar_core.erl | erlang | ex: ts=4 sw=4 et
-------------------------------------------------------------------
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
to use, copy, modify, merge, publish, distribute, sublicense, and/or sel... | -*- erlang - indent - level : 4;indent - tabs - mode : nil -*-
rebar : Erlang Build Tools
Copyright ( c ) 2009 ( )
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit persons to whom the Software is
all copies or substantial portions of the... |
5ac8d8ac54ee39c7bd95ab9c9c8118f3d25b23f293e5ff55741a4d93e366517f | thosmos/riverdb | model.cljc | (ns riverdb.model
(:require
[riverdb.model.person :as person]
[com.fulcrologic.rad.attributes :as attr]))
(def all-attributes (vec (concat
person/attributes)))
(def all-attribute-validator (attr/make-attribute-validator all-attributes)) | null | https://raw.githubusercontent.com/thosmos/riverdb/b47f01a938da26298ee7924c8b2b3a2be5371927/src/rad/riverdb/model.cljc | clojure | (ns riverdb.model
(:require
[riverdb.model.person :as person]
[com.fulcrologic.rad.attributes :as attr]))
(def all-attributes (vec (concat
person/attributes)))
(def all-attribute-validator (attr/make-attribute-validator all-attributes)) | |
4951af095e4a2566de4cdc6aa6970d8c932c64ceb78ba10a9b2547b564b29c7c | herd/herdtools7 | alpha.ml | (****************************************************************************)
(* the diy toolsuite *)
(* *)
, University College London , UK .
, INRIA Par... | null | https://raw.githubusercontent.com/herd/herdtools7/3e2e3e3680887cbf27e78810326ecb877d0faf1f/tools/alpha.ml | ocaml | **************************************************************************
the diy toolsuite
en Automatique and ... | , University College London , UK .
, INRIA Paris - Rocquencourt , France .
Copyright 2010 - present Institut National de Recherche en Informatique et
This software is governed by the CeCILL - B license under French law and
modify and/ or redistribu... |
e63c2eb0e49287cb37d534933422e0825834c1bd0dabe7916d98903a15087975 | smucclaw/dsl | Parser.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE DerivingStrategies #
# LANGUAGE DeriveFunctor #
# LANGUAGE StandaloneDeriving #
# OPTIONS_GHC -Wno - orphans #
|
Abstract parser functions that help build other parsers .
This module imports Control . Monad . Combinators . which is the basis for the BoolStruct family... | null | https://raw.githubusercontent.com/smucclaw/dsl/4849bbf12418817e8ca30ddf64c1fc563ffe945d/lib/haskell/natural4/src/LS/Parser.hs | haskell | # LANGUAGE OverloadedStrings #
[TODO]: consider upgrading anyall's Item a to be a Label [TL.Text] rather than Label TL.Text
, [ Prefix labelPrefix]
SetPlus is an Or
| Extracts leaf labels and combine 'All's into a single 'All'
local (\rc -> rc { debug = True }) $
post part
debugName "withPreOnly" $ do
suppose ... | # LANGUAGE DerivingStrategies #
# LANGUAGE DeriveFunctor #
# LANGUAGE StandaloneDeriving #
# OPTIONS_GHC -Wno - orphans #
|
Abstract parser functions that help build other parsers .
This module imports Control . Monad . Combinators . which is the basis for the BoolStruct family of parsers .
Abstract parser fu... |
d7e884e45f037c0b75d8dfb4ef99a1987e648e50d1f50ad502072cd83e4975d4 | tsloughter/kuberl | kuberl_v1_api_group_list.erl | -module(kuberl_v1_api_group_list).
-export([encode/1]).
-export_type([kuberl_v1_api_group_list/0]).
-type kuberl_v1_api_group_list() ::
#{ 'apiVersion' => binary(),
'groups' := list(),
'kind' => binary()
}.
encode(#{ 'apiVersion' := ApiVersion,
'groups' := Groups,
'kind' :... | null | https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v1_api_group_list.erl | erlang | -module(kuberl_v1_api_group_list).
-export([encode/1]).
-export_type([kuberl_v1_api_group_list/0]).
-type kuberl_v1_api_group_list() ::
#{ 'apiVersion' => binary(),
'groups' := list(),
'kind' => binary()
}.
encode(#{ 'apiVersion' := ApiVersion,
'groups' := Groups,
'kind' :... | |
5301f8063b91a1f529bc78f0187512cb2e41211ac124b748a3a93551c9196a73 | luminus-framework/ring-undertow-adapter | websocket.clj | (ns ring.adapter.undertow.websocket
(:refer-clojure :exclude [send])
(:require [ring.adapter.undertow.headers :refer [set-headers]])
(:import
[java.nio ByteBuffer]
[io.undertow.server HttpServerExchange]
[io.undertow.websockets
WebSocketConnectionCallback
WebSocketProtocolHandshakeHandler]
... | null | https://raw.githubusercontent.com/luminus-framework/ring-undertow-adapter/648e0c513e3a8a231ae0c7a67249e21f5b145657/src/ring/adapter/undertow/websocket.clj | clojure | (ns ring.adapter.undertow.websocket
(:refer-clojure :exclude [send])
(:require [ring.adapter.undertow.headers :refer [set-headers]])
(:import
[java.nio ByteBuffer]
[io.undertow.server HttpServerExchange]
[io.undertow.websockets
WebSocketConnectionCallback
WebSocketProtocolHandshakeHandler]
... | |
a0e382ab22253cf578b7723a5aa9406ea8f1b874fcc6972e25e9f50921b7d510 | den1k/vimsical | user.clj | (ns backend.user
(:require
[com.stuartsierra.component :as cp]
[vimsical.backend.adapters.cassandra :as cassandra]
[vimsical.backend.adapters.redis :as redis]
[vimsical.backend.components.datomic :as datomic]
[vimsical.backend.system :as sys]))
;;
;; * State
;;
(defonce system nil)
(defn drop!
([]... | null | https://raw.githubusercontent.com/den1k/vimsical/1e4a1f1297849b1121baf24bdb7a0c6ba3558954/dev/backend/user.clj | clojure |
* State
* Reloaded
* Actions
| (ns backend.user
(:require
[com.stuartsierra.component :as cp]
[vimsical.backend.adapters.cassandra :as cassandra]
[vimsical.backend.adapters.redis :as redis]
[vimsical.backend.components.datomic :as datomic]
[vimsical.backend.system :as sys]))
(defonce system nil)
(defn drop!
([] (drop! system))
... |
75ef7660fc1177836a86dbbf941aa35e74dc7244956054f9a589ab72fb34d66c | romac/lfc-haskell | Typed.hs |
module LFC.Tree.Typed
( TypedTree
, typedVar
, typedAbs
, typedApp
, getType
) where
import Control.Comonad.Cofree (Cofree(..))
import LFC.Name
import LFC.Tree
import LFC.Ty
type TypedTree = Cofree TreeF Ty
typedVar :: Ty -> Name -> TypedTree
typedVar ty name = ty :< Var name
typedAbs :: Ty -> Name ->... | null | https://raw.githubusercontent.com/romac/lfc-haskell/437f847519156cd2381e552ec2b1cac882a018e4/src/LFC/Tree/Typed.hs | haskell |
module LFC.Tree.Typed
( TypedTree
, typedVar
, typedAbs
, typedApp
, getType
) where
import Control.Comonad.Cofree (Cofree(..))
import LFC.Name
import LFC.Tree
import LFC.Ty
type TypedTree = Cofree TreeF Ty
typedVar :: Ty -> Name -> TypedTree
typedVar ty name = ty :< Var name
typedAbs :: Ty -> Name ->... | |
7ab9a2b95cb4a2b5e49fbdcb04df496e2a554abe36e1900efffcb8b2832434ca | youjinbou/gmaths | quaternion.mli | (** basic Quaternion module *)
type vector = Vec4.Float.t
type scalar = Vec4.Float.scalar
type mat4x4 = Matrix.mat4x4
type t = vector
val of_tuple : scalar * scalar * scalar * scalar -> t
val to_tuple : t -> scalar * scalar * scalar * scalar
val of_xyz : scalar * scalar * scalar -> t
val pure : t -> scalar * scalar ... | null | https://raw.githubusercontent.com/youjinbou/gmaths/1a507444071941a45b39f8c65e90c37427ea68a3/src/quaternion.mli | ocaml | * basic Quaternion module |
type vector = Vec4.Float.t
type scalar = Vec4.Float.scalar
type mat4x4 = Matrix.mat4x4
type t = vector
val of_tuple : scalar * scalar * scalar * scalar -> t
val to_tuple : t -> scalar * scalar * scalar * scalar
val of_xyz : scalar * scalar * scalar -> t
val pure : t -> scalar * scalar * scalar
val norm : t -> scalar... |
1c37921d2c6b3b0116c6d9b3d2ec06f66abdbf8d9230d1e488edc9b341bf4901 | bgusach/exercises-htdp2e | ex-186.rkt | #lang htdp/bsl
(require test-engine/racket-tests)
; Temperature is a Number greater than -273
NotEmptyTempList is one of :
; - (cons Temperature '())
- ( cons )
NotEmptyTempList - > Boolean
(check-expect (sorted>? (cons 100 '())) #true)
(check-expect (sorted>? (cons 3 (cons 1 '()))) #true)
(check-expect (... | null | https://raw.githubusercontent.com/bgusach/exercises-htdp2e/c4fd33f28fb0427862a2777a1fde8bf6432a7690/2-arbitrarily-large-data/ex-186.rkt | racket | Temperature is a Number greater than -273
- (cons Temperature '())
List-of-numbers -> List-of-numbers
produces a sorted version of l
Number List-of-numbers -> List-of-numbers
inserts n into the sorted list of numbers l
List-of-numbers -> List-of-numbers
produces a sorted version of l
Q: Can you formulate a te... | #lang htdp/bsl
(require test-engine/racket-tests)
NotEmptyTempList is one of :
- ( cons )
NotEmptyTempList - > Boolean
(check-expect (sorted>? (cons 100 '())) #true)
(check-expect (sorted>? (cons 3 (cons 1 '()))) #true)
(check-expect (sorted>? (cons 1 (cons 3 '()))) #false)
(define (sorted>? l)
(cond
... |
8143a6b38dda0c226db1167bc54a189e79d57e909ff0443d617ed398c774a25d | Raynes/refheap | core.clj | (ns noir.test.core
(:use [noir.core])
(:use [clojure.test]))
(deftest replace-me ;; FIXME: write
(is false "No tests have been written."))
| null | https://raw.githubusercontent.com/Raynes/refheap/ad85097172a6d11dd9edaa97e2f2eb6d3296e94f/test/noir/test/core.clj | clojure | FIXME: write | (ns noir.test.core
(:use [noir.core])
(:use [clojure.test]))
(is false "No tests have been written."))
|
a644e99325407df59a1311c267a195b067f46201c83fa441b4c65d372197890f | clash-lang/clash-compiler | VIndex.hs | module VIndex where
import Clash.Prelude
topEntity :: (Integer,Vec 8 (Vec 8 (Maybe Int))) -> Vec 8 (Maybe Int)
topEntity (i,as) = zipWith (!!) as (iterateI (+1) i)
| null | https://raw.githubusercontent.com/clash-lang/clash-compiler/8e461a910f2f37c900705a0847a9b533bce4d2ea/tests/shouldwork/Vector/VIndex.hs | haskell | module VIndex where
import Clash.Prelude
topEntity :: (Integer,Vec 8 (Vec 8 (Maybe Int))) -> Vec 8 (Maybe Int)
topEntity (i,as) = zipWith (!!) as (iterateI (+1) i)
| |
ca10c4c5bfe2b979e59bc69d9ee9d60d4456bd282efd4d1f03a58f4c2b2a6cdb | discus-lang/ddc | SubstituteXX.hs |
-- | Capture avoiding substitution of expressions in expressions.
--
-- If a binder would capture a variable then it is anonymized
-- to deBruijn form.
--
module DDC.Core.Transform.SubstituteXX
( SubstituteXX(..)
, substituteXX
, substituteXXs
, substituteXArg
, substituteXA... | null | https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-core/DDC/Core/Transform/SubstituteXX.hs | haskell | | Capture avoiding substitution of expressions in expressions.
If a binder would capture a variable then it is anonymized
to deBruijn form.
| Wrapper for `substituteWithX` that determines the set of free names in the
expression being substituted, and starts with an empty binder stack.
Rewrite level-1 bind... |
module DDC.Core.Transform.SubstituteXX
( SubstituteXX(..)
, substituteXX
, substituteXXs
, substituteXArg
, substituteXArgs)
where
import DDC.Core.Exp.Annot.Exp
import DDC.Core.Collect
import DDC.Core.Transform.BoundX
import DDC.Core.Transform.SubstituteWX
import DDC.Core.Transf... |
7c8aa283eeeb062deaf52a3855c1faaee8bd668ca18184a1a352277c5eddd917 | tnelson/Forge | import2.rkt | #lang forge/core
(sig C)
(sig D)
| null | https://raw.githubusercontent.com/tnelson/Forge/1687cba0ebdb598c29c51845d43c98a459d0588f/forge/example/forge-core/import2.rkt | racket | #lang forge/core
(sig C)
(sig D)
| |
9f7c23f1dcf0271cc4c4d623458fe70b85a09adc0339d4fe3bcc3f79e7dadc60 | ollef/sixty | Context.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE BlockArguments #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleContexts #
# LANGUAGE NamedFieldPuns #
# LANGUAGE OverloadedRecordDot #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PolyKinds #
# LANGUAGE TupleSections #
# LANGUAGE NoFieldSelectors #
module Elaboration.C... | null | https://raw.githubusercontent.com/ollef/sixty/5d630ca6fde91da5a691dc7cd195f5cbf6491eb0/src/Elaboration/Context.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE OverloadedStrings #
-----------------------------------------------------------------------------
Extension
TODO: Move
-----------------------------------------------------------------------------
Lookup
----------------------------------------------------------------------------... | # LANGUAGE BlockArguments #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleContexts #
# LANGUAGE NamedFieldPuns #
# LANGUAGE OverloadedRecordDot #
# LANGUAGE PolyKinds #
# LANGUAGE TupleSections #
# LANGUAGE NoFieldSelectors #
module Elaboration.Context where
import qualified Builtin
import Control.Exception.L... |
0585cce741ef2cdd2c78a1e089b147a320466e9e165ff2426c0da1df668e0758 | racket/drracket | language-object-contract.rkt | #lang racket/base
(require (for-syntax racket/base)
scribble/srcdoc
racket/class
racket/gui/base
racket/contract
"recon.rkt")
(require/doc racket/base scribble/manual)
(require (for-meta 2 racket/base))
(provide language-object-abstraction)
(define-syntax (language-object... | null | https://raw.githubusercontent.com/racket/drracket/2d7c2cded99e630a69f05fb135d1bf7543096a23/drracket/drracket/private/language-object-contract.rkt | racket | #lang racket/base
(require (for-syntax racket/base)
scribble/srcdoc
racket/class
racket/gui/base
racket/contract
"recon.rkt")
(require/doc racket/base scribble/manual)
(require (for-meta 2 racket/base))
(provide language-object-abstraction)
(define-syntax (language-object... | |
0c003fcf7294e50829bb8b597880456c5d8c8e90fe52ddbd3f8ab298479ede67 | slyrus/mcclim-old | colors.lisp | -*- Mode : Lisp ; Package : clim - extensions -*-
( c ) copyright 2006 by
( )
;;; This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation ; either
version 2 of the License ,... | null | https://raw.githubusercontent.com/slyrus/mcclim-old/354cdf73c1a4c70e619ccd7d390cb2f416b21c1a/ESA/colors.lisp | lisp | Package : clim - extensions -*-
This library is free software; you can redistribute it and/or
either
This library 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 PURPOSE. See the GNU
License along wit... |
( c ) copyright 2006 by
( )
modify it under the terms of the GNU Library General Public
version 2 of the License , or ( at your option ) any later version .
Library General Public License for more details .
You should have received a copy of the GNU Library General Public
Free Software Fou... |
155939ae882ac4b1dc1fa23b5d7d0a81fd471ac193e83706a5b7a150a9cd0d99 | change-metrics/monocle | Provisioner.hs | # LANGUAGE RecordWildCards #
-- TODO: Add a CLI command to run the provisioner on an index.
-- | A test module to load some fake data
module Monocle.Backend.Provisioner (
-- * Provisioner
runProvisioner,
-- * Fake datas
fakeAuthor,
fakeChange,
fakeChangeEvent,
fakeETaskData,
fakeTaskData,
-- * re-... | null | https://raw.githubusercontent.com/change-metrics/monocle/8274b2cd54e15e93ea5fce66b0c1d0ba8d892cb6/src/Monocle/Backend/Provisioner.hs | haskell | TODO: Add a CLI command to run the provisioner on an index.
| A test module to load some fake data
* Provisioner
* Fake datas
* re-exports
| Provision fakedata for a tenant
| Ensure changes have a unique ID
create ids using epoch as a prefix | # LANGUAGE RecordWildCards #
module Monocle.Backend.Provisioner (
runProvisioner,
fakeAuthor,
fakeChange,
fakeChangeEvent,
fakeETaskData,
fakeTaskData,
Faker.generateNonDeterministic,
) where
import Data.Time.Clock.System
import Faker qualified
import Faker.Combinators qualified
import Faker.Combinat... |
3261d6c5981695da6e4f873835a2eb0f1c4afb11ecf56f0f95fc2557156d67e2 | chef-boneyard/opscode-pushy-server | pushy_job_feed_test.erl | -*- erlang - indent - level : 4;indent - tabs - mode : nil ; fill - column : 92 -*-
%% ex: ts=4 sw=4 et
%%
@author < >
%%
%% @end
Copyright 2012 Chef Software , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
%%... | null | https://raw.githubusercontent.com/chef-boneyard/opscode-pushy-server/7272326960fcc35eaa99fa8d5f5bd58959755b3e/apps/pushy/test/pushy_job_feed_test.erl | erlang | ex: ts=4 sw=4 et
@end
Version 2.0 (the "License"); you may not use this file
except in compliance with the License. You may obtain
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing p... | -*- erlang - indent - level : 4;indent - tabs - mode : nil ; fill - column : 92 -*-
@author < >
Copyright 2012 Chef Software , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANT... |
353e7091987343aedf98fc41d0932b7d05970866898075dd0e6c1b5f756b5724 | r0man/hdfs-clj | core_test.clj | (ns hdfs.core-test
(:refer-clojure :exclude [spit slurp])
(:require [clojure.test :refer :all]
[hdfs.core :refer :all])
(:import [java.io BufferedReader BufferedWriter PrintWriter]
[org.apache.hadoop.conf Configuration]
[org.apache.hadoop.io SequenceFile$Reader SequenceFile$Write... | null | https://raw.githubusercontent.com/r0man/hdfs-clj/693e5985a79a3c1d8894602389d73c6f47377c81/test/hdfs/core_test.clj | clojure | TODO: Control order?
TODO: Control order? | (ns hdfs.core-test
(:refer-clojure :exclude [spit slurp])
(:require [clojure.test :refer :all]
[hdfs.core :refer :all])
(:import [java.io BufferedReader BufferedWriter PrintWriter]
[org.apache.hadoop.conf Configuration]
[org.apache.hadoop.io SequenceFile$Reader SequenceFile$Write... |
ba9738525900ee34691fc775f04882602efd45e4753053c122da841c04de2882 | remyzorg/pendulum | test_ppx_react.ml |
let%sync react_prog =
react e1;
loop begin
emit e1;
pause
end
let%sync mouse =
element w {
onmousemove = "", (fun x ev -> Format.sprintf "%d,%d" ev##.clientX ev##.clientY);
};
react write;
loop begin
present w##onmousemove
(emit write !!(w##onmousemove))
; pause
end
| null | https://raw.githubusercontent.com/remyzorg/pendulum/a532681c6f99d77129e31fbe27cc56c396a7c63c/tests/ppx/test_ppx_react.ml | ocaml |
let%sync react_prog =
react e1;
loop begin
emit e1;
pause
end
let%sync mouse =
element w {
onmousemove = "", (fun x ev -> Format.sprintf "%d,%d" ev##.clientX ev##.clientY);
};
react write;
loop begin
present w##onmousemove
(emit write !!(w##onmousemove))
; pause
end
| |
7170370c43b24180ca5728aab33d9ba721d2a30a7bc42e7bd4092916864561d6 | mirage/ptt | ptt.ml | module SMTP = SMTP
module SSMTP = SSMTP
module Submission = Submission
module Relay = Relay
module Relay_map = Relay_map
module Messaged = Messaged
module Mxs = Mxs
module Aggregate = Aggregate
module Authentication = Authentication
module Mechanism = Mechanism
module Sigs = Sigs
module Logic = Logic
| null | https://raw.githubusercontent.com/mirage/ptt/b555f7b132850de257d8f8d731cdf2a7723c9ab1/lib/ptt.ml | ocaml | module SMTP = SMTP
module SSMTP = SSMTP
module Submission = Submission
module Relay = Relay
module Relay_map = Relay_map
module Messaged = Messaged
module Mxs = Mxs
module Aggregate = Aggregate
module Authentication = Authentication
module Mechanism = Mechanism
module Sigs = Sigs
module Logic = Logic
| |
bab95d14f2e5fa632384d8f4fc2a58f87af6c005d765a03af12af358f309dd31 | openvstorage/alba | maintenance_coordination.ml |
Copyright ( C ) iNuron -
This file is part of Open vStorage . For license information , see < LICENSE.txt >
Copyright (C) iNuron -
This file is part of Open vStorage. For license information, see <LICENSE.txt>
*)
open! Prelude
open Lwt.Infix
type state =
| Master
| Follower
let throttled_log
... | null | https://raw.githubusercontent.com/openvstorage/alba/459bd459335138d6b282d332fcff53a1b4300c29/ocaml/src/maintenance_coordination.ml | ocaml | do cleanup of participants that don't renew their lease |
Copyright ( C ) iNuron -
This file is part of Open vStorage . For license information , see < LICENSE.txt >
Copyright (C) iNuron -
This file is part of Open vStorage. For license information, see <LICENSE.txt>
*)
open! Prelude
open Lwt.Infix
type state =
| Master
| Follower
let throttled_log
... |
1723294ff55e1be3ae36516ba1b57693961751330a20fe738c3f0c5c5d99005d | prolic/futr | Profile.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
module Widgets.Profile where
import Control.Concurrent (threadDelay)
import Control.Concurrent.MVar
import Control.Concurrent.STM.TChan
import Control.Lens
import Control.Monad (forever, void)
import Control.Monad.STM (atomically)
import Crypto.Schnor... | null | https://raw.githubusercontent.com/prolic/futr/45ad69bf19ce91c7a07efe91add1ccc609c527de/src/Widgets/Profile.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE TemplateHaskell #
module Widgets.Profile where
import Control.Concurrent (threadDelay)
import Control.Concurrent.MVar
import Control.Concurrent.STM.TChan
import Control.Lens
import Control.Monad (forever, void)
import Control.Monad.STM (atomically)
import Crypto.Schnorr
import Data.Aeson
import Data.Dat... |
0d025552c277622e2a6495eb86e98c17b98a1b375b1feb7001ca8887e06b4423 | qkrgud55/ocamlmulti | patmatch.ml | (* Tests for matchings on integers and characters *)
(* Dense integer switch *)
let f = function 1 -> 1 | 2 -> 2 | 3 -> 3 | 4 -> 4 | 5 -> 5 | 6 -> 6 | _ -> 0
(* Sparse integer switch *)
let g = function 303 -> 1 | 401 -> 2 | _ -> 0
(* Very sparse integer switch *)
let iszero = function 0 -> true | _ -> false
(* ... | null | https://raw.githubusercontent.com/qkrgud55/ocamlmulti/74fe84df0ce7be5ee03fb4ac0520fb3e9f4b6d1f/testsuite/tests/basic/patmatch.ml | ocaml | Tests for matchings on integers and characters
Dense integer switch
Sparse integer switch
Very sparse integer switch
Simple matching on characters
Matching with orpats
Matching on arrays
The test |
let f = function 1 -> 1 | 2 -> 2 | 3 -> 3 | 4 -> 4 | 5 -> 5 | 6 -> 6 | _ -> 0
let g = function 303 -> 1 | 401 -> 2 | _ -> 0
let iszero = function 0 -> true | _ -> false
let h = function
'a' -> "a"
| 'e' -> "e"
| 'i' -> "i"
| 'o' -> "o"
| 'u' -> "u"
| _ -> "?"
let k = function
' ' | '\t' | '\... |
2782f31f2dda524f5bfd29ac06a5581c0051413eef6895bac905785bf83c0aab | stylewarning/policy-cond | policy.lisp | policy.lisp
;;;;
Copyright ( c ) 2014
(in-package #:policy)
(defmacro if (form)
"Intended to be used with read macros. FORM should be a policy
expression as described in POLICY-COND:POLICY-COND. For example,
#+#.(policy:if (> speed safety)) EXPRESSION"
(labels ((replace-keys (form)
(typecase f... | null | https://raw.githubusercontent.com/stylewarning/policy-cond/eedb625520175bfdf44d385ff3b21039b7f75706/policy.lisp | lisp | policy.lisp
Copyright ( c ) 2014
(in-package #:policy)
(defmacro if (form)
"Intended to be used with read macros. FORM should be a policy
expression as described in POLICY-COND:POLICY-COND. For example,
#+#.(policy:if (> speed safety)) EXPRESSION"
(labels ((replace-keys (form)
(typecase form
... | |
a6d1ed7dfe145ea9bbbe75479b651c9dfb2b8653325d88e3df2252ecd68a9bf5 | redplanetlabs/vector-backed-sorted-map | vector_backed_sorted_map.clj | (ns com.rpl.vector-backed-sorted-map
(:use [potemkin])
)
(assert (do (println "Warning: Assertions are enabled while loading VectorBackedSortedMap. This has a gigantic performance impact and should only be allowed in testing!")
true))
(defn apv-fast-nth [^clojure.lang.APersistentVector v ^long idx]
(.... | null | https://raw.githubusercontent.com/redplanetlabs/vector-backed-sorted-map/1a63e6ab4ddd2f580873be1823937868f2513e08/src/com/rpl/vector_backed_sorted_map.clj | clojure | either this is it, or this is where it would be if present.
return it all and let the caller decide.
this is non-standard potemkin usage. if we use the provided seqable impl,
iterating the map ends up taking O (n log n)!
TODO: could this be off by one if there's not an exact match?
consume a (no match)
consume b... | (ns com.rpl.vector-backed-sorted-map
(:use [potemkin])
)
(assert (do (println "Warning: Assertions are enabled while loading VectorBackedSortedMap. This has a gigantic performance impact and should only be allowed in testing!")
true))
(defn apv-fast-nth [^clojure.lang.APersistentVector v ^long idx]
(.... |
f81652bd42a7091ea1ba9d2a3eb0d579956ea96809dd9f103bf9824e3a5b85d7 | ijvcms/chuanqi_dev | monster_attack_reward_config.erl | %%%-------------------------------------------------------------------
@author zhengsiying
%%% @doc
%%% 自动生成文件,不要手动修改
%%% @end
Created : 2016/10/12
%%%-------------------------------------------------------------------
-module(monster_attack_reward_config).
-include("common.hrl").
-include("config.hrl").
-compi... | null | https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/config/monster_attack_reward_config.erl | erlang | -------------------------------------------------------------------
@doc
自动生成文件,不要手动修改
@end
------------------------------------------------------------------- | @author zhengsiying
Created : 2016/10/12
-module(monster_attack_reward_config).
-include("common.hrl").
-include("config.hrl").
-compile([export_all]).
get_list_conf() ->
[ monster_attack_reward_config:get(X) || X <- get_list() ].
get_list() ->
[1, 2, 3, 4, 5, 6, 7].
get(1) ->
#monster_attack_reward_conf{
... |
36edfa1cf8ea209d5d94ca5a51b51df758fe2951e45955fbfa0385f44b73c728 | mrphlip/aoc | 01.hs | # OPTIONS_GHC -Wno - tabs #
import Data.List
import Control.Exception
calcFuel :: Integer -> Integer
calcFuel x = (x `div` 3) - 2
calcFuelFuel :: Integer -> Integer
calcFuelFuel x = sum $ unfoldr iterfunc x
where iterfunc x = let f = calcFuel x in if f > 0 then Just (f, f) else Nothing
getInput :: IO [Integer]
getI... | null | https://raw.githubusercontent.com/mrphlip/aoc/06395681eb6b50b838cd4561b2e0aa772aca570a/2019/01.hs | haskell | # OPTIONS_GHC -Wno - tabs #
import Data.List
import Control.Exception
calcFuel :: Integer -> Integer
calcFuel x = (x `div` 3) - 2
calcFuelFuel :: Integer -> Integer
calcFuelFuel x = sum $ unfoldr iterfunc x
where iterfunc x = let f = calcFuel x in if f > 0 then Just (f, f) else Nothing
getInput :: IO [Integer]
getI... | |
a09cb171cda2fe4d8ae5d76ffa999a1cb811caaf38223e1f93e5d772dca37ff5 | dyoo/whalesong | union-find.rkt | #lang typed/racket/base
;; Union-find hardcoded to do symbols.
(provide (all-defined-out))
;; A forest contains a collection of its nodes keyed by element.
;; The elements are compared by eq?
(define-struct: forest
([ht : (HashTable Symbol node)]))
;; A node is an element, a parent node, and a numeric rank.
(... | null | https://raw.githubusercontent.com/dyoo/whalesong/636e0b4e399e4523136ab45ef4cd1f5a84e88cdc/whalesong/union-find.rkt | racket | Union-find hardcoded to do symbols.
A forest contains a collection of its nodes keyed by element.
The elements are compared by eq?
A node is an element, a parent node, and a numeric rank.
Builds a new, empty forest.
lookup-node: forest X -> node
Returns the node that's associated with this element.
make-set: fo... | #lang typed/racket/base
(provide (all-defined-out))
(define-struct: forest
([ht : (HashTable Symbol node)]))
(define-struct: node
([elt : Symbol]
[p : (U False node)]
[rank : Natural])
#:mutable)
(: new-forest (-> forest))
(define (new-forest)
(make-forest (make-hash)))
(: lookup-node (for... |
4eab2cc2949f32a5399aeb92cea8005f56a6ac98fc286585ba8ac845656585ab | flipstone/orville | Transaction.hs | module Orville.PostgreSQL.Internal.Transaction
( withTransaction,
)
where
import qualified Control.Exception as Exception
import qualified Control.Monad as Monad
import Control.Monad.IO.Class (liftIO)
import qualified Data.IORef as IORef
import qualified Orville.PostgreSQL.Internal.Execute as Execute
import quali... | null | https://raw.githubusercontent.com/flipstone/orville/9c8ba3118f6a808da7b6bd10f45e095f3c9edc0e/orville-postgresql-libpq/src/Orville/PostgreSQL/Internal/Transaction.hs | haskell | module Orville.PostgreSQL.Internal.Transaction
( withTransaction,
)
where
import qualified Control.Exception as Exception
import qualified Control.Monad as Monad
import Control.Monad.IO.Class (liftIO)
import qualified Data.IORef as IORef
import qualified Orville.PostgreSQL.Internal.Execute as Execute
import quali... | |
e3761fc032778fe642a3323b4485aedc4397e0a5efa8b8b3296c14b1f8af8754 | mbg/hoop | Constructor.hs | module Language.Hoop.Constructor where
import Language.Haskell.TH
import Language.Haskell.TH.Syntax
data StateCtr = SCtr {
sctrDec :: Dec,
sctrTypes :: [Type]
} | null | https://raw.githubusercontent.com/mbg/hoop/98a53bb1db66b06f9b5d3e5242eed336f908ad18/src/Language/Hoop/Constructor.hs | haskell | module Language.Hoop.Constructor where
import Language.Haskell.TH
import Language.Haskell.TH.Syntax
data StateCtr = SCtr {
sctrDec :: Dec,
sctrTypes :: [Type]
} | |
e3fbbb699457b7aa260d22fa7f8ea89e6b01d5fa7c57ce2517af5860264b364e | reactiveml/rml | pa_deriving_Json.ml | Js_of_ocaml
*
* Copyright 2010 .
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at your ... | null | https://raw.githubusercontent.com/reactiveml/rml/d178d49ed923290fa7eee642541bdff3ee90b3b4/toplevel-alt/js/js-of-ocaml/lib/syntax/pa_deriving_Json.ml | ocaml | Generate code that write a block with [tag]. | Js_of_ocaml
*
* Copyright 2010 .
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at your ... |
ba01305b5480306795085507b962a95338fef640eed8ecdd34aef621f60c2d0d | flavioc/cl-hurd | io-wrapper.lisp |
(in-package :hurd-translator)
(defcenum io-routine-code
:IO-WRITE
:IO-READ
:IO-SEEK
:IO-READABLE
:IO-SET-ALL-OPENMODES
:IO-GET-OPENMODES
:IO-SET-SOME-OPENMODES
:IO-CLEAR-SOME-OPENMODES
:IO-ASYNC
:IO-MOD-OWNER
:IO-GET-OWNER
:IO-GET-ICKY-ASYNC-ID
:IO-SELECT
:IO-STAT
:IO-REAUTHENTICATE
:I... | null | https://raw.githubusercontent.com/flavioc/cl-hurd/982232f47d1a0ff4df5fde2edad03b9df871470a/translator/io-wrapper.lisp | lisp |
(in-package :hurd-translator)
(defcenum io-routine-code
:IO-WRITE
:IO-READ
:IO-SEEK
:IO-READABLE
:IO-SET-ALL-OPENMODES
:IO-GET-OPENMODES
:IO-SET-SOME-OPENMODES
:IO-CLEAR-SOME-OPENMODES
:IO-ASYNC
:IO-MOD-OWNER
:IO-GET-OWNER
:IO-GET-ICKY-ASYNC-ID
:IO-SELECT
:IO-STAT
:IO-REAUTHENTICATE
:I... | |
ef0fdce7918637913eacc5bab9e2aa28b324978adb8c4511d16f8c62fe96d9b8 | clojure-interop/aws-api | AWSWAFAsyncClient.clj | (ns com.amazonaws.services.waf.AWSWAFAsyncClient
"Client for accessing WAF asynchronously. Each asynchronous method will return a Java Future object representing the
overloads which accept an AsyncHandler can be used to receive notification when an
asynchronous operation completes.
This is the AWS WAF API Ref... | null | https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.waf/src/com/amazonaws/services/waf/AWSWAFAsyncClient.clj | clojure | (ns com.amazonaws.services.waf.AWSWAFAsyncClient
"Client for accessing WAF asynchronously. Each asynchronous method will return a Java Future object representing the
overloads which accept an AsyncHandler can be used to receive notification when an
asynchronous operation completes.
This is the AWS WAF API Ref... | |
c2858f4ea1155b63fb362fe7eead561e977221a7d0b10a0f11696714ee56e4cc | mirage/ocaml-qcow | qcow_cache.mli |
* Copyright ( C ) 2017 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | null | https://raw.githubusercontent.com/mirage/ocaml-qcow/2418c66627dcce8420bcb06d7547db171528060a/lib/qcow_cache.mli | ocaml | * A cache of clusters
* Create a cache of clusters, given the read/write functions
* [read t cluster] returns the data in [cluster]
* [write t cluster data] writes [data] to [cluster]
* [remove t cluster] drops any cache associated with [cluster]
* [resize t new_size_clusters] drops any cache entries which are bey... |
* Copyright ( C ) 2017 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... |
75396e481246257dbcaad2a3e4587bf3ef29ab20481850bcf864d00e5500dcf7 | spell-music/csound-catalog | WoodwindAlg.hs | module Csound.Catalog.Wave.WoodwindAlg(
WoodwindSpec(..), RangeSpec(..), HarmSpec(..), AmpSpec(..), WaveSpec,
fromSpec, byFreq,
woodwind
) where
import Data.List (transpose, intersperse)
import Control.Monad
import Control.Monad.Trans.State
import Csound.Base hiding (fromSpec)
----------... | null | https://raw.githubusercontent.com/spell-music/csound-catalog/2a4e12227bd6e27bc0eac05b3465e9a7f1f4bdbf/src/Csound/Catalog/Wave/WoodwindAlg.hs | haskell | --------------------------------------------------------------
Deterministic random numbers
--------------------------------------------------------------
tools
--------------------------------------------------------------
algorithm parameters
| Winds algorithm specification.
| Harmonics per pitch range.
| The h... | module Csound.Catalog.Wave.WoodwindAlg(
WoodwindSpec(..), RangeSpec(..), HarmSpec(..), AmpSpec(..), WaveSpec,
fromSpec, byFreq,
woodwind
) where
import Data.List (transpose, intersperse)
import Control.Monad
import Control.Monad.Trans.State
import Csound.Base hiding (fromSpec)
newtype R... |
73878213dd0d8c1a38f24ac1283e8b14600a96d4767ecf399b6202865f0302f5 | Kakadu/fp2022 | REPL.ml | * Copyright 2021 - 2022 ,
* SPDX - License - Identifier : LGPL-3.0 - or - later
open Prolog_lib
open Core
open Types
open Db
type opts = { mutable debug : bool }
let print_error err =
let message =
match err with
| Critical x -> x
| EvalError _ -> "false."
in
Caml.Format.printf "%s\n" message
;;... | null | https://raw.githubusercontent.com/Kakadu/fp2022/b91542ab68c04d0a5b0e35f258ddb3b1e8661223/Prolog/REPL.ml | ocaml | * Copyright 2021 - 2022 ,
* SPDX - License - Identifier : LGPL-3.0 - or - later
open Prolog_lib
open Core
open Types
open Db
type opts = { mutable debug : bool }
let print_error err =
let message =
match err with
| Critical x -> x
| EvalError _ -> "false."
in
Caml.Format.printf "%s\n" message
;;... | |
4220772bf002cb6e4b192088c94c6c8cc94e2e2fb63508220c720b4d3ba86cb3 | dschrempf/mcmc | Bactrian.hs | -- |
Module : Mcmc . Proposal . Bactrian
Description : Bactrian proposals
Copyright : 2021
License : GPL-3.0 - or - later
--
-- Maintainer :
-- Stability : unstable
-- Portability : portable
--
Creation date : Thu Jun 25 15:49:48 2020 .
--
-- See /.
module Mcmc.Proposal.Bactrian... | null | https://raw.githubusercontent.com/dschrempf/mcmc/e546ef538ceddf51acd3b5ba3b7298d7679c5775/mcmc/src/Mcmc/Proposal/Bactrian.hs | haskell | |
Maintainer :
Stability : unstable
Portability : portable
See /.
| Type synonym indicating the spike parameter.
| Additive symmetric proposal with kernel similar to the silhouette of a
kernel]() is
See /.
We have:
x' (1+dx') = x.
Hence,
dx' = 1/(1-dx) - 1.
camel.
See 'Mcmc.Proposal.Scale.s... | Module : Mcmc . Proposal . Bactrian
Description : Bactrian proposals
Copyright : 2021
License : GPL-3.0 - or - later
Creation date : Thu Jun 25 15:49:48 2020 .
module Mcmc.Proposal.Bactrian
( SpikeParameter,
slideBactrian,
scaleBactrian,
)
where
import Mcmc.Proposal
import... |
be65eb290662c436421f298081e48e85d208223ab2e4216dae551b04785bc7a6 | NethermindEth/horus-checker | Runner.hs | {-# LANGUAGE ConstraintKinds #-}
module Horus.Logger.Runner
( ImplL
, interpret
, runImpl
)
where
import Colog.Core
import Control.Monad.Free.Church (iterM)
import Control.Monad.State (MonadState, State, modify', runState)
import Data.Foldable (toList)
import Data.Sequence (Seq, (|>))
import Data.Text (Text, ... | null | https://raw.githubusercontent.com/NethermindEth/horus-checker/b4ce60c7739a0d12dab6c9b2ff87719b321f6200/src/Horus/Logger/Runner.hs | haskell | # LANGUAGE ConstraintKinds # |
module Horus.Logger.Runner
( ImplL
, interpret
, runImpl
)
where
import Colog.Core
import Control.Monad.Free.Church (iterM)
import Control.Monad.State (MonadState, State, modify', runState)
import Data.Foldable (toList)
import Data.Sequence (Seq, (|>))
import Data.Text (Text, filter, unpack)
import Prelude hi... |
8ab431d757a7f16170f601ac37f08d4b5dbe09a8084f14ef555e3850128aba27 | MarcKaufmann/congame | get-data.rkt | #lang racket/base
(require net/http-easy
racket/contract
racket/format
racket/hash
racket/list
racket/string)
;; FIXME: Should this functionality not be broken in its own package that can be used outside of congame?
;; FIXME: We fail to set some information on the particip... | null | https://raw.githubusercontent.com/MarcKaufmann/congame/50cf0b7303baf6c982bb46c5d9f43cd9632e061b/data-tools/get-data.rkt | racket | FIXME: Should this functionality not be broken in its own package that can be used outside of congame?
FIXME: We fail to set some information on the participant for export that we need, such as the status
FIXME: Get the anonymized username for debugging
FIXME: csv output is not reliable, since some feels may be mer... | #lang racket/base
(require net/http-easy
racket/contract
racket/format
racket/hash
racket/list
racket/string)
For now , assume that the steps are in order ( FIXME : check this -- is there ambiguity with respect to first - put and last - put ? ) and check if final step ha... |
898803a47198b74241cefbe0b68361026878c9369720b3333426467f25278c8b | jtkristensen/exercises-in-type-level-programming | Next.hs | module Next where
-- Examples goes here
| null | https://raw.githubusercontent.com/jtkristensen/exercises-in-type-level-programming/91aaa383e94fa39cd647aba47078f7dcd89ef6a7/functionelle-koebenhavnere-november-2022/NatProperties/src/Next.hs | haskell | Examples goes here | module Next where
|
cd5c9a2a694f8295ad79a28749181593572d6f17d64ae4663efa0782d25fc59e | djblue/portal | select.cljs | (ns ^:no-doc portal.ui.select
(:require ["react" :as react]))
(defonce ^:private selection-index (atom {}))
(defonce ^:private index-context (react/createContext []))
(defn with-position [position & children]
(let [index (conj (react/useContext index-context) position)]
(into [:r> (.-Provider index-context) #... | null | https://raw.githubusercontent.com/djblue/portal/d56ccc0b14b75008929169f967b5b26bfc5c87e1/src/portal/ui/select.cljs | clojure | (ns ^:no-doc portal.ui.select
(:require ["react" :as react]))
(defonce ^:private selection-index (atom {}))
(defonce ^:private index-context (react/createContext []))
(defn with-position [position & children]
(let [index (conj (react/useContext index-context) position)]
(into [:r> (.-Provider index-context) #... | |
e50e6aabb3939be17728788078bfbd06e9db019acd461176e0f762cae377f7dd | MinaProtocol/mina | global_slot.mli | include
Global_slot_intf.Full
with type ('slot_number, 'slots_per_epoch) Poly.Stable.V1.t =
( 'slot_number
, 'slots_per_epoch )
Mina_wire_types.Consensus_global_slot.Poly.V1.t
and type Stable.V1.t = Mina_wire_types.Consensus_global_slot.V1.t
| null | https://raw.githubusercontent.com/MinaProtocol/mina/7a380064e215dc6aa152b76a7c3254949e383b1f/src/lib/consensus/global_slot.mli | ocaml | include
Global_slot_intf.Full
with type ('slot_number, 'slots_per_epoch) Poly.Stable.V1.t =
( 'slot_number
, 'slots_per_epoch )
Mina_wire_types.Consensus_global_slot.Poly.V1.t
and type Stable.V1.t = Mina_wire_types.Consensus_global_slot.V1.t
| |
999b3fb0fb3163bc64732c34bcb4a51805730ec3763d594c9f0b3c0d2c96feb8 | 2600hz/kazoo | knm_sms.erl | %%%-----------------------------------------------------------------------------
( C ) 2010 - 2020 , 2600Hz
%%% @doc Handle im features
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 /.
%%%
%... | null | https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_numbers/src/providers/knm_sms.erl | erlang | -----------------------------------------------------------------------------
@doc Handle im features
@end
-----------------------------------------------------------------------------
------------------------------------------------------------------------------
@doc This function is called each time a number is s... | ( C ) 2010 - 2020 , 2600Hz
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
-module(knm_sms).
-behaviour(knm_gen_provider).
-export([save/1]).
-export([delete/1]).
-export([available/1
... |
a8a97ce4e6fccd20fe5bc4f7e81ed896a8400d0f41bb773a0636568bf08fe8f2 | talex5/mirage-trace-viewer | main.ml | Copyright ( C ) 2014 ,
open Mirage_trace_viewer
let main paths =
try
GMain.init () |> ignore;
paths |> List.iter (fun path ->
let vat = Mtv_unix.load path |> Mtv_ctf_loader.from_bigarray |> Mtv_thread.of_events in
let win = Gtk_viewer.make ~name:(path :> string) vat in
ignore (wi... | null | https://raw.githubusercontent.com/talex5/mirage-trace-viewer/8492c53c57778fd55474d37b34833129c5c1d5d3/gtk/main.ml | ocaml | todo: only quit when last window is closed | Copyright ( C ) 2014 ,
open Mirage_trace_viewer
let main paths =
try
GMain.init () |> ignore;
paths |> List.iter (fun path ->
let vat = Mtv_unix.load path |> Mtv_ctf_loader.from_bigarray |> Mtv_thread.of_events in
let win = Gtk_viewer.make ~name:(path :> string) vat in
ignore (wi... |
f200587fe78891b5cfe785dda4711210df6bc0afca385fd307649a4b47259ade | johnlawrenceaspden/hobby-code | htmlscrape.clj | ; using [enlive "1.0.1"]
(require '[net.cgrand.enlive-html :as html])
(def url (html/html-resource (java.net.URL. "")))
(def realurl (((first (html/select url [:frame])) :attrs) :src))
(def realpage (html/html-resource (java.net.URL. realurl)))
(html/select realpage [:a])
(use 'clojure.pprint)
(pprint
(map
... | null | https://raw.githubusercontent.com/johnlawrenceaspden/hobby-code/48e2a89d28557994c72299962cd8e3ace6a75b2d/htmlscrape.clj | clojure | using [enlive "1.0.1"] |
(require '[net.cgrand.enlive-html :as html])
(def url (html/html-resource (java.net.URL. "")))
(def realurl (((first (html/select url [:frame])) :attrs) :src))
(def realpage (html/html-resource (java.net.URL. realurl)))
(html/select realpage [:a])
(use 'clojure.pprint)
(pprint
(map
(fn[x] ((juxt :href :nam... |
098a44d93aa881f13538cf3a655008a9dbc2152ccd36d7384952501243d90551 | cirodrig/triolet | Export.hs | {-| Descriptions of exported functions. Information that is stable across
multiple compiler stages belongs here. Information specific to a stage is
found in that stage's directory.
-}
module Export where
import Data.List
import Text.Show
import Type.Type
-- | The foreign language to which a name is exported.
data... | null | https://raw.githubusercontent.com/cirodrig/triolet/e515a1dc0d6b3e546320eac7b71fb36cea5b53d0/src/program/Export.hs | haskell | | Descriptions of exported functions. Information that is stable across
multiple compiler stages belongs here. Information specific to a stage is
found in that stage's directory.
| The foreign language to which a name is exported.
| Get the foreign language's name as it appears in triolet source code
| A source ... |
module Export where
import Data.List
import Text.Show
import Type.Type
data ForeignLanguage =
CCall
| CPlusPlus
deriving(Eq, Ord, Show)
foreignLanguageName :: ForeignLanguage -> String
foreignLanguageName CCall = "ccall"
foreignLanguageName CPlusPlus = "cplusplus"
to elaborate this into an ' ExportSig ... |
530adc0d49470c37f664eb30896c08aab13865790cbfbf5af3c1d451146ef41f | emotiq/emotiq | cli.lisp | (in-package :emotiq/cli)
(defun spawn-cli ()
(let ((*standard-output* *standard-output*) ;; may need to bind to
;; other fds depending
;; on the invocation
;; scenario
(*s... | null | https://raw.githubusercontent.com/emotiq/emotiq/9af78023f670777895a3dac29a2bbe98e19b6249/src/cli.lisp | lisp | may need to bind to
other fds depending
on the invocation
scenario | (in-package :emotiq/cli)
(defun spawn-cli ()
(*standard-input* *standard-input*))
(bordeaux-threads:make-thread 'emotiq/cli::main :name "cli-main")))
(defun output-prompt ()
(format *standard-output* "~&emotiq> "))
(defun read-command ()
(let ((raw (read-line)))
(cl-ppcre:split "\\s+" raw)))
(de... |
eee35d64c69e0f4c9f5c3b8f1f76cd19bb7c22a8eefc2976d9a4dcf6b4505e51 | coccinelle/coccinelle | lic.ml |
* This file is part of Coccinelle , licensed under the terms of the GPL v2 .
* See copyright.txt in the Coccinelle source code for more information .
* The Coccinelle source code can be obtained at
* This file is part of Coccinelle, licensed under the terms of the GPL v2.
* See copyright.txt in the Cocci... | null | https://raw.githubusercontent.com/coccinelle/coccinelle/57cbff0c5768e22bb2d8c20e8dae74294515c6b3/tools/lic.ml | ocaml | pad: no recursive call in directory List.iter process files |
* This file is part of Coccinelle , licensed under the terms of the GPL v2 .
* See copyright.txt in the Coccinelle source code for more information .
* The Coccinelle source code can be obtained at
* This file is part of Coccinelle, licensed under the terms of the GPL v2.
* See copyright.txt in the Cocci... |
7717fb288a40347d40fdd1445aac3f76b774b6c407fcc5e8cb1accea2e6ed52b | Factual/skuld | leader_test.clj | (ns skuld.leader-test
(:use clojure.tools.logging
clojure.test
skuld.util
skuld.node
skuld.node-test)
(:require [skuld.client :as client]
[skuld.admin :as admin]
[skuld.vnode :as vnode]
[skuld.flake ... | null | https://raw.githubusercontent.com/Factual/skuld/79599f9b13aee35c680183d6bf9e2fcbfde1d7c7/test/skuld/leader_test.clj | clojure | Take a snapshot of the states (so we're operating on locally consistent
information
For all leaders
Find all nodes which this leader could write to
Measure consistency continuously
Initiate randomized elections | (ns skuld.leader-test
(:use clojure.tools.logging
clojure.test
skuld.util
skuld.node
skuld.node-test)
(:require [skuld.client :as client]
[skuld.admin :as admin]
[skuld.vnode :as vnode]
[skuld.flake ... |
6cc8de21f99132a04679d4bf6a6fce628e415073cfa0435f2c9bfa59edeca73e | pixlsus/registry.gimp.org_static | Rule_of_thirds_guides.scm | ;===============================================================
;== GIMP Add Guides for Rule of Thirds ==
= = Copyright ( c ) 2006 = =
;===============================================================
(define (script-fu-Rule-of-Thirds-guides img drawable)
... | null | https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/Rule_of_thirds_guides.scm | scheme | ===============================================================
== GIMP Add Guides for Rule of Thirds ==
===============================================================
| = = Copyright ( c ) 2006 = =
(define (script-fu-Rule-of-Thirds-guides img drawable)
(let* ((ImageW (car (gimp-drawable-width drawable)))
(ImageH (car (gimp-drawable-height drawable)))
(Vert_Offset (car (gimp-drawable-offsets drawable)))
(Horz_Offset (cadr (g... |
8ee2ce0f9154dd2c1aa8714f97259cdd747729af2d7d6d8ab7c2b9860d4ad8d2 | K1D77A/lunamech-matrix-api | call-wrapper.lisp | (in-package #:lunamech-matrix-api/v2)
(defmacro with-captured-dex-error (&body body)
"Catches any conditions signalled by dex and converts the response into a
special condition defined in src/classes.lisp and signals."
(alexandria:with-gensyms (condition)
`(labels ((try-again-restart (fun)
(re... | null | https://raw.githubusercontent.com/K1D77A/lunamech-matrix-api/02c5161d9d9d0c28cbfc02074583bb53abf5c940/api/v2/protocol/call-wrapper.lisp | lisp | this is here because bt:timeout is a type but not a class.. | (in-package #:lunamech-matrix-api/v2)
(defmacro with-captured-dex-error (&body body)
"Catches any conditions signalled by dex and converts the response into a
special condition defined in src/classes.lisp and signals."
(alexandria:with-gensyms (condition)
`(labels ((try-again-restart (fun)
(re... |
b822aa2ad3f5054ce8641411bcc70a0bc599dcca8214bddd911e9b4ec59f7d7c | nasa/Common-Metadata-Repository | project.clj | (defproject nasa-cmr/cmr-common-lib "0.1.1-SNAPSHOT"
:description "Provides common utility code for CMR projects."
:url "-Metadata-Repository/tree/master/common-lib"
:exclusions [[cheshire]
[clj-time]
[commons-codec/commons-codec]
[instaparse]
[org.cloju... | null | https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/13c47ccfebbbe2745c16220b6e41bfdc0ed286b6/common-lib/project.clj | clojure | these dependencies should be updated in tandem with the ring dependiences below
See
XXX Note that profiling can be kept in a profile,
with no need to comment/uncomment.
Uncomment this to enable assertions. Turn off during performance tests.
"-ea"
"-Dcom.sun.management.jmxremote"
"-Dcom.sun.management.jmxrem... | (defproject nasa-cmr/cmr-common-lib "0.1.1-SNAPSHOT"
:description "Provides common utility code for CMR projects."
:url "-Metadata-Repository/tree/master/common-lib"
:exclusions [[cheshire]
[clj-time]
[commons-codec/commons-codec]
[instaparse]
[org.cloju... |
da58ae1f6ca33d29ed55ec8222e59ff7ca03a974774fb256fa3b74173032e8cc | kowey/GenI | sillymorph.hs | -- Sillymorph morphological realiser
Copyright ( C ) 2009
--
-- 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/kowey/GenI/570a6ef70e61a7cb01fe0fc29732cd9c1c8f2d7a/sillymorph/sillymorph.hs | haskell | Sillymorph morphological realiser
This program is free software; you can redistribute it and/or
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 PURPOSE. See the
GNU General Public License ... | Copyright ( C ) 2009
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 .
You should have received a copy of the GNU General Public License
Foundation , Inc. , 59 Temple Place ... |
f72b6f3dae07f1f05b7428bf3d573c54b00111688191411c5030e11a06697aa6 | appleshan/cl-http | http-proxy-6-15.lisp | -*- Mode : LISP ; Syntax : Common - Lisp ; Package : USER ; Base : 10 ; Patch - File : t -*-
Patch file for HTTP - PROXY version 6.15
;;; Reason: Handle client request versions lower than the replying server by relying on the substrate.
;;;
;;; Function HTTP::PROXY-RELAY-SIMPLE-REQUEST: -
;;; Function HTTP::PROXY... | null | https://raw.githubusercontent.com/appleshan/cl-http/a7ec6bf51e260e9bb69d8e180a103daf49aa0ac2/lispm/proxy/patch/http-proxy-6/http-proxy-6-15.lisp | lisp | Syntax : Common - Lisp ; Package : USER ; Base : 10 ; Patch - File : t -*-
Reason: Handle client request versions lower than the replying server by relying on the substrate.
Function HTTP::PROXY-RELAY-SIMPLE-REQUEST: -
Function HTTP::PROXY-RESPOND-WITH-REMOTE-ACCESS: -
Function HTTP::PROXY-RESPOND-WITH-REMOTE-... | Patch file for HTTP - PROXY version 6.15
Function ( CLOS : METHOD HTTP::INVOKE - PROXY - SERVICE ( HTTP::PROXY - SERVER - MIXIN URL : HTTP - URL ( EQL : OPTIONS ) T ) ): -
Function ( CLOS : METHOD HTTP::INVOKE - PROXY - SERVICE ( HTTP::PROXY - SERVER - MIXIN URL : HTTP - URL ( EQL : TRACE ) T ) ): -
Written... |
a8477f3b367d36f3d0a96464e8c271587196e547c078f32444d7114087b311ba | fulcrologic/fulcro-rad-kvstore | chan_only_2.clj | (ns play.konserve.chan-only-2
(:require
[play.konserve.entity-read :as entity-read]
[com.fulcrologic.guardrails.core :refer [>defn => ?]]
[com.fulcrologic.rad.ids :refer [new-uuid]]
[com.fulcrologic.rad.database-adapters.key-value.key-store :as kv-key-store]
[com.fulcrologic.rad.database-adapters.... | null | https://raw.githubusercontent.com/fulcrologic/fulcro-rad-kvstore/f0046c21e386214b42d4621b33dcb3aa1058ad52/src/play/play/konserve/chan_only_2.clj | clojure |
A place to put the store when we access it once
'our-store' here is a ::key-value/key-store that will be available globally to all components so they can easily
grab data from it (and also put data in!). This will only be called once, at startup time.
With chan-only-1 we were putting in only the adaptor. Here... | (ns play.konserve.chan-only-2
(:require
[play.konserve.entity-read :as entity-read]
[com.fulcrologic.guardrails.core :refer [>defn => ?]]
[com.fulcrologic.rad.ids :refer [new-uuid]]
[com.fulcrologic.rad.database-adapters.key-value.key-store :as kv-key-store]
[com.fulcrologic.rad.database-adapters.... |
03c02169d8c3d6133618a3e4e8497319fa9a6825f5e3c40fc585b94b57d5b767 | brownplt/cs173-python | python-primitives.rkt | #lang plai-typed
(require "python-core-syntax.rkt")
#|
Since there may end up being a large number of primitives that you
implement for python, here is a suggested factoring into a separate
file. You can add new primitives here by adding new symbols to the
dispatch. You might also choose to add more than single-ar... | null | https://raw.githubusercontent.com/brownplt/cs173-python/d8ae026172f269282e54366f16ec42e037117cb4/python-primitives.rkt | racket |
Since there may end up being a large number of primitives that you
implement for python, here is a suggested factoring into a separate
file. You can add new primitives here by adding new symbols to the
dispatch. You might also choose to add more than single-arity
primitives here.
| #lang plai-typed
(require "python-core-syntax.rkt")
(require (typed-in racket/base [display : (string -> void)]))
(define (pretty arg)
(type-case CVal arg
[VNum (n) (to-string n)]
[VStr (s) s]
[VTrue () "true"]
[VClosure (env args body) (error 'prim "Can't print closures yet")]))
(define (prin... |
035bd738e611b1b2fa73e87c6ac859d71bbf91a09c96b319802c4bda6d8792a8 | ghollisjr/cl-ana | package.lisp | ;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
;;;;
Copyright by The HDF Group .
;;;; All rights reserved.
;;;;
This file is part of hdf5 - cffi .
The full hdf5 - cffi copyright notice , including terms governing
;;;; use, modification, and redistribution, is contained in the file COPYING,
;;;; which can be found... | null | https://raw.githubusercontent.com/ghollisjr/cl-ana/5cb4c0b0c9c4957452ad2a769d6ff9e8d5df0b10/hdf-cffi/src/package.lisp | lisp | -*- Mode: lisp; indent-tabs-mode: nil -*-
All rights reserved.
use, modification, and redistribution, is contained in the file COPYING,
which can be found at the root of the source code distribution tree.
If you do not have access to this file, you may request a copy from
.
== h5 ==============================... | Copyright by The HDF Group .
This file is part of hdf5 - cffi .
The full hdf5 - cffi copyright notice , including terms governing
(defpackage #:hdf5
(:documentation "hdf5-cffi library: Common LISP binding for the HDF5 library")
(:use #:cl #:cffi)
(:shadow "OFF-T" "SIZE-T")
(:export #:load-hdf5-foreign-li... |
692285e66b4c589512b030111b464d08ea4dae2243959d99a6d990f09103fb07 | zkincaid/duet | polynomialConeCpClosure.mli | open Polynomial
(** Cutting plane closure of polynomial cones, defined per the weak theory
of arithmetic.
*)
val set_cutting_plane_method : [`GomoryChvatal | `Normaliz] -> unit
* [ regular_cutting_plane_closure cone affine_lattice ]
computes a coherent ( C , L ) such that C is the smallest
regular po... | null | https://raw.githubusercontent.com/zkincaid/duet/162d3da830f12ab8e8d51f7757cddcb49c4084ca/srk/src/polynomialConeCpClosure.mli | ocaml | * Cutting plane closure of polynomial cones, defined per the weak theory
of arithmetic.
| open Polynomial
val set_cutting_plane_method : [`GomoryChvatal | `Normaliz] -> unit
* [ regular_cutting_plane_closure cone affine_lattice ]
computes a coherent ( C , L ) such that C is the smallest
regular polynomial cone that contains [ cone ] and is
closed under CP - INEQ with respect to L or [ a... |
a37ea2dd8fe88b06c3fd1e7907163a123650979fc64ad54787b09ea19bec4b8c | capsjac/opengles | Types.hs | # LANGUAGE CPP , FlexibleInstances #
module Graphics.OpenGL.Types (
-- * Shading Language Double Types
DVec2, DVec3, DVec4,
DMat2, DMat3, DMat4,
DMat2x3, DMat2x4, DMat3x2,
DMat3x4, DMat4x2, DMat4x3
-- * Additional Instances
) where
import Foreign
import Graphics.OpenGL.CoreArb
import Graphics.OpenG... | null | https://raw.githubusercontent.com/capsjac/opengles/23b78e5d1b058349a778a49310d867164ea1a529/src/Graphics/OpenGL/Types.hs | haskell | * Shading Language Double Types
* Additional Instances | # LANGUAGE CPP , FlexibleInstances #
module Graphics.OpenGL.Types (
DVec2, DVec3, DVec4,
DMat2, DMat3, DMat4,
DMat2x3, DMat2x4, DMat3x2,
DMat3x4, DMat4x2, DMat4x3
) where
import Foreign
import Graphics.OpenGL.CoreArb
import Graphics.OpenGLES.Base
import Graphics.OpenGLES.Internal
import Graphics.OpenGL... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.