_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 |
|---|---|---|---|---|---|---|---|---|
679bc2665c3ccb30acaeade0d1a39cf852bb65be22d330edff4b781182d6917b | glebec/haskell-programming-allen-moronuki | Main.hs | # LANGUAGE TypeApplications #
module Main where
import Test.Hspec
import Test.QuickCheck
import Control . Monad
import Data . Monoid
import MadLib
import Data.List.NonEmpty
-- Exercise: Optional Monoid
data Optional a = Nada
| Only a
deriving (Eq, Show)
instance Semigroup a =>... | null | https://raw.githubusercontent.com/glebec/haskell-programming-allen-moronuki/99bd232f523e426d18a5e096f1cf771228c55f52/15-monoid-semigroup/projects/p0-scratch/src/Main.hs | haskell | Exercise: Optional Monoid
genOptional3 :: Arbitrary a => Gen (Optional a, Optional a, Optional a)
genOptional3 = (,,) <$> genOptional <*> genOptional <*> genOptional
uncurry3 :: (a -> b -> c -> d) -> (a, b, c) -> d
uncurry3 f (a, b, c) = f a b c
prop_assocOptional :: Property
prop_assocOptional = forAll (genOpti... | # LANGUAGE TypeApplications #
module Main where
import Test.Hspec
import Test.QuickCheck
import Control . Monad
import Data . Monoid
import MadLib
import Data.List.NonEmpty
data Optional a = Nada
| Only a
deriving (Eq, Show)
instance Semigroup a => Semigroup (Optional a) where... |
d63cf6a207ecead10edbefd5b77122de6b7fea98c63d9ce8d58242ca0ddcf74c | toolslive/ordma | lwt_rsocket.mli | type lwt_rsocket
val socket : Unix.socket_domain -> Unix.socket_type -> int -> lwt_rsocket
(* val show : rsocket -> string *)
val identifier : lwt_rsocket -> int
val connect : lwt_rsocket -> Unix.sockaddr -> unit Lwt.t
val close : lwt... | null | https://raw.githubusercontent.com/toolslive/ordma/e430cb48677a6c0c7847c00118c5eb4ebedebe2c/lwt_rsocket.mli | ocaml | val show : rsocket -> string
class rpoll : Lwt_engine.t | type lwt_rsocket
val socket : Unix.socket_domain -> Unix.socket_type -> int -> lwt_rsocket
val identifier : lwt_rsocket -> int
val connect : lwt_rsocket -> Unix.sockaddr -> unit Lwt.t
val close : lwt_rsocket -> unit Lwt.t
val bind ... |
e126b3becc8ba034345ff650c71afade7d209f2e22fb3cdd2862c9938cb0523f | gretay-js/ocamlfdo | clusters.ml | Adaptation of [ 1 ] to basic blocks , influenced by [ 2 ] . The use of LBR
profile information for calculating basic - block level execution counts
used here is based on algorithms described in [ 3 ] . Collection and decoding
of profile information is inspired by [ 4 ] .
[ 1 ] Optimizing function... | null | https://raw.githubusercontent.com/gretay-js/ocamlfdo/5866fe9c2bfea03bc7efb033cc7b91a3a25cf520/src/clusters.ml | ocaml | CR-someday xclerc: the various operations in this files (sorting,
extracting the argmin/argmax, etc) seem to indicate that we might
want to switch from lists to e.g. heaps. However, the execution
profile shows that the tool does not spend much time in the clustering,
so this should be low-priority (or even... | Adaptation of [ 1 ] to basic blocks , influenced by [ 2 ] . The use of LBR
profile information for calculating basic - block level execution counts
used here is based on algorithms described in [ 3 ] . Collection and decoding
of profile information is inspired by [ 4 ] .
[ 1 ] Optimizing function... |
7a05ce33634bd0a580ca36e6645f0ab1b259896588d50ff683f87c7df39b35f4 | onedata/op-worker | storage_import_delete_and_links_test_SUITE.erl | %%%--------------------------------------------------------------------
@author
( C ) 2016 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%--------------------------------------------------------------------
%%% @doc This module tests storage import
%%%... | null | https://raw.githubusercontent.com/onedata/op-worker/74254143340d6783cc90a51d971bca67536267ff/test_distributed/storage_import_delete_and_links_test_SUITE.erl | erlang | --------------------------------------------------------------------
@end
--------------------------------------------------------------------
@doc This module tests storage import
@end
-------------------------------------------------------------------
export for ct
tests
=========================================... | @author
( C ) 2016 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
-module(storage_import_delete_and_links_test_SUITE).
-author("Jakub Kudzia").
-include("modules/fslogic/fslogic_common.hrl").
-include_lib("ctool/include/test/performance.hrl").
-export([all/0, in... |
221b39f3a1c5840c7911f5fb817ce1492ec57eabb2d5d77831bc6d8ccd9effd2 | khibino/haskell-relational-record | SqlSyntax.hs | -- |
-- Module : Database.Relational.SqlSyntax
Copyright : 2017 - 2019
-- License : BSD3
--
-- Maintainer :
-- Stability : experimental
-- Portability : unknown
--
-- This module is integrated module of sql-syntax.
module Database.Relational.SqlSyntax (
module Database.Relational.SqlSyntax.Types,
... | null | https://raw.githubusercontent.com/khibino/haskell-relational-record/759b3d7cea207e64d2bd1cf195125182f73d2a52/relational-query/src/Database/Relational/SqlSyntax.hs | haskell | |
Module : Database.Relational.SqlSyntax
License : BSD3
Maintainer :
Stability : experimental
Portability : unknown
This module is integrated module of sql-syntax. | Copyright : 2017 - 2019
module Database.Relational.SqlSyntax (
module Database.Relational.SqlSyntax.Types,
module Database.Relational.SqlSyntax.Join,
module Database.Relational.SqlSyntax.Aggregate,
module Database.Relational.SqlSyntax.Query,
module Database.Relational.SqlSyntax.Fold,
module Database.... |
c422a816c54b65b9d9b549092188b8eb98fa1fcfa05b4e313748785499a71684 | hasura/pg-client-hs | Interrupt.hs | {-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DerivingStrategies #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
module Interrupt (specInterrupt) where
-------------------------------------------------------------------------------
import Control.Concurrent
( MVar,
newEmptyMVar,
putMVar,... | null | https://raw.githubusercontent.com/hasura/pg-client-hs/5793e998c20358eef6ca86b5d480956e08b7e07a/test/Interrupt.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE OverloadedStrings #
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
add an extra action so the timeout is delivered reliably
the important property is that we always get "... | # LANGUAGE DerivingStrategies #
# LANGUAGE ScopedTypeVariables #
module Interrupt (specInterrupt) where
import Control.Concurrent
( MVar,
newEmptyMVar,
putMVar,
threadDelay,
tryReadMVar,
)
import Control.Concurrent.Interrupt (interruptOnAsyncException)
import Control.Exception.Safe (Exception, on... |
64e33d59a0d436c3d8a236086d36d4030ab18f8392d1c48f25b920bb1fe92888 | cardmagic/lucash | ekko.scm | #!/usr/local/bin/scsh -s
!#
(define (main args)
(for-each (lambda (f) (display f) (write-char #\ ))
args)
(newline))
(define (ekko)
(main command-line-arguments)
)
(ekko)
| null | https://raw.githubusercontent.com/cardmagic/lucash/0452d410430d12140c14948f7f583624f819cdad/reference/scsh-0.6.6/scsh/ekko.scm | scheme | #!/usr/local/bin/scsh -s
!#
(define (main args)
(for-each (lambda (f) (display f) (write-char #\ ))
args)
(newline))
(define (ekko)
(main command-line-arguments)
)
(ekko)
| |
36bd0880698f96b05c4c4e5fc544df7d35d19616ea37199568774321252c66f0 | yapsterapp/deferst | monad_trans.cljc | (ns cats.labs.monad-trans
(:require
[cats.context :as ctx]))
(defprotocol MonadTrans
"A monad transformer abstraction."
(-lift [m mv] "Lift a value from the parameterized monad to the transformer."))
(defn lift
"Lift a value from the inner monad of a monad transformer
into a value of the monad transforme... | null | https://raw.githubusercontent.com/yapsterapp/deferst/13ef02499211b42b1876e3b170ca27e9f721ad2b/src/cats/labs/monad_trans.cljc | clojure | (ns cats.labs.monad-trans
(:require
[cats.context :as ctx]))
(defprotocol MonadTrans
"A monad transformer abstraction."
(-lift [m mv] "Lift a value from the parameterized monad to the transformer."))
(defn lift
"Lift a value from the inner monad of a monad transformer
into a value of the monad transforme... | |
5f56d881056f954457605fc1bdc4427dd6ada3e738308b51715b37ed0fa7545d | NorfairKing/smos | PostBackupSpec.hs | module Smos.Server.Handler.PostBackupSpec
( spec,
)
where
import Smos.Client
import Smos.Data.Gen ()
import Smos.Server.InterestingStore
import Smos.Server.TestUtils
import Test.Syd
import Test.Syd.Validity
spec :: Spec
spec =
describe "PostBackup" $ do
serverSpec $ do
it "produces a valid smos direct... | null | https://raw.githubusercontent.com/NorfairKing/smos/a3ed8fdbcb8f298bc49866bf6d0ee59a964ba0da/smos-server-gen/test/Smos/Server/Handler/PostBackupSpec.hs | haskell | module Smos.Server.Handler.PostBackupSpec
( spec,
)
where
import Smos.Client
import Smos.Data.Gen ()
import Smos.Server.InterestingStore
import Smos.Server.TestUtils
import Test.Syd
import Test.Syd.Validity
spec :: Spec
spec =
describe "PostBackup" $ do
serverSpec $ do
it "produces a valid smos direct... | |
e16e48bb8a227dbb05521b863bbb9840ae359e6f78a01c9ad20bbcda0da3e163 | imrehg/ypsilon | mount.scm | #!nobacktrace
Ypsilon Scheme System
Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited .
See license.txt for terms and conditions of use .
(library (ypsilon gtk mount)
(export gtk_mount_operation_get_parent
gtk_mount_operation_get_screen
gtk_mount_operation_get_type
... | null | https://raw.githubusercontent.com/imrehg/ypsilon/e57a06ef5c66c1a88905b2be2fa791fa29848514/sitelib/ypsilon/gtk/mount.scm | scheme | [end] | #!nobacktrace
Ypsilon Scheme System
Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited .
See license.txt for terms and conditions of use .
(library (ypsilon gtk mount)
(export gtk_mount_operation_get_parent
gtk_mount_operation_get_screen
gtk_mount_operation_get_type
... |
9f539cde5b8b6c523217c87abac7cae4f86ca963995ccd74e7ef7d3986933ec9 | cedlemo/OCaml-GI-ctypes-bindings-generator | Socket_msg_flags.mli | open Ctypes
type t = None | Oob | Peek | Dontroute
type t_list = t list
val of_value:
Unsigned.uint32 -> t
val to_value:
t -> Unsigned.uint32
val list_of_value:
Unsigned.uint32 -> t_list
val list_to_value:
t_list -> Unsigned.uint32
val t_list_view : t_list typ
| null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gio/Socket_msg_flags.mli | ocaml | open Ctypes
type t = None | Oob | Peek | Dontroute
type t_list = t list
val of_value:
Unsigned.uint32 -> t
val to_value:
t -> Unsigned.uint32
val list_of_value:
Unsigned.uint32 -> t_list
val list_to_value:
t_list -> Unsigned.uint32
val t_list_view : t_list typ
| |
dc891c1cd3b5988c0cec0ffaaabfd0fa397230cc87716c58cb67ed46c4e449fc | phadej/staged | Directory.hs | {-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
module Staged.Stream.Directory (
listDirectory,
recursiveListDirectory,
files,
) where
import Control.Monad.IO.Class (MonadIO (..))
import System.FilePath ((</>))
import... | null | https://raw.githubusercontent.com/phadej/staged/b51c8c508af71ddb2aca4a75030da9b2c4f9e3dd/staged-streams/src/Staged/Stream/Directory.hs | haskell | # LANGUAGE DeriveAnyClass #
| List directory.
'listDirectory' is defined using 'M.fromListM' of corresponding
function in the @directory@ package.
| Recursively (breath-first) walk through the directory structure.
| Filter with 'Dir.doesFileExist', i.e. return only existing files. | # LANGUAGE DeriveGeneric #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
module Staged.Stream.Directory (
listDirectory,
recursiveListDirectory,
files,
) where
import Control.Monad.IO.Class (MonadIO (..))
import System.FilePath ((</>))
import qualified System.Directory as Dir
i... |
ef5e552e8a46084a715175cb1ea6d644d5b634a24ac1bfc32323f6b5b714f8d5 | opencog/learn | gram-class-api.scm | ;
; gram-class-api.scm
;
; Representing word-classes as vectors of (pseudo-)connector-sets.
;
Copyright ( c ) 2017 , 2019 Linas Vepstas
;
; ---------------------------------------------------------------------
; OVERVIEW
; --------
; This file provides the `matrix-object` API that allows grammatical
; classes of word... | null | https://raw.githubusercontent.com/opencog/learn/ffd86cccfdcba360433d9a79a84ce7eb1a8f255c/scm/gram-class/gram-class-api.scm | scheme |
gram-class-api.scm
Representing word-classes as vectors of (pseudo-)connector-sets.
---------------------------------------------------------------------
OVERVIEW
--------
This file provides the `matrix-object` API that allows grammatical
classes of words to be treated as vectors of connector-sets (vectors
... | Copyright ( c ) 2017 , 2019 Linas Vepstas
(use-modules (srfi srfi-1))
(use-modules (opencog))
(use-modules (opencog persist))
(use-modules (opencog matrix))
(define-public (add-gram-class-api LLOBJ)
"
add-gram-class-api LLOBJ -- Enable (WordClass, disjunct) pairs.
This will take LLOBJ and extend it's native `l... |
c888f72d90a8a80779e8117c4968dc7bdc5790024ad5ddbe83dee40556d3adc9 | wargrey/w3s | text-decor.rkt | #lang typed/racket/base
-text-decor
(provide (all-defined-out))
(require racket/list)
(require "syntax/digicore.rkt")
(require "syntax/misc.rkt")
(require "../recognizer.rkt")
(require "color.rkt")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define css-te... | null | https://raw.githubusercontent.com/wargrey/w3s/9a716932d946a51a1105c8913f3c532eb99c823b/css/digitama/text-decor.rkt | racket |
-text-decor/#text-decoration-color-property | #lang typed/racket/base
-text-decor
(provide (all-defined-out))
(require racket/list)
(require "syntax/digicore.rkt")
(require "syntax/misc.rkt")
(require "../recognizer.rkt")
(require "color.rkt")
(define css-text-decor-line-options : (Listof Symbol) '(underline overline line-through blink))
(define css-text-d... |
5d6ee0ff56249dce5a00b33496bde95c85bbb4fc20f96753feddd3bf2fc2f420 | haskell-tools/haskell-tools | Transitive.hs | # LANGUAGE NoImplicitPrelude #
module Refactor.OrganizeImports.InstanceCarry.Transitive where
import Data.List ()
import Data.Foldable ()
| null | https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/builtin-refactorings/examples/Refactor/OrganizeImports/InstanceCarry/Transitive.hs | haskell | # LANGUAGE NoImplicitPrelude #
module Refactor.OrganizeImports.InstanceCarry.Transitive where
import Data.List ()
import Data.Foldable ()
| |
35603ea522c254b511df7589e3aa2f1faa1b6fc31661763eae79749912469d15 | karetsu/xmonad-aloysius | Commands.hs | -- | Commands to include in prompts
TODO
module Data.Commands where
import XMonad
import XMonad.Actions.Commands
commands :: X [(String, X ())]
commands = defaultCommands
| null | https://raw.githubusercontent.com/karetsu/xmonad-aloysius/9910c8db4bb75600fc9af51b9e64ab5704e8126c/app/Data/Commands.hs | haskell | | Commands to include in prompts | TODO
module Data.Commands where
import XMonad
import XMonad.Actions.Commands
commands :: X [(String, X ())]
commands = defaultCommands
|
88615676a841942c4676c8a9ae41b6e76a6b71b37e6450c0e69bef0bd7f11608 | qfpl/sv | Type.hs | # LANGUAGE GeneralizedNewtypeDeriving #
|
Module : Data . Sv . Encode . Type
Copyright : ( C ) CSIRO 2017 - 2019
License : : < >
Stability : experimental
Portability : non - portable
The core type for encoding
Module : Data.Sv.Encode.Type
Copyright : (C) CSIRO 2017-2019
L... | null | https://raw.githubusercontent.com/qfpl/sv/74aa56bcdcc0d7f1d7b5783bf59e3878dfbb64bc/sv-core/src/Data/Sv/Encode/Type.hs | haskell | written out as CSV.
from smaller ones.
from smaller ones.
names does not make sense. | # LANGUAGE GeneralizedNewtypeDeriving #
|
Module : Data . Sv . Encode . Type
Copyright : ( C ) CSIRO 2017 - 2019
License : : < >
Stability : experimental
Portability : non - portable
The core type for encoding
Module : Data.Sv.Encode.Type
Copyright : (C) CSIRO 2017-2019
L... |
1acfea7c75e866131e2ecc87b1ffc25f07b8d435ec85b8454956a987b22e5603 | bldl/magnolisp | test-foreign-1.rkt | #lang magnolisp/2014
(typedef int (#:annos foreign))
(begin-racket 1 2 3 (void))
(function (holds? x)
(#:annos [type (fn int Bool)] foreign)
(begin-racket (begin 1 #f)))
(function (f x)
(#:annos export [type (fn int int)])
(begin-racket 4 5 6)
(if (holds? x) 1 2))
(f 5)
| null | https://raw.githubusercontent.com/bldl/magnolisp/191d529486e688e5dda2be677ad8fe3b654e0d4f/tests/test-foreign-1.rkt | racket | #lang magnolisp/2014
(typedef int (#:annos foreign))
(begin-racket 1 2 3 (void))
(function (holds? x)
(#:annos [type (fn int Bool)] foreign)
(begin-racket (begin 1 #f)))
(function (f x)
(#:annos export [type (fn int int)])
(begin-racket 4 5 6)
(if (holds? x) 1 2))
(f 5)
| |
4049fac581c40faa3709bb9e302cd4c472a902a6e014ad29ccf5402e3e0e4392 | rescript-lang/rescript-compiler | super_typecore.ml | open Misc
open
open Parsetree
open Types
open Typedtree
open Btype
open Asttypes
open Parsetree
open Types
open Typedtree
open Btype *)
open Ctype
let fprintf = Format.fprintf
let sprintf = Format.sprintf
let longident = Printtyp.longident
let super_report_unification_error =... | null | https://raw.githubusercontent.com/rescript-lang/rescript-compiler/beebcfff28aba13d833fab557e4fd5fc8ea87336/jscomp/super_errors/super_typecore.ml | ocaml | this is the most frequent error. We should do whatever we can to provide
specific guidance to this generic error before giving up
btw, you can't say "final arguments". Intermediate labeled
arguments might be the ones missing
Pasted from typecore.ml. Needed for some cases in report_error below
modifie... | open Misc
open
open Parsetree
open Types
open Typedtree
open Btype
open Asttypes
open Parsetree
open Types
open Typedtree
open Btype *)
open Ctype
let fprintf = Format.fprintf
let sprintf = Format.sprintf
let longident = Printtyp.longident
let super_report_unification_error =... |
ae7ddc9cb84cd82e18c5f5c3c65db66ff4923d04931113bc2056812891f93441 | haroldcarr/learn-haskell-coq-ml-etc | Lib.hs | {-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DeriveGeneric #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE TemplateHaskell... | null | https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/topic/monads/hc-has-field/src/Lib.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE TemplateHaskell #
----------------------------------------------------------------------------
---------------------------------------------------------------------------- | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
module Lib where
import Control.Concurrent
import Control.Lens
import Control.Monad.... |
e1d9172b3f00cdd9a83865ab0e0aa5a44f445710ed4565e95e42c317b83630c1 | racket/redex | stlc-tests-lib.rkt | #lang racket/base
(require redex/reduction-semantics)
(provide stlc-tests
consistent-with?)
(define (consistent-with? t1 t2)
(define table (make-hash))
(let loop ([t1 t1]
[t2 t2])
(cond
[(and (pair? t1) (pair? t2))
(and (loop (car t1) (car t2))
(loop (cdr t1) (cdr... | null | https://raw.githubusercontent.com/racket/redex/4c2dc96d90cedeb08ec1850575079b952c5ad396/redex-examples/redex/examples/stlc-tests-lib.rkt | racket | #lang racket/base
(require redex/reduction-semantics)
(provide stlc-tests
consistent-with?)
(define (consistent-with? t1 t2)
(define table (make-hash))
(let loop ([t1 t1]
[t2 t2])
(cond
[(and (pair? t1) (pair? t2))
(and (loop (car t1) (car t2))
(loop (cdr t1) (cdr... | |
26ef3814b6c336cb315035aefcf05a7f0ba8f57069cedb4ad64fe2e5a4bb8e52 | ml4tp/tcoq | eqschemes.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/tactics/eqschemes.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* This file builds schemes relative ... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Names
open Term
open En... |
09b85caced5405300f9de6a3fdf3b6030e85fa44a94904f43cde1be326f3e82a | ghcjs/ghcjs-dom | HTMLHyperlinkElementUtils.hs | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
module GHCJS.DOM.JSFFI.Generated.HTMLHyperlinkElementUtils
(js_setHref, setHref, js_getHref, getHref, js_getOrigin, getO... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/HTMLHyperlinkElementUtils.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
| <-US/docs/Web/API/HTMLHyperlinkElementUtils.hostname Mozilla HTMLHyperlinkElementUtils.hostname documentation>
| <-US/docs/Web/API/HTMLHyperlinkElementUtils.hostname Mozilla HTMLHyperlinkElementUtils.hostname documentation... | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
module GHCJS.DOM.JSFFI.Generated.HTMLHyperlinkElementUtils
(js_setHref, setHref, js_getHref, getHref, js_getOrigin, getOrigin,
js_setProtocol, setProtocol, js_getProtocol, getProtocol,
js_setUsername, se... |
119ad543a5812bcad162ee48778d13c676301a77382fee35faabad7620e76f16 | mejgun/haskell-tdlib | OptionValue.hs | {-# LANGUAGE OverloadedStrings #-}
-- |
module TD.Data.OptionValue where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified Utils as U
-- | Represents the value of an option
data OptionValue
| Represents a boolean option @value The value of the option
OptionValueBoolean
... | null | https://raw.githubusercontent.com/mejgun/haskell-tdlib/9bd82101be6e6218daf816228f6141fe89d97e8b/src/TD/Data/OptionValue.hs | haskell | # LANGUAGE OverloadedStrings #
|
| Represents the value of an option
|
| Represents an unknown option or an option which has a default value
|
| |
module TD.Data.OptionValue where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified Utils as U
data OptionValue
| Represents a boolean option @value The value of the option
OptionValueBoolean
value :: Maybe Bool
}
OptionValueEmpty
| Represents an intege... |
0ac18c7fe61e7d2409be017336981c68b5b8ea231e6aff508c1fed320fb0ca68 | Frama-C/Frama-C-snapshot | alarmset.mli | (**************************************************************************)
(* *)
This file is part of Frama - C.
(* *)
Copyright ... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/value/alarmset.mli | ocaml | ************************************************************************
alternatives)
... | This file is part of Frama - C.
Copyright ( C ) 2007 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , v... |
fc4658ec8864481fdcf774d27241576d14e576ca0f14fe1000036d314dd0f746 | Clozure/ccl | native-activity.lisp | ;;;-*-Mode: LISP; Package: CL-USER -*-
;;;
Copyright ( C ) 2012 Clozure Associates
This file is part of Clozure CL .
;;;
Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
License , known as the LLGPL and distributed with Clozure CL as the
;;; file "LICENSE". The LLGPL consists of... | null | https://raw.githubusercontent.com/Clozure/ccl/6c1a9458f7a5437b73ec227e989aa5b825f32fd3/examples/android/native-activity.lisp | lisp | -*-Mode: LISP; Package: CL-USER -*-
file "LICENSE". The LLGPL consists of a preamble and the LGPL,
conflict, the preamble takes precedence.
Clozure CL is referenced in the preamble as the "LIBRARY."
The LLGPL is also available online at
This is supposed to be a transliteration of the code from t... | Copyright ( C ) 2012 Clozure Associates
This file is part of Clozure CL .
Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
License , known as the LLGPL and distributed with Clozure CL as the
which is distributed with Clozure CL as the file " LGPL " . Where these
(in-package... |
474b235d5876c5e22be1d60cb9b9b6e83d72fc3aa326c4a9381e11f1d7c0dfcb | stevebleazard/ocaml-json-of-jsonm | json_of_jsonm_monad.mli | type json =
[ `Null
| `Bool of bool
| `Float of float
| `String of string
| `List of json list
| `Assoc of (string * json) list
]
module type IO = sig
type 'a t
val return : 'a -> 'a t
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
end
module type Json_encoder_decoder = sig
module IO : IO
type no... | null | https://raw.githubusercontent.com/stevebleazard/ocaml-json-of-jsonm/595b90e19c5399316fcd013aa9ad6a2df48a3d73/src/json_of_jsonm_monad.mli | ocaml | * [decode_string] - decode a [string] to a [json] type
* [decode_string_exn] - the same as [decode_sting] but raises on error
* [encode_exn] - the same as [encode] but raises on error
* [encode_string] - encode a [json] type to a [string]
* [encode_string_exn] - the same as [encode_string] but raises on error
* ... | type json =
[ `Null
| `Bool of bool
| `Float of float
| `String of string
| `List of json list
| `Assoc of (string * json) list
]
module type IO = sig
type 'a t
val return : 'a -> 'a t
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
end
module type Json_encoder_decoder = sig
module IO : IO
type no... |
361d6845e317f9b1d5bad83b7ba8567225fd37376b7b01d3b74d0305012b7356 | tisnik/clojure-examples | core_test.clj | (ns sqltest3.core-test
(:require [clojure.test :refer :all]
[sqltest3.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| null | https://raw.githubusercontent.com/tisnik/clojure-examples/984af4a3e20d994b4f4989678ee1330e409fdae3/sqltest3/test/sqltest3/core_test.clj | clojure | (ns sqltest3.core-test
(:require [clojure.test :refer :all]
[sqltest3.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| |
23a4ee8b8e0cd2a1d0a0392206ff04fb6be629dd6981261c27d3c022b3cb6f4c | williamleferrand/accretio | ys_dummy.ml |
* Accretio is an API , a sandbox and a runtime for social playbooks
*
* Copyright ( C ) 2015
*
* 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 o... | null | https://raw.githubusercontent.com/williamleferrand/accretio/394f855e9c2a6a18f0c2da35058d5a01aacf6586/library/client/ys_dummy.ml | ocaml | for future use |
* Accretio is an API , a sandbox and a runtime for social playbooks
*
* Copyright ( C ) 2015
*
* 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 o... |
0577d236c6ddf5ae392375796e37931a9122a72b9ed3139ad437bcc3ae42f68b | buntine/Simply-Scheme-Exercises | 12-2.scm | ;Fix the bug in the following definition:
;(define (acronym sent) ;; wrong
( if (= ( count sent ) 1 )
( first sent )
( word ( first ( first sent ) )
; (acronym (bf sent)))))
(define (acronym sent)
(if (= (count sent) 1)
(first (first sent)... | null | https://raw.githubusercontent.com/buntine/Simply-Scheme-Exercises/c6cbf0bd60d6385b506b8df94c348ac5edc7f646/12-the-leap-of-faith/12-2.scm | scheme | Fix the bug in the following definition:
(define (acronym sent) ;; wrong
(acronym (bf sent))))) |
( if (= ( count sent ) 1 )
( first sent )
( word ( first ( first sent ) )
(define (acronym sent)
(if (= (count sent) 1)
(first (first sent))
(word (first (first sent))
(acronym (bf sent)))))
|
994c8eecd5c4caba3f47f16b69ad481dc2c633237e508992bf79d1a265c8f2f8 | mokus0/splines | Tabulate.hs | module Tabulate where
import Text.Printf
import Data.VectorSpace
-- quick and dirty "tabulation" function - takes a function and a range and
-- prints a table of values of the function to the console in a format suitable
for copying and pasting into Excel or Grapher.app
tabulate :: Int -> (Double -> [Double]) -> Do... | null | https://raw.githubusercontent.com/mokus0/splines/2c1b370d7602a2287017811e9e4a2ec4b5ec1491/test/Tabulate.hs | haskell | quick and dirty "tabulation" function - takes a function and a range and
prints a table of values of the function to the console in a format suitable | module Tabulate where
import Text.Printf
import Data.VectorSpace
for copying and pasting into Excel or Grapher.app
tabulate :: Int -> (Double -> [Double]) -> Double -> Double -> IO ()
tabulate n f x0 x1 = sequence_
[ doubleRow (x : f x)
| i <- [1..n]
, let x = lerp x0 x1 (fromIntegral (i - 1) / fromInte... |
8bf0dcc214d1130581bff8c37e2a1a5db82d35d073e05a3ae562f3278c3bbdcb | kostmo/circleci-failure-tracker | gist.hs | # OPTIONS_GHC -Wall -O2 -threaded -with - rtsopts="-N " #
-- | Found here:
import Control.Concurrent
import Control.Concurrent.Async
import Control.Lens
import Control.Monad
import Data.ByteString.Lazy hiding (replicate)
import Data.List.Split
import Network.Wreq hiding (getWith)
import Network.Wreq.Session
data Th... | null | https://raw.githubusercontent.com/kostmo/circleci-failure-tracker/393d10a72080bd527fdb159da6ebfea23fcd52d1/app/threading-experiment/gist.hs | haskell | | Found here: | # OPTIONS_GHC -Wall -O2 -threaded -with - rtsopts="-N " #
import Control.Concurrent
import Control.Concurrent.Async
import Control.Lens
import Control.Monad
import Data.ByteString.Lazy hiding (replicate)
import Data.List.Split
import Network.Wreq hiding (getWith)
import Network.Wreq.Session
data ThreadOptions = Thre... |
7e1e0db754f567876b6bc957b7045096cc49a90e8056f5ab77fc80754cccbd6f | CIFASIS/QuickFuzz | PrintGrammar.hs | # OPTIONS_GHC -fno - warn - incomplete - patterns #
module Test.QuickFuzz.Gen.Bnfc.PrintGrammar where
pretty - printer generated by the BNF converter
import Test.QuickFuzz.Gen.Bnfc.AbsGrammar
import Data.Char
-- the top-level printing method
printTree :: Print a => a -> String
printTree = render . prt 0
type Doc... | null | https://raw.githubusercontent.com/CIFASIS/QuickFuzz/a1c69f028b0960c002cb83e8145f039ecc0e0a23/src/Test/QuickFuzz/Gen/Bnfc/PrintGrammar.hs | haskell | the top-level printing method
the printer class does the job | # OPTIONS_GHC -fno - warn - incomplete - patterns #
module Test.QuickFuzz.Gen.Bnfc.PrintGrammar where
pretty - printer generated by the BNF converter
import Test.QuickFuzz.Gen.Bnfc.AbsGrammar
import Data.Char
printTree :: Print a => a -> String
printTree = render . prt 0
type Doc = [ShowS] -> [ShowS]
doc :: Sho... |
51e1366314fd66694639c3ced855df4142cc73bad661668a6d5fb22f8160c8c0 | ryukinix/leraxandria | flipping-bits.lisp | Flipping Bits @ HackerRank Algorithms / Bit Manipulation
Solved by at 11/07/2017 05:05:05
(in-package :leraxandria/math)
(defun list-of-bits (integer)
"Given a integer i return a list of bits
Ex.: (integer-to-bits 3) => (1 1)
(integer-to-bits 5) => (1 0 1)"
(let ((bits '()))
(dotimes (index (in... | null | https://raw.githubusercontent.com/ryukinix/leraxandria/e8c4d1f6d1e88072fbd58dd6c48b5d80577f3b62/src/math/flipping-bits.lisp | lisp | Flipping Bits @ HackerRank Algorithms / Bit Manipulation
Solved by at 11/07/2017 05:05:05
(in-package :leraxandria/math)
(defun list-of-bits (integer)
"Given a integer i return a list of bits
Ex.: (integer-to-bits 3) => (1 1)
(integer-to-bits 5) => (1 0 1)"
(let ((bits '()))
(dotimes (index (in... | |
02c8f953a6276935385c62ef553f8df81541f5f6eef567da78e17701311a7284 | babashka/babashka | crypto_test.clj | (ns babashka.crypto-test
(:require [babashka.test-utils :as test-utils]
[clojure.edn :as edn]
[clojure.test :refer [deftest is]])
(:import (javax.crypto Mac)
(javax.crypto.spec SecretKeySpec)))
(defn bb [& exprs]
(edn/read-string (apply test-utils/bb nil (map str exprs))))
(de... | null | https://raw.githubusercontent.com/babashka/babashka/3ad043769c16162abf33c58ad7068fb8ebc6679f/test/babashka/crypto_test.clj | clojure | (ns babashka.crypto-test
(:require [babashka.test-utils :as test-utils]
[clojure.edn :as edn]
[clojure.test :refer [deftest is]])
(:import (javax.crypto Mac)
(javax.crypto.spec SecretKeySpec)))
(defn bb [& exprs]
(edn/read-string (apply test-utils/bb nil (map str exprs))))
(de... | |
4bdcc0fd5c102050201491782bc0ea45dd01945d9ef7a23da0c984c68e6e6b0d | mg289/summarizer | project.clj | (defproject summarizer "1.1.0-SNAPSHOT"
:description "Text summarizer"
:dependencies [[org.clojure/clojure "1.5.1"]
[net.sf.jwordnet/jwnl "1.4_rc3"]
[org.apache.opennlp/opennlp-tools "1.5.3"]
[org.jgrapht/jgrapht-jdk1.5 "0.7.3"]])
| null | https://raw.githubusercontent.com/mg289/summarizer/0696cad3b2d9c8f80fa7566f4fe910e068a6377b/project.clj | clojure | (defproject summarizer "1.1.0-SNAPSHOT"
:description "Text summarizer"
:dependencies [[org.clojure/clojure "1.5.1"]
[net.sf.jwordnet/jwnl "1.4_rc3"]
[org.apache.opennlp/opennlp-tools "1.5.3"]
[org.jgrapht/jgrapht-jdk1.5 "0.7.3"]])
| |
d662ceb421c2f34c880c36e59027b4aab91d53a8dc7fa6ea2e2331b8b00475c6 | monadbobo/ocaml-core | conv_test.ml | * Conv_test : module for testing automated S - expression conversions and
path substitutions
path substitutions *)
open Format
open Sexplib
open Sexp
open Conv
module Exc_test : sig
exception Test_exc of (string * int) with sexp
end = struct
exception Test_exc of (string * int) with sexp
end
(* Test e... | null | https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/sexplib/lib_test/conv_test.ml | ocaml | Test each character.
Test user specified conversion
Test simple sum of products
Test polymorphic variants and deep module paths
Test empty types
Test variance annotations
Test labeled arguments in functions
Test recursive types
Test polymorphic record fields
Test records
Test manifest types
Test ... | * Conv_test : module for testing automated S - expression conversions and
path substitutions
path substitutions *)
open Format
open Sexplib
open Sexp
open Conv
module Exc_test : sig
exception Test_exc of (string * int) with sexp
end = struct
exception Test_exc of (string * int) with sexp
end
let check... |
9c5b3cc4a8bdafea263396cbfcc0f417c9517642114d8d1b278c64a44ccb1b4f | cloudant/chttpd | chttpd_sup.erl | 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 under the License is distributed on an ... | null | https://raw.githubusercontent.com/cloudant/chttpd/d20e9b66b9e51ac400f468aa442af461fc85a96f/src/chttpd_sup.erl | erlang | the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License. | 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
distributed under the License is distributed on an " AS IS " BASIS , WITHOUT
-module(chttpd_sup).
-behaviour(supervisor).
-export([init/1]).
-export(... |
052a2a1a0db110b1733ddf6a9bed09c058db7eca5349c4bee8cbe9ebb6b374dd | roddyyaga/bs-swr | swr_options.ml | type t = {
errorRetryInterval: int option;
errorRetryCount: int option;
loadingTimeout: int option;
focusThrottleInterval: int option;
dedupingInterval: int option;
refreshInterval: int option;
refreshWhenHidden: bool option;
refreshWhenOffline: bool option;
revalidateOnFocus: bool option;
revalidat... | null | https://raw.githubusercontent.com/roddyyaga/bs-swr/d284cc3f7d3a596c79c654eb3cc3204b6c7493e9/src/swr_options.ml | ocaml | type t = {
errorRetryInterval: int option;
errorRetryCount: int option;
loadingTimeout: int option;
focusThrottleInterval: int option;
dedupingInterval: int option;
refreshInterval: int option;
refreshWhenHidden: bool option;
refreshWhenOffline: bool option;
revalidateOnFocus: bool option;
revalidat... | |
56a56e0de982a2f0abbcf35d09190b9bc53efa5c31003501c2f736b45ed2e2f7 | Dasudian/DSDIN | dsdc_block_genesis.erl | %%%-------------------------------------------------------------------
( C ) 2018 , Dasudian Technologies
@doc Genesis block definition .
%%%
%%% The genesis block does not follow the validation rules of the
%%% other blocks because:
%%% * Its state trees include preset accounts;
* It does not cointain a valid P... | null | https://raw.githubusercontent.com/Dasudian/DSDIN/b27a437d8deecae68613604fffcbb9804a6f1729/apps/dsdcore/src/dsdc_block_genesis.erl | erlang | -------------------------------------------------------------------
The genesis block does not follow the validation rules of the
other blocks because:
* Its state trees include preset accounts;
* Note: the miner account specified in the genesis block is
still rewarded as for the other blocks.
* Its time i... | ( C ) 2018 , Dasudian Technologies
@doc Genesis block definition .
* It does not cointain a valid PoW ( it is unmined ) ;
* It implies genesis block can not be validated PoW wise ;
* It implies the time difference between genesis block and first
successive blocks ( e.g. between blocks 1 and 2 - wit... |
9a964321304b09fc40a553914842e320256916d81bc6f79d1de6da1e917aca4d | basho/riak_test | rt_cascading_mixed_clusters.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2013 - 2016 Basho Technologies , Inc.
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of... | null | https://raw.githubusercontent.com/basho/riak_test/8170137b283061ba94bc85bf42575021e26c929d/tests/rt_cascading_mixed_clusters.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2013 - 2016 Basho Technologies , Inc.
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
| | < - | n34 |
This... |
182722d23a2451eee81f4e6ec8acafa1fc3fa75fd80cd9e09252502f6a3a90e2 | s-expressionists/Cleavir | staple.ext.lisp | (in-package #:cleavir-documentation-generation)
(defmethod staple:packages ((sys (eql (asdf:find-system :cleavir-ast-to-bir))))
(list (find-package "CLEAVIR-AST-TO-BIR")))
(defmethod staple:page-type ((sys (eql (asdf:find-system :cleavir-ast-to-bir))))
'cleavir-page)
| null | https://raw.githubusercontent.com/s-expressionists/Cleavir/b211c882e075867b0e18f5ccfc8d38a021df7eb8/AST-to-BIR/staple.ext.lisp | lisp | (in-package #:cleavir-documentation-generation)
(defmethod staple:packages ((sys (eql (asdf:find-system :cleavir-ast-to-bir))))
(list (find-package "CLEAVIR-AST-TO-BIR")))
(defmethod staple:page-type ((sys (eql (asdf:find-system :cleavir-ast-to-bir))))
'cleavir-page)
| |
81910df601e67887c284f62c94849a88bcc83418c08e45cf74b69e55f07eb311 | Naproche-SAD/Naproche-SAD | Error.hs |
Authors : ( 2017 - 2018 )
Message and Error data type and core functions .
Authors: Steffen Frerix (2017 - 2018)
Message and Parse Error data type and core functions.
-}
module SAD.Parser.Error
( ParseError,
errorPos,
newErrorMessage,
newErrorUnknown,
(<+>),
(<++>),
setExpectMessa... | null | https://raw.githubusercontent.com/Naproche-SAD/Naproche-SAD/da131a6eaf65d4e02e82082a50a4febb6d42db3d/src/SAD/Parser/Error.hs | haskell | Well-formedness message
helpers |
Authors : ( 2017 - 2018 )
Message and Error data type and core functions .
Authors: Steffen Frerix (2017 - 2018)
Message and Parse Error data type and core functions.
-}
module SAD.Parser.Error
( ParseError,
errorPos,
newErrorMessage,
newErrorUnknown,
(<+>),
(<++>),
setExpectMessa... |
40a9b5446653037c1c5f0b5ef0d6758178259553c39e3f9d753fb5e9c6e12e08 | gfour/gic | Parfib.hs | | Parallel Fibonacci example , parallelism cutoff at parameter 11 .
module Parfib where
import Control.Parallel (par, pseq)
result :: Int
result = fib 31
fib :: Int -> Int
fib x = if x<2 then 1 else if x<11 then ((fib (x-1)) + (fib (x-2))) else addpar (fib (x-1)) (fib (x-2)) ;
addpar :: Int -> Int -> Int
addpar ... | null | https://raw.githubusercontent.com/gfour/gic/d5f2e506b31a1a28e02ca54af9610b3d8d618e9a/Examples/Parallel/Parfib.hs | haskell | | Parallel Fibonacci example , parallelism cutoff at parameter 11 .
module Parfib where
import Control.Parallel (par, pseq)
result :: Int
result = fib 31
fib :: Int -> Int
fib x = if x<2 then 1 else if x<11 then ((fib (x-1)) + (fib (x-2))) else addpar (fib (x-1)) (fib (x-2)) ;
addpar :: Int -> Int -> Int
addpar ... | |
2ea320fa4b229c983784e4691dd3b3e2c0bc51ade03cb9c3d564fe3b6761fdf7 | 3b/clws | buffer.lisp | (in-package #:ws)
;;; chunks stored by chunk-buffer class
(defclass buffer-chunk ()
((vector :reader buffer-vector :initarg :vector)
(start :reader buffer-start :initarg :start)
(end :reader buffer-end :initarg :end)))
(defmethod buffer-count ((buffer buffer-chunk))
(- (buffer-end buffer) (buffer-start buff... | null | https://raw.githubusercontent.com/3b/clws/b20799dd37d8385d312c371181d465bbee2f9e4f/buffer.lisp | lisp | chunks stored by chunk-buffer class
chunked buffer class
stores a sequence of vectors + start/end
and will be consumed all at once after it is accumulated
operations:
add a chunk (vector+bounds)
-- check last chunk and combine if contiguous
append another buffer
read an octet
convert to a contig... | (in-package #:ws)
(defclass buffer-chunk ()
((vector :reader buffer-vector :initarg :vector)
(start :reader buffer-start :initarg :start)
(end :reader buffer-end :initarg :end)))
(defmethod buffer-count ((buffer buffer-chunk))
(- (buffer-end buffer) (buffer-start buffer)))
intent is that one chunked -... |
16afbb4cb4bb158752b9183c321db00f98861d3d1499762ea8fcb9550366ec83 | azimut/shiny | endings.lisp | (in-package #:shiny)
(defparameter *mf*
"/home/sendai/Downloads/Octopath_Traveler_-_Haanits_Theme.mscz.mid")
(defparameter *notes*
(subseq (get-measures-pair *mf* 999 1.5 0) 0))
(defparameter *sing*
(subseq (get-measures-pair *mf* 999 1.5 1) 0))
(defparameter *pc-follow*
(delete-duplicates
(sort (mapcar (... | null | https://raw.githubusercontent.com/azimut/shiny/774381a9bde21c4ec7e7092c7516dd13a5a50780/compositions/drafts/midifile/endings.lisp | lisp | (play-midi time
*pc-follow*) | (in-package #:shiny)
(defparameter *mf*
"/home/sendai/Downloads/Octopath_Traveler_-_Haanits_Theme.mscz.mid")
(defparameter *notes*
(subseq (get-measures-pair *mf* 999 1.5 0) 0))
(defparameter *sing*
(subseq (get-measures-pair *mf* 999 1.5 1) 0))
(defparameter *pc-follow*
(delete-duplicates
(sort (mapcar (... |
a0dd04f387a3bae7b589adf61e22d73f70de7e26ff48df597b3d42a42c755e71 | esl/MongooseIM | path_helper.erl | %% @doc Common filename functions
-module(path_helper).
%% Paths
-export([repo_dir/1]).
-export([test_dir/1]).
-export([ct_run_dir/1]).
-export([ct_run_dir_in_browser/1]).
-export([data_dir/2]).
%% Path transformation
-export([canonicalize_path/1]).
%% @doc Get repository root directory
repo_dir(_Config) ->
get_e... | null | https://raw.githubusercontent.com/esl/MongooseIM/8b8c294b1b01dc178eed1b3b28ca0fbbd73f382c/big_tests/tests/path_helper.erl | erlang | @doc Common filename functions
Paths
Path transformation
@doc Get repository root directory
@doc Get `big_tests/' directory
@doc Returns`big_tests/ct_report/ct_run.*' directory
Run it from a test case functions only (not group or suite functions)
Remove: *SUITE.logs/run.*/log_private/
@doc Returns path, corres... | -module(path_helper).
-export([repo_dir/1]).
-export([test_dir/1]).
-export([ct_run_dir/1]).
-export([ct_run_dir_in_browser/1]).
-export([data_dir/2]).
-export([canonicalize_path/1]).
repo_dir(_Config) ->
get_env_var("REPO_DIR").
test_dir(_Config) ->
get_env_var("TEST_DIR").
ct_run_dir(Config) ->
PrivDi... |
b16395679a303ce41e19529d648eb63c287a65f398fcbaf110ad847660f832bc | ejgallego/coq-serapi | ser_sorts.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2016
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/ejgallego/coq-serapi/4c18c49187603fd05554f22760fd3ef644dcd806/serlib/ser_sorts.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
************************************... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2016
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Copyright 2016 MINES ParisT... |
7ce690b3631bc088bfa395929c3d77c0c3cebe8ec906c7415ef212934863a74b | lagenorhynque/aqoursql | const.clj | (ns aqoursql.util.const)
(def ^:const artist-type-group 1)
(def ^:const artist-type-solo 2)
(def artist-types #{artist-type-group artist-type-solo})
(def error-code-validation
"VALIDATION_ERROR")
(defn error-map [code message]
{:message message
:extensions {:code code}})
| null | https://raw.githubusercontent.com/lagenorhynque/aqoursql/a7f00ee588ff7e1c1f10ac3f550aafea2ef661ab/src/aqoursql/util/const.clj | clojure | (ns aqoursql.util.const)
(def ^:const artist-type-group 1)
(def ^:const artist-type-solo 2)
(def artist-types #{artist-type-group artist-type-solo})
(def error-code-validation
"VALIDATION_ERROR")
(defn error-map [code message]
{:message message
:extensions {:code code}})
| |
6329b83490070af97f6cd8ffaab4444e871e9021f5b33f074f16d8a2d9f09b52 | rescript-lang/rescript-compiler | outcome_printer_ns.mli | Copyright ( C ) 2017 Authors of ReScript
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later version .... | null | https://raw.githubusercontent.com/rescript-lang/rescript-compiler/edbe4efc5d8b3899f126a5efa563ae437cb41406/jscomp/outcome_printer/outcome_printer_ns.mli | ocaml | * This function is used to
reverse namespace printing to
avoid namespace leaking
| Copyright ( C ) 2017 Authors of ReScript
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later version .... |
19e535fefd767efa961c535154d968e733803f1e48eea9a2906251eeff76a563 | calvis/cKanren | symbolo-numbero.rkt | #lang racket
(require
"../ck.rkt"
"../tree-unify.rkt"
"../attributes.rkt"
"../neq.rkt"
"../tester.rkt")
(provide test-symbol-number
test-symbol-number-long)
(define (test-symbol-number)
(test
(run* (q) (symbol q) (number q))
'())
(test
(run* (q) (number q) (symbol q))
'())
(test
... | null | https://raw.githubusercontent.com/calvis/cKanren/8714bdd442ca03dbf5b1d6250904cbc5fd275e68/cKanren/tests/symbolo-numbero.rkt | racket | #lang racket
(require
"../ck.rkt"
"../tree-unify.rkt"
"../attributes.rkt"
"../neq.rkt"
"../tester.rkt")
(provide test-symbol-number
test-symbol-number-long)
(define (test-symbol-number)
(test
(run* (q) (symbol q) (number q))
'())
(test
(run* (q) (number q) (symbol q))
'())
(test
... | |
4110194d0bafd82813c1a1dfa5defdbfae4e9d44bfb7f8937e1e9229f6dc6dac | ndmitchell/shake | FileName.hs | # LANGUAGE GeneralizedNewtypeDeriving , FlexibleInstances #
module Development.Shake.Internal.FileName(
FileName,
fileNameFromString, fileNameFromByteString,
fileNameToString, fileNameToByteString,
filepathNormalise
) where
import qualified Data.ByteString.Char8 as BS
import qualified Data.ByteStr... | null | https://raw.githubusercontent.com/ndmitchell/shake/99c5a7a4dc1d5a069b13ed5c1bc8e4bc7f13f4a6/src/Development/Shake/Internal/FileName.hs | haskell | -------------------------------------------------------------------
FileName newtype
| UTF8 ByteString
-------------------------------------------------------------------
| Equivalent to @toStandard . normaliseEx@ from "Development.Shake.FilePath".
equivalent to eliminating ../x | # LANGUAGE GeneralizedNewtypeDeriving , FlexibleInstances #
module Development.Shake.Internal.FileName(
FileName,
fileNameFromString, fileNameFromByteString,
fileNameToString, fileNameToByteString,
filepathNormalise
) where
import qualified Data.ByteString.Char8 as BS
import qualified Data.ByteStr... |
dd0ec5b95ace6c04213ba1b3112f75a3b21213465fd76da8503ea802f8c925ea | eslick/cl-registry | number.lisp | (in-package :registry)
(defclass number-presentation (input-based-field-presentation)
((precision :accessor precision :initarg :precision :initform nil)))
(define-lisp-value-getter number-presentation (client-value)
(or (when (> (length client-value) 0)
(parse-number:parse-number client-value))
:none))
(d... | null | https://raw.githubusercontent.com/eslick/cl-registry/d4015c400dc6abf0eeaf908ed9056aac956eee82/src/libs/presentations/number.lisp | lisp | * integer type
* range integer type
* range limited integers | (in-package :registry)
(defclass number-presentation (input-based-field-presentation)
((precision :accessor precision :initarg :precision :initform nil)))
(define-lisp-value-getter number-presentation (client-value)
(or (when (> (length client-value) 0)
(parse-number:parse-number client-value))
:none))
(d... |
6b6dfa8a4e94f20cdcad73869b92c076b1380d8af2950ea06634db03152039b3 | vtsingaras/orct | mbn.clj | ;; Open Radio Calibration Toolkit
An enhanced Open Source Implementation to replace Qualcomm 's QRCT
;;
;; The use and distribution terms for this software are covered by
the GNU General Public License
;;
( C ) 2015 ,
;;
;; mbn.cljs - parser for modem configuration binary files (mbn)
(ns orct.mbn
(:use [orct... | null | https://raw.githubusercontent.com/vtsingaras/orct/1b4c2b2b16c62cd8a51db8c1ed6a805a4677779c/src/orct/mbn.clj | clojure | Open Radio Calibration Toolkit
The use and distribution terms for this software are covered by
mbn.cljs - parser for modem configuration binary files (mbn)
omit subscriber respectively index id, not part of efs
omit subscriber respectively index id, not part of efs | An enhanced Open Source Implementation to replace Qualcomm 's QRCT
the GNU General Public License
( C ) 2015 ,
(ns orct.mbn
(:use [orct.utils]
[orct.elf]
[clojure.java.io]
[orct.qcn-parser]
[orct.nv-xml]
[orct.qcn-printer])
(:require [clojure.string :as str]))
(def... |
d7d33f2cc898cebffe03445c8d13cad2c56257d2f741e01fa7c81c03876a42f0 | spartango/CS153 | mips_sim.ml | open Mips_ast
open Byte
open Binary_ops
exception TODO
exception FatalError
exception UnalignedAccessError
exception InvalidInstruction
Register file definitions . A register file is a map from a register
number to a 32 - bit quantity .
number to a 32-bit quantity. *)
module IntMap = Map.Make(struct type t ... | null | https://raw.githubusercontent.com/spartango/CS153/16faf133889f1b287cb95c1ea1245d76c1d8db49/ps0/mips_sim.ml | ocaml | Split into parts by shifting
Insert parts into slots from offset
Reads a word starting from the offset in memory
Translates an instruction to binary and copies it into memory, resolving pseudoinstructions
Pick out pseudoinstructions
Do a binary translate & update
A nice helper function to accumulate state ... | open Mips_ast
open Byte
open Binary_ops
exception TODO
exception FatalError
exception UnalignedAccessError
exception InvalidInstruction
Register file definitions . A register file is a map from a register
number to a 32 - bit quantity .
number to a 32-bit quantity. *)
module IntMap = Map.Make(struct type t ... |
1dfdeb329005fc45eef64c8e25db0faff3fe8c9dc9706df7cc49c5c9fc13f299 | technion/ct_advisor | ct_advisor_sup.erl | %%%-------------------------------------------------------------------
%% @doc ct_advisor top level supervisor.
%% @end
%%%-------------------------------------------------------------------
-module('ct_advisor_sup').
-behaviour(supervisor).
%% API
-export([start_link/0]).
%% Supervisor callbacks
-export([init/1]).... | null | https://raw.githubusercontent.com/technion/ct_advisor/d5f3120c468e4203caefbe57f1c64fa4b7017613/apps/ct_advisor/src/ct_advisor_sup.erl | erlang | -------------------------------------------------------------------
@doc ct_advisor top level supervisor.
@end
-------------------------------------------------------------------
API
Supervisor callbacks
====================================================================
API functions
============================... |
-module('ct_advisor_sup').
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(SERVER, ?MODULE).
start_link() ->
supervisor:start_link({local, ?SERVER}, ?MODULE, []).
Child : : { Id , StartFunc , Restart , Shutdown , Type , Modules }
init([]) ->
{ok, { {one_for_all, 0, 1}, []}... |
a5618491e1b5c74d492ab164faa2615d7c8b2253805ca128c9d05eb5081e00fa | TerrorJack/yuuenchi | LazyRead.hs | # LANGUAGE RecordWildCards #
{-# LANGUAGE StrictData #-}
module LazyRead
( ReadChunks(..)
, lazyRead
) where
import Control.Exception
import Data.Functor
import OneShotIO
import System.IO.Unsafe
data ReadChunks s a = ReadChunks
{ emptyChunks :: s
, prependChunk :: a -> s -> s
, isEmptyChunk :: a -> Bool
... | null | https://raw.githubusercontent.com/TerrorJack/yuuenchi/f2af8d8c2c71c93c1ddb61e87629ae53851dd2e6/src/LazyRead.hs | haskell | # LANGUAGE StrictData # | # LANGUAGE RecordWildCards #
module LazyRead
( ReadChunks(..)
, lazyRead
) where
import Control.Exception
import Data.Functor
import OneShotIO
import System.IO.Unsafe
data ReadChunks s a = ReadChunks
{ emptyChunks :: s
, prependChunk :: a -> s -> s
, isEmptyChunk :: a -> Bool
, readChunk :: IO a
, fi... |
52828858288c6e0300daf871496d791aab37a7fcb535046417b30d55768cbd14 | aviaviavi/legion | Server.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE GADTs #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
{-# LANGUAGE RankNTypes #-}
module Server where
import Control.Concurrent (threadDelay)
import Control.C... | null | https://raw.githubusercontent.com/aviaviavi/legion/32a8cacebd57ab97761907b23d1396b9a8700c2d/src/Server.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
args for running the main application
explicit entry point to run the application, which is useful
for our tests
wait for messages to come in from the p2p network and respond to them
Type alias
retrieve the current block chain
retrieve the most re... | # LANGUAGE DeriveGeneric #
# LANGUAGE GADTs #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
module Server where
import Control.Concurrent (threadDelay)
import Control.Concurrent.Async
import Control.Distributed.Process
import ... |
125d30883b03286fd02f0305c25dcb8c480a596093ad480377fb3d76f93b510e | cedlemo/OCaml-GI-ctypes-bindings-generator | Dialog.mli | open Ctypes
type t
val t_typ : t typ
val create :
unit -> Widget.t ptr
val add_action_widget :
t -> Widget.t ptr -> int32 -> unit
val add_button :
t -> string -> int32 -> Widget.t ptr
val get_action_area :
t -> Widget.t ptr
val get_content_area :
t -> Box.t ptr
val get_header_bar :
t -> Widget.t ptr
val g... | null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Dialog.mli | ocaml | Not implemented gtk_dialog_set_alternative_button_order_from_array type C Array type for Types.Array tag not implemented | open Ctypes
type t
val t_typ : t typ
val create :
unit -> Widget.t ptr
val add_action_widget :
t -> Widget.t ptr -> int32 -> unit
val add_button :
t -> string -> int32 -> Widget.t ptr
val get_action_area :
t -> Widget.t ptr
val get_content_area :
t -> Box.t ptr
val get_header_bar :
t -> Widget.t ptr
val g... |
606f3e3c140601af54ad3cc2f07252e7317e54b517fa43c861479ba8b03e7529 | toddaaro/advanced-dan | miniKanren.scm | ;; In order to use "basic" miniKanren
(load "ck.scm")
(define-syntax run1 (syntax-rules () ((_ (x) g0 g ...) (run 1 (x) g0 g ...))))
(define-syntax run2 (syntax-rules () ((_ (x) g0 g ...) (run 2 (x) g0 g ...))))
(define-syntax run3 (syntax-rules () ((_ (x) g0 g ...) (run 3 (x) g0 g ...))))
(define-syntax run4 (syntax... | null | https://raw.githubusercontent.com/toddaaro/advanced-dan/5d6c0762d998aa37774e0414a0f37404e804b536/valo/miniKanren.scm | scheme | In order to use "basic" miniKanren |
(load "ck.scm")
(define-syntax run1 (syntax-rules () ((_ (x) g0 g ...) (run 1 (x) g0 g ...))))
(define-syntax run2 (syntax-rules () ((_ (x) g0 g ...) (run 2 (x) g0 g ...))))
(define-syntax run3 (syntax-rules () ((_ (x) g0 g ...) (run 3 (x) g0 g ...))))
(define-syntax run4 (syntax-rules () ((_ (x) g0 g ...) (run 4 (x)... |
2ed38e41249f6765ef319c80e6eaca5fc7eaf5a5f7fd013eeae7ed494d276437 | yjqww6/drcomplete | walk-bound.rkt | #lang racket/base
(require racket/set racket/sequence syntax/kerncase "utils.rkt")
(cond-use-bound
(define (walk form phase mods)
(kernel-syntax-case/phase
form phase
[(module ?id ?path (_ ?form ...))
(walk* #'(?form ...) 0 (cons #'?path mods))]
[(module* ?id ?f (_ ?form ...))
(eq? (syntax-e ... | null | https://raw.githubusercontent.com/yjqww6/drcomplete/9bb41e031280794d8e395d834ff49ebfc52569a5/drcomplete-required/private/walk-bound.rkt | racket | #lang racket/base
(require racket/set racket/sequence syntax/kerncase "utils.rkt")
(cond-use-bound
(define (walk form phase mods)
(kernel-syntax-case/phase
form phase
[(module ?id ?path (_ ?form ...))
(walk* #'(?form ...) 0 (cons #'?path mods))]
[(module* ?id ?f (_ ?form ...))
(eq? (syntax-e ... | |
f71ccf531dd3007843d35c322c2414f9413d0b887ca3884dd875a3d44d68b2c7 | bortexz/graphcom | build.clj | (ns build
(:refer-clojure :exclude [test])
(:require [org.corfield.build :as bb]))
(def lib 'io.github.bortexz/graphcom)
(def version "0.2.0")
(defn- gha-output
[k v]
(println (str "::set-output name=" k "::" v)))
(defn test "Run the tests." [opts]
(bb/run-tests opts)
(bb/run-tests (assoc opts :aliases [... | null | https://raw.githubusercontent.com/bortexz/graphcom/50439b9d40f89a9bf4ef14ddc449411ef2661e88/build.clj | clojure | (ns build
(:refer-clojure :exclude [test])
(:require [org.corfield.build :as bb]))
(def lib 'io.github.bortexz/graphcom)
(def version "0.2.0")
(defn- gha-output
[k v]
(println (str "::set-output name=" k "::" v)))
(defn test "Run the tests." [opts]
(bb/run-tests opts)
(bb/run-tests (assoc opts :aliases [... | |
e35be495cd55dd202e9a2f30b5b881d42b8f07577a17af02b58fb8b99bc5639e | deadpendency/deadpendency | DependencyAssessmentFailure.hs | module Common.Model.Assessment.DependencyAssessmentFailure
( DependencyAssessmentFailure (..),
)
where
import Common.Aeson.Aeson
import Common.Model.Assessment.DependencyAssessmentViolation
import Data.Aeson
newtype DependencyAssessmentFailure = DependencyAssessmentFailure
{ _violation :: DependencyAssessmentVi... | null | https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/common/src/Common/Model/Assessment/DependencyAssessmentFailure.hs | haskell | module Common.Model.Assessment.DependencyAssessmentFailure
( DependencyAssessmentFailure (..),
)
where
import Common.Aeson.Aeson
import Common.Model.Assessment.DependencyAssessmentViolation
import Data.Aeson
newtype DependencyAssessmentFailure = DependencyAssessmentFailure
{ _violation :: DependencyAssessmentVi... | |
af4b9f8227c39814a6a90a429e48c498f3d14edf2145dd6a603084c1b02c6d01 | lexi-lambda/racket-commonmark | spec.rkt | #lang racket/base
(require json
net/uri-codec
racket/format
racket/list
racket/match
racket/runtime-path
rackunit
xml
commonmark)
(define-runtime-path spec.json "spec-0.30.json")
(define color:reset #"\e(B\e[m")
(define color:bold #"\e[1m")
(de... | null | https://raw.githubusercontent.com/lexi-lambda/racket-commonmark/1d7f1d5fc70bedfbe201c2e794da69dc7afe6e63/commonmark-test/tests/commonmark/spec.rkt | racket | The spec examples use very particular HTML formatting (the precise details of
which are not actually mandated by the spec), and normalizing the spec’s
expected HTML would cause problems for examples involving raw “HTML” that is
not actually valid HTML, so this function manually converts an xexpr to HTML
using the ... | #lang racket/base
(require json
net/uri-codec
racket/format
racket/list
racket/match
racket/runtime-path
rackunit
xml
commonmark)
(define-runtime-path spec.json "spec-0.30.json")
(define color:reset #"\e(B\e[m")
(define color:bold #"\e[1m")
(de... |
28c3bb74197886bb3f771436590a5276c54df71ef2892c1694c202c637290eb7 | bootstrapworld/curr | Game.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname Game) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #... | null | https://raw.githubusercontent.com/bootstrapworld/curr/443015255eacc1c902a29978df0e3e8e8f3b9430/courses/reactive/resources/source-files/Game.rkt | racket | about the language level of this file in a form that our tools can easily process.
DATA:
define-struct:
STARTING WORLD
GRAPHICS
GRAPHICS FUNCTIONS:
draw-world: world -> Image
UPDATING FUNCTIONS:
update-world: world -> world
What does your update-world function do?
KEY EVENTS:
keypress: world string -> w... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname Game) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ())))
(require "Teachpacks/bootstrap-teachpack.rkt")
(require "Teachpacks/b... |
2525d4d13093303bd2e4cfa8237148243c81543dcfe3275c92dd8fc075825cb4 | heraldry/heraldicon | config.cljs | (ns heraldicon.config
(:refer-clojure :exclude [get])
(:require
[clojure.string :as str]))
(defn- js->clj+
"For cases when built-in js->clj doesn't work. Source: "
[x]
(into {}
(map (fn [k]
[(keyword k) (aget x k)]))
(js-keys x)))
(def ^:private env
"Returns current env v... | null | https://raw.githubusercontent.com/heraldry/heraldicon/54e003614cf2c14cda496ef36358059ba78275b0/src/heraldicon/config.cljs | clojure | (ns heraldicon.config
(:refer-clojure :exclude [get])
(:require
[clojure.string :as str]))
(defn- js->clj+
"For cases when built-in js->clj doesn't work. Source: "
[x]
(into {}
(map (fn [k]
[(keyword k) (aget x k)]))
(js-keys x)))
(def ^:private env
"Returns current env v... | |
f5450c7747c0b24ab2104e17d7ab12b782809c1c9318610fb70d24ff8d63b1c3 | privet-kitty/cl-competitive | round-robin.lisp | (defpackage :cp/test/round-robin
(:use :cl :fiveam :cp/round-robin)
(:import-from :cp/test/base #:base-suite))
(in-package :cp/test/round-robin)
(in-suite base-suite)
(test round-robin
(let ((*test-dribble* nil))
(finishes (map-round-robin 0 (lambda (&rest _)
(declare (igno... | null | https://raw.githubusercontent.com/privet-kitty/cl-competitive/4d1c601ff42b10773a5d0c5989b1234da5bb98b6/module/test/round-robin.lisp | lisp | (defpackage :cp/test/round-robin
(:use :cl :fiveam :cp/round-robin)
(:import-from :cp/test/base #:base-suite))
(in-package :cp/test/round-robin)
(in-suite base-suite)
(test round-robin
(let ((*test-dribble* nil))
(finishes (map-round-robin 0 (lambda (&rest _)
(declare (igno... | |
d3ff71451c1364f2f71a4995babe35c339e5d5f1226729ada6e5fffe16c75741 | froggey/Mezzano | cold-start.lisp | ;;;; Cold initialization
;;;;
This code is run when an image is booted for the first time
(in-package :mezzano.internals)
(declaim (special *cold-toplevel-forms*
*package-system*
*additional-cold-toplevel-forms*
*initial-obarray*
*initial-keywo... | null | https://raw.githubusercontent.com/froggey/Mezzano/f0eeb2a3f032098b394e31e3dfd32800f8a51122/system/cold-start.lisp | lisp | Cold initialization
Stuff duplicated/reimplemented from stream.lisp.
Pathname stuff before pathnames exist (file.lisp defines real pathnames).
Fake streams & fake stream functions, used by the mini loader to load
Used during cold-image bringup, various files will redefine packages before
the package system is lo... | This code is run when an image is booted for the first time
(in-package :mezzano.internals)
(declaim (special *cold-toplevel-forms*
*package-system*
*additional-cold-toplevel-forms*
*initial-obarray*
*initial-keyword-obarray*
... |
865ab46d61e949edd7dfccdbab97545a7ea8046e74e0f63ab69c4d2533a401d3 | input-output-hk/cardano-wallet | Hash.hs |
# LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE QuantifiedConstraints #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE Undecidable... | null | https://raw.githubusercontent.com/input-output-hk/cardano-wallet/97e183d3a1999f8e5658a3883785a293b3beda21/lib/wallet/src/Cardano/Wallet/Read/Tx/Hash.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes # |
# LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE QuantifiedConstraints #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
module Cardano.Wallet.Read.Tx.Hash
... |
086dd0659525921e22412710f7f9eb6de322aceac43ad41586abb13723003c72 | airbus-seclab/bincat | npkcontext.mli |
C2Newspeak : compiles C code into Newspeak . Newspeak is a minimal language
well - suited for static analysis .
Copyright ( C ) 2007 , ,
This library is free software ; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by th... | null | https://raw.githubusercontent.com/airbus-seclab/bincat/493a03890b3b472fd198ce58c7e9280abd0f9f93/ocaml/src/npk/newspeak/npkcontext.mli | ocaml | * When remove_temp is set, only used variables are kept in newspeak
code
* If no_opt is set, then no code simplification is performed
* Compiles the input files to .no, without linking them into a .npk.
corresponds to -c option
* Name of the result file of the process
* TODO: document that
* Name of the x... |
C2Newspeak : compiles C code into Newspeak . Newspeak is a minimal language
well - suited for static analysis .
Copyright ( C ) 2007 , ,
This library is free software ; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by th... |
b8d241083d9d6d76b674facbdee07adb22e72a45e255a435072b4be4ea3c345b | haskell-mafia/mafia | Ghc.hs | # LANGUAGE LambdaCase #
# LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
module Mafia.Ghc (
GhcVersion(..)
, mkGhcVersion
, renderGhcVersion
, getGhcVersion
, GhcTarget(..)
, getGhcTarget
, GhcError(..)
, renderGhcError
) where
import Control.Monad.Trans.Either (EitherT... | null | https://raw.githubusercontent.com/haskell-mafia/mafia/529440246ee571bf1473615e6218f52cd1e990ae/src/Mafia/Ghc.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE LambdaCase #
# LANGUAGE NoImplicitPrelude #
module Mafia.Ghc (
GhcVersion(..)
, mkGhcVersion
, renderGhcVersion
, getGhcVersion
, GhcTarget(..)
, getGhcTarget
, GhcError(..)
, renderGhcError
) where
import Control.Monad.Trans.Either (EitherT, left, runEitherT)
import qualifi... |
f0f8bad41853dd8e5283dcedd3d4ea181c8dd90c6fad41e3a64a9be035f511a1 | jwiegley/notes | main.hs | {-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Applicative
import Control.Exception
import Control.Monad
import qualified Data.ByteString as B
import Data.Conduit
import Data.Conduit.Filesystem
import qualified Data.Conduit.List as CL
import ... | null | https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/gists/f719a3d41696d48f6005/gists/6084024/main.hs | haskell | # LANGUAGE OverloadedStrings # |
module Main where
import Control.Applicative
import Control.Exception
import Control.Monad
import qualified Data.ByteString as B
import Data.Conduit
import Data.Conduit.Filesystem
import qualified Data.Conduit.List as CL
import Data.List
import qualified Dat... |
45c742357f01ee11f139bc27cc2a49e39b1c7742c490f68124b5edf8041194c6 | fp-works/2019-winter-Haskell-school | Exercise02Spec.hs | module CIS194.Homework01.Exercise02Spec where
import CIS194.Homework01.Exercise02
import Test.Tasty.Hspec
spec_doubleEveryOther :: Spec
spec_doubleEveryOther = do
it "returns an empty list for an empty string" $
doubleEveryOther [] `shouldBe` []
it "returns the same list itself for a single element list" $... | null | https://raw.githubusercontent.com/fp-works/2019-winter-Haskell-school/823b67f019b9e7bc0d3be36711c0cc7da4eba7d2/cis194/week1/daniel-deng/test/CIS194/Homework01/Exercise02Spec.hs | haskell | module CIS194.Homework01.Exercise02Spec where
import CIS194.Homework01.Exercise02
import Test.Tasty.Hspec
spec_doubleEveryOther :: Spec
spec_doubleEveryOther = do
it "returns an empty list for an empty string" $
doubleEveryOther [] `shouldBe` []
it "returns the same list itself for a single element list" $... | |
09884b381f24b42516fbdcdd6996708b4f5a1f75da8eb53abcfe474cbd33de6c | racket/pict | code.rkt | #lang racket/base
(require pict/private/pict
(prefix-in r: racket/base)
mzlib/class
mzlib/list
(only-in scheme/list last)
racket/draw
mzlib/unit
(for-syntax racket/base)
(only-in mzscheme make-namespace))
(provide define-code code^ code-params^ c... | null | https://raw.githubusercontent.com/racket/pict/add4f1deba60fe284016ad889a49941a0ff1c3df/pict-lib/texpict/code.rkt | racket | => render normally
Avoid a syntax location for the synthesized `code:line` wrapper,
syntax-rules syntax-case)))
Ungraceful handling of ungraceful closes by adding a line
--- better than sticking them to the right of the comment, at least
position of `a' is after `b', while everything else is in
order, so print ... | #lang racket/base
(require pict/private/pict
(prefix-in r: racket/base)
mzlib/class
mzlib/list
(only-in scheme/list last)
racket/draw
mzlib/unit
(for-syntax racket/base)
(only-in mzscheme make-namespace))
(provide define-code code^ code-params^ c... |
bf1d9f2591ddc16a2f6e4e45c2491b2ea88c4bfc8cfc952131b80cd211070c6f | inria-parkas/sundialsml | idaFoodWeb_kry_bbd_p.ml |
* -----------------------------------------------------------------
* $ Revision : 1.4 $
* $ Date : 2010/12/01 23:03:29 $
* -----------------------------------------------------------------
* Programmer(s ): , and
* @ LLNL
* ----------------------------------------------------... | null | https://raw.githubusercontent.com/inria-parkas/sundialsml/a1848318cac2e340c32ddfd42671bef07b1390db/examples/ida/parallel/idaFoodWeb_kry_bbd_p.ml | ocaml | Problem Constants
Number of prey (= number of predators).
pi
Number of x mesh points per processor subgrid
Number of y mesh points per processor subgrid
Number of subgrids in the x direction
Number of subgrids in the y direction
mx = number of x mesh points
my = number of y mesh points
Number of equa... |
* -----------------------------------------------------------------
* $ Revision : 1.4 $
* $ Date : 2010/12/01 23:03:29 $
* -----------------------------------------------------------------
* Programmer(s ): , and
* @ LLNL
* ----------------------------------------------------... |
de0629780c3a00c7c0e79c128f4f7f5597626bf87e98580076c806295bb5e0be | kupl/LearnML | original.ml | type lambda = V of var | P of (var * lambda) | C of (lambda * lambda)
and var = string
let rec makePList (lambda : lambda) (pl : string list) : string list =
match lambda with
| V v -> pl
| P (v, e) -> pl @ [ v ] @ makePList e pl
| C (e1, e2) -> makePList e1 pl @ makePList e2 pl
let rec makeVList (lambda : ... | null | https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/lambda/sub91/original.ml | ocaml | type lambda = V of var | P of (var * lambda) | C of (lambda * lambda)
and var = string
let rec makePList (lambda : lambda) (pl : string list) : string list =
match lambda with
| V v -> pl
| P (v, e) -> pl @ [ v ] @ makePList e pl
| C (e1, e2) -> makePList e1 pl @ makePList e2 pl
let rec makeVList (lambda : ... | |
a36d0dfbb00c6f5e45e20a506511148e2688d14742fe2373c5fd2ecef4451d91 | tweag/pirouette | QuasiQuoter.hs | # LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE DeriveLift #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGUAGE ... | null | https://raw.githubusercontent.com/tweag/pirouette/1bfaa872dc04654ad32e9f8e7e2420ec4fa6de3b/src/Language/Pirouette/QuasiQuoter.hs | haskell | # LANGUAGE DeriveLift #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
| Provides the quasiquoters to be able to write @lang@ programs
exported by this module requires the @-XQuasiQuotes@ extension. | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGUAGE UndecidableInstances #
directly into Haskell source files . Using the functions
Chec... |
687e414498460dae2d9a27453c854492971351eaee968b5343502630c7913ec6 | conreality/conreality | cccp.ml | (* This is free and unencumbered software released into the public domain. *)
open Prelude
open Lwt.Infix
open Networking
open Syntax
module Protocol = struct
let port = 1984
end
module Client = struct
type t = Lwt_unix.sockaddr
let any =
Unix.(ADDR_INET (Unix.inet_addr_any, 0))
let compare (a : t) (b ... | null | https://raw.githubusercontent.com/conreality/conreality/e03328ef1f0056b58e4ffe181a279a1dc776e094/src/consensus/messaging/cccp.ml | ocaml | This is free and unencumbered software released into the public domain.
for `nc` probe packets |
open Prelude
open Lwt.Infix
open Networking
open Syntax
module Protocol = struct
let port = 1984
end
module Client = struct
type t = Lwt_unix.sockaddr
let any =
Unix.(ADDR_INET (Unix.inet_addr_any, 0))
let compare (a : t) (b : t) =
Pervasives.compare a b
let to_string = function
| Unix.ADDR_... |
64cf277c912f9258061e0c0a5e254c8eddebf03ad45f270412edbe6c055ce671 | disconcision/fructure | layout-demos.rkt | #lang racket
(require 2htdp/image
"../shared/slash-patterns/slash-patterns.rkt"
; only for div in add-dynamic. TODO: refactor
"../src/common.rkt"
"../src/layout/layout.rkt"
"layout-demos-data.rkt")
; TODO: rework as default settings?
(define test-settings-init
(hash 't... | null | https://raw.githubusercontent.com/disconcision/fructure/d434086052eab3c450f631b7b14dcbf9358f45b7/tests/layout-demos.rkt | racket | only for div in add-dynamic. TODO: refactor
TODO: rework as default settings?
selected-color
add dynamic settings to layout
(draw-outlines-abs | #lang racket
(require 2htdp/image
"../shared/slash-patterns/slash-patterns.rkt"
"../src/common.rkt"
"../src/layout/layout.rkt"
"layout-demos-data.rkt")
(define test-settings-init
(hash 'text-size 34
'typeface "Iosevka, Light"
'max-menu-length 3
'max-menu... |
673b4b37c46c8408055935ee5cf736f050387c62661b2787984a8b13a27e3887 | bobbae/gosling-emacs | spell.ml | (defun
(correct-spelling-mistakes word action continue
(setq continue 1)
(progn;error-occured
(while continue
(save-excursion
(temp-use-buffer "Error log")
(beginning-of-file)
(set-mark)
(end-of-line)
(setq word (region-to-string))
(forward-character)
(delete-to-ki... | null | https://raw.githubusercontent.com/bobbae/gosling-emacs/8fdda532abbffb0c952251a0b5a4857e0f27495a/maclib/spell.ml | ocaml | (defun
(correct-spelling-mistakes word action continue
(setq continue 1)
(progn;error-occured
(while continue
(save-excursion
(temp-use-buffer "Error log")
(beginning-of-file)
(set-mark)
(end-of-line)
(setq word (region-to-string))
(forward-character)
(delete-to-ki... | |
1600458f731492146bfbf066ab9063c6740da05a5c7c96efdd566dd170c5f529 | camlp5/camlp5 | pa_lex.ml | (* camlp5r *)
(* pa_lex.ml,v *)
Copyright ( c ) INRIA 2007 - 2017
#load "pa_extend.cmo";
#load "q_MLast.cmo";
(* Simplified syntax of parsers of characters streams *)
open Pcaml;
open Exparser;
(**)
value var () = "buf";
value empty loc = <:expr< B.empty >>;
value add_char loc c cl = <:expr< B.add $c$ $cl$ >>;
va... | null | https://raw.githubusercontent.com/camlp5/camlp5/15e03f56f55b2856dafe7dd3ca232799069f5dda/etc/pa_lex.ml | ocaml | camlp5r
pa_lex.ml,v
Simplified syntax of parsers of characters streams
| Copyright ( c ) INRIA 2007 - 2017
#load "pa_extend.cmo";
#load "q_MLast.cmo";
open Pcaml;
open Exparser;
value var () = "buf";
value empty loc = <:expr< B.empty >>;
value add_char loc c cl = <:expr< B.add $c$ $cl$ >>;
value get_buf loc cl = <:expr< B.get $cl$ >>;
value var ( ) = " buf " ;
value empty loc = < ... |
eefeae7cc2d5d6cac1455e8ab4d7cf076dc8f011e2e78669b90be6187b2e97c6 | faylang/fay | patternGuards.hs | # LANGUAGE FlexibleInstances #
module PatternGuards where
import FFI
isPositive :: Double -> Bool
isPositive x | x > 0 = True
| x <= 0 = False
threeConds :: Double -> Double
threeConds x | x > 1 = 2
| x == 1 = 1
| x < 1 = 0
withOtherwise :: Double -> Bool
withOtherw... | null | https://raw.githubusercontent.com/faylang/fay/8455d975f9f0db2ecc922410e43e484fbd134699/tests/patternGuards.hs | haskell | Not called, throws "non-exhaustive guard" | # LANGUAGE FlexibleInstances #
module PatternGuards where
import FFI
isPositive :: Double -> Bool
isPositive x | x > 0 = True
| x <= 0 = False
threeConds :: Double -> Double
threeConds x | x > 1 = 2
| x == 1 = 1
| x < 1 = 0
withOtherwise :: Double -> Bool
withOtherw... |
f398ac1f6885464f36f647cb9c3aa6eaaa93601ca13f312957cc9c69b939c044 | spechub/Hets | Lib.hs | |
Module : ./atermlib / src / ATerm / Lib.hs
Description : reexports modules needed for ATC generation
Copyright : ( c ) , Uni Bremen 2002 - 2004
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : provisional
Portability : non - portable ( via impor... | null | https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/atermlib/src/ATerm/Lib.hs | haskell | |
Module : ./atermlib / src / ATerm / Lib.hs
Description : reexports modules needed for ATC generation
Copyright : ( c ) , Uni Bremen 2002 - 2004
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : provisional
Portability : non - portable ( via impor... | |
cb0cecc04475d9b2406f4e40827806442b77844a5564110bee38fc369b156c92 | GillianPlatform/Gillian | Verifier.ml | open Containers
module DL = Debugger_log
module type S = sig
type st
type heap_t
type state
type m_err
type annot
module SPState :
PState.S
with type t = state
and type vt = SVal.M.t
and type st = st
and type store_t = SStore.t
and type heap_t = heap_t
and type... | null | https://raw.githubusercontent.com/GillianPlatform/Gillian/c794de7417f29e3c23146f9958ead7e4ad0216ce/GillianCore/engine/Abstraction/Verifier.ml | ocaml | * For a given definition of a predicate, this function derives the
corresponding logical variables it hides.
* Same as add_hides, but fails in case of error
* For a given predicate, returns a new predicate where the hides have been derived
* Given a program and its unification plans, modifies the program in ... | open Containers
module DL = Debugger_log
module type S = sig
type st
type heap_t
type state
type m_err
type annot
module SPState :
PState.S
with type t = state
and type vt = SVal.M.t
and type st = st
and type store_t = SStore.t
and type heap_t = heap_t
and type... |
0f44f8b9a07d192b83991f7869372c148ed6b9a629dbd5457179d547113ecc16 | clojure-interop/aws-api | AbstractAmazonInspectorAsync.clj | (ns com.amazonaws.services.inspector.AbstractAmazonInspectorAsync
"Abstract implementation of AmazonInspectorAsync. Convenient method forms pass through to the corresponding
overload that takes a request object and an AsyncHandler, which throws an
UnsupportedOperationException."
(:refer-clojure :only [require c... | null | https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.inspector/src/com/amazonaws/services/inspector/AbstractAmazonInspectorAsync.clj | clojure | (ns com.amazonaws.services.inspector.AbstractAmazonInspectorAsync
"Abstract implementation of AmazonInspectorAsync. Convenient method forms pass through to the corresponding
overload that takes a request object and an AsyncHandler, which throws an
UnsupportedOperationException."
(:refer-clojure :only [require c... | |
db3ad9846c66ab8d72baa2ef0e89d016302f14aa1f29023b68175b9a1d1f4d70 | stackbuilders/stache | Parser.hs | {-# LANGUAGE OverloadedStrings #-}
-- |
Module : Text . Mustache .
Copyright : © 2016 – present Stack Builders
License : BSD 3 clause
--
Maintainer : < >
-- Stability : experimental
-- Portability : portable
--
parser for Mustache templates . You do n't usually need to
-- imp... | null | https://raw.githubusercontent.com/stackbuilders/stache/e201682835d87a9e2f51ccba7b5f47866cf05f87/Text/Mustache/Parser.hs | haskell | # LANGUAGE OverloadedStrings #
|
Stability : experimental
Portability : portable
import the module, because "Text.Mustache" re-exports everything you may
need, import that module instead.
--------------------------------------------------------------------------
| Parse a given Mustache template.
| Locatio... |
Module : Text . Mustache .
Copyright : © 2016 – present Stack Builders
License : BSD 3 clause
Maintainer : < >
parser for Mustache templates . You do n't usually need to
module Text.Mustache.Parser
( parseMustache,
)
where
import Control.Monad
import Control.Monad.State.Stri... |
b00153c7c6fae22015a65dce89520118d53c89b3bc612efd7cfa433667b4f853 | bmeurer/ocaml-arm | stdLabels.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, Kyot... | null | https://raw.githubusercontent.com/bmeurer/ocaml-arm/43f7689c76a349febe3d06ae7a4fc1d52984fd8b/stdlib/stdLabels.mli | ocaml | *********************************************************************
OCaml
... | , Kyoto University RIMS
Copyright 2001 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
$ Id$
module Array :
sig
external ... |
7241dfbc17e2433b1c41ea7d64562667c4446c382b3ca5ead7f370073c99d451 | mokus0/junkbox | STLC.hs | {-# LANGUAGE GADTs #-}
module Math.STLC where
import qualified Data.Map as M
import Data.Monoid
data Type b
= BaseType b
| Arrow (Type b) (Type b)
deriving (Eq, Show)
instance Functor Type where
fmap f (BaseType b) = BaseType (f b)
fmap f (Arrow a b) = Arrow (fmap f a) (fmap f b)
data Term k v
... | null | https://raw.githubusercontent.com/mokus0/junkbox/151014bbef9db2b9205209df66c418d6d58b0d9e/Haskell/Math/STLC.hs | haskell | # LANGUAGE GADTs #
this strategy isn't gonna work. Need to introduce unification type variables | module Math.STLC where
import qualified Data.Map as M
import Data.Monoid
data Type b
= BaseType b
| Arrow (Type b) (Type b)
deriving (Eq, Show)
instance Functor Type where
fmap f (BaseType b) = BaseType (f b)
fmap f (Arrow a b) = Arrow (fmap f a) (fmap f b)
data Term k v
= Const k
| Var ... |
307a9085f00761ccbca415171f80b46668b2284b03e806f2e33e7c028f06c5ab | garrigue/labltk | main.ml | (*************************************************************************)
(* *)
(* OCaml LablTk library *)
(* *)
,... | null | https://raw.githubusercontent.com/garrigue/labltk/441705df2d88de01bc6aa28c31cc45e40751ee20/browser/main.ml | ocaml | ***********************************************************************
OCaml LablTk library
... | , Kyoto University RIMS
Copyright 1999 Institut National de Recherche en Informatique et
en Automatique and Kyoto University . All rights reserved .
This file is distributed under the terms of the GNU Library
$ Id$
open StdLabels
module Unix = ... |
4a86a5d8d0447278d7389819aee3f9dbc20909fab8fe12ed51ceea7ba6d7a651 | osa1/sc-plugin | Syntax.hs | # LANGUAGE CPP , FlexibleInstances , Rank2Types , TypeSynonymInstances #
module Supercompile.Core.Syntax (
module Supercompile.Core.Syntax,
Coercion, NormalCo, mkAxInstCo, mkReflCo,
DataCon, Var, Literal, Type, PrimOp
) where
#include "GHCDefs.h"
import Supercompile.StaticFlags
import Supercompile.Util... | null | https://raw.githubusercontent.com/osa1/sc-plugin/1969ad81f16ca8ed8110ca8dadfccf6f3d463635/src/Supercompile/Core/Syntax.hs | haskell | Note [Case wildcards]
~~~~~~~~~~~~~~~~~~~~~
The motivation is that this lets us do more inlining above the case. For example, take this code fragment from foldl':
let n' = c n y
in case n' of wild -> foldl' c n' ys
If we rewrite, n' becomes linear:
let n' = c n y
in case n' of wild -> foldl c wild y... | # LANGUAGE CPP , FlexibleInstances , Rank2Types , TypeSynonymInstances #
module Supercompile.Core.Syntax (
module Supercompile.Core.Syntax,
Coercion, NormalCo, mkAxInstCo, mkReflCo,
DataCon, Var, Literal, Type, PrimOp
) where
#include "GHCDefs.h"
import Supercompile.StaticFlags
import Supercompile.Util... |
8579133ab2b6f3acb1d367821ab001b8d6bfb4dc2da24bdfd13767f4190072ce | xclerc/ocamljava | javaStringPrintf.ml |
* This file is part of library .
* Copyright ( C ) 2007 - 2015 .
*
* library is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation ; either version 3 of the License , or
* ( at yo... | null | https://raw.githubusercontent.com/xclerc/ocamljava/8330bfdfd01d0c348f2ba2f0f23d8f5a8f6015b1/library/javalib/src/javaStringPrintf.ml | ocaml |
* This file is part of library .
* Copyright ( C ) 2007 - 2015 .
*
* library is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation ; either version 3 of the License , or
* ( at yo... | |
ad56164643bc0d7e041efffb6be046934c92e7743aa16410951c43168904ee3d | mfoemmel/erlang-otp | wxColourData.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/wx/src/gen/wxColourData.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 2008 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(wxColourData).
-include("wxe.hrl"... |
6e7df2eeb27434cf72b9b4120f9a36cf00d9307c85611cf6d0470cced9e529b1 | metaocaml/ber-metaocaml | t200-getfield2.ml | TEST
include tool - ocaml - lib
flags = " -w a "
ocaml_script_as_argument = " true "
* setup - ocaml - build - env
* *
include tool-ocaml-lib
flags = "-w a"
ocaml_script_as_argument = "true"
* setup-ocaml-build-env
** ocaml
*)
open Lib;;
type t = {
a : int;
b : int;
c : int;
};;
if { a = 7; b = 6;... | null | https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/tool-ocaml/t200-getfield2.ml | ocaml | TEST
include tool - ocaml - lib
flags = " -w a "
ocaml_script_as_argument = " true "
* setup - ocaml - build - env
* *
include tool-ocaml-lib
flags = "-w a"
ocaml_script_as_argument = "true"
* setup-ocaml-build-env
** ocaml
*)
open Lib;;
type t = {
a : int;
b : int;
c : int;
};;
if { a = 7; b = 6;... | |
8f5fc6fe033d130012586ab93d1b2580a49a99e0a69a17b46459629827e2860a | ralsei/graphite | dodged-bar.rkt | #lang racket
(require data-frame fancy-app
graphite)
(provide (all-defined-out))
(define all-data (df-read/csv "./data/gss_sm.csv"))
(graph #:data all-data
#:title "Where people live, I guess?"
#:x-label "Region"
#:y-label "% of total"
#:mapping (aes #:x "bigregion")
#:width 120... | null | https://raw.githubusercontent.com/ralsei/graphite/a57eacf1b9262a9bde220035e303c42a814ecfe3/graphite-examples/dodged-bar.rkt | racket | #lang racket
(require data-frame fancy-app
graphite)
(provide (all-defined-out))
(define all-data (df-read/csv "./data/gss_sm.csv"))
(graph #:data all-data
#:title "Where people live, I guess?"
#:x-label "Region"
#:y-label "% of total"
#:mapping (aes #:x "bigregion")
#:width 120... | |
6798f9bd3e7b53ec76453c399b1f6715a24b50ef71ef58026b88791ae018a4a4 | PacktWorkshops/The-Clojure-Workshop | tennis_history.clj | (ns packt-clj.tennis
(:require
[clojure.data.csv :as csv]
[clojure.java.io :as io]
[clojure.math.numeric-tower :as math]
[semantic-csv.core :as sc]))
The first part of this file comes from the tennis_history.clj
from Exercise 5.04 .
(defn match-probability [player-1-rating player-2-rating]
(/ 1
... | null | https://raw.githubusercontent.com/PacktWorkshops/The-Clojure-Workshop/3d309bb0e46a41ce2c93737870433b47ce0ba6a2/Chapter07/Exercise7.05/tennis_history.clj | clojure | The new functions start here | (ns packt-clj.tennis
(:require
[clojure.data.csv :as csv]
[clojure.java.io :as io]
[clojure.math.numeric-tower :as math]
[semantic-csv.core :as sc]))
The first part of this file comes from the tennis_history.clj
from Exercise 5.04 .
(defn match-probability [player-1-rating player-2-rating]
(/ 1
... |
0123bbb32e4ff07b999cfa316b35ac437eca2e5f1dfd22f56a8a0903edbc628d | may-liu/qtalk | mod_recent_contact.erl | %%%----------------------------------------------------------------------
%%% File : mod_ping.erl
Author : < >
Purpose : Support XEP-0199 XMPP Ping and periodic keepalives
Created : 11 Jul 2009 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2014 ProcessOne
%%%
%%% This program is free software; ... | null | https://raw.githubusercontent.com/may-liu/qtalk/f5431e5a7123975e9656e7ab239e674ce33713cd/qtalk_opensource/src/mod_recent_contact.erl | erlang | ----------------------------------------------------------------------
File : mod_ping.erl
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 that it will be useful,
but WITHOUT ANY WARRANTY; without even the ... | Author : < >
Purpose : Support XEP-0199 XMPP Ping and periodic keepalives
Created : 11 Jul 2009 by < >
ejabberd , Copyright ( C ) 2002 - 2014 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 ... |
91392a46645db11be76bbdf0187063c3c5e37fbe1be698dd21693de4dd5e4203 | esl/erlang-web | e_cache.erl | The contents of this file are subject to the Erlang Web Public License ,
Version 1.0 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
Erlang Web Public License along with this software . If not , it can be
%% retrieved via the world... | null | https://raw.githubusercontent.com/esl/erlang-web/2e5c2c9725465fc5b522250c305a9d553b3b8243/lib/eptic-1.4.1/src/e_cache.erl | erlang | compliance with the License. You should have received a copy of the
retrieved via the world wide web at -consulting.com/.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
---------------------------------... | The contents of this file are subject to the Erlang Web Public License ,
Version 1.0 , ( the " License " ) ; you may not use this file except in
Erlang Web Public License along with this software . If not , it can be
Software distributed under the License is distributed on an " AS IS "
The Initial Developer o... |
bfe2c3ad586979aa1c88ebbf7b2a8c829eaab71cf68d65eaf380b37139715bbb | geophf/1HaskellADay | Solution.hs | module Y2020.M08.D27.Solution where
-
OKAY ! now we can start these documents into word - vectors .
But ... wait .
What , exactly , is a word ? I do n't have a good answer to that quesstion , because
why ? because some characters are word - parts , and some are n't , and given UTF-8
and documents that use... | null | https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2020/M08/D27/Solution.hs | haskell | }
wowzorx. That was hard. ... NOT!
}
}
-
>>> weirdChars <$> weirds
{"!\"#$%'()*,-./0123456789:;?@[]\182\187\191"}
- | module Y2020.M08.D27.Solution where
-
OKAY ! now we can start these documents into word - vectors .
But ... wait .
What , exactly , is a word ? I do n't have a good answer to that quesstion , because
why ? because some characters are word - parts , and some are n't , and given UTF-8
and documents that use... |
93f19e41fb33029fe4ae11d69c6b7975c2a48a9fb15604446936217b3df134ea | danieljharvey/mimsa | Solve.hs | # LANGUAGE BlockArguments #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
module Language.Mimsa.Typechecker.Solve (solve, runSolveM, SolveM) where
import Control.Monad.Except
import Control.Monad.State
import Language.Mimsa.Typechecker.TcMonad
import Language.Mimsa.Typechecker.Unify
import Language.Mi... | null | https://raw.githubusercontent.com/danieljharvey/mimsa/319b18896379c9a1d64f4e636817f8f38a77bbd9/compiler/src/Language/Mimsa/Typechecker/Solve.hs | haskell | # LANGUAGE BlockArguments #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
module Language.Mimsa.Typechecker.Solve (solve, runSolveM, SolveM) where
import Control.Monad.Except
import Control.Monad.State
import Language.Mimsa.Typechecker.TcMonad
import Language.Mimsa.Typechecker.Unify
import Language.Mi... | |
56ce93567ae991fe2609ae7062afd261d359e70fe0a2c3c3e458ab7742843493 | jabber-at/ejabberd | node_hometree.erl | %%%----------------------------------------------------------------------
%%% File : node_hometree.erl
Author :
%%% Purpose : Standard tree ordered node plugin
Created : 1 Dec 2007 by
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2018 ProcessOne
%%%
%%% This program is free software; you can redis... | null | https://raw.githubusercontent.com/jabber-at/ejabberd/7bfec36856eaa4df21b26e879d3ba90285bad1aa/src/node_hometree.erl | erlang | ----------------------------------------------------------------------
File : node_hometree.erl
Purpose : Standard tree ordered node plugin
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 that it will be us... | Author :
Created : 1 Dec 2007 by
ejabberd , Copyright ( C ) 2002 - 2018 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.