_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 |
|---|---|---|---|---|---|---|---|---|
ddab271df1a2f7506651fce58ac53fd2da5cbf4c4a840279b69cf31e4f2bc07e | mmirman/rpc-framework | RPC.hs | |
Module : Network . Remote . RPC
Copyright : ( c ) 2012
License : BSD - style ( see the file LICENSE )
Maintainer : < >
Stability : experimental
Portability : Many GHC only extensions
Declaration of the frontend for RPC .
Module : Network.Remote.RPC
Copyrig... | null | https://raw.githubusercontent.com/mmirman/rpc-framework/63568adc07e0b9e8e7e8cfdf5f9ee116668c5b21/src/Network/Remote/RPC.hs | haskell | * Example: Making remote Calls
LANGUAGE TemplateHaskell , KindSignatures , FlexibleContexts
add : : Integer - > WIO Client IO Integer
LANGUAGE TemplateHaskell, KindSignatures, FlexibleContexts
add :: Integer -> WIO Client IO Integer | |
Module : Network . Remote . RPC
Copyright : ( c ) 2012
License : BSD - style ( see the file LICENSE )
Maintainer : < >
Stability : experimental
Portability : Many GHC only extensions
Declaration of the frontend for RPC .
Module : Network.Remote.RPC
Copyrig... |
c7b6a8013eb85bf7abfb3c7259d0d0ff8a6c7df062b3e9e76e8d6c3c74d07373 | well-typed/large-records | R020.hs | # LANGUAGE TypeApplications #
#if PROFILE_CORESIZE
{-# OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #-}
#endif
#if PROFILE_TIMING
{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-}
#endif
module Experiment.PreEval_Phantom.Sized.R020 where
import Data.Proxy
import Common.EmptyClass_Tree_Phantom
... | null | https://raw.githubusercontent.com/well-typed/large-records/c6c2b51af11e90f30822543d7ce4d1cb28cee294/large-records-benchmarks/bench/experiments/Experiment/PreEval_Phantom/Sized/R020.hs | haskell | # OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #
# OPTIONS_GHC -ddump-to-file -ddump-timings # | # LANGUAGE TypeApplications #
#if PROFILE_CORESIZE
#endif
#if PROFILE_TIMING
#endif
module Experiment.PreEval_Phantom.Sized.R020 where
import Data.Proxy
import Common.EmptyClass_Tree_Phantom
import Common.HListOfSize.HL020
requiresInstance :: ()
requiresInstance = requireEmptyClass_preEval (Proxy @ExampleFields)
|
12d566422eb39d61b7fe42194c4bf55542a0ff8c21a4322130c2a655a2957145 | eu90h/ascii-painter | generator.rkt | #lang racket/gui
(provide fill-generator% uniform-random-fill-generator% rogue-dungeon-generator%)
(require "scene.rkt" "point.rkt" "util.rkt" "room.rkt")
(define fill-generator%
(class object%
(init-field scene canvas tiles)
(field [tile null] [new-scene null])
(super-new)
(define/p... | null | https://raw.githubusercontent.com/eu90h/ascii-painter/23297b324d855c96d3ca12742f4991e7c10127be/generator.rkt | racket | #lang racket/gui
(provide fill-generator% uniform-random-fill-generator% rogue-dungeon-generator%)
(require "scene.rkt" "point.rkt" "util.rkt" "room.rkt")
(define fill-generator%
(class object%
(init-field scene canvas tiles)
(field [tile null] [new-scene null])
(super-new)
(define/p... | |
691f0f3fc8b4953755a21478e0c04b2dedf47042c71dc8387aefbd000aefd098 | ChrisPenner/proton | Withering.hs | module Data.Profunctor.Withering where
import Data.Profunctor
import Data.Profunctor.Traversing
import Control.Applicative
class (Traversing p) => Withering p where
cull :: (forall f. Alternative f => (a -> f b) -> (s -> f t)) -> p a b -> p s t
instance Alternative f => Withering (Star f) where
cull f (Star amb)... | null | https://raw.githubusercontent.com/ChrisPenner/proton/4ce22d473ce5bece8322c841bd2cf7f18673d57d/src/Data/Profunctor/Withering.hs | haskell | module Data.Profunctor.Withering where
import Data.Profunctor
import Data.Profunctor.Traversing
import Control.Applicative
class (Traversing p) => Withering p where
cull :: (forall f. Alternative f => (a -> f b) -> (s -> f t)) -> p a b -> p s t
instance Alternative f => Withering (Star f) where
cull f (Star amb)... | |
c08de7f7b7113305903015e4438a0c806ba53e5bba9834b66c942c29ba0de95a | mejgun/haskell-tdlib | ChatPermissions.hs | {-# LANGUAGE OverloadedStrings #-}
-- |
module TD.Data.ChatPermissions where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified Utils as U
-- |
data ChatPermissions = -- | Describes actions that a user is allowed to take in a chat
ChatPermissions
{ -- | True, if the user can... | null | https://raw.githubusercontent.com/mejgun/haskell-tdlib/b088f5062023fa201a68ebda128ab2fc489329ab/src/TD/Data/ChatPermissions.hs | haskell | # LANGUAGE OverloadedStrings #
|
|
| Describes actions that a user is allowed to take in a chat
| True, if the user can manage topics
| True, if the user can pin messages
| True, if the user can invite new users to the chat
| True, if the user can change the chat title, photo, and other settings
| True, if the ... |
module TD.Data.ChatPermissions where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified Utils as U
ChatPermissions
can_manage_topics :: Maybe Bool,
can_pin_messages :: Maybe Bool,
can_invite_users :: Maybe Bool,
can_change_info :: Maybe Bool,
can_add_web_pa... |
90e2b82e80e313b63317275919fbaa2a5d8ee36d6579d54624dc2d403879a16e | qkrgud55/ocamlmulti | printf.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
and , projet Cris... | null | https://raw.githubusercontent.com/qkrgud55/ocamlmulti/74fe84df0ce7be5ee03fb4ac0520fb3e9f4b6d1f/stdlib_r/printf.ml | ocaml | *********************************************************************
OCaml
... | and , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
$ I d : printf.ml 12014 2012 - 01 - 11 15:22:51... |
3589a06d1d13b6bcc4c6d3b5171afa3a27e88ba4d74bbc5c66a2d5267900798d | iijlab/postgresql-pure | Pure.hs | # LANGUAGE CPP #
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE DerivingStrategies #-}
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleIn... | null | https://raw.githubusercontent.com/iijlab/postgresql-pure/2a640f102f3e3540aedbcf4cfb5d1ed10310f773/src/Database/PostgreSQL/Pure.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DataKinds #
# LANGUAGE DefaultSignatures #
# LANGUAGE DerivingStrategies #
# LANGUAGE OverloadedLabels #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -Wno-redundant-constraints #
These warnings are raised, although ... | # LANGUAGE CPP #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE InstanceSigs #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NamedFieldPuns ... |
07a79b76d64bb3d6e425bc9c3a74cbcf16e0c284bc944ec13a3a7cdc7f1257b7 | ingesolvoll/kee-frame | api.cljc | (ns kee-frame.api)
(defprotocol Navigator
(dispatch-current! [_])
(navigate! [_ url]))
(defprotocol Router
(data->url [_ data])
(url->data [_ url])) | null | https://raw.githubusercontent.com/ingesolvoll/kee-frame/caeddaf8fdb2bab6e16573453d13141b3ba12378/src/kee_frame/api.cljc | clojure | (ns kee-frame.api)
(defprotocol Navigator
(dispatch-current! [_])
(navigate! [_ url]))
(defprotocol Router
(data->url [_ data])
(url->data [_ url])) | |
f0b1dadc1caf06e6c792be4d49e2514a99830803a06fe875123225a0bb1ee877 | sadiqj/ocaml-esp32 | typedtree.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/sadiqj/ocaml-esp32/33aad4ca2becb9701eb90d779c1b1183aefeb578/typing/typedtree.mli | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
* By comparison with { ! :
- Every { ! Longindent.t } is accompanied by a resolved { ! Path.t }... |
58ca6e3a56a13264e3a42016af3d1817f539cf26de8e3172a0450c5800248984 | mars0i/masonclj | GUI.clj | This software is copyright 2016 , 2017 , 2018 , 2019 by ,
and is distributed under the Gnu General Public License version 3.0
;; as specified in the the file LICENSE.
;(set! *warn-on-reflection* true)
(ns example.GUI
(:require [example.Sim :as sim]
[masonclj.properties :as props]
[cloj... | null | https://raw.githubusercontent.com/mars0i/masonclj/c5ff56c54749832b4c0a390332154072755e7bf0/example/src/example/GUI.clj | clojure | as specified in the the file LICENSE.
(set! *warn-on-reflection* true)
see comment on the implementation below
method, normally, in the sense that the method to run would be chosen
at runtime by the actual class used. Rather, with a static method,
the declared class of a variable determines at compile time which ... | This software is copyright 2016 , 2017 , 2018 , 2019 by ,
and is distributed under the Gnu General Public License version 3.0
(ns example.GUI
(:require [example.Sim :as sim]
[masonclj.properties :as props]
[clojure.math.numeric-tower :as math])
(:import [example snipe Sim]
... |
395b6970c830911b53e85f4e9498666e76c392fe3048572b2f962754e993054e | tolysz/prepare-ghcjs | PSQ.hs | # LANGUAGE Trustworthy #
# LANGUAGE BangPatterns , NoImplicitPrelude #
Copyright ( c ) 2008 ,
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions
-- are met:
--
-- * Redistributions of source code... | null | https://raw.githubusercontent.com/tolysz/prepare-ghcjs/8499e14e27854a366e98f89fab0af355056cf055/spec-lts8/base/GHC/Event/PSQ.hs | haskell | All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above
copyright notice, this list of conditions and the following
disclaimer.
... | # LANGUAGE Trustworthy #
# LANGUAGE BangPatterns , NoImplicitPrelude #
Copyright ( c ) 2008 ,
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
COPYRIGHT OWNER OR ANY DIRECT , INDIRECT ,
INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES
( INCLUDING , BUT NOT LIMITED TO , P... |
f13991b7a8abfe0d4948124047eaea8a64dbe3845d86311be87ddb8bab94a94f | wireless-net/erlang-nommu | ssh_unicode_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2005 - 2014 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Publi... | null | https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/ssh/test/ssh_unicode_SUITE.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitatio... | Copyright Ericsson AB 2005 - 2014 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
ct : run_test([{suite,"ssh_unicode_SUITE... |
a857be2f5782f2149dfef0c0e48be30d095cff2a490119d3367e0577ea7680d1 | TheLortex/mirage-monorepo | s.ml | { { { Copyright ( C ) 2012 - 2014 Anil Madhavapeddy < >
* Copyright ( c ) 2014
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
... | null | https://raw.githubusercontent.com/TheLortex/mirage-monorepo/b557005dfe5a51fc50f0597d82c450291cfe8a2a/duniverse/ocaml-cohttp/cohttp/src/s.ml | ocaml | * The [IO] module defines the blocking interface for reading and writing to
Cohttp streams
* ['a t] represents a blocking monad state
* [a >>= b] will pass the result of [a] to the [b] function. This is a
monadic [bind].
* [return a] will construct a constant IO value.
* [ic] represents an input channel
... | { { { Copyright ( C ) 2012 - 2014 Anil Madhavapeddy < >
* Copyright ( c ) 2014
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
... |
5c1c870e3f066a3ad38ff0466291b9bcb1b3082f9e1b84527c16b41ad9cf7126 | madjestic/Haskell-OpenGL-Tutorial | Rendering.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE InstanceSigs #
module NGL.Rendering where
import Graphics.Rendering.OpenGL as GL hiding (Color, Constant)
import Graphics.UI.GLFW as GLFW
import Control.Monad
import Control.Applicative
import System.Exit ( exitWith, ExitCode(..) )
import Foreign.Marshal.Array
import Foreign.... | null | https://raw.githubusercontent.com/madjestic/Haskell-OpenGL-Tutorial/9f685ddde9d6c5d2cc9c2c62f214ca0d43e717c7/rectangle_with_texture_blending/NGL/Rendering.hs | haskell |
Declaring VBO: vertices
Declaring VBO: UVs
| # LANGUAGE FlexibleInstances #
# LANGUAGE InstanceSigs #
module NGL.Rendering where
import Graphics.Rendering.OpenGL as GL hiding (Color, Constant)
import Graphics.UI.GLFW as GLFW
import Control.Monad
import Control.Applicative
import System.Exit ( exitWith, ExitCode(..) )
import Foreign.Marshal.Array
import Foreign.... |
bb5b5f2dbe96088ff387aaf296b23cc95dc2140f9f70c621d585d942e308addd | xapi-project/xenvm | lvdisplay.ml | LVM compatible bits and pieces
open Cmdliner
open Xenvm_common
open Lwt
let print_verbose vg lv =
let read_write =
let all =
(if List.mem Lvm.Lv.Status.Read lv.Lvm.Lv.status
then [ "read" ] else []) @
(if List.mem Lvm.Lv.Status.Write lv.Lvm.Lv.status
then [ "write" ] else []) in
... | null | https://raw.githubusercontent.com/xapi-project/xenvm/401754dfb05376b5fc78c9290453b006f6f38aa1/xenvm/lvdisplay.ml | ocaml | Example output:
/dev/packer-virtualbox-iso-vg/root:packer-virtualbox-iso-vg:3:1:-1:1:132661248:16194:-1:0:-1:252:0
access
volume status
internal logical volume number
open count
size in sectors
current size in extents
allocated extents
allocation policy
read ahead sectors | LVM compatible bits and pieces
open Cmdliner
open Xenvm_common
open Lwt
let print_verbose vg lv =
let read_write =
let all =
(if List.mem Lvm.Lv.Status.Read lv.Lvm.Lv.status
then [ "read" ] else []) @
(if List.mem Lvm.Lv.Status.Write lv.Lvm.Lv.status
then [ "write" ] else []) in
... |
504152a546bff4b1bf1d6e32334ccc167d85b24aaa820272e2bcff4236083897 | chordify/HarmTrace-Base | General.hs | {-# OPTIONS_GHC -Wall #-}
# LANGUAGE FlexibleContexts #
--------------------------------------------------------------------------------
-- |
Module : HarmTrace . Base . . General
Copyright : ( c ) 2012 - -2016 , Chordify BV
License : LGPL-3
--
-- Maintainer :
-- Stability : ex... | null | https://raw.githubusercontent.com/chordify/HarmTrace-Base/cd1a0651ec29f08b1d8328f20e8569cb358587d8/src/HarmTrace/Base/Parse/General.hs | haskell | # OPTIONS_GHC -Wall #
------------------------------------------------------------------------------
|
Maintainer :
Stability : experimental
Portability : non-portable
Summary: Some general parsing utilities used for parsing textual chord
representations.
-----------------------------------------... | # LANGUAGE FlexibleContexts #
Module : HarmTrace . Base . . General
Copyright : ( c ) 2012 - -2016 , Chordify BV
License : LGPL-3
parseData
, parseDataWithErrors
, parseDataSafe
, pString
, pLineEnd
, pManyTill
, module Text.ParserCombinators.UU
, module Text.ParserCombin... |
32446b423960194547372042020038ea368bbf01e99424f487424c41aad1bb73 | levex/haskell-doom | Language.hs | # LANGUAGE KindSignatures #
# LANGUAGE ExistentialQuantification #
# LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleContexts #
# LANGUAGE UndecidableInstances #
# LANGUAGE ScopedTypeVariables #
module Graphics.Shader.Language where
import Graphics.Shader.Types
import Data.List (intercalate)
import GH... | null | https://raw.githubusercontent.com/levex/haskell-doom/30ec4e0c5fa6bf10cbce99e27e3d7027afbdb980/src/Graphics/Shader/Language.hs | haskell | ARGUMENT TYPES | # LANGUAGE KindSignatures #
# LANGUAGE ExistentialQuantification #
# LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleContexts #
# LANGUAGE UndecidableInstances #
# LANGUAGE ScopedTypeVariables #
module Graphics.Shader.Language where
import Graphics.Shader.Types
import Data.List (intercalate)
import GH... |
fc105bb6310361f63c14f40037e0d0596e8d1b68e8c84fea21fcbc3918665c34 | synduce/Synduce | maxcount.ml | * @synduce -s 2 -NB
type 'a clist =
| Single of 'a
| Concat of 'a clist * 'a clist
type 'a list =
| Elt of 'a
| Cons of 'a * 'a list
let rec maxcount = function
| Elt a -> a, 1
| Cons (hd, tl) ->
let amax, acnt = maxcount tl in
max amax hd, if hd > amax then 1 else acnt + if hd = amax then 1 else... | null | https://raw.githubusercontent.com/synduce/Synduce/42d970faa863365f10531b19945cbb5cfb70f134/benchmarks/incomplete/list/maxcount.ml | ocaml | * @synduce -s 2 -NB
type 'a clist =
| Single of 'a
| Concat of 'a clist * 'a clist
type 'a list =
| Elt of 'a
| Cons of 'a * 'a list
let rec maxcount = function
| Elt a -> a, 1
| Cons (hd, tl) ->
let amax, acnt = maxcount tl in
max amax hd, if hd > amax then 1 else acnt + if hd = amax then 1 else... | |
5cc98c1f49f79763f26c1dee00ff0bc8630d70852b2930afa54c0f9c8563f262 | herbelin/coq-hh | libnames.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/herbelin/coq-hh/296d03d5049fea661e8bdbaf305ed4bf6d2001d2/library/libnames.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* Turn a global reference into a con... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Pp
open Util
open Names
... |
300a01bbe5274d5356b3c45be861edab69e2c4a2fb8ba0c7f8f99e1103202baa | prepor/condo | system_test.ml | open! Core.Std
open! Async.Std
open! Import
module S = System
let%expect_test "place snapshot" =
let snapshot = Instance.init_snaphot () |> Instance.snapshot_to_yojson in
let%bind s = system () in
let%bind () = S.place_snapshot s ~name:"nginx" ~snapshot in
print_endline (In_channel.read_all "/tmp/condo_state"... | null | https://raw.githubusercontent.com/prepor/condo/b9a16829e6ffef10df2fefdadf143b56d33f0b97/test/system_test.ml | ocaml | open! Core.Std
open! Async.Std
open! Import
module S = System
let%expect_test "place snapshot" =
let snapshot = Instance.init_snaphot () |> Instance.snapshot_to_yojson in
let%bind s = system () in
let%bind () = S.place_snapshot s ~name:"nginx" ~snapshot in
print_endline (In_channel.read_all "/tmp/condo_state"... | |
98da21e0647e1e18cb3445de009de334c00c324ed0e495ec0a3608cf5c7af250 | aryx/fork-efuns | scroll.ml | (*s: features/scroll.ml *)
(*s: copyright header2 *)
(***********************************************************************)
(* *)
xlib for
(* *)
... | null | https://raw.githubusercontent.com/aryx/fork-efuns/8f2f8f66879d45e26ecdca0033f9c92aec2b783d/features/scroll.ml | ocaml | s: features/scroll.ml
s: copyright header2
*********************************************************************
... | xlib for
Fabrice Le Fessant , projet Para / SOR , INRIA Rocquencourt
Copyright 1998 Institut National de Recherche en Informatique et
Automatique . Distributed only by permission .
open Efuns
open Move
let forward_screen frame =
frame.... |
8c28a1bdb95ae7a943523577200dba72184f278e7eaf3f65cdb31a629fb6e63f | clash-lang/ghc-tcplugins-extra | Constraint.hs | module Internal.Constraint (newGiven, flatToCt, overEvidencePredType) where
import GhcApi.GhcPlugins
import GhcApi.Constraint
(Ct(..), CtEvidence(..), CtLoc, ctLoc, ctEvId, mkNonCanonical)
import Panic (panicDoc)
import TcType (TcType)
import Constraint (QCInst(..))
import TcEvidence (EvTerm(..))
import TcPluginM (... | null | https://raw.githubusercontent.com/clash-lang/ghc-tcplugins-extra/20a6cc71b6fef6e92bca4eda0abdb776403ceb31/src-ghc-8.8/Internal/Constraint.hs | haskell | | Create a new [G]iven constraint, with the supplied evidence. This must not
be invoked from 'tcPluginInit' or 'tcPluginStop', or it will panic.
| Modify the predicate type of the evidence term of a constraint | module Internal.Constraint (newGiven, flatToCt, overEvidencePredType) where
import GhcApi.GhcPlugins
import GhcApi.Constraint
(Ct(..), CtEvidence(..), CtLoc, ctLoc, ctEvId, mkNonCanonical)
import Panic (panicDoc)
import TcType (TcType)
import Constraint (QCInst(..))
import TcEvidence (EvTerm(..))
import TcPluginM (... |
022b43d2950437b13a63e7d08727a43b7a92231e45ce159c4001761dec8ba6a2 | trevorbernard/cljzmq-examples | project.clj | (defproject cljzmq-examples "0.1.0-SNAPSHOT"
:description "zguide examples ported to cljzmq"
:url "-examples"
:license {:name "LGPLv3+"
:url ""}
:dependencies [[org.clojure/clojure "1.5.1"]
[org.zeromq/cljzmq "0.1.4"]])
| null | https://raw.githubusercontent.com/trevorbernard/cljzmq-examples/d76df4b1f07749efa566c4bf8bdd4ec3ca0b26a6/project.clj | clojure | (defproject cljzmq-examples "0.1.0-SNAPSHOT"
:description "zguide examples ported to cljzmq"
:url "-examples"
:license {:name "LGPLv3+"
:url ""}
:dependencies [[org.clojure/clojure "1.5.1"]
[org.zeromq/cljzmq "0.1.4"]])
| |
924d550c17b87260051ab36b4b874cb7f58280adef988a28335828a187cb96ae | AbstractMachinesLab/caramel | ast_helper.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/ocaml-lsp-server/vendor/merlin/upstream/ocaml_403/parsing/ast_helper.ml | ocaml | ************************************************************************
OCaml
... | , LexiFi
Copyright 2012 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
* Helpers to produce Parsetree fragments
open Asttypes
open Parsetree
open Docstrings
type lid = Longide... |
333a16fb1a4de0a54e77f4fdcf004579bc17ada3955172f2994deabd19ab263c | chaoxu/mgccl-haskell | chbp.hs | import System.IO
import Data.Graph.Inductive
import Data.Maybe
import Newick
import Data.Tree
import Data.List
import Rosalind
import Data.Set hiding (map, filter, null, foldl)
main :: IO ()
main = do c <- getLine
t' <-loop []
let w = words c
t = fromJust $ normalCharacterTable t'
... | null | https://raw.githubusercontent.com/chaoxu/mgccl-haskell/bb03e39ae43f410bd2a673ac2b438929ab8ef7a1/rosalind/chbp.hs | haskell | import System.IO
import Data.Graph.Inductive
import Data.Maybe
import Newick
import Data.Tree
import Data.List
import Rosalind
import Data.Set hiding (map, filter, null, foldl)
main :: IO ()
main = do c <- getLine
t' <-loop []
let w = words c
t = fromJust $ normalCharacterTable t'
... | |
f4b2e53a489e536a19e5b8870b09d69abcf48c97b8106cf355fda92162df8718 | OpenC2-org/ocas | act_distill.erl | @author
( C ) 2017 , sFractal Consulting LLC
-module(act_distill).
%%%-------------------------------------------------------------------
%%%
%%% All rights reserved.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%%%
%%% Redistribution and use in source and binary forms, with or without... | null | https://raw.githubusercontent.com/OpenC2-org/ocas/c15132d9f37b1e0e29884456a520557c25b22f38/apps/ocas/src/action_servers/act_distill.erl | erlang | -------------------------------------------------------------------
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this... | @author
( C ) 2017 , sFractal Consulting LLC
-module(act_distill).
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
OWNER OR ANY DIRECT , INDIRECT , INCIDENTAL ,
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES (... |
d935d93478776a50d2bcda3ca41ee0cbd4e125aff4ba35adef8e79d433bd7344 | fgalassi/cs61a-sp11 | 3.16.scm | (define (count-pairs x)
(if (not (pair? x))
0
(+ (count-pairs (car x))
(count-pairs (cdr x))
1)))
returns 3
- > [ 1| * ] - > [ 2| * ] - > [ 3|/ ]
(define a1 (list 1 2 3))
returns 4
- > [ 1| * ] - > [ * | * ]
; | |
; v v
[ 3|/ ]
(define b2 (cons 3... | null | https://raw.githubusercontent.com/fgalassi/cs61a-sp11/66df3b54b03ee27f368c716ae314fd7ed85c4dba/homework/3.16.scm | scheme | | |
v v
-> [*|*]
| |
v v
[*|*]
| |
v v
never returns
^ |
| |
------------------- | (define (count-pairs x)
(if (not (pair? x))
0
(+ (count-pairs (car x))
(count-pairs (cdr x))
1)))
returns 3
- > [ 1| * ] - > [ 2| * ] - > [ 3|/ ]
(define a1 (list 1 2 3))
returns 4
- > [ 1| * ] - > [ * | * ]
[ 3|/ ]
(define b2 (cons 3 nil))
(define a2 (cons 1 (cons b2 b2)... |
8304070aa0069a2992e5792a91b2b0984cc5df97c8f4bbc773665fad06f382f3 | amir343/avlang | avl_port.erl | Copyright ( c ) 2016 - 2017
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing, software
distributed... | null | https://raw.githubusercontent.com/amir343/avlang/36b14f476327c38d7fb75a787e1e8fd89f25919e/src/avl_port.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright ( c ) 2016 - 2017
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(avl_port).
-behaviour(type_interface).
-include("type_macros.hrl").
-export([ abs_form/0
, lub/0
, name/0
]).... |
030d0491e85d7ec3d5306cf27d18926a311b176a817db301b142daed7e5fa04f | Incanus3/ExiL | fe-rules.lisp | (in-package :exil)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; strategies
;; TODO: this shouldn't take function, instead it should seem more like
;; a function definition - it should take name and body, pass the body to parser
;; to create the strategy (which will probably stil... | null | https://raw.githubusercontent.com/Incanus3/ExiL/de0f7c37538cecb7032cc1f2aa070524b0bc048d/src/front-end/fe-rules.lisp | lisp |
strategies
TODO: this shouldn't take function, instead it should seem more like
a function definition - it should take name and body, pass the body to parser
to create the strategy (which will probably still be just a function)
and then store the strategy in the environment under given name
public
public
publi... | (in-package :exil)
(defun defstrategyf (name function)
(add-strategy *current-environment* name function
(format nil "(defstrategy ~A ~A)" name function))
nil)
(defmacro defstrategy (name function)
"define new strategy"
`(defstrategyf ',name ,function))
(defun undefstrategyf (name)
(rem-strategy *curren... |
dfa785f8f2a3727533f319c226d430b1760c4bba25fc097a10b5a2bae7542728 | walck/learn-physics | SimpleVec.hs | # OPTIONS_GHC -Wall #
{-# LANGUAGE Safe #-}
|
Module : Physics . Learn .
Copyright : ( c ) 2012 - 2019
License : BSD3 ( see LICENSE )
Maintainer : < >
Stability : experimental
Basic operations on the vector type ' ' , such as vector addition
and scalar multiplicat... | null | https://raw.githubusercontent.com/walck/learn-physics/99611ca49940b78a0e13402f35082805cc7db294/src/Physics/Learn/SimpleVec.hs | haskell | # LANGUAGE Safe #
| The additive inverse of a vector.
| Sum of a list of vectors.
| Vector addition.
| Vector subtraction.
| Scalar multiplication, where the scalar is on the left
and the vector is on the right.
| Scalar multiplication, where the scalar is on the right
and the vector is on the left.
| Divi... | # OPTIONS_GHC -Wall #
|
Module : Physics . Learn .
Copyright : ( c ) 2012 - 2019
License : BSD3 ( see LICENSE )
Maintainer : < >
Stability : experimental
Basic operations on the vector type ' ' , such as vector addition
and scalar multiplication .
This module is... |
2ddaf091ffdcfbb211b0010e8e848925069e375a7ef6fabc4212ffe1d2f1e9c4 | LesleyLai/ocamlpt | sphere.ml | open Base
open Vec3
type t = {center: Vec3.t; radius: float; material: Material.t}
let create center radius material =
{center; radius; material}
void get_sphere_uv(const vec3 & p , double & u , double & v ) {
= ( ) , p.x ( ) ) ;
auto theta = asin(p.y ( ) ) ;
u = 1-(phi + pi ) / ( 2*pi ) ;
... | null | https://raw.githubusercontent.com/LesleyLai/ocamlpt/65c72fc473e98e1fe802b25807dc74a19a6a3d3e/lib/sphere.ml | ocaml | open Base
open Vec3
type t = {center: Vec3.t; radius: float; material: Material.t}
let create center radius material =
{center; radius; material}
void get_sphere_uv(const vec3 & p , double & u , double & v ) {
= ( ) , p.x ( ) ) ;
auto theta = asin(p.y ( ) ) ;
u = 1-(phi + pi ) / ( 2*pi ) ;
... | |
4cd823a15f24c080abfad5d1b28a7a0d8373667cd203586774f778f3d642e998 | spl/ivy | dcheckdef.mli |
*
* Copyright ( c ) 2006 ,
* < >
* < >
* < >
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are
* met :
*
* 1 . Redistributions of source... | null | https://raw.githubusercontent.com/spl/ivy/b1b516484fba637eb24e83d27555d273495e622b/src/deputy/dcheckdef.mli | ocaml |
*
* Copyright ( c ) 2006 ,
* < >
* < >
* < >
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are
* met :
*
* 1 . Redistributions of source... | |
7bf5e73c124796c84ec3a53815bb12b3376cd30192fe2b32b47e97b4f6adbf58 | achirkin/vulkan | DeclaredNames.hs | {-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE Strict #-}
module Write.Util.DeclaredNames
( DeclaredNames, baseDeclaredNames
, DeclaredIdent (..), DIThingMembers (..)
, diToImportSpec, diToExportSpec
, combineExportSpecs, importToExp... | null | https://raw.githubusercontent.com/achirkin/vulkan/b2e0568c71b5135010f4bba939cd8dcf7a05c361/genvulkan/src/Write/Util/DeclaredNames.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE OverloadedStrings #
# LANGUAGE Strict #
| I want to have unambiguous set of haskell identifiers globally for
the library. Thus, it should be possible to lookup module names
(for export or import) by identifiers.
| I limit number of ways to express imports and... | # LANGUAGE DeriveGeneric #
module Write.Util.DeclaredNames
( DeclaredNames, baseDeclaredNames
, DeclaredIdent (..), DIThingMembers (..)
, diToImportSpec, diToExportSpec
, combineExportSpecs, importToExportSpec
) where
import Control.DeepSeq
import Data.List (union... |
c9e335f8ff964eaedb0c206683468107b275e79c1be5ddcb77c061fe6b20a8c0 | nikita-volkov/rebase | Scientific.hs | module Rebase.Data.Text.Lazy.Builder.Scientific
(
module Data.Text.Lazy.Builder.Scientific
)
where
import Data.Text.Lazy.Builder.Scientific
| null | https://raw.githubusercontent.com/nikita-volkov/rebase/7c77a0443e80bdffd4488a4239628177cac0761b/library/Rebase/Data/Text/Lazy/Builder/Scientific.hs | haskell | module Rebase.Data.Text.Lazy.Builder.Scientific
(
module Data.Text.Lazy.Builder.Scientific
)
where
import Data.Text.Lazy.Builder.Scientific
| |
5f9613c2fba957b33c45127a6847602badd0b5cba4f6b092ca58d95939f0ff39 | formal-land/coq-of-ocaml | disabled_list.ml | let l1 : int list = []
let l2 = [1; 2; 3; 4]
let l3 = [1, "one"; 2, "two"]
let s1 = List.length l1
let s2 = List.length l2
let h _ = List.hd l2
let t _ = List.tl l2
let x _ = List.nth l2 1
let rl = List.rev l2
let ll = List.append l2 l2
let rll = List.rev_append l2 l2
let lc = List.concat [l1; l2; l1; l2]
let lf = Lis... | null | https://raw.githubusercontent.com/formal-land/coq-of-ocaml/c9c86b08eb19d7fd023f48029cc5f9bf53f6a11c/tests/disabled_list.ml | ocaml | Iterators
List scanning
List searching
Association lists
Lists of pairs
Sorting | let l1 : int list = []
let l2 = [1; 2; 3; 4]
let l3 = [1, "one"; 2, "two"]
let s1 = List.length l1
let s2 = List.length l2
let h _ = List.hd l2
let t _ = List.tl l2
let x _ = List.nth l2 1
let rl = List.rev l2
let ll = List.append l2 l2
let rll = List.rev_append l2 l2
let lc = List.concat [l1; l2; l1; l2]
let lf = Lis... |
b45c6438e7938b21bf010d4c993fa1f795bf6f93367379355e381e45ee5f0e9f | processone/ejabberd | mod_push_mnesia.erl | %%%----------------------------------------------------------------------
%%% File : mod_push_mnesia.erl
Author : < >
%%% Purpose : Mnesia backend for Push Notifications (XEP-0357)
Created : 15 Jul 2017 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2017 - 2023 ProcessOne
%%%
%%% This program is free softwa... | null | https://raw.githubusercontent.com/processone/ejabberd/c103182bc7e5b8a8ab123ce02d1959a54e939480/src/mod_push_mnesia.erl | erlang | ----------------------------------------------------------------------
File : mod_push_mnesia.erl
Purpose : Mnesia backend for Push Notifications (XEP-0357)
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope t... | Author : < >
Created : 15 Jul 2017 by < >
ejabberd , Copyright ( C ) 2017 - 2023 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU General Public License along
wit... |
724728407a493e5e813095d966cdefa918e0d11db67151cc136ee86f616968f0 | ahrefs/monorobot | github.ml | open Base
open Devkit
open Printf
open Github_j
type t =
| Push of commit_pushed_notification
| Pull_request of pr_notification
| PR_review of pr_review_notification
| PR_review_comment of pr_review_comment_notification
| Issue of issue_notification
| Issue_comment of issue_comment_notification
| Commit_... | null | https://raw.githubusercontent.com/ahrefs/monorobot/3be7fa1c78bd01f15ef1aebf0cbfae8faa060f64/lib/github.ml | ocaml | all other events
handle "Merge <any branch> into <feature branch>" commits when they are merged into main branch
we should have already seen these commits on the feature branch but for some reason they are distinct:true
Parse a payload. The type of the payload is detected from the headers.
* [gh_l... | open Base
open Devkit
open Printf
open Github_j
type t =
| Push of commit_pushed_notification
| Pull_request of pr_notification
| PR_review of pr_review_notification
| PR_review_comment of pr_review_comment_notification
| Issue of issue_notification
| Issue_comment of issue_comment_notification
| Commit_... |
74387dc680e35ea25aeed30830f58664bf0eb2c491d379f8cd72511ec64435f6 | lamdu/momentu | MRUMemo.hs | Copied & modified from the public - domain uglymemo package by
- Lennart Augustsson
- Lennart Augustsson
-}
module Data.MRUMemo
( memoIO, memoIOPure, memo
) where
import Control.Concurrent.MVar
import Control.Lens.Operators ((<&>))
import Data.IORef
import System.IO.Unsafe (unsafePerformIO)
import P... | null | https://raw.githubusercontent.com/lamdu/momentu/7ba3c75469cfbad521d446e2bbefee1ed69d4406/src/Data/MRUMemo.hs | haskell | | Memoize the given function with a single most-recently-used value
^Function to memoize
^Function to memoize | Copied & modified from the public - domain uglymemo package by
- Lennart Augustsson
- Lennart Augustsson
-}
module Data.MRUMemo
( memoIO, memoIOPure, memo
) where
import Control.Concurrent.MVar
import Control.Lens.Operators ((<&>))
import Data.IORef
import System.IO.Unsafe (unsafePerformIO)
import P... |
b753bc168aa2812a7822287de22653cd0d2f18c7e6e69a5e20c8b3ef93238420 | ericnormand/lispcast-clojure-core-async | chapter11.clj | Exercise 1
(defn work-session []
(go
(let [t (async/timeout 10000)]
(loop []
(let [[val ch] (alts! [t
telephone-chan
email-chan
todo-chan] :priority true)]
(if (= ch t)
(println "Bre... | null | https://raw.githubusercontent.com/ericnormand/lispcast-clojure-core-async/ac1140be188a261155eb353928aa03f9f8048eb1/exercises/chapter11.clj | clojure | Example | Exercise 1
(defn work-session []
(go
(let [t (async/timeout 10000)]
(loop []
(let [[val ch] (alts! [t
telephone-chan
email-chan
todo-chan] :priority true)]
(if (= ch t)
(println "Bre... |
0251a33eee87b09b4cd3e56638f073dc73eeb132ad15269d51f465fb238a6c9b | finnishtransportagency/harja | erilliskustannus_kyselyt.clj | (ns harja.kyselyt.erilliskustannus-kyselyt
"Erilliskustannuksiin liittyvät tietokantakyselyt"
(:require [jeesql.core :refer [defqueries]]
[harja.kyselyt.konversio :as konv]))
(defqueries "harja/kyselyt/erilliskustannus_kyselyt.sql"
{:positional? true})
| null | https://raw.githubusercontent.com/finnishtransportagency/harja/587654c25f7ce458ef87078b2d3a4edd7c7f6159/src/clj/harja/kyselyt/erilliskustannus_kyselyt.clj | clojure | (ns harja.kyselyt.erilliskustannus-kyselyt
"Erilliskustannuksiin liittyvät tietokantakyselyt"
(:require [jeesql.core :refer [defqueries]]
[harja.kyselyt.konversio :as konv]))
(defqueries "harja/kyselyt/erilliskustannus_kyselyt.sql"
{:positional? true})
| |
ebf8995bb1e0be1d4184575dc3b1cecd7808e72b4b10cd79ef9e72f7e2243400 | bsaleil/lc | peval.scm.scm | ;;------------------------------------------------------------------------------
Macros
(##define-macro (def-macro form . body)
`(##define-macro ,form (let () ,@body)))
(def-macro (FLOATvector-const . lst) `',(list->vector lst))
(def-macro (FLOATvector? x) `(vector? ,x))
(def-macro (FLOATvector . lst... | null | https://raw.githubusercontent.com/bsaleil/lc/ee7867fd2bdbbe88924300e10b14ea717ee6434b/tools/benchtimes/resultVMIL-lc-gsc-lc/LCnaive/peval.scm.scm | scheme | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Gabriel benchmarks
C benchmarks
Other benchmarks
-------------------------------... | Macros
(##define-macro (def-macro form . body)
`(##define-macro ,form (let () ,@body)))
(def-macro (FLOATvector-const . lst) `',(list->vector lst))
(def-macro (FLOATvector? x) `(vector? ,x))
(def-macro (FLOATvector . lst) `(vector ,@lst))
(def-macro (FLOATmake-vector n . init) `(make-vector ,... |
22dec2238047d446c8b6041ff01130854df7a0b4d2ca0cb8dd525654f3c4c2ec | crategus/cl-cffi-gtk | application-menu.lisp | ;;; Example Application Menu - 2021-10-10
(in-package :gtk-application)
(defparameter *menu-ui*
"<interface>
<menu id='menubar'>
<submenu>
<attribute name='label'>File</attribute>
</submenu>
<submenu>
<attribute name='label'>Edit</attribute>
</submenu>
<submenu>
<attribute name=... | null | https://raw.githubusercontent.com/crategus/cl-cffi-gtk/7f5a09f78d8004a71efa82794265f2587fff98ab/demo/gtk-application/application-menu.lisp | lisp | Example Application Menu - 2021-10-10
Create an application
Read the menus from a string
Set the application menu
Set the menubar
Create an application window
Define action entries for the menu items
Add the action entries to the application window
Show the application window
Run the application |
(in-package :gtk-application)
(defparameter *menu-ui*
"<interface>
<menu id='menubar'>
<submenu>
<attribute name='label'>File</attribute>
</submenu>
<submenu>
<attribute name='label'>Edit</attribute>
</submenu>
<submenu>
<attribute name='label'>View</attribute>
<section>
... |
28fbf394c3eacd270259037c98ccda9aef68fbf5e2a1398e41e841c67b93b56a | edicl/cl-interpol | util.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CL - INTERPOL ; Base : 10 -*-
$ Header : /usr / local / cvsrep / cl - interpol / util.lisp , v 1.12 2008/07/23 14:41:37 edi Exp $
Copyright ( c ) 2003 - 2008 , Dr. . All rights reserved .
;;; Redistribution and use in source and binary forms, with or withou... | null | https://raw.githubusercontent.com/edicl/cl-interpol/70a1137f41dd8889004dbab9536b1adeac2497aa/util.lisp | lisp | Syntax : COMMON - LISP ; Package : CL - INTERPOL ; Base : 10 -*-
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and... | $ Header : /usr / local / cvsrep / cl - interpol / util.lisp , v 1.12 2008/07/23 14:41:37 edi Exp $
Copyright ( c ) 2003 - 2008 , Dr. . All rights reserved .
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
(in-package... |
2648530482bcc78c8ca232deebda3b601682cf33076b5b9f73f2c65b4d24c19c | mbj/stratosphere | DimensionProperty.hs | module Stratosphere.NetworkFirewall.RuleGroup.DimensionProperty (
DimensionProperty(..), mkDimensionProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data Dimensi... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/networkfirewall/gen/Stratosphere/NetworkFirewall/RuleGroup/DimensionProperty.hs | haskell | module Stratosphere.NetworkFirewall.RuleGroup.DimensionProperty (
DimensionProperty(..), mkDimensionProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data Dimensi... | |
f61f0fae4ced8082f15810ad5615c22f95288a8174a4306ff56951184a065268 | tolysz/ghcjs-stack | Main.hs | module Main where
import Foo
main :: IO ()
main = return ()
| null | https://raw.githubusercontent.com/tolysz/ghcjs-stack/83d5be83e87286d984e89635d5926702c55b9f29/special/cabal/Cabal/tests/PackageTests/PreProcess/Main.hs | haskell | module Main where
import Foo
main :: IO ()
main = return ()
| |
02d98b3d473599485995307811a360ea7a8155bae08ac1373d810705dc2e83df | reanimate/reanimate | 09_Camera.hs | animation :: Animation
animation = docEnv $ mapA (withFillOpacity 1) $ scene $ do
cam <- newObject Camera
txt <- newObject $ center $ latex "Fixed (non-cam)"
oModifyS txt $ do
oTopY .= screenTop
oZIndex .= 2
circle <- newObject $ withFillColor "blue" $ mkCircle 1
cameraAttach cam circle
circleR... | null | https://raw.githubusercontent.com/reanimate/reanimate/5ea023980ff7f488934d40593cc5069f5fd038b0/playground/snippets/09_Camera.hs | haskell | animation :: Animation
animation = docEnv $ mapA (withFillOpacity 1) $ scene $ do
cam <- newObject Camera
txt <- newObject $ center $ latex "Fixed (non-cam)"
oModifyS txt $ do
oTopY .= screenTop
oZIndex .= 2
circle <- newObject $ withFillColor "blue" $ mkCircle 1
cameraAttach cam circle
circleR... | |
9d2a03f00f62660b196bf4eed4951db9fbb1b713daf5d2d6649a32bbd0b52923 | krajj7/BotHack | item.clj | (ns bothack.item
(:require [clojure.tools.logging :as log]
[clojure.string :as string]
[bothack.itemtype :refer :all]
[bothack.delegator :refer :all]
[bothack.itemid :refer :all]
[bothack.util :refer :all]))
(def ^:private item-fields
[:slot :qty :buc :gr... | null | https://raw.githubusercontent.com/krajj7/BotHack/70226b3c8ed12d29c64068aec0acc0ca71d57adf/src/bothack/item.clj | clojure | (log/debug raw)
called
named
nil :uncursed :cursed :blessed
:fixed :rustproof :fireproof ...
nil or number
worn / wielded | (ns bothack.item
(:require [clojure.tools.logging :as log]
[clojure.string :as string]
[bothack.itemtype :refer :all]
[bothack.delegator :refer :all]
[bothack.itemid :refer :all]
[bothack.util :refer :all]))
(def ^:private item-fields
[:slot :qty :buc :gr... |
97220344a17591bfb10ceafb8b85f1fe69028d2ac7529afb116a09ab9de48db6 | alanz/ghc-exactprint | Issue91.hs | module Issue91 where
Based on -exactprint/issues/91
foo = case hi of
_ -> hi
_ -> hi
_ -> hi
| null | https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc88/Issue91.hs | haskell | module Issue91 where
Based on -exactprint/issues/91
foo = case hi of
_ -> hi
_ -> hi
_ -> hi
| |
c1d9112b37373450431c94e579306872e47cff83ce39f81b8ec281387cc4b58f | mirage/ptt | relay_map.ml | let src = Logs.Src.create "ptt.relay-map"
module Log = (val Logs.src_log src)
type t = {
postmaster: Emile.mailbox
; domain: [ `host ] Domain_name.t
; map: (Emile.local, Colombe.Forward_path.t list) Hashtbl.t
}
let postmaster {postmaster; _} = postmaster
let domain {domain; _} = domain
let empty ~postmaster ... | null | https://raw.githubusercontent.com/mirage/ptt/80411d4e1eedc989fe4f092d60ed9d56bfd2dbcf/lib/relay_map.ml | ocaml | let src = Logs.Src.create "ptt.relay-map"
module Log = (val Logs.src_log src)
type t = {
postmaster: Emile.mailbox
; domain: [ `host ] Domain_name.t
; map: (Emile.local, Colombe.Forward_path.t list) Hashtbl.t
}
let postmaster {postmaster; _} = postmaster
let domain {domain; _} = domain
let empty ~postmaster ... | |
8fd850eab1d0f63d3d5ca28be5c76d94c6cea7a6b0b8e54a18649ca6eb0494dd | semilin/layoup | evtest4.lisp |
(MAKE-LAYOUT :NAME "evtest4" :MATRIX (APPLY #'KEY-MATRIX 'NIL) :SHIFT-MATRIX
NIL :KEYBOARD NIL) | null | https://raw.githubusercontent.com/semilin/layoup/27ec9ba9a9388cd944ac46206d10424e3ab45499/data/layouts/evtest4.lisp | lisp |
(MAKE-LAYOUT :NAME "evtest4" :MATRIX (APPLY #'KEY-MATRIX 'NIL) :SHIFT-MATRIX
NIL :KEYBOARD NIL) | |
6b80604d65538845091187830809910f3e6b04942b136bad589fd69ff9196372 | CodyReichert/qi | package.lisp | ;;;
Copyright ( c ) 2007 , All Rights Reserved
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; * Redistributions of source code must retain the above copyright
;;; notice, this list of condit... | null | https://raw.githubusercontent.com/CodyReichert/qi/9cf6d31f40e19f4a7f60891ef7c8c0381ccac66f/dependencies/salza2/package.lisp | lisp |
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form... | Copyright ( c ) 2007 , All Rights Reserved
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
(defpackage #:salza2
(:use #:cl)
(:export
#:reset
#:deflate-compressor
#:callback
#:write-bits
#:write-octet
#:... |
dff9be2d81a17269b41030888bed7676421e83e1a14a4929ea692ae81a96067d | altenwald/rdbms | rdbms_table_test.erl | -module(rdbms_table_test).
-include_lib("eunit/include/eunit.hrl").
setup() ->
rdbms_cluster:start_master(),
ok.
teardown(_) ->
rdbms_cluster:leave(rdbms),
ok.
all_test_() ->
{foreach,
local,
fun setup/0,
fun teardown/1,
[
fun create_table_test/1
... | null | https://raw.githubusercontent.com/altenwald/rdbms/2972173281ae1ac3bcce836c5fda4751395f7c23/test/rdbms_table_test.erl | erlang | -module(rdbms_table_test).
-include_lib("eunit/include/eunit.hrl").
setup() ->
rdbms_cluster:start_master(),
ok.
teardown(_) ->
rdbms_cluster:leave(rdbms),
ok.
all_test_() ->
{foreach,
local,
fun setup/0,
fun teardown/1,
[
fun create_table_test/1
... | |
68550c59b82e4a6b262cdc7b80fd9f10e56ef19e89a6485dcb7da823e35280e2 | stchang/macrotypes | stlc+reco+var-tests.rkt | #lang s-exp macrotypes/examples/stlc+reco+var
(require "rackunit-typechecking.rkt")
(check-type (λ ([n : Int]) (var b = (tup [c = n]) as (∨ [b : (× [c : Int])])))
: (→ Int (∨ [b : (× [c : Int])])))
;; define-type-alias
(define-type-alias Integer Int)
(define-type-alias ArithBinOp (→ Int Int Int))
( define... | null | https://raw.githubusercontent.com/stchang/macrotypes/05ec31f2e1fe0ddd653211e041e06c6c8071ffa6/macrotypes-test/tests/macrotypes/stlc%2Breco%2Bvar-tests.rkt | racket | define-type-alias
error , Complex undefined
records (ie labeled tuples)
record errors
variants
variant errors
previous tuple tests: ------------------------------------------------------------
wont work anymore
(check-type (tup 1 2 3) : (× Int Int Int))
(check-type (tup 1 "1" #f +) : (× Int String Bool (→ Int I... | #lang s-exp macrotypes/examples/stlc+reco+var
(require "rackunit-typechecking.rkt")
(check-type (λ ([n : Int]) (var b = (tup [c = n]) as (∨ [b : (× [c : Int])])))
: (→ Int (∨ [b : (× [c : Int])])))
(define-type-alias Integer Int)
(define-type-alias ArithBinOp (→ Int Int Int))
(check-type ((λ ([x : Int]) ... |
5dbd5c8334b39b69b5b4d8ae59e3c4e100904ec897d8533506245968126e6c82 | Kalimehtar/gtk-cffi | file-chooser-dialog.lisp | (in-package :gtk-cffi)
(defclass file-chooser-dialog (dialog file-chooser)
())
(defcfun "gtk_file_chooser_dialog_new" :pointer
(title :string) (parent pobject) (action file-chooser-action)
(but1-text :string) (but1-response dialog-response)
(but2-text :string) (but2-response dialog-response)
(null :pointer)... | null | https://raw.githubusercontent.com/Kalimehtar/gtk-cffi/fbd8a40a2bbda29f81b1a95ed2530debfe2afe9b/gtk/file-chooser-dialog.lisp | lisp | (in-package :gtk-cffi)
(defclass file-chooser-dialog (dialog file-chooser)
())
(defcfun "gtk_file_chooser_dialog_new" :pointer
(title :string) (parent pobject) (action file-chooser-action)
(but1-text :string) (but1-response dialog-response)
(but2-text :string) (but2-response dialog-response)
(null :pointer)... | |
8be3678c524557a416062ecc1f073fbbf87249e02aec201cf8da096331881961 | fredrikt/yxa | sipsocket_blacklist.erl | %%%-------------------------------------------------------------------
%%% File : sipsocket_blacklist.erl
@author < >
%%% @doc Sipsocket blacklist gen_server and interface functions.
%%% Keeps track of destinations that recently has failed to
respond to SIP messages . Read more in ... | null | https://raw.githubusercontent.com/fredrikt/yxa/85da46a999d083e6f00b5f156a634ca9be65645b/src/transportlayer/sipsocket_blacklist.erl | erlang | -------------------------------------------------------------------
File : sipsocket_blacklist.erl
@doc Sipsocket blacklist gen_server and interface functions.
Keeps track of destinations that recently has failed to
@end
-------------------------------------------------------------------
-compile... | @author < >
respond to SIP messages . Read more in RFC3263 and 4321 .
@since 19 Feb 2006 by < >
@private
-module(sipsocket_blacklist).
-behaviour(gen_server).
-export([start_link/0
]).
-export([report_unreachable/3,
report_unreachable/4,
remove_blacklisting/1,
remove_blacklistin... |
0f9dae7f5c13f7ebbcf5e5fbef335bd7138388626860ae311b8934fa39b880a8 | apinf/proxy42 | proxy42_plugins.erl | -module(proxy42_plugins).
-export([]).
-compile(export_all).
-behaviour(gen_server).
-define(SERVER, ?MODULE).
-define(APP, proxy42_core).
start() ->
gen_server:start_link({local, ?SERVER}, ?MODULE, [], [{hibernate_after, 5000}]).
init(_opts) ->
{ok, Plugins} = application:get_env(proxy42_core, plugins),
... | null | https://raw.githubusercontent.com/apinf/proxy42/01b483b711881391e8306bf64b83b4df9d0bc832/apps/proxy42_core/src/proxy42_plugins.erl | erlang | TODO: Detect failures and crash
TODO: Distributiion. Handle table locations and othe props.
TODO: Check slug for duplicates
TODO: Then create tables
TODO: Then add to ets/mnesia
TODO: Register slug, register strategies, get rid of catch all.
Unknown opts must cause a crash. | -module(proxy42_plugins).
-export([]).
-compile(export_all).
-behaviour(gen_server).
-define(SERVER, ?MODULE).
-define(APP, proxy42_core).
start() ->
gen_server:start_link({local, ?SERVER}, ?MODULE, [], [{hibernate_after, 5000}]).
init(_opts) ->
{ok, Plugins} = application:get_env(proxy42_core, plugins),
... |
0f5d9c33f7e1cf283a423c3de5749894ce6903c3b8f0e939099808d293ece251 | mjstewart/rejig | Main.hs | module Main
where
--------------------------------------------------------------------------------
-- standard imports
import Text.Megaparsec
import Text.PrettyPrint
( render
)
import qualified Data.Text.IO as TIO
import qualified Options.Applicative as O
imports by Rejig *
import Rejig.Parser
import Rejig... | null | https://raw.githubusercontent.com/mjstewart/rejig/f359cfba44196671df5210da714e07a5ba64263c/src/Main.hs | haskell | ------------------------------------------------------------------------------
standard imports
------------------------------------------------------------------------------
For testing | module Main
where
import Text.Megaparsec
import Text.PrettyPrint
( render
)
import qualified Data.Text.IO as TIO
import qualified Options.Applicative as O
imports by Rejig *
import Rejig.Parser
import Rejig.Settings
import Rejig.Sorter
import Rejig.Pretty
( showPretty
)
fileInput :: O.Parser Input
f... |
bbbd739ecfca2e60888b578ddbfa584e5be9e9087e7a7c95a0fb50cc6a77051c | samuelrivas/moka | mok_internal_functions_aux.erl | Copyright ( c ) 2012 , < >
%%% All rights reserved.
%%% Redistribution and use in source and binary forms, with or without
%%% modification, are permitted provided that the following conditions are met:
%%% * Redistributions of source code must retain the above copyright
%%% notice, this list of conditio... | null | https://raw.githubusercontent.com/samuelrivas/moka/92521e43d1d685794f462ed49403c99baeae0226/test/acceptance/mok_internal_functions_aux.erl | erlang | All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistr... | Copyright ( c ) 2012 , < >
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS "
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES
( INCLUDING , BUT NOT LIMITED TO , PROCUREMENT OF SUBSTI... |
2390281232a968ea7ebd3cd96bea8c0d5796971a2df2dcd9863e81f541e5f7e8 | basho/riak_test | replication_upgrade.erl | -module(replication_upgrade).
-behavior(riak_test).
-export([confirm/0]).
-include_lib("eunit/include/eunit.hrl").
confirm() ->
OrigDelay = rt_config:get(rt_retry_delay, 1000),
lager:info("Original rt_retry_delay is ~p", [OrigDelay]),
rt_config:set(rt_retry_delay, OrigDelay*5),
NewDelay = rt_config:ge... | null | https://raw.githubusercontent.com/basho/riak_test/8170137b283061ba94bc85bf42575021e26c929d/tests/replication_upgrade.erl | erlang | halfass randomization
initial replication run, homogeneous cluster
upgrade the nodes, one at a time
Prior to 1.4.8 riak_repl registered
as a service before completing all
initialization including establishing
realtime connections.
for the connection in the case of the
node version being < 1.4.8, but currently... | -module(replication_upgrade).
-behavior(riak_test).
-export([confirm/0]).
-include_lib("eunit/include/eunit.hrl").
confirm() ->
OrigDelay = rt_config:get(rt_retry_delay, 1000),
lager:info("Original rt_retry_delay is ~p", [OrigDelay]),
rt_config:set(rt_retry_delay, OrigDelay*5),
NewDelay = rt_config:ge... |
e3d65e1803bd48fd4bc54beb79f1b81e19f717992785b01db3105775d05e6aa5 | wireapp/wire-server | RPC.hs | -- This file is part of the Wire Server implementation.
--
Copyright ( C ) 2022 Wire Swiss GmbH < >
--
-- This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License... | null | https://raw.githubusercontent.com/wireapp/wire-server/090e762ec0a2026a266c1fd2a288301b3759d92f/services/brig/src/Brig/RPC.hs | haskell | This file is part of the Wire Server implementation.
This program is free software: you can redistribute it and/or modify it under
later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTI... | Copyright ( C ) 2022 Wire Swiss GmbH < >
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option ) any
You should have received a copy of the GNU Affero General Public License along
module Brig.RPC where
import Bi... |
34e654a6d2e3c3a8dc2aefa915316548b333f7956348de68396370e513ae6fdf | ocaml-multicore/ocaml-tsan | odoc_latex.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-multicore/ocaml-tsan/f54002470cc6ab780963cc81b11a85a820a40819/ocamldoc/odoc_latex.mli | ocaml | ************************************************************************
OCaml
... | , projet Cambium , INRIA Paris
Copyright 2022 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
val separate_files : bool ref
val latex_titles : (int * string) list ref
val latex_value_prefix : string ref... |
d97e72768a62088cc12537885c232faf9d09d627b99e111993b0237b6e1e81d8 | mario-goulart/spock | driver.scm | ;;;; driver.scm - compiler-invocation
(define dropped '())
(define defined '())
(define assigned '())
(define referenced '())
(define undefined '())
(define used-sections '())
(define default-xref-mode #f)
(define (spock-help)
(display "(spock OPTION | FILENAME-OR-PORT ...)\n\n")
(display " Available options:\... | null | https://raw.githubusercontent.com/mario-goulart/spock/b88f08f8bc689babc433ad8288559ce5c28c52d5/driver.scm | scheme | driver.scm - compiler-invocation
XXX if "-runtime" + "-library":
xref and add compiled library.scm
of used definitions (sort sections topologically
to determine order)
XXX do this in a modular and extensible manner |
(define dropped '())
(define defined '())
(define assigned '())
(define referenced '())
(define undefined '())
(define used-sections '())
(define default-xref-mode #f)
(define (spock-help)
(display "(spock OPTION | FILENAME-OR-PORT ...)\n\n")
(display " Available options:\n\n")
(display " 'source ... |
f1124daafdbf4b421b52fa6647184e3d303355c022c8793ee778188bb1b31e45 | Twinside/FontyFruity | fontytest.hs | import Data.Maybe( fromJust )
import Data.Monoid( mempty )
import Control . ( forM _ )
import Data.Binary( decodeFile )
import qualified Data.Vector as V
import System.Environment( getArgs )
import Graphics.Text.TrueType
import Graphics.Text.TrueType.Internal
dumpFont :: Font -> IO ()
dumpFont font = do
putStrLn .... | null | https://raw.githubusercontent.com/Twinside/FontyFruity/636eeff6547478ba304cdd7b85ecaa24acc65062/test-src/fontytest.hs | haskell | import Data.Maybe( fromJust )
import Data.Monoid( mempty )
import Control . ( forM _ )
import Data.Binary( decodeFile )
import qualified Data.Vector as V
import System.Environment( getArgs )
import Graphics.Text.TrueType
import Graphics.Text.TrueType.Internal
dumpFont :: Font -> IO ()
dumpFont font = do
putStrLn .... | |
7650796d67cec61cef88fc888141d3ddfddcf86cc6a74509d13c8c44118926c3 | YoshikuniJujo/test_haskell | try-no-dynamic-dsc-sets.hs | # LANGUAGE QuasiQuotes #
# , LambdaCase , OverloadedStrings #
# LANGUAGE ScopedTypeVariables , RankNTypes , TypeApplications #
# LANGUAGE GADTs , TypeFamilies #
# LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleContexts , FlexibleInstances , UndecidableInstances #... | null | https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/37eb9675bf1c0b008c7af4843713c91623c1e7f4/themes/gui/vulkan/try-my-vulkan-snd/app/try-no-dynamic-dsc-sets.hs | haskell | # LANGUAGE PatternSynonyms, ViewPatterns # | # LANGUAGE QuasiQuotes #
# , LambdaCase , OverloadedStrings #
# LANGUAGE ScopedTypeVariables , RankNTypes , TypeApplications #
# LANGUAGE GADTs , TypeFamilies #
# LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleContexts , FlexibleInstances , UndecidableInstances #... |
1c461676856ae7fb060eb08973e0e53f097d4ef1f9dcba8ce6af7ec91828416d | softwarelanguageslab/maf | R5RS_ad_list-3.scm | ; Changes:
* removed : 0
* added : 2
* swaps : 2
* negated predicates : 1
; * swapped branches: 0
* calls to i d fun : 3
(letrec ((create-list (lambda size
(<change>
(let* ((list-size (if (null? size) 10 (car size)))
(content... | null | https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_ad_list-3.scm | scheme | Changes:
* swapped branches: 0 | * removed : 0
* added : 2
* swaps : 2
* negated predicates : 1
* calls to i d fun : 3
(letrec ((create-list (lambda size
(<change>
(let* ((list-size (if (null? size) 10 (car size)))
(content (make-vector list-size 0))
... |
d38c20ca2b750da3cca04f8fad5a788a19223bd3a17f66e80ba11910f3ae3c4b | arnemileswinter/itc | Format.hs | module Data.Clock.IntervalTree.Format where
import Data.Clock.IntervalTree
-- | pretty print a stamp, mathematical notation like in the original paper.
fmtStamp :: Stamp -> String
fmtStamp (Stamp i e) = "(" <> fmtId i <> ", " <> fmtEv e <> ")"
where
fmtId ITCIdOff = "0"
fmtId ITCIdOn = "1"
fmtId (ITCIdB... | null | https://raw.githubusercontent.com/arnemileswinter/itc/539425dfaed2441c5cdf821487ab39ee50ab41c2/src/Data/Clock/IntervalTree/Format.hs | haskell | | pretty print a stamp, mathematical notation like in the original paper. | module Data.Clock.IntervalTree.Format where
import Data.Clock.IntervalTree
fmtStamp :: Stamp -> String
fmtStamp (Stamp i e) = "(" <> fmtId i <> ", " <> fmtEv e <> ")"
where
fmtId ITCIdOff = "0"
fmtId ITCIdOn = "1"
fmtId (ITCIdBranch l r) = "(" <> fmtId l <> ", " <> fmtId r <> ")"
fmtEv (ITCEventLea... |
47d64c3858f096177ebc6fd7d248b19ae34ae50a211968326b1fb20505483273 | mylesmegyesi/metis | util_spec.clj | (ns metis.util-spec
(:use
[speclj.core]
[metis.util]))
(describe "utility functions"
(context "blank?"
(it "returns true for an empty string"
(should (blank? "")))
(it "returns true for an empty collection"
(should (blank? [])))
(it "returns false for a non-empty string"
(s... | null | https://raw.githubusercontent.com/mylesmegyesi/metis/44127ac75fb6ce6235a516bf6a6f8a9222e5dd67/spec/metis/util_spec.clj | clojure | (ns metis.util-spec
(:use
[speclj.core]
[metis.util]))
(describe "utility functions"
(context "blank?"
(it "returns true for an empty string"
(should (blank? "")))
(it "returns true for an empty collection"
(should (blank? [])))
(it "returns false for a non-empty string"
(s... | |
f181b9277c81a99bc4a3a00fc826ccdbe0606eb632fb015a1e4428abda9ed4f7 | RedPRL/stagedtt | Conversion.ml | open Core
module S = Syntax
module D = Domain
module I = Inner
exception NotConvertible
open struct
type mode =
| Full
(** When in {!const.Full} mode, the conversion checker will unfold
{i all} {!const.Syntax.Global} values before checking convertability. *)
| Rigid
(** When in {!const.Rig... | null | https://raw.githubusercontent.com/RedPRL/stagedtt/f88538036b51cebb83ebb0b418ec9b089550275d/lib/nbe/Conversion.ml | ocaml | * When in {!const.Full} mode, the conversion checker will unfold
{i all} {!const.Syntax.Global} values before checking convertability.
* When in {!const.Rigid} mode, we will only unfold {!const.Syntax.Global}
values if their heads don't match.
* When in {!const.Flex} mode, we don't unfold {!const.Synt... | open Core
module S = Syntax
module D = Domain
module I = Inner
exception NotConvertible
open struct
type mode =
| Full
| Rigid
| Flex
type env =
{ mode : mode;
size : int }
module Eff = Algaeff.Reader.Make (struct type nonrec env = env end)
let get_mode () =
(Eff.read()).mode
... |
03afa4b2d170a9487169d793e3c3717fd9868bceead0e3f761fc41b151cb4f2e | mhallin/graphql_ppx | discover.ml | module C = Configurator.V1
let () =
C.main ~name:"graphql_ppx" (fun c ->
let system = C.ocaml_config_var_exn c "system" in
let flags = if system = "linux" then ["-ccopt"; "-static"] else [] in
C.Flags.write_sexp "dune.flags" flags)
| null | https://raw.githubusercontent.com/mhallin/graphql_ppx/5796b3759bdf0d29112f48e43a2f0623f7466e8a/discover/discover.ml | ocaml | module C = Configurator.V1
let () =
C.main ~name:"graphql_ppx" (fun c ->
let system = C.ocaml_config_var_exn c "system" in
let flags = if system = "linux" then ["-ccopt"; "-static"] else [] in
C.Flags.write_sexp "dune.flags" flags)
| |
8d145088e4293b194f662a5c39d1aeddfc0578ab2eba8ecfb67d431d26727a60 | nasa/Common-Metadata-Repository | granule.clj | (ns cmr.sizing.granule
(:require
[clojure.data.xml :as xml]
[cmr.sizing.util :as util]
[xml-in.core :as xml-in]))
(defn extract-size-data
[parsed-xml]
(-> parsed-xml
(xml-in/find-first [:Granule :DataGranule :SizeMBDataGranule])
first
read-string
util/mb->bytes))
(defn file-size... | null | https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/63001cf021d32d61030b1dcadd8b253e4a221662/other/cmr-exchange/ses-plugin/src/cmr/sizing/granule.clj | clojure | (ns cmr.sizing.granule
(:require
[clojure.data.xml :as xml]
[cmr.sizing.util :as util]
[xml-in.core :as xml-in]))
(defn extract-size-data
[parsed-xml]
(-> parsed-xml
(xml-in/find-first [:Granule :DataGranule :SizeMBDataGranule])
first
read-string
util/mb->bytes))
(defn file-size... | |
ad31203fba1fb4aae61b67138678518f71e2bcbbb867f607bd0afb5918cf1d72 | gedge-platform/gedge-platform | rabbit_error_logger_handler.erl | 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 /.
%%
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rabbit_error_logger_handler).
-behaviour... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbit_common/src/rabbit_error_logger_handler.erl | erlang |
API
gen_event callbacks
===================================================================
API
===================================================================
--------------------------------------------------------------------
@doc
Creates an event manager
@end
-------------------------------------------... | 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 /.
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_error_logger_handler).
-behaviour(gen_e... |
314ac5eb8e6b1e34f004d10a53e1cfbea9d549d08d0db0d8ec983d31418cf305 | valpackett/octohipster | link_spec.clj | (ns octohipster.link-spec
(:use [speclj core]
[ring.mock request]
[octohipster.link header]))
(describe "make-link-header"
(it "makes the link header"
(should= (make-link-header []) nil)
(should= (make-link-header [{:href "/hello" :rel "next"}])
"</hello>; rel=\"next\"")
(s... | null | https://raw.githubusercontent.com/valpackett/octohipster/4c1d210643940576eed42a194f810c5c719da63f/spec/octohipster/link_spec.clj | clojure | (ns octohipster.link-spec
(:use [speclj core]
[ring.mock request]
[octohipster.link header]))
(describe "make-link-header"
(it "makes the link header"
(should= (make-link-header []) nil)
(should= (make-link-header [{:href "/hello" :rel "next"}])
"</hello>; rel=\"next\"")
(s... | |
d5f5e7e72ca484d442b6941b9bf11a0f754f361a6b8ba18cbb054cae2b165662 | SchornacklabSLCU/amfinder | imgAnnotations.ml | AMFinder - img / imgAnnotations.ml
*
* MIT License
* Copyright ( c ) 2021
*
* Permission is hereby granted , free of charge , to any person obtaining a copy
* of this software and associated documentation files ( the " Software " ) , to
* deal in the Software without restriction , including wit... | null | https://raw.githubusercontent.com/SchornacklabSLCU/amfinder/1053045b431b9e9e85a7bcebea2e38cda92a8dcd/amfbrowser/sources/img/imgAnnotations.ml | ocaml | AMFinder - img / imgAnnotations.ml
*
* MIT License
* Copyright ( c ) 2021
*
* Permission is hereby granted , free of charge , to any person obtaining a copy
* of this software and associated documentation files ( the " Software " ) , to
* deal in the Software without restriction , including wit... | |
d6bf87e3c60e665d4d19c0438bbc7741fb8db906b43f898aca86df103e807bff | lukaszcz/coinduction | cNorm.mli | (* Proof normalization *)
(* Proof normalization with beta *)
val norm_beta : Evd.evar_map -> EConstr.t -> EConstr.t
(* Proof normalization with beta-iota-zeta and head-delta *)
val norm : Evd.evar_map -> EConstr.t -> EConstr.t
| null | https://raw.githubusercontent.com/lukaszcz/coinduction/b7437fe155a45f93042a5788dc62512534172dcd/src/cNorm.mli | ocaml | Proof normalization
Proof normalization with beta
Proof normalization with beta-iota-zeta and head-delta |
val norm_beta : Evd.evar_map -> EConstr.t -> EConstr.t
val norm : Evd.evar_map -> EConstr.t -> EConstr.t
|
187f5e9784503439af73cd211f87b10ea300496df58f375973259f730c03edfd | facebook/infer | llvm.ml | = = = -- / llvm.ml - LLVM OCaml Interface -------------------------------=== *
*
* Part of the LLVM Project , under the Apache License v2.0 with LLVM Exceptions .
* See for license information .
* SPDX - License - Identifier : Apache-2.0 WITH LLVM - exception
*
* = = = ------------------------------... | null | https://raw.githubusercontent.com/facebook/infer/0bebce66a92d1773f34f9c9cd9cf0c4b01c5c85c/sledge/vendor/llvm-dune/llvm-project/llvm/bindings/ocaml/llvm/llvm.ml | ocaml | not an instruction
Terminator Instructions
Logical Operators
Memory Operators
Other Operators
===-- Context error handling --------------------------------------------===
===-- Contexts ----------------------------------------------------------===
===-- Attributes ---------------------------------------------... | = = = -- / llvm.ml - LLVM OCaml Interface -------------------------------=== *
*
* Part of the LLVM Project , under the Apache License v2.0 with LLVM Exceptions .
* See for license information .
* SPDX - License - Identifier : Apache-2.0 WITH LLVM - exception
*
* = = = ------------------------------... |
ad10643d6ddd105868d93b9277887cfdcad798a4828983b657547a81c27a5b4e | RutledgePaulV/datalogger | protos.clj | (ns datalogger.protos
(:require [datalogger.impl.config :as config]
[datalogger.impl.utils :as utils]
[clojure.stacktrace :as stack])
(:import (clojure.lang MapEntry Keyword Delay Atom ISeq Volatile Namespace Symbol)
(java.util Map Set List)
(java.time Instant)
... | null | https://raw.githubusercontent.com/RutledgePaulV/datalogger/200c14fc230b9bc64d6dc0150ad2262d22c154af/src/datalogger/protos.clj | clojure | in case it includes things that aren't comparable
in case it includes things that aren't comparable | (ns datalogger.protos
(:require [datalogger.impl.config :as config]
[datalogger.impl.utils :as utils]
[clojure.stacktrace :as stack])
(:import (clojure.lang MapEntry Keyword Delay Atom ISeq Volatile Namespace Symbol)
(java.util Map Set List)
(java.time Instant)
... |
374bd66d8b617ad6d752c9b011b835210302ce4adfe6959f264dbd81f7cb525d | deadtrickster/prometheus.cl | package.lisp | (in-package #:cl-user)
(defpackage #:prometheus.sbcl
(:use #:cl #:alexandria)
(:nicknames #:prom.sbcl)
(:export #:make-threads-collector
#:make-memory-collector))
| null | https://raw.githubusercontent.com/deadtrickster/prometheus.cl/60572b793135e8ab5a857d47cc1a5fe0af3a2d53/src/collectors/sbcl/package.lisp | lisp | (in-package #:cl-user)
(defpackage #:prometheus.sbcl
(:use #:cl #:alexandria)
(:nicknames #:prom.sbcl)
(:export #:make-threads-collector
#:make-memory-collector))
| |
b16898e586b2b9ee245ca255362839c44008030946b9343b074635c1c48acc8c | mirage/irmin | tree_intf.ml |
* Copyright ( c ) 2013 - 2022 < >
* 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 S... | null | https://raw.githubusercontent.com/mirage/irmin/4936dec5bb672552c1b9f09d1c6de08ccd762605/src/irmin/tree_intf.ml | ocaml | * The type of trees.
* {1 Constructors}
* [empty ()] is the empty tree. The empty tree does not have associated
backend configuration values, as they can perform in-memory operation,
independently of any given backend.
* [singleton k c] is the tree with a single binding mapping the key [k] to
the c... |
* Copyright ( c ) 2013 - 2022 < >
* 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 S... |
4e2986ea42f9e82353ff33d98568eea37cc941c6511a275037aeb59c9a483f80 | jaspervdj/patat | Table.hs | --------------------------------------------------------------------------------
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
module Patat.Presentation.Display.Table
( Table (..)
, prettyTable
, themed
) where
---------------------------------------------------------------------... | null | https://raw.githubusercontent.com/jaspervdj/patat/9e0d0ccde9afee07ea23521546c406033afeb4f9/lib/Patat/Presentation/Display/Table.hs | haskell | ------------------------------------------------------------------------------
# LANGUAGE OverloadedStrings #
------------------------------------------------------------------------------
------------------------------------------------------------------------------
----------------------------------------------------... | # LANGUAGE RecordWildCards #
module Patat.Presentation.Display.Table
( Table (..)
, prettyTable
, themed
) where
import Data.List (intersperse, transpose)
import Patat.PrettyPrint ((<$$>))
import qualified Patat.PrettyPrint as PP
import Patat.Theme (Them... |
912165e2d42516411a46995eaa3008a27b18019e3109b4a1491a56ba60e214b9 | gregr/dKanren | dkanren-interp.rkt | #lang racket/base
(provide
evalo
)
(require
"dkanren.rkt"
)
TODO
; profile to see what terms are getting all the attention
; nest all literals under a single match clause to compress their mostly-useless scheduling
; can a weighted match prioritize symbol lookup unraveling?
; additional predicates: procedur... | null | https://raw.githubusercontent.com/gregr/dKanren/2f05275b00dfba5c2f0ca196a514c377b3b60798/dkanren-interp.rkt | racket | profile to see what terms are getting all the attention
nest all literals under a single match clause to compress their mostly-useless scheduling
can a weighted match prioritize symbol lookup unraveling?
additional predicates: procedure?, boolean?
evalo solver
tag match statements
recognize tag groups (confi... | #lang racket/base
(provide
evalo
)
(require
"dkanren.rkt"
)
TODO
never equate two literals
` # f ` in at least one env
and to ` not # f ` in at least one other env
parse initial program to produce something like a de Bruijn program representation
(define (letrec-e... |
9503490f12936695226307c5161b8754a5841286d6458b36a35de73176b47b2f | release-project/benchmarks | aco.erl | -module(aco).
-export([run/0, run/1]).
-include ("types.hrl").
%% --------------------------- Read problem specification from file ------------------------------ %%
-spec get_int (string()) -> integer().
get_int(S) ->
{N, _} = string:to_integer(S),
N.
-spec read_input(string()) -> {pos_integer(), inputs()... | null | https://raw.githubusercontent.com/release-project/benchmarks/55f042dca3a2c680e2967c59edc9636456047bd5/ACO/SMP-ACO/aco.erl | erlang | --------------------------- Read problem specification from file ------------------------------ %%
Split at space & newline.
weights and due dates respectively.
--------------------------- Run the colony ------------------------------ %%
or use lists:foldl.
Set up ets table: visible to all ants
Already exis... | -module(aco).
-export([run/0, run/1]).
-include ("types.hrl").
-spec get_int (string()) -> integer().
get_int(S) ->
{N, _} = string:to_integer(S),
N.
-spec read_input(string()) -> {pos_integer(), inputs()}.
read_input(Fname) ->
util:check_file(Fname),
case file:read_file(Fname) of
{ok,B} ... |
25089f19ad9198795e1ce2632cbbed5abf31f6932555c434cc9bfe49e55516b9 | hirokai/PaperServer | Science.hs | # LANGUAGE QuasiQuotes #
-----------------------------------------------------------------------------
--
-- Module : Model.PaperReader.Science
-- Copyright :
-- License : BSD3
--
Maintainer :
-- Stability : Experimental
-- Portability :
--
-- |
--
----------------------------------------------... | null | https://raw.githubusercontent.com/hirokai/PaperServer/b577955af08660253d0cd11282cf141d1c174bc0/Parser/Publisher/Science.hs | haskell | ---------------------------------------------------------------------------
Module : Model.PaperReader.Science
Copyright :
License : BSD3
Stability : Experimental
Portability :
|
---------------------------------------------------------------------------
For Science
_title :: PaperReader -... | # LANGUAGE QuasiQuotes #
Maintainer :
module Parser.Publisher.Science (
scienceReader,
stkeReader
) where
import Parser.Import
import Parser.Utils
import qualified Data.Text as T
import qualified Data.Text.Lazy as TL
import Data.Text.Read
import Control.Applicative
import Text.XML.Cursor
_scienceReade... |
61c34720381a14d9164e7ae1f19e68a90c2ffea3a2b6039ae4b03602e2ece99d | luke-clifton/shh | release.hs | #! /usr/bin/env runghc
# LANGUAGE TemplateHaskell #
# LANGUAGE ExtendedDefaultRules #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE LambdaCase #
import System.FilePath.Glob
import Shh
import System.Exit
import Control.Exception
import qualified Data.ByteString.Lazy.Char8 as B
loadEnv SearchPath
hackageVersion :: Str... | null | https://raw.githubusercontent.com/luke-clifton/shh/f2d13b27a1ae86d003deb1d78e79d9a76a0f8882/release.hs | haskell | # LANGUAGE OverloadedStrings # | #! /usr/bin/env runghc
# LANGUAGE TemplateHaskell #
# LANGUAGE ExtendedDefaultRules #
# LANGUAGE LambdaCase #
import System.FilePath.Glob
import Shh
import System.Exit
import Control.Exception
import qualified Data.ByteString.Lazy.Char8 as B
loadEnv SearchPath
hackageVersion :: String -> IO String
hackageVersion pkg... |
72d82ba099d329f09bf953d6a0c6f0ec3b4d5b3eca8e0103ac539e68dae7eb20 | kadena-io/chainweb-node | Create.hs | {-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TupleSections #
# LANGUAGE ... | null | https://raw.githubusercontent.com/kadena-io/chainweb-node/aff594a05096341d01ae50a9f37056b2519025d2/src/Chainweb/Cut/Create.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE OverloadedStrings #
|
Stability: experimental
The steps for extending a Cut with a new Block are usually as follows:
blocked. In which case another chain must be choosen.
(time should be current time, nonce should be 0) and send work header
to the miner.
valid... | # LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TupleSections #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
Module : Chainweb .... |
08267c162f02d983c64e2bf3ebd3cf5aff0fe677e533d789dbd502125b7ebfbe | ocamllabs/vscode-ocaml-platform | ppx_tools.ml | open Base
module Dumpast = Dumpast
let get_preprocessed_ast path =
match Ppxlib.Ast_io.read_binary path with
| exception Sys_error s -> Error s
| Ok s -> Ok s
| Error e -> Error e
let get_reparsed_code_from_pp_file ~path =
get_preprocessed_ast path
|> Result.map ~f:(fun source ->
match Ppxlib.Ast... | null | https://raw.githubusercontent.com/ocamllabs/vscode-ocaml-platform/a7256e8be0fad29c34bfc9a7015cb2d76802fe29/src/ppx_tools/ppx_tools.ml | ocaml | open Base
module Dumpast = Dumpast
let get_preprocessed_ast path =
match Ppxlib.Ast_io.read_binary path with
| exception Sys_error s -> Error s
| Ok s -> Ok s
| Error e -> Error e
let get_reparsed_code_from_pp_file ~path =
get_preprocessed_ast path
|> Result.map ~f:(fun source ->
match Ppxlib.Ast... | |
73de24e35c89048eeffb785a2e1ac72d9569d99380c75e4b2af9358864a07f57 | clojure/core.typed | parse_unparse.clj | Copyright ( c ) , contributors .
;; 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
;... | null | https://raw.githubusercontent.com/clojure/core.typed/f5b7d00bbb29d09000d7fef7cca5b40416c9fa91/typed/checker.jvm/src/clojure/core/typed/checker/jvm/parse_unparse.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 .
(ns ^:skip-wiki clojure.core.typed.checker.jvm.parse-unparse
(:require [clojure.core.typed :as t]
[clojure.core.typed.checker.type-rep :as r]
[clojure.core.typed.checker.type-ctors :as c]
[clojure.core.typed.checker.name-env :as nme-env]... |
2803c565d80e2591e3cc0c183698ac9b262c5d117085cab7fe05d4d91e374514 | schell/odin | NextT.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
{-# LANGUAGE TypeFamilies #-}
module Control.Monad.Trans.NextT
( module Control.Monad.Trans.NextT
, NonEmpty(..)
, MonadMask(..)
) where
import Control.Monad.Catch (MonadCatch (..), MonadMask (..),
... | null | https://raw.githubusercontent.com/schell/odin/97ae1610a7abd19aa150bc7dfc132082d88ca9ea/odin-engine/src/Control/Monad/Trans/NextT.hs | haskell | # LANGUAGE TypeFamilies #
------------------------------------------------------------------------------
Class
------------------------------------------------------------------------------
type Base (m :: * -> *) :: * -> *
| Done this loop immediately, returning a value.
| Yield a computation to return to late... | # LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
module Control.Monad.Trans.NextT
( module Control.Monad.Trans.NextT
, NonEmpty(..)
, MonadMask(..)
) where
import Control.Monad.Catch (MonadCatch (..), MonadMask (..),
MonadThrow (..))
imp... |
30d138ab4bf8f8fb034b10eb30272efc027bb0c965e301de132eaa5ec3c707f0 | S8A/htdp-exercises | ex483.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-intermediate-lambda-reader.ss" "lang")((modname ex483) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp"))) (htdp... | null | https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex483.rkt | racket | about the language level of this file in a form that our tools can easily process.
(make-posn CI CI)
interpretation (make-posn c r) denotes the square at
A Board is a [List-of Square]
interpretation the position of a square and whether it is
threatened or not.
data examples: QP
data examples: [List-of QP]
N... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex483) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ((lib "image.rkt" "teachpac... |
46a9f688db7f51adb89cc44005fbcd0496095cd7dc15e24e5de6aeda60a603fd | informatimago/lisp | xkcd.lisp | -*- mode : lisp;coding : utf-8 -*-
;;;;**************************************************************************
FILE : xkcd.lisp
;;;;LANGUAGE: Common-Lisp
;;;;SYSTEM: Common-Lisp
USER - INTERFACE :
;;;;DESCRIPTION
;;;;
;;;; Builds an inverted index of xkcd.
;;;;
<... | null | https://raw.githubusercontent.com/informatimago/lisp/571af24c06ba466e01b4c9483f8bb7690bc46d03/future/xkcd.lisp | lisp | coding : utf-8 -*-
**************************************************************************
LANGUAGE: Common-Lisp
SYSTEM: Common-Lisp
DESCRIPTION
Builds an inverted index of xkcd.
Note: xmls-tools and parse-html don't agree on the format of
sexps representing xml/html attrib... | FILE : xkcd.lisp
USER - INTERFACE :
< PJB > < >
MODIFICATIONS
2014 - 10 - 22 < PJB > Created .
AGPL3
Copyright 2014 - 2016
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 of the Licens... |
af7d4656d91458f63c6c88cd50a3a3b4cf3e29de7ce9016992d7e3eccb4fc782 | dustin/environ | gen_sup.erl | %%
%%
%%
-module(gen_sup).
-behavior(supervisor).
-export([init/1]).
Generic supervisor initialization
init([Rv|_Args]) -> {ok, Rv}.
| null | https://raw.githubusercontent.com/dustin/environ/a45e714752a38e0b67ebd7e8d0bf8fb0c74d7945/src/gen_sup.erl | erlang |
-module(gen_sup).
-behavior(supervisor).
-export([init/1]).
Generic supervisor initialization
init([Rv|_Args]) -> {ok, Rv}.
| |
6ea2661efc0b0b4637a0f2b12900c7abe01a1b9a615b6348bd712005aa76a4aa | caisah/sicp-exercises-and-examples | ex_2.2.scm | ;; Consider the problem of representing line segments in a plane. Each segment is
;; represented as a pair of points: a starting point and an ending point. Define a
;; constructor make-segment and selectors start-segment and end-segment that define
;; the representation of segments in terms of points. Furthermore, a po... | null | https://raw.githubusercontent.com/caisah/sicp-exercises-and-examples/605c698d7495aa3474c2b6edcd1312cb16c5b5cb/2.1.2-abstraction_barriers/ex_2.2.scm | scheme | Consider the problem of representing line segments in a plane. Each segment is
represented as a pair of points: a starting point and an ending point. Define a
constructor make-segment and selectors start-segment and end-segment that define
the representation of segments in terms of points. Furthermore, a point can ... |
(define (new-point x y)
(cons x y))
(define (x-point p)
(car p))
(define (y-point p)
(cdr p))
(define (make-segment p1 p2)
(cons p1 p2))
(define (midpoint-segment s)
(new-point (/ (+ (car (car s)) (car (cdr s))) 2)
(/ (+ (cdr (car s)) (cdr (cdr s))) 2)))
(define (print-point p)
(newline)
(disp... |
98b52a0a98fb990130094a1f39c7851e9affccad3c939c7a867c7201b79e066a | ucsd-progsys/230-wi19-web | Axiomatic.hs | {-@ LIQUID "--reflection" @-}
{-@ LIQUID "--ple" @-}
{-@ LIQUID "--diff" @-}
{- LIQUID "--short-names" @-}
TODO : to have to rewrite this annotation !
TODO : to have to rewrite this annotation !
--------------------------------------------------------------------------------
-- | Inspired by
-- ... | null | https://raw.githubusercontent.com/ucsd-progsys/230-wi19-web/7f5fc5414886fae4e2382cd5a0e48f638be06f0f/src/Week10/Axiomatic.hs | haskell | @ LIQUID "--reflection" @
@ LIQUID "--ple" @
@ LIQUID "--diff" @
LIQUID "--short-names" @
------------------------------------------------------------------------------
| Inspired by
------------------------------------------------------------------------------
# LANGUAGE GADTs #
--------... | TODO : to have to rewrite this annotation !
TODO : to have to rewrite this annotation !
module Axiomatic where
import Prelude hiding ((++))
import ProofCombinators
import qualified State as S
import Expressions
import Imp
import BigStep hiding (And)
| ... |
d2cc747406d89bacd7ab5ca15a25c91cc61515f181d62b9f3dcd87ba6dea93cb | mini-monkey/mini-monkey | prop_user.erl | -module(prop_user).
-include_lib("proper/include/proper.hrl").
-import(mm_test_common, [setup/0,
allow_admin/2,
allow_subscribe/2,
allow_publish/2,
disallow_admin/2,
disallow_subscribe/2,
disallow_publish/2]).
%%%%%%%%%%%%%%%%%%
%%% Properties %%%
%%%%%%%%%%%%%%%%%%
prop_user_minimal_pub_sub_t... | null | https://raw.githubusercontent.com/mini-monkey/mini-monkey/4afa4385256c0f1d23db522c0725c3291a8c86c8/test/prop_user.erl | erlang |
Properties %%%
setup the system
make the connections
login both
enter room
mock permissions
pub / sub
receive messaage
revoke permissions
make sure we cannot subscribe and publish
clean-up
make the connections
login both
enter room
publisher cannot publish without permission
allow publisher to publish... | -module(prop_user).
-include_lib("proper/include/proper.hrl").
-import(mm_test_common, [setup/0,
allow_admin/2,
allow_subscribe/2,
allow_publish/2,
disallow_admin/2,
disallow_subscribe/2,
disallow_publish/2]).
prop_user_minimal_pub_sub_test() ->
?FORALL({Token1, Token2, Room, Content, Tag}... |
257ab6c77a54c85efea4afa2762cb0350a199e11674b1b3ad17668516aec4ef8 | informatimago/lisp | annex-a.lisp | (eval-when (:compile-toplevel :load-toplevel :execute)
(setf *readtable* (copy-readtable nil)))
(in-package "COM.INFORMATIMAGO.LANGUAGES.LINC")
(defparameter *ansi-c-grammar*
'(("(6.4)" token -->
keyword
identifier
constant
string-literal
punctuator)
("(6.4)" preprocessing-token -->
... | null | https://raw.githubusercontent.com/informatimago/lisp/571af24c06ba466e01b4c9483f8bb7690bc46d03/languages/linc/annex-a.lisp | lisp | u ul
ull
lu
\.\.\.
)
)
))
))
)
(opt expression) \; (opt expression) \) statement)
(opt expression) \) statement))
)
)
)
)) | (eval-when (:compile-toplevel :load-toplevel :execute)
(setf *readtable* (copy-readtable nil)))
(in-package "COM.INFORMATIMAGO.LANGUAGES.LINC")
(defparameter *ansi-c-grammar*
'(("(6.4)" token -->
keyword
identifier
constant
string-literal
punctuator)
("(6.4)" preprocessing-token -->
... |
1eca9f2795606281d53835b1348f0a4d4a0fa4476868a273bb42c1bd8bcf6a19 | heroku/logplex | live_upgrade.erl | f(UpgradeNode).
UpgradeNode = fun () ->
case logplex_app:config(git_branch) of
"v69.9" ->
io:format(whereis(user), "at=upgrade_start cur_vsn=69.8~n", []);
"v69.10" ->
io:format(whereis(user),
"at=upgrade type=retry cur_vsn=69.8 old_vsn=69.9~n", []);
Else ->
... | null | https://raw.githubusercontent.com/heroku/logplex/fc520c44cf4687726d5d51464d3264ddc6abb0ba/upgrades/v69.9_v69.10/live_upgrade.erl | erlang | stateless
Stateful changes to HTTP drains -- gotta suspend, reload, and then
resume all drains before going for the stateless drain buffer update
stateless | f(UpgradeNode).
UpgradeNode = fun () ->
case logplex_app:config(git_branch) of
"v69.9" ->
io:format(whereis(user), "at=upgrade_start cur_vsn=69.8~n", []);
"v69.10" ->
io:format(whereis(user),
"at=upgrade type=retry cur_vsn=69.8 old_vsn=69.9~n", []);
Else ->
... |
5e9e34767a7d449ea9c860ce4c858ed91ec2a5fa4a3d0bbd078183074718d809 | rmloveland/scheme48-0.53 | inspect.scm | Copyright ( c ) 1993 - 1999 by and . See file COPYING .
; A dirty little inspector.
; This breaks abstractions left and right.
Look and feel shamelessly plagiarized from the Lucid Lisp inspector .
; Inspector state:
; thing ; object currently being inspected, obtained as (focus-object)
; menu ; c... | null | https://raw.githubusercontent.com/rmloveland/scheme48-0.53/1ae4531fac7150bd2af42d124da9b50dd1b89ec1/scheme/env/inspect.scm | scheme | A dirty little inspector.
This breaks abstractions left and right.
Inspector state:
thing ; object currently being inspected, obtained as (focus-object)
menu ; cached result of (prepare-menu thing). This is a list of
lists (<name-or-#f> <value>).
position ; position within menu; mo... | Copyright ( c ) 1993 - 1999 by and . See file COPYING .
Look and feel shamelessly plagiarized from the Lucid Lisp inspector .
(define-record-type inspector-state inspector-state?
(make-inspector-state menu position stack)
(menu inspector-state-menu)
(position inspector-state-position set-inspector-stat... |
024573cabbe9a7a13f8f6025faeed914985271fc72127322653225e3fcd24db3 | input-output-hk/cardano-ledger-byron | SlotCount.hs | {-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
# LANGUAGE GeneralizedNewtypeDeriving #
module Cardano.Chain.Slotting.SlotCount
( SlotCount(..)
)
where
import Cardano.Prelude
import Formatting.Buildable (Buildable)
import Cardan... | null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger-byron/d309449e6c303a9f0dcc8dcf172df6f0b3195ed5/cardano-ledger/src/Cardano/Chain/Slotting/SlotCount.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
| A number of slots | # LANGUAGE GeneralizedNewtypeDeriving #
module Cardano.Chain.Slotting.SlotCount
( SlotCount(..)
)
where
import Cardano.Prelude
import Formatting.Buildable (Buildable)
import Cardano.Binary (FromCBOR, ToCBOR)
newtype SlotCount = SlotCount
{ unSlotCount :: Word64
} deriving stock (Read, Show, Generic)
d... |
d8704b410f434dcd240026a01789786df01ae044b710708f014777fa68238061 | ml4tp/tcoq | vernacentries.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/toplevel/vernacentries.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* This function can be used by any c... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Misctypes
val dump_glob... |
d136a370343459b499dc392cb596ffc10b669a21ba2e8e3373b9bd10cd817d6f | TristanCacqueray/haskell-butler | Display.hs | -- | This module contains the logic to enable user access through HTTP.
module Butler.Display (
Display (..),
DisplayAddr (..),
AuthApplication (..),
OnClient,
startDisplay,
getClient,
DisplayEvent (..),
JwkStorage (..),
DisplayApplication (..),
module Butler.Display.Client,
... | null | https://raw.githubusercontent.com/TristanCacqueray/haskell-butler/68cde9a74c530c7652c1dadf9a487b35ec0d0ab4/src/Butler/Display.hs | haskell | | This module contains the logic to enable user access through HTTP.
* Application environment
Add the client to server state
Wait for client completion
Remove the client from the server state
Say goodbye
> > > displayAddrFromEnv " " @?= 8080
>>> displayAddrFromEnv "http:8080" @?= DisplayAddr Http 8080
| G... | module Butler.Display (
Display (..),
DisplayAddr (..),
AuthApplication (..),
OnClient,
startDisplay,
getClient,
DisplayEvent (..),
JwkStorage (..),
DisplayApplication (..),
module Butler.Display.Client,
serveApps,
serveDashboardApps,
) where
import Codec.Serialise.Deco... |
3d1dce7dc5013d9117be4f31b725126a5cb927b573923fc4374598681799e74f | f-o-a-m/kepler | Metrics.hs | module Network.ABCI.Server.Middleware.Metrics
( defaultBuckets
, mkMetricsMiddleware
) where
import Control.Monad (forM_)
import Control.Monad.IO.Class (MonadIO, liftIO)
import qualified Data.IORef ... | null | https://raw.githubusercontent.com/f-o-a-m/kepler/6c1ad7f37683f509c2f1660e3561062307d3056b/hs-abci-extra/src/Network/ABCI/Server/Middleware/Metrics.hs | haskell | -------------------------------------------------------------------------
mkMetrics
------------------------------------------------------------------------- | module Network.ABCI.Server.Middleware.Metrics
( defaultBuckets
, mkMetricsMiddleware
) where
import Control.Monad (forM_)
import Control.Monad.IO.Class (MonadIO, liftIO)
import qualified Data.IORef ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.