_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 |
|---|---|---|---|---|---|---|---|---|
35998ba10224d91e02e4b372d498b595a1e88049921ff69993e9310d162b2c04 | wh5a/thih | SourceMonad.hs | -----------------------------------------------------------------------------
SourceMonad : encoding of the Monad library source code
--
Part of ` Typing Haskell in ' , version of November 23 , 2000
Copyright ( c ) and the Oregon Graduate Institute
of Science and Technology , 1999 - 2000
--
... | null | https://raw.githubusercontent.com/wh5a/thih/dc5cb16ba4e998097135beb0c7b0b416cac7bfae/src/SourceMonad.hs | haskell | ---------------------------------------------------------------------------
in the file "License" that is included in the distribution
of this software, copies of which may be obtained from:
/~mpj/thih/
---------------------------------------------------------------------------
------------... | SourceMonad : encoding of the Monad library source code
Part of ` Typing Haskell in ' , version of November 23 , 2000
Copyright ( c ) and the Oregon Graduate Institute
of Science and Technology , 1999 - 2000
This program is distributed as Free Software under the terms
module SourceMonad wh... |
610236582587517cde8ec462424ee78e2f402525e6eadb266b64c42603f37bb9 | macourtney/Conjure | builder.clj | (ns conjure.test.builder
(:import [java.io File])
(:require [clojure.tools.logging :as logging]
[conjure.config.environment :as environment]
[conjure.test.util :as util]
[clojure.tools.file-utils :as file-utils]
[clojure.tools.loading-utils :as loading-utils]))
(defn... | null | https://raw.githubusercontent.com/macourtney/Conjure/1d6cb22d321ea75af3a6abe2a5bc140ad36e20d1/conjure_test/src/conjure/test/builder.clj | clojure | (ns conjure.test.builder
(:import [java.io File])
(:require [clojure.tools.logging :as logging]
[conjure.config.environment :as environment]
[conjure.test.util :as util]
[clojure.tools.file-utils :as file-utils]
[clojure.tools.loading-utils :as loading-utils]))
(defn... | |
549e646a6b3ccb19e07492c741c7fa536d5b83b77d4162863f2006fcceb8309b | facebookarchive/pfff | utils_js.ml |
open Common
let string_of_any ast =
ast +> Meta_ast_js.vof_any +> Ocaml.string_of_v
let load db gen =
try
let in_channel = open_in db in
let data = Marshal.from_channel in_channel in
close_in in_channel;
data
with _ ->
let data = gen() in
let out_channel = open_out db in
Marshal.to_channel out_chan... | null | https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/lang_js/analyze/utils_js.ml | ocaml |
open Common
let string_of_any ast =
ast +> Meta_ast_js.vof_any +> Ocaml.string_of_v
let load db gen =
try
let in_channel = open_in db in
let data = Marshal.from_channel in_channel in
close_in in_channel;
data
with _ ->
let data = gen() in
let out_channel = open_out db in
Marshal.to_channel out_chan... | |
f700a04a16e930ae5f72e5c3b4c7ce239b9ffb573645a3e0ab4f9487522dd5df | ocaml-multicore/parafuzz | yamagata021012_ok.ml | (* TEST
flags = " -w a "
* setup-ocamlc.byte-build-env
** ocamlc.byte
*** check-ocamlc.byte-output
*)
(* The module begins *)
exception Out_of_range
class type ['a] cursor =
object
method get : 'a
method incr : unit -> unit
method is_last : bool
end
class type ['a] storage =
object ('self)
meth... | null | https://raw.githubusercontent.com/ocaml-multicore/parafuzz/6a92906f1ba03287ffcb433063bded831a644fd5/testsuite/tests/typing-objects-bugs/yamagata021012_ok.ml | ocaml | TEST
flags = " -w a "
* setup-ocamlc.byte-build-env
** ocamlc.byte
*** check-ocamlc.byte-output
The module begins
: #ustorage |
exception Out_of_range
class type ['a] cursor =
object
method get : 'a
method incr : unit -> unit
method is_last : bool
end
class type ['a] storage =
object ('self)
method first : 'a cursor
method len : int
method nth : int -> 'a cursor
method copy : 'self
method sub : int -> in... |
1f517dd0b9ace12bbc9de17d6c44dc382cd65573afa5536657dece09bc74dbc9 | erlangonrails/devdb | xml.erl | %%%----------------------------------------------------------------------
%%% File : xml.erl
Author : < >
%%% Purpose : XML utils
Created : 20 Nov 2002 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2010 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
modify it u... | null | https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/exmpp-0.9.5/src/compat/xml.erl | erlang | ----------------------------------------------------------------------
File : xml.erl
Purpose : XML utils
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; w... | Author : < >
Created : 20 Nov 2002 by < >
ejabberd , Copyright ( C ) 2002 - 2010 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
Founda... |
c7d96189b420d6336b885a7fb7a22312b81355c1da8f96009b8f9e87f1f2e00f | choener/ADPfusion | benchmark.hs |
{- Options_GHC -fno-liberate-case #-}
{- Options_GHC -fno-full-laziness #-}
module Main where
import Criterion.Main
import BenchmarkFun
main :: IO ()
main = return ()
main : : IO ( )
main = do
defaultMain
[ bgroup " Epsilon "
[ bench " S " $ nf stream_Epsilon_S 0
, ben... | null | https://raw.githubusercontent.com/choener/ADPfusion/fcbbf05d0f438883928077e3d8a7f1cbf8c2e58d/tests/benchmark.hs | haskell | Options_GHC -fno-liberate-case #
Options_GHC -fno-full-laziness # |
module Main where
import Criterion.Main
import BenchmarkFun
main :: IO ()
main = return ()
main : : IO ( )
main = do
defaultMain
[ bgroup " Epsilon "
[ bench " S " $ nf stream_Epsilon_S 0
, bench " V " $ nf stream_Epsilon_V 0
]
, bgroup " Chr ... |
9550c401aa546eb23f5db598d6959abbc2f8b6cab77dc30b842cd50c84024694 | AndrasKovacs/ELTE-func-lang | Lesson05_pre.hs | # LANGUAGE InstanceSigs #
module Lesson05 where
data List a = Nil | Cons a (List a)
data BinaryTree a = Leaf a | Node (BinaryTree a) a (BinaryTree a)
data RoseTree a = RoseNode a [RoseTree a]
--------------------------------------
-- Functor:
-- típusa, típusok típusa ((,), Maybe, Either, List ...)
-- (,) :: Type -... | null | https://raw.githubusercontent.com/AndrasKovacs/ELTE-func-lang/81f6d08a2194cd5c93850d59c03a410cca591960/2021-22-2/gyak_2/Lesson05_pre.hs | haskell | ------------------------------------
Functor:
típusa, típusok típusa ((,), Maybe, Either, List ...)
(,) :: Type -> Type -> Type
Maybe :: Type -> Type
Either :: Type -> Type -> Type
List :: Type -> Type
List Int :: Type
ghci-ben :k
Functor törvények:
i-szeres elágazás
Törvények:
Törvények:
| # LANGUAGE InstanceSigs #
module Lesson05 where
data List a = Nil | Cons a (List a)
data BinaryTree a = Leaf a | Node (BinaryTree a) a (BinaryTree a)
data RoseTree a = RoseNode a [RoseTree a]
Functor paramétere ( Type - > Type ) kind - ú .
kind = típus típusa
A paramétereket lehet parciálisan applikálni ,... |
c40ef8e90ad612e08977294843f2dc8f6a01719e0aa258daa0fcf62a0103b46e | jonatack/cl-kraken | http.lisp | ;;;; cl-kraken/tests/http.lisp
(defpackage #:cl-kraken/tests/http
(:use #:cl #:cl-kraken #:rove))
(in-package #:cl-kraken/tests/http)
(defparameter *expected-query* "GET /0/public/Time HTTP/1.1")
(deftest request
(testing "when passed no keyword params"
(let* ((response (cl-kraken::request "Time"))
... | null | https://raw.githubusercontent.com/jonatack/cl-kraken/e5b438eb821bf7dc3514a44ff84f15f393b4e393/tests/http.lisp | lisp | cl-kraken/tests/http.lisp |
(defpackage #:cl-kraken/tests/http
(:use #:cl #:cl-kraken #:rove))
(in-package #:cl-kraken/tests/http)
(defparameter *expected-query* "GET /0/public/Time HTTP/1.1")
(deftest request
(testing "when passed no keyword params"
(let* ((response (cl-kraken::request "Time"))
(headers (with-output-to-stri... |
291fd78046117ade1f28c32cb9dee0cf0b0183bd6bc62a411efc2243602267b9 | bscarlet/llvm-general | Linking.hs | module LLVM.General.Test.Linking where
import Test.Framework
import Test.Framework.Providers.HUnit
import Test.HUnit
import LLVM.General.Test.Support
import Control.Monad.Trans.Except
import Data.Functor
import qualified Data.Set as Set
import qualified Data.Map as Map
import LLVM.General.Module
import LLVM.General... | null | https://raw.githubusercontent.com/bscarlet/llvm-general/61fd03639063283e7dc617698265cc883baf0eec/llvm-general/test/LLVM/General/Test/Linking.hs | haskell | module LLVM.General.Test.Linking where
import Test.Framework
import Test.Framework.Providers.HUnit
import Test.HUnit
import LLVM.General.Test.Support
import Control.Monad.Trans.Except
import Data.Functor
import qualified Data.Set as Set
import qualified Data.Map as Map
import LLVM.General.Module
import LLVM.General... | |
56dd416e97fe4913783ba89e2f1ee6b4ab3e7eedec9bb3b4384037f6b04b8eb1 | janestreet/email_message | email_grammar_types.ml | (* Some simple, lightweight types for parser output *)
type header = (string * string) list
type content_offset =
[ `Content_offset of int
| `Bad_headers of int
| `Truncated
]
type message = [ `Message of header * content_offset ]
| null | https://raw.githubusercontent.com/janestreet/email_message/c88d38b850fce23bb5eb4f772211a4368324b1f7/src/email_grammar_types.ml | ocaml | Some simple, lightweight types for parser output | type header = (string * string) list
type content_offset =
[ `Content_offset of int
| `Bad_headers of int
| `Truncated
]
type message = [ `Message of header * content_offset ]
|
7f057504c99d8902e260a4cd3ec1c26baec4e571cc9dba487627461a97298022 | 40ants/cl-hamcrest | changelog.lisp | (uiop:define-package #:hamcrest-docs/changelog
(:use #:cl)
(:import-from #:40ants-doc/changelog
#:defchangelog))
(in-package #:hamcrest-docs/changelog)
(defchangelog (:ignore-words ("SLY"
"ASDF"
"REPL"
"SBCL"... | null | https://raw.githubusercontent.com/40ants/cl-hamcrest/9abb4978271907e11c21411ba350b0d6d7d9cb12/docs/changelog.lisp | lisp | (uiop:define-package #:hamcrest-docs/changelog
(:use #:cl)
(:import-from #:40ants-doc/changelog
#:defchangelog))
(in-package #:hamcrest-docs/changelog)
(defchangelog (:ignore-words ("SLY"
"ASDF"
"REPL"
"SBCL"... | |
c99e6786d8d1760ce08462f4a877e6cc24682c88aa78d10d8b4a921880cb24c9 | ghc/packages-Cabal | DependencyMap.hs | module Distribution.Types.DependencyMap (
DependencyMap,
toDepMap,
fromDepMap,
constrainBy,
) where
import Distribution.Compat.Prelude
import Prelude ()
import Distribution.Types.Dependency
import Distribution.Types.LibraryName
import Distribution.Types.PackageName
import Distribution.Types.PackageVer... | null | https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/Cabal/Distribution/Types/DependencyMap.hs | haskell | | A map of dependencies. Newtyped since the default monoid instance is not
appropriate. The monoid instance uses 'intersectVersionRanges'.
Apply extra constraints to a dependency map.
Combines dependencies where the result will only contain keys from the left
be intersected. | module Distribution.Types.DependencyMap (
DependencyMap,
toDepMap,
fromDepMap,
constrainBy,
) where
import Distribution.Compat.Prelude
import Prelude ()
import Distribution.Types.Dependency
import Distribution.Types.LibraryName
import Distribution.Types.PackageName
import Distribution.Types.PackageVer... |
c497ad8f0ff57a90f87e41585eaa7ba8c6d20f9078ef182b3928caad3ba20f70 | ericcervin/getting-started-with-sketching | pg029b.rkt | #lang sketching
(define (setup)
(size 480 120)
(smoothing 'smoothed)
(background 200)
(no-loop)
)
(define (draw)
;Left Creature
(fill 153 176 180)
(begin-shape)
(vertex 50 120)
(vertex 100 90)
(vertex 110 60)
(vertex 80 20)
(vertex 210 60)
(vertex 160 80)
(vertex 200 9... | null | https://raw.githubusercontent.com/ericcervin/getting-started-with-sketching/c328a92d2f6adbffddf3394613d244af54d4034f/pg029b.rkt | racket | Left Creature
Right Creature | #lang sketching
(define (setup)
(size 480 120)
(smoothing 'smoothed)
(background 200)
(no-loop)
)
(define (draw)
(fill 153 176 180)
(begin-shape)
(vertex 50 120)
(vertex 100 90)
(vertex 110 60)
(vertex 80 20)
(vertex 210 60)
(vertex 160 80)
(vertex 200 90)
(vertex 140 ... |
7164fc80ec1cf39b8e3a1f6ad470971f2279c6ae70619a99a7e1539becdefc85 | IBM/probzelus | run.ml |
* Copyright 2018 - 2020 IBM Corporation
*
* 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 writin... | null | https://raw.githubusercontent.com/IBM/probzelus/c56573201b43780b9c103e5616bb193ababa3399/benchmarks/gtree/semi_symb/run.ml | ocaml |
* Copyright 2018 - 2020 IBM Corporation
*
* 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 writin... | |
0c69614fedbb2a621b71c3bb63b88f78a55ff12f9269a8a6a1f9948bb2f04eef | helium/kdtree | kdtree_h3_SUITE.erl | -module(kdtree_h3_SUITE).
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
-export([all/0]).
-export([
basic_test/1,
add_test/1,
remove_test/1
]).
all() -> [
basic_test,
add_test,
remove_test
].
basic_test... | null | https://raw.githubusercontent.com/helium/kdtree/f7f1aa66e552cafde25074a63ee32eca41880596/test/kdtree_h3_SUITE.erl | erlang | random list of h3 indices
build a kdtree
Verify nearest location from given location
Verify nearby
random list of h3 indices
build a kdtree
create a new node from h3 index
add node to tree
random list of h3 indices
build a kdtree | -module(kdtree_h3_SUITE).
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
-export([all/0]).
-export([
basic_test/1,
add_test/1,
remove_test/1
]).
all() -> [
basic_test,
add_test,
remove_test
].
basic_test... |
6d7d173a07c7dc4c5da41fd4ce00b75adbbae8f5182bcd451ced860a3fce9266 | wangweihao/ProgrammingErlangAnswer | a.erl | % 对不同名类型做些试验。创建两个模块,第一个模块导出一个不同名类型,
% 第二个模块以能导致抽象违规的方式使用该不透明类型的内部数据结构。
% 在这两个模块上运行 dialyzer 并确保理解了错误消息。
-module(a).
-export_type([mylist/0]).
-type mylist()::list().
-opaque ( ) : : list ( ) .
| null | https://raw.githubusercontent.com/wangweihao/ProgrammingErlangAnswer/b145b5e6a19cb866ce5d2ceeac116d751f6e2b3d/9/4/a.erl | erlang | 对不同名类型做些试验。创建两个模块,第一个模块导出一个不同名类型,
第二个模块以能导致抽象违规的方式使用该不透明类型的内部数据结构。
在这两个模块上运行 dialyzer 并确保理解了错误消息。 |
-module(a).
-export_type([mylist/0]).
-type mylist()::list().
-opaque ( ) : : list ( ) .
|
92a08ced2aa3a6a49b4f62b1a7eca743dda0e7e7271833d7470e575118322bbc | haskell/aeson | Encoders.hs | # LANGUAGE CPP #
# LANGUAGE EmptyCase #
{-# LANGUAGE GADTs #-}
# LANGUAGE NoImplicitPrelude #
# LANGUAGE TemplateHaskell #
module Encoders (module Encoders) where
import Prelude.Compat
import Data.Aeson.TH
import Data.Aeson.Types
import qualified Data.Aeson.Key as Key
import Options
import Types
-------------------... | null | https://raw.githubusercontent.com/haskell/aeson/66b0b0d323a83fbfd94a4f8bfa1699ef55ce6159/tests/Encoders.hs | haskell | # LANGUAGE GADTs #
------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
----------------------------------------------------------------... | # LANGUAGE CPP #
# LANGUAGE EmptyCase #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE TemplateHaskell #
module Encoders (module Encoders) where
import Prelude.Compat
import Data.Aeson.TH
import Data.Aeson.Types
import qualified Data.Aeson.Key as Key
import Options
import Types
Nullary encoders / decoders
thNullaryTo... |
616c59dba547e0b0d4b2eb4c15b4fec2689a551875ba6184f3ad5f5a8598e5a6 | cedlemo/OCaml-GI-ctypes-bindings-generator | Search_bar.mli | open Ctypes
type t
val t_typ : t typ
val create :
unit -> Widget.t ptr
val connect_entry :
t -> Entry.t ptr -> unit
val get_search_mode :
t -> bool
val get_show_close_button :
t -> bool
(*Not implemented gtk_search_bar_handle_event type union not implemented*)
val set_search_mode :
t -> bool -> unit
val set... | null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Search_bar.mli | ocaml | Not implemented gtk_search_bar_handle_event type union not implemented | open Ctypes
type t
val t_typ : t typ
val create :
unit -> Widget.t ptr
val connect_entry :
t -> Entry.t ptr -> unit
val get_search_mode :
t -> bool
val get_show_close_button :
t -> bool
val set_search_mode :
t -> bool -> unit
val set_show_close_button :
t -> bool -> unit
|
d8141082dd0a292f09ea0851b7a1572a90f410393fe2a1930484c24543e775a8 | tommaisey/aeon | rotate2.help.scm | (let* ((p (mul (white-noise ar) 0.05))
(q (mul (mix (lf-saw ar (make-mce (list 200 200.37 201)) 0)) 0.03))
(encoded (add (pan-b2 p -0.5 1) (pan-b2 q -0.5 1)))
(rotated (rotate2 (mce-channel encoded 1)
(mce-channel encoded 2)
(mouse-x kr -1 1 0 0.1)))
(decoded (decode-b2 4
(mce-c... | null | https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/panners/rotate2.help.scm | scheme | Rotation of stereo sound, via mouse. | (let* ((p (mul (white-noise ar) 0.05))
(q (mul (mix (lf-saw ar (make-mce (list 200 200.37 201)) 0)) 0.03))
(encoded (add (pan-b2 p -0.5 1) (pan-b2 q -0.5 1)))
(rotated (rotate2 (mce-channel encoded 1)
(mce-channel encoded 2)
(mouse-x kr -1 1 0 0.1)))
(decoded (decode-b2 4
(mce-c... |
fa957598dab0f4e3839ad60371a49fc907c47b4d8ae3c34a7a846859b6eeadf2 | UCSD-PL/refscript | Syntax.hs | # LANGUAGE FlexibleInstances #
| Pretty - printing JavaScript .
module Language.Rsc.Pretty.Syntax (
javaScript
, renderStatements
, renderExpression
) where
import Data.Maybe (catMaybes, fromMaybe)
import Language.Rsc.AST.Syntax
import Language.Rsc.Names
import ... | null | https://raw.githubusercontent.com/UCSD-PL/refscript/884306fef72248ac41ecdbb928bbd7b06ca71bd4/src/Language/Rsc/Pretty/Syntax.hs | haskell | # OVERLAPPING #
| Renders a list of statements as a 'String'
| Renders a list of statements as a 'String'
classEltAsBlock = asBlock classEltList
Based on:
:Literals
@ppRelationalExpression False@ is RelationalExpressionNoIn
PV Adding new levels for Cast
PV Adding new levels for Cast_
'Doc' will pretty-print ... | # LANGUAGE FlexibleInstances #
| Pretty - printing JavaScript .
module Language.Rsc.Pretty.Syntax (
javaScript
, renderStatements
, renderExpression
) where
import Data.Maybe (catMaybes, fromMaybe)
import Language.Rsc.AST.Syntax
import Language.Rsc.Names
import ... |
2d74dc88a200de2a8055934c07c3659b2c253b8dac56fdb4b594775d3a6598be | freizl/dive-into-haskell | FoldBool.hs | -- |
module FoldBool where
foldBool :: a -> a -> Bool -> a
foldBool x _ False = x
foldBool _ y True = y
foldBool2 :: a -> a -> Bool -> a
foldBool2 x y cond = case cond of
True -> y
False -> x
foldBool3 :: a -> a -> Bool -> a
foldBool3 x y cond
| cond == True = y
| cond == False = x
| null | https://raw.githubusercontent.com/freizl/dive-into-haskell/b18a6bfe212db6c3a5d707b4a640170b8bcf9330/readings/haskell-book/07/FoldBool.hs | haskell | | |
module FoldBool where
foldBool :: a -> a -> Bool -> a
foldBool x _ False = x
foldBool _ y True = y
foldBool2 :: a -> a -> Bool -> a
foldBool2 x y cond = case cond of
True -> y
False -> x
foldBool3 :: a -> a -> Bool -> a
foldBool3 x y cond
| cond == True = y
| cond == False = x
|
b34f65775ac0b70be4c60e71d7bc0ca283234f2f97591c04ab7a791c33aa4105 | tomas-abrahamsson/gpb | gpb_gen_types.erl | Copyright ( C ) 2017
%%%
Author : < >
%%%
%%% This library is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
version 2.1 of the License , or ( at your option ) any later version .
%... | null | https://raw.githubusercontent.com/tomas-abrahamsson/gpb/5d5f49ba56b884a92a9eb996971871cf97a5c0f0/src/gpb_gen_types.erl | erlang |
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GN... | Copyright ( C ) 2017
Author : < >
License as published by the Free Software Foundation ; either
version 2.1 of the License , or ( at your option ) any later version .
You should have received a copy of the GNU Lesser General Public
Foundation , Inc. , 51 Franklin Street , Fifth Floor , Boston ,
MA ... |
a0035c631315d8ce1dde16f48c7cdbc7dc193b5bd3a2388f18b6b112a8c6166a | haskell-mafia/boris | Ref.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
module Boris.Core.Serial.Ref (
BorisPatternConfigError (..)
, parsePatternConfig
, renderBorisPatternConfigError
) where
import Boris.Core.Data
import Control.Lens ((^?))
import qualified Data.Text as T
import qualified D... | null | https://raw.githubusercontent.com/haskell-mafia/boris/fb670071600e8b2d8dbb9191fcf6bf8488f83f5a/boris-core/src/Boris/Core/Serial/Ref.hs | haskell | # LANGUAGE OverloadedStrings #
} | # LANGUAGE NoImplicitPrelude #
module Boris.Core.Serial.Ref (
BorisPatternConfigError (..)
, parsePatternConfig
, renderBorisPatternConfigError
) where
import Boris.Core.Data
import Control.Lens ((^?))
import qualified Data.Text as T
import qualified Data.HashMap.Strict as M
import ... |
225afe54a6545cb97c6a7ade5771ae5e0acf1a6550a080cb6be64b46a28bd924 | byorgey/diagrams-play | Animation.hs | # LANGUAGE NoMonomorphismRestriction #
import Diagrams.Prelude
import Diagrams.Backend.Cairo.CmdLine
s = bezier3 (0,2) (3,3) (2,0)
toDouble = fromRational . toRational
a = mkActive 0 1 (\t -> circle 0.3 # fc black # translate (atParam s (toDouble t)))
main = animMain ((const <$> (a # stretch 3) <*> interval (-1) 4... | null | https://raw.githubusercontent.com/byorgey/diagrams-play/5362c715db394be6848ff5de1bbe71178e5f173f/Animation.hs | haskell | # LANGUAGE NoMonomorphismRestriction #
import Diagrams.Prelude
import Diagrams.Backend.Cairo.CmdLine
s = bezier3 (0,2) (3,3) (2,0)
toDouble = fromRational . toRational
a = mkActive 0 1 (\t -> circle 0.3 # fc black # translate (atParam s (toDouble t)))
main = animMain ((const <$> (a # stretch 3) <*> interval (-1) 4... | |
7591241e71ff73fb62116a9970adc9852af2cc3508525fbdcbf11d58d9b977c4 | tisnik/clojure-examples | core.clj | ;
( C ) Copyright 2015 , 2020
;
; All rights reserved. This program and the accompanying materials
; are made available under the terms of the Eclipse Public License v1.0
; which accompanies this distribution, and is available at
-v10.html
;
; Contributors:
;
(ns seesaw15.core
(:gen-class))
... | null | https://raw.githubusercontent.com/tisnik/clojure-examples/984af4a3e20d994b4f4989678ee1330e409fdae3/seesaw15/src/seesaw15/core.clj | clojure |
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
Contributors:
| ( C ) Copyright 2015 , 2020
-v10.html
(ns seesaw15.core
(:gen-class))
(use 'seesaw.core)
(use 'seesaw.color)
(def formular
(vertical-panel :border 10
:items [(button :text ":background :red" :background :red)
(button :text ":background :yellow" :b... |
8d2dea9c2f18cd2f97bc45314864dc73adae73b26c76b5e6edf559b9cf92224b | anuyts/menkar | Monad.hs | module Control.Categorical.Monad where
import qualified Prelude as P
import Prelude (($))
import Control.Category
import Control.Categorical.Functor
class (Endofunctor m hom) => Monad (m :: kobj -> kobj) (hom :: kobj -> kobj -> *) where
return :: hom a (m a)
bind :: hom a (m b) -> hom (m a) (m b)
---------------... | null | https://raw.githubusercontent.com/anuyts/menkar/1f00e9febd1e9ed70c138ae8232b1c72a17d31da/menkar/obsolete/Control/Categorical/Monad.hs | haskell | ----------------------
| Natural transformations from 'f' to 'g' with codomain category 'cod'
| If 'cod' is a category, then functors to 'cod' constitute the category 'NT cod'
| If @dom@ is a kind and 'cod' is a category, then @NT cod f@ is a functor @(dom -> cod) -> *@.
---------------------- | module Control.Categorical.Monad where
import qualified Prelude as P
import Prelude (($))
import Control.Category
import Control.Categorical.Functor
class (Endofunctor m hom) => Monad (m :: kobj -> kobj) (hom :: kobj -> kobj -> *) where
return :: hom a (m a)
bind :: hom a (m b) -> hom (m a) (m b)
newtype NT cod... |
0ed71d7e56ad7468ec92787715ee5e1f42207820f8e9991dc3fd69c4ef998d68 | jserot/lascar | main.ml | open Utils
open Lascar
module State = struct
type t = S0 | S1 | S2 [@@deriving show {with_path=false}]
let compare = Stdlib.compare
let to_string = show
end
module Label = Builtins.String
module Attr = Builtins.String
module M1 = Ltsa.Make (State)(Label)(Attr)
open State
let s1 = M1.create
~states:[S0, "... | null | https://raw.githubusercontent.com/jserot/lascar/79bd11cd0d47545bccfc3a3571f37af065915c83/examples/lts/conv/main.ml | ocaml | open Utils
open Lascar
module State = struct
type t = S0 | S1 | S2 [@@deriving show {with_path=false}]
let compare = Stdlib.compare
let to_string = show
end
module Label = Builtins.String
module Attr = Builtins.String
module M1 = Ltsa.Make (State)(Label)(Attr)
open State
let s1 = M1.create
~states:[S0, "... | |
5f05cba3d999b0823b8aa1074176ed5f327202ec8f1376c505d7129bb9877ed9 | msakai/toysolver | MIP.hs | {-# LANGUAGE Rank2Types #-}
# LANGUAGE ScopedTypeVariables #
# OPTIONS_GHC -Wall #
{-# OPTIONS_HADDOCK show-extensions #-}
-----------------------------------------------------------------------------
-- |
Module : ToySolver . Arith . MIP
Copyright : ( c ) 2012
-- License : BSD-style
--
-- Maint... | null | https://raw.githubusercontent.com/msakai/toysolver/6233d130d3dcea32fa34c26feebd151f546dea85/src/ToySolver/Arith/MIP.hs | haskell | # LANGUAGE Rank2Types #
# OPTIONS_HADDOCK show-extensions #
---------------------------------------------------------------------------
|
License : BSD-style
Maintainer :
Stability : provisional
Portability : non-portable
Reference:
* </~wei/lpch3.pdf>
\"An Algorithm for the Mixed Integer Pro... | # LANGUAGE ScopedTypeVariables #
# OPTIONS_GHC -Wall #
Module : ToySolver . Arith . MIP
Copyright : ( c ) 2012
Naïve implementation of MIP solver based on Simplex module
* .
RM-2597 , 1960 , The Rand Corporation , Santa Monica , CA .
* .
\"Outline of an algorithm for integer solut... |
b98b7aee1f0cf8b56fc8ed5fc22ce895516717c4e01bb6f12e3a111d128300f2 | iburzynski/EMURGO_71 | Lists.hs | {-# OPTIONS_GHC -Wno-unrecognised-pragmas #-}
{-# HLINT ignore "Use foldr" #-}
-- Use function patterns to implement the following list functions:
-- Takes any list and returns a string describing its size:
" empty " , " singleton " , " two element list " , " three or more element list "
describeList :: [a] -> [Cha... | null | https://raw.githubusercontent.com/iburzynski/EMURGO_71/0080f78f954ab64171097e860cd3435ec5d327c2/HW_07-16/Lists.hs | haskell | # OPTIONS_GHC -Wno-unrecognised-pragmas #
# HLINT ignore "Use foldr" #
Use function patterns to implement the following list functions:
Takes any list and returns a string describing its size:
could also be String
implement the built-in `head` function:
implement the built-in `tail` function:
Homework: implement t... |
" empty " , " singleton " , " two element list " , " three or more element list "
describeList [ ] = "empty"
describeList [_] = "singleton"
describeList [x, y] = "two element list"
describeList (x : xs) = "any other list"
myHead :: [a] -> a
myHead [ ] = error "error: empty list"
myHead (x : _) = x
myTail :: [a] -... |
0482f26114db30a234258bd113a4bfc7f06ab86652a29ba9ca0a5e6517c56f2c | Drezil/pioneers | Main.hs | # LANGUAGE BangPatterns , DoAndIfThenElse #
module Main where
import Graphics.Rendering.OpenGL.GL.Texturing.Specification (texImage2D,TextureTarget2D(Texture2D))
import Graphics.Rendering.OpenGL.GL.PixelRectangles.ColorTable (PixelInternalFormat(..))
import Graphics.Rendering.OpenGL.GL.Texturing.Objects (textureBindin... | null | https://raw.githubusercontent.com/Drezil/pioneers/2a9de00213144cfa870e9b71255a92a905dec3a9/src/Main.hs | haskell | data consistency/conversion
GUI
Render
Our modules
import qualified Debug.Trace as D (trace)
------------------------------------------------------------------------------
------------------------------------------------------------------------------
also: InitNoParachute -> faster, withou... | # LANGUAGE BangPatterns , DoAndIfThenElse #
module Main where
import Graphics.Rendering.OpenGL.GL.Texturing.Specification (texImage2D,TextureTarget2D(Texture2D))
import Graphics.Rendering.OpenGL.GL.PixelRectangles.ColorTable (PixelInternalFormat(..))
import Graphics.Rendering.OpenGL.GL.Texturing.Objects (textureBindin... |
bbe8262950495713a4c733fef1d401ccc726a3ffee498b775ab03c01f29f18a3 | matlux/game-of-life | core.cljc | (ns game-of-life.core
#?(:clj (:require
[net.matlux.utils :refer [display-assert]]
[zone.lambda.game.board :as b :refer [DEAD ALIVE]])
))
;; board logic
(def test-board
'[
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .... | null | https://raw.githubusercontent.com/matlux/game-of-life/5e95e2fc2de266e784a35415f5b4bcde8ffd6838/src/game_of_life/core.cljc | clojure | board logic
(reset! arena test-board)
(display board) | (ns game-of-life.core
#?(:clj (:require
[net.matlux.utils :refer [display-assert]]
[zone.lambda.game.board :as b :refer [DEAD ALIVE]])
))
(def test-board
'[
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . ... |
803e2ecda101c30ee5db0ec251f9f9a028112addeb3ecb87ff2b465b1c3e4a7d | janestreet/bonsai | instrumentation.mli | open! Core
open! Import
* Wraps each node in a [ Computation.t ] with calls to [ start_timer ] and
[ stop_timer ] . The string passed to both these is intended to be the names
for performance entries sent to the browser . The strings contain the
[ Node_path ] to which the time corresponds . When thes... | null | https://raw.githubusercontent.com/janestreet/bonsai/4baeedc75bf73a0915e04dc02d8a49b78779e9b0/src/instrumentation.mli | ocaml | open! Core
open! Import
* Wraps each node in a [ Computation.t ] with calls to [ start_timer ] and
[ stop_timer ] . The string passed to both these is intended to be the names
for performance entries sent to the browser . The strings contain the
[ Node_path ] to which the time corresponds . When thes... | |
87bf90de59ab154b4a318c2f90408eafe2a849ccf2cc3d29c360e0ff4700792c | ajhc/ajhc | read002.hs | -- !!! tests fixity reading and printing
module ShouldCompile where
infixl 1 `f`
infixr 2 \\\
infix 3 :==>
infix 4 `MkFoo`
data Foo = MkFoo Int | Float :==> Double
x `f` y = x
(\\\) :: (Eq a) => [a] -> [a] -> [a]
(\\\) xs ys = xs
| null | https://raw.githubusercontent.com/ajhc/ajhc/8ef784a6a3b5998cfcd95d0142d627da9576f264/regress/tests/0_parse/2_pass/ghc/read002.hs | haskell | !!! tests fixity reading and printing | module ShouldCompile where
infixl 1 `f`
infixr 2 \\\
infix 3 :==>
infix 4 `MkFoo`
data Foo = MkFoo Int | Float :==> Double
x `f` y = x
(\\\) :: (Eq a) => [a] -> [a] -> [a]
(\\\) xs ys = xs
|
92ee0dc30493b30362bbb9f43193954c63e389e2e359ebdaa7e4bcdd46b384ee | bmeurer/ocamljit2 | pos.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ,... | null | https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/debugger/pos.ml | ocaml | *********************************************************************
Objective Caml
... | , projet , INRIA Rocquencourt
Copyright 2003 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ Id$
open Instruct;;
open Lexing;;
open Loca... |
81031a02810bf27187438e64fb107b8db75651c8696e459e6f94c9dcd0022ac3 | 6502/JSLisp | test.lisp | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; ;;;
Copyright ( c ) 2011 by ; ; ;
;;; ... | null | https://raw.githubusercontent.com/6502/JSLisp/9a4aa1a9116f0cfc598ec9f3f30b59d99810a728/test.lisp | lisp |
;;;
; ;
;;;
Permission is hereby granted, free of charge, to any person obtaining ;;;
a copy of this software and associated documentation files (the ;;;
... |
(defvar test-passed 0)
(defvar test-total 0)
(defvar test-start (clock))
(let ((result (gensym)))
(defmacro test (form expected-result)
`(progn
(incf test-total)
(try (let ((,result (str-value ,form)))
(when (/= ,result ,expected-result)
(error (+ "Wrong result: ("
... |
65ef09bf4d389f3018580e3689c0fdf032c83fb9219e28c0353250000add7825 | kupl/FixML | sub76.ml |
type aexp =
| Const of int
| Var of string
| Power of string * int
| Times of aexp list
| Sum of aexp list
let rec diff : aexp * string -> aexp
= fun (e,x) ->
match e with
|Const a -> Const 0
|Var y -> if x=y then Const 1 else Var y
|Power (s, i) -> if s=x
... | null | https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/differentiate/diff1/submissions/sub76.ml | ocaml |
type aexp =
| Const of int
| Var of string
| Power of string * int
| Times of aexp list
| Sum of aexp list
let rec diff : aexp * string -> aexp
= fun (e,x) ->
match e with
|Const a -> Const 0
|Var y -> if x=y then Const 1 else Var y
|Power (s, i) -> if s=x
... | |
e0bd3695b7823028e20efb2a0df77dcf2691789d7183e63cc1d07d1469de52e2 | ucsd-progsys/dsolve | constraint.ml |
* Copyright © 2008 The Regents of the University of California . All rights reserved .
*
* Permission is hereby granted , without written agreement and without
* license or royalty fees , to use , copy , modify , and distribute this
* software and its documentation for any purpose , provided that the
... | null | https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/liquid/constraint.ml | ocaml | ************************************************************
*************************** Stats **************************
************************************************************
************************************************************
********************* Pretty Printing **********************
***************... |
* Copyright © 2008 The Regents of the University of California . All rights reserved .
*
* Permission is hereby granted , without written agreement and without
* license or royalty fees , to use , copy , modify , and distribute this
* software and its documentation for any purpose , provided that the
... |
b765ddd612f61f10c46391965153353fc2a734143620803a777ddcdded2069a5 | dmitryvk/sbcl-win32-threads | sanctify.lisp | ;;;; Do whatever is necessary to make the given code component
;;;; executable.
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
While most of SBCL is derived from the CMU CL system , the test
;;;; files (like this one) were written from scratch after the fork
from C... | null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/src/compiler/ppc/sanctify.lisp | lisp | Do whatever is necessary to make the given code component
executable.
more information.
files (like this one) were written from scratch after the fork
This software is in the public domain and is provided with
absolutely no warranty. See the COPYING and CREDITS files for
more information.
Do whatever is neces... |
This software is part of the SBCL system . See the README file for
While most of SBCL is derived from the CMU CL system , the test
from CMU CL .
(in-package "SB!VM")
On the 601 , we have less to do than on some other PowerPC chips .
(defun sanctify-for-execution (component)
(without-gcing
(alien-fun... |
71112d30c721ea62f1311b098b760aff88253ce46e7600a837e3adeb78a05817 | landakram/kiwi-desktop | events.cljs | (ns kiwi.search.events
(:require [re-frame.core
:as
re-frame
:refer
[after enrich path reg-event-db reg-event-fx]]))
(reg-event-db
:assoc-search-filter
(fn [db [_ filter]]
(assoc-in db [:route-state :filter] filter)))
| null | https://raw.githubusercontent.com/landakram/kiwi-desktop/cc7d0a5f28430f39d43dffb26850183601fd28f9/src/cljs/kiwi/search/events.cljs | clojure | (ns kiwi.search.events
(:require [re-frame.core
:as
re-frame
:refer
[after enrich path reg-event-db reg-event-fx]]))
(reg-event-db
:assoc-search-filter
(fn [db [_ filter]]
(assoc-in db [:route-state :filter] filter)))
| |
50e12f223bd1ce7ea46c874fd54369b7a7bafec31f81a0bd461b8645e3fcf073 | tgass/macbeth | Message.hs | module Macbeth.Fics.Message where
import Control.Concurrent.Chan
import Macbeth.Fics.Api.Api
import Macbeth.Fics.Api.Player
import Macbeth.Fics.Api.Game
import Macbeth.Fics.Api.Move
import Macbeth.Fics.Api.Offer
import Macbeth.Fics.Api.OngoingGame
i... | null | https://raw.githubusercontent.com/tgass/macbeth/c64b3cc9b641444688b14a2838ee554932f0e9e6/macbeth-fics/src/Macbeth/Fics/Message.hs | haskell | | Merged
| interim
| interim
| If id in 'observe id' does not exist | module Macbeth.Fics.Message where
import Control.Concurrent.Chan
import Macbeth.Fics.Api.Api
import Macbeth.Fics.Api.Player
import Macbeth.Fics.Api.Game
import Macbeth.Fics.Api.Move
import Macbeth.Fics.Api.Offer
import Macbeth.Fics.Api.OngoingGame
i... |
42c2898e2282d81be3c36d6fab86bbd0d8430d7385eab6290ad81dc7d1a45c45 | gedge-platform/gedge-platform | rabbitmq_peer_discovery_consul.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
The Initial Developer of the Original Code is AWeber Communications .
Copyright ( c ) 2015 - 2016 AWeber Communications
Copyright ( c )... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbitmq_peer_discovery_consul/src/rabbitmq_peer_discovery_consul.erl | erlang |
API
| This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
The Initial Developer of the Original Code is AWeber Communications .
Copyright ( c ) 2015 - 2016 AWeber Communications
Copyright ( c ) 20... |
b1f7e2bf773442318314abdcb6b00b8be0b44e88c54757906f8edf415ade38d2 | Apress/common-lisp-condition-system | tclcs-00-dynamic-variables.lisp | ;;;; clcs-00-dynamic-variables.lisp
(defpackage #:clcs-00-dynamic-variables
(:use #:cl)
(:export #:test-1 #:test-2 #:test-3 #:test-4 #:test-5))
(in-package #:clcs-00-dynamic-variables)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; 01 - lexical closure
(let ((x1 5))
(defu... | null | https://raw.githubusercontent.com/Apress/common-lisp-condition-system/7f4533e20d6397a59ca5bbfdc139b3389a135c34/Sources%20-%20TCLCS/00-dynavars/tclcs-00-dynamic-variables.lisp | lisp | clcs-00-dynamic-variables.lisp
01 - lexical closure
- > 5
02 - lexical closure with indirection
- > 5
03 - lexical closure with shadowing
- > 5 , 42
- > 42 , 5
- > 42 , UNBOUND - VARIABLE |
(defpackage #:clcs-00-dynamic-variables
(:use #:cl)
(:export #:test-1 #:test-2 #:test-3 #:test-4 #:test-5))
(in-package #:clcs-00-dynamic-variables)
(let ((x1 5))
(defun foo1 ()
x1))
(defun test-1 ()
(values (foo1)))
(let ((x2 5))
(defun bar2 ()
x2)
(defun foo2 ()
(bar2)))
(defun test-2... |
c523f2ed624c0e78aed7d08ebd845c3319aec732b938baf2624d300e51e1ee84 | alsonkemp/turbinado-website | Install.hs | markup = <div>
<h1>Installation == Pain, Pain == Love</h1>
<p>
Given the relative immaturity of Haskell's package installation tools, installation of Turbinado is fairly challenging. With <% anchorTag "" "cabal-install" %> this should get better, but, for now, installatio... | null | https://raw.githubusercontent.com/alsonkemp/turbinado-website/310f38dd7d13cdb838e2ea6181c61521021c32b5/App/Views/Home/Install.hs | haskell | markup = <div>
<h1>Installation == Pain, Pain == Love</h1>
<p>
Given the relative immaturity of Haskell's package installation tools, installation of Turbinado is fairly challenging. With <% anchorTag "" "cabal-install" %> this should get better, but, for now, installatio... | |
9698f4e377e72923dd25199ac246541a292ad506a9d36baf93c35a8350a18c58 | nikita-volkov/rebase | Strict.hs | module Rebase.Control.Monad.ST.Strict
(
module Control.Monad.ST.Strict
)
where
import Control.Monad.ST.Strict
| null | https://raw.githubusercontent.com/nikita-volkov/rebase/7c77a0443e80bdffd4488a4239628177cac0761b/library/Rebase/Control/Monad/ST/Strict.hs | haskell | module Rebase.Control.Monad.ST.Strict
(
module Control.Monad.ST.Strict
)
where
import Control.Monad.ST.Strict
| |
679f4f938aa6a70184ffef387bb5b8fa6e4027a8bb2665eaf66932a092a653e0 | tengstrand/lein-polylith | shared.clj | (ns leiningen.polylith.cmd.shared
(:require [clojure.java.shell :as shell]
[clojure.string :as str]
[leiningen.polylith.file :as file]
[clojure.set :as set])
(:import (java.util.concurrent ExecutionException)))
(defn throw-polylith-exception
([message]
(throw (ExecutionExce... | null | https://raw.githubusercontent.com/tengstrand/lein-polylith/27bf508a7b4806e4d2dfac01787e99edf2c1c306/src/leiningen/polylith/cmd/shared.clj | clojure | Print out the stack trace with the error message | (ns leiningen.polylith.cmd.shared
(:require [clojure.java.shell :as shell]
[clojure.string :as str]
[leiningen.polylith.file :as file]
[clojure.set :as set])
(:import (java.util.concurrent ExecutionException)))
(defn throw-polylith-exception
([message]
(throw (ExecutionExce... |
6bff46739fd0e98823f17d904d164ff913b3486874f6a40218ddc588d4103dbc | mmontone/cl-xul | tabs.lisp | (in-package :xul-test)
(define-component tabs-showcase ()
()
(:render (comp)
(<:vbox (<:flex= 1)
(<:style= "overflow: auto")
(<:description "XUL Tabs")
(<:group-box
(<:description "This is the standard tabbox. It looks fine.")
(<:group-box
(<:tab-box (<:flex= 1)
(<:... | null | https://raw.githubusercontent.com/mmontone/cl-xul/049c8664bb58d177c71d93ac5b5e1a2ba9b9469b/test/showcase/tabs.lisp | lisp | (in-package :xul-test)
(define-component tabs-showcase ()
()
(:render (comp)
(<:vbox (<:flex= 1)
(<:style= "overflow: auto")
(<:description "XUL Tabs")
(<:group-box
(<:description "This is the standard tabbox. It looks fine.")
(<:group-box
(<:tab-box (<:flex= 1)
(<:... | |
20da6925afc9ee9a9918913f4909c28e7a7ebb5411b19e403cab8327df3738ad | fdopen/ppx_cstubs | main.ml | let () =
let name =
match Namelib.real_name () with None -> "unknown person" | Some s -> s
in
Printf.printf "Hello, %s!\n" name ;
exit 0
| null | https://raw.githubusercontent.com/fdopen/ppx_cstubs/5d5ce9b7cf45d87bb71c046a76d30c17ec6075e5/examples/dune-project/src/bin/main.ml | ocaml | let () =
let name =
match Namelib.real_name () with None -> "unknown person" | Some s -> s
in
Printf.printf "Hello, %s!\n" name ;
exit 0
| |
c8dfe3584e3ee9f93d4dcb46e6c700a3ea9bdf200766a3d9bd803e406d433594 | Oblosys/proxima | DepTypes.hs | module DepTypes where
import CommonTypes
-------------------------------------------------------------------------------
-- Class definitions
-------------------------------------------------------------------------------
class HasAttrAndField a where
getField :: a -> Identifier
getAttr :: a -> Identifier
class ... | null | https://raw.githubusercontent.com/Oblosys/proxima/f154dff2ccb8afe00eeb325d9d06f5e2a5ee7589/uuagc/src/DepTypes.hs | haskell | -----------------------------------------------------------------------------
Class definitions
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
Vertices
-------------------------------------------------------... | module DepTypes where
import CommonTypes
class HasAttrAndField a where
getField :: a -> Identifier
getAttr :: a -> Identifier
class ContainsTrace a where
addTraceElem :: TraceElem -> a -> a
addTrace :: Trace -> a -> a
kan helaas niet met named fields , want dat levert een conflict op in de uniekheid vd naa... |
fae46441752df0b8fa5d8d02473e8fb93663554c3ecc882d46efde247bf86232 | ANSSI-FR/xsvgen | xsd.mli | (***********************************************************************)
(* *)
(* XML Schema Validator Generator *)
(* *)
( SafeRive... | null | https://raw.githubusercontent.com/ANSSI-FR/xsvgen/3c2b5e43e7adcb856a3a2aa01bfc039bf3c6459b/xsd/xsd.mli | ocaml | *********************************************************************
XML Schema Validator Generator
... | ( SafeRiver )
Copyright 2012 , ANSSI and SafeRiver .
$ I d : xsd.mli 1686 2012 - 05 - 30 09:00:22Z maarek $
* { 1 XSD components types }
* The OCaml types defined in this module follow the " Schema
Component " as defined in
... |
51389abe546d68586f30516ad9280270610224ead1c00927eb3b2ba2afdac57d | clojerl/clojerl | clojerl_Cons_SUITE.erl | -module(clojerl_Cons_SUITE).
-include("clojerl.hrl").
-include("clj_test_utils.hrl").
-export([ all/0
, init_per_suite/1
, end_per_suite/1
]).
-export([ new/1
, count/1
, str/1
, is_sequential/1
, hash/1
, seq/1
, equiv/1
, cons/1
... | null | https://raw.githubusercontent.com/clojerl/clojerl/aa35847ca64e1c66224867ca4c31ca6de95bc898/test/clojerl_Cons_SUITE.erl | erlang | ------------------------------------------------------------------------------
Test Cases
------------------------------------------------------------------------------ | -module(clojerl_Cons_SUITE).
-include("clojerl.hrl").
-include("clj_test_utils.hrl").
-export([ all/0
, init_per_suite/1
, end_per_suite/1
]).
-export([ new/1
, count/1
, str/1
, is_sequential/1
, hash/1
, seq/1
, equiv/1
, cons/1
... |
dc603e9d9f9ce8be922340c20df63352e3b9ba8a3f63ce870ca54d77bc778002 | mattmundell/nightshade | constraint.lisp | ;;; The constraint propagation phase of the compiler, which uses global
;;; flow analysis to obtain dynamic type information.
(in-package "C")
#[ Type Propagation
Use global flow analysis to propagate information about lexical
variable types. Eliminate redundant type checks and tests.
Phase position: 5/23 ... | null | https://raw.githubusercontent.com/mattmundell/nightshade/d8abd7bd3424b95b70bed599e0cfe033e15299e0/src/compiler/constraint.lisp | lisp | The constraint propagation phase of the compiler, which uses global
flow analysis to obtain dynamic type information.
The kind of constraint we have:
X is a LAMBDA-VAR and Y is a CTYPE. The value of X is constrained to
be of type Y.
>, <
X is a lambda-var and Y is a CTYPE. The relation holds bet... |
(in-package "C")
#[ Type Propagation
Use global flow analysis to propagate information about lexical
variable types. Eliminate redundant type checks and tests.
Phase position: 5/23 (front)
Presence: optional
Files: constraint
Entry functions: `constraint-propagate'
Call sequences:
constraint-propa... |
e41b30cb8c04e65ea451a60412004891fabf9ec45ab197f6fb4018b3ab7436ab | ijvcms/chuanqi_dev | active_service_merge_type_config.erl | %%%-------------------------------------------------------------------
@author zhengsiying
%%% @doc
%%% 自动生成文件,不要手动修改
%%% @end
Created : 2016/10/12
%%%-------------------------------------------------------------------
-module(active_service_merge_type_config).
-include("common.hrl").
-include("config.hrl").
-c... | null | https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/config/active_service_merge_type_config.erl | erlang | -------------------------------------------------------------------
@doc
自动生成文件,不要手动修改
@end
------------------------------------------------------------------- | @author zhengsiying
Created : 2016/10/12
-module(active_service_merge_type_config).
-include("common.hrl").
-include("config.hrl").
-compile([export_all]).
get_list_conf() ->
[ active_service_merge_type_config:get(X) || X <- get_list() ].
get_list() ->
[1, 2, 9, 15, 16, 17, 18, 19, 20].
get_ui_list(1) ->
[... |
4c1d35dd9e090fbd12656ce402c6f6256a3cdb1c5a1dbde0e08c33e05f8dc8fa | haskell/haskell-language-server | DestructDataFam.hs | # LANGUAGE TypeFamilies #
data family Yo
data instance Yo = Heya Int
test :: Yo -> Int
test b = _
| null | https://raw.githubusercontent.com/haskell/haskell-language-server/f3ad27ba1634871b2240b8cd7de9f31b91a2e502/plugins/hls-tactics-plugin/new/test/golden/DestructDataFam.hs | haskell | # LANGUAGE TypeFamilies #
data family Yo
data instance Yo = Heya Int
test :: Yo -> Int
test b = _
| |
c05fa89119660be039bf51aa53cd88f3d8ebf4b6edfc829e2d12c0ed1cca50be | casperschipper/ocaml-cisp | cisp2.ml | open Cisp
let sr = ref 44100.0
let sec s = !sr *. s
(* (float -> float) -> seq.t float -> seq.t float *)
(* frequency is the thing *)
let phase_inc = (1.0 /. !sr) *. Float.pi *. 2.0
* recursive
@control : the control stream , that allows us to customize the update
@init : the initial state ( can be any... | null | https://raw.githubusercontent.com/casperschipper/ocaml-cisp/571ffb8e508c5427d01e407ba5e91ff2a4604f40/examples/cisp_backup/delaySynthesis/cisp2.ml | ocaml | (float -> float) -> seq.t float -> seq.t float
frequency is the thing | open Cisp
let sr = ref 44100.0
let sec s = !sr *. s
let phase_inc = (1.0 /. !sr) *. Float.pi *. 2.0
* recursive
@control : the control stream , that allows us to customize the update
@init : the initial state ( can be anything ! )
@update : takes a state and one value of control then produces a new s... |
2f5fa9616304a1627a33f0af75fe82fe24eb1b5b31dc17edf1dea2b86466822d | pixlsus/registry.gimp.org_static | StarScape_2_6.scm | Star Scape
Script - Fu for GIMP 2.6 , by LightningIsMyName
;
; This Script is meant to create a star scape pattern
;
; This script was written by LightningIsMyName
; Email: lightningismyname(at)gmail(dot)com
; My Home Page: /
;
This Program is a free software , and you may use it for any purpose , c... | null | https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/StarScape_2_6.scm | scheme |
This Script is meant to create a star scape pattern
This script was written by LightningIsMyName
Email: lightningismyname(at)gmail(dot)com
My Home Page: /
You may not sell or redistribute this software alone or inside a bundle unless it's for FREE.
You may modify this script only if:
This progra... | Star Scape
Script - Fu for GIMP 2.6 , by LightningIsMyName
This Program is a free software , and you may use it for any purpose , comercial and non - commercial .
1 . You keep this message with my email , homepage , description , and release log .
2 . You share alike with the same licensing , and with... |
5c14c262ce1078c26c60d51f9a324c08660963c982790b5e9afb78abe190b7ca | ocsigen/js_of_ocaml | htbl.ml | (* TEST
*)
(* Hashtable operations, using maps as a reference *)
[@@@ocaml.warning "-unused-var-strict"]
open Printf
module Test(H: Hashtbl.SeededS) (M: Map.S with type key = H.key) = struct
let incl_mh m h =
try
M.iter
(fun k d ->
let d' = H.find h k in if d <> d' then raise Exit)
... | null | https://raw.githubusercontent.com/ocsigen/js_of_ocaml/3a615d693b213140ea8e5c43d5bbe99569bc898d/compiler/tests-ocaml/lib-hashtbl/htbl.ml | ocaml | TEST
Hashtable operations, using maps as a reference
Insert all data with H.add
Remove some of the data
Specific functorial hashes
Specific weak functorial hashes
Instantiating the test
Data set: strings from a file, associated with their line number
Data set: fixed strings
Data set: random integers ... |
[@@@ocaml.warning "-unused-var-strict"]
open Printf
module Test(H: Hashtbl.SeededS) (M: Map.S with type key = H.key) = struct
let incl_mh m h =
try
M.iter
(fun k d ->
let d' = H.find h k in if d <> d' then raise Exit)
m;
true
with Exit | Not_found -> false
let dom... |
640d221e3bf669d876fbd4689b9b14e1435cce3ab338a0f725d6f695ae9951b7 | agda/agda | NonLinPattern.hs | # LANGUAGE NondecreasingIndentation #
{- | Various utility functions dealing with the non-linear, higher-order
patterns used for rewrite rules.
-}
module Agda.TypeChecking.Rewriting.NonLinPattern where
import Prelude hiding ( null )
import Control.Monad ( (>=>), forM )
import Control.Monad.Reader ( asks... | null | https://raw.githubusercontent.com/agda/agda/e018e58453a06e4c4a15c9b81396cbcd1e2c640f/src/full/Agda/TypeChecking/Rewriting/NonLinPattern.hs | haskell | | Various utility functions dealing with the non-linear, higher-order
patterns used for rewrite rules.
| Turn a term into a non-linear pattern, treating the
free variables as pattern variables.
is Irrelevant, then we construct a pattern that never fails to match.
The arguments of `var i` should be distin... | # LANGUAGE NondecreasingIndentation #
module Agda.TypeChecking.Rewriting.NonLinPattern where
import Prelude hiding ( null )
import Control.Monad ( (>=>), forM )
import Control.Monad.Reader ( asks )
import Data.IntSet (IntSet)
import qualified Data.IntSet as IntSet
import Agda.Syntax.Common
import Agda.Synt... |
7484f5eeba923cc34f996247d5a205913ec6fc86fb45cae582053b5b090b5b1c | reborg/clojure-essential-reference | 4.clj | < 1 >
( " SYMBOLS " " : KEYWORDS " " 1.0E10 " " JAVA.LANG.OBJECT@4C7A1053 " ) | null | https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/OtherFunctions/StringsandRegularExpressions/lower-case%2Cupper-case%2Ccapitalize/4.clj | clojure | < 1 >
( " SYMBOLS " " : KEYWORDS " " 1.0E10 " " JAVA.LANG.OBJECT@4C7A1053 " ) | |
16313127435a513d2ee3f4b107b35e64f5ebb907ebe17f2aafffc91f786fbf7d | simingwang/emqx-plugin-kafkav5 | crc32cer.erl |
-module(crc32cer).
-export([nif/1, nif/2]).
-on_load(init/0).
-spec init() -> ok.
init() ->
_ = erlang:load_nif(so_path(), 0),
ok.
-spec nif(iodata()) -> non_neg_integer().
nif(IoData) ->
nif(0, IoData).
-spec nif(integer(), iodata()) -> non_neg_integer().
nif(_Acc, _IoData) ->
erlang:nif_error({crc32cer_... | null | https://raw.githubusercontent.com/simingwang/emqx-plugin-kafkav5/bbf919e56dbc8fd2d4c1c541084532f844a11cbc/_build/default/lib/crc32cer/src/crc32cer.erl | erlang | TEST
_* Emacs ====================================================================
Local Variables:
allout-layout: t
End: |
-module(crc32cer).
-export([nif/1, nif/2]).
-on_load(init/0).
-spec init() -> ok.
init() ->
_ = erlang:load_nif(so_path(), 0),
ok.
-spec nif(iodata()) -> non_neg_integer().
nif(IoData) ->
nif(0, IoData).
-spec nif(integer(), iodata()) -> non_neg_integer().
nif(_Acc, _IoData) ->
erlang:nif_error({crc32cer_... |
e66d6b7aae99293ab6415d90c4b357fed907cd61ce0f0fea54ff30659dc72e0c | TrustInSoft/tis-kernel | context.mli | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/inout/context.mli | ocaml | ************************************************************************
... | This file is part of .
is a fork of Frama - C. All the differences are :
Copyright ( C ) 2016 - 2017
is released under GPLv2
This file is part of Frama - C.
Copyright ( C ) 2007 - 2015 ... |
baade3707f4e81cea7008f0fe01e4519350a895868ea5cefeae1d5cf65c60a9e | ptal/AbSolute | itv.ml | Copyright 2019 AbSolute Team
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 .
This prog... | null | https://raw.githubusercontent.com/ptal/AbSolute/469159d87e3a717499573c1e187e5cfa1b569829/src/vardom/itv.ml | ocaml | * Generic intervals.
Can be instantiated with any bound type.
An interval is a pair `(l,u)` where `l` is the lower bound and `u` is the upper bound.
Consequently it does not handle "holes" in the domain.
interval bound (possibly -oo or +oo
An interval is a pair of bounds (lower,upper).
Intervals ... | Copyright 2019 AbSolute Team
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 .
This prog... |
68658865c7f1cb74b8810bd843027b253b659af4e170a9169ae0b2fa1c01e6e5 | ftzm/Hnefatafl | GameState.hs | {-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE TemplateHaskell #
module GameState where
import Control.Lens
import Board
import Moves
data GameState = GameState
{ _board :: Board
, _king :: Coord
, _whiteTurn :: Bool
, _lastMove :: (Square,Square)
, _whiteLosses :: Int
, _blackLosses :: Int
... | null | https://raw.githubusercontent.com/ftzm/Hnefatafl/8e6240861c6afb5ee0e6b70160fd2daba520b4d9/src/GameState.hs | haskell | # LANGUAGE DeriveAnyClass # | # LANGUAGE TemplateHaskell #
module GameState where
import Control.Lens
import Board
import Moves
data GameState = GameState
{ _board :: Board
, _king :: Coord
, _whiteTurn :: Bool
, _lastMove :: (Square,Square)
, _whiteLosses :: Int
, _blackLosses :: Int
, _allMoves :: AllMoves
}
... |
bbe40b0950abfbcebaee0e24ac964267146e0552831b8bc204269f869fa3a404 | reenberg/wobot | potentiometer.dump.hs | v0 :: Integer -> Integer
v0 = let { v = (\tc:107 -> (/) tc:107 4) :: (Integer -> Integer) } in v
toggle1_out :: () -> ()
toggle1_out x = ()
toggle1_in :: Integer -> ()
idle0_out :: Integer -> ()
idle0_out x = seq (toggle1_in x) ()
idle0_in :: Integer -> Integer
idle0_in x = idle0_out x
setValue5_out :: () -> ()
setValu... | null | https://raw.githubusercontent.com/reenberg/wobot/ce7f112096ba1abd43b8d29da7e8944c2a004125/fladuino/examples/potentiometer/potentiometer.dump.hs | haskell | v0 :: Integer -> Integer
v0 = let { v = (\tc:107 -> (/) tc:107 4) :: (Integer -> Integer) } in v
toggle1_out :: () -> ()
toggle1_out x = ()
toggle1_in :: Integer -> ()
idle0_out :: Integer -> ()
idle0_out x = seq (toggle1_in x) ()
idle0_in :: Integer -> Integer
idle0_in x = idle0_out x
setValue5_out :: () -> ()
setValu... | |
1d0ac5bd786320f0bb31afa0bef5d8b19c5801a886220572a2f609caf901feed | tamarin-prover/tamarin-prover | Sapic.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE PatternGuards #
{-# LANGUAGE DoAndIfThenElse #-}
-- |
Copyright : ( c ) 2019 and
-- License : GPL v3 (see LICENSE)
--
Maintainer : < >
Portability : GHC only
--
-- Translation from Theories with Processes to multiset rewrite... | null | https://raw.githubusercontent.com/tamarin-prover/tamarin-prover/16e777c2878b0150805607942427c88ad52c0fa3/lib/sapic/src/Sapic.hs | haskell | # LANGUAGE DoAndIfThenElse #
|
License : GPL v3 (see LICENSE)
Translation from Theories with Processes to multiset rewrite rules
| Translates the process (singular) into a set of rules and adds them to the theory
annotate
compute initial rules
generate protocol rules, starting from variables in initial til... | # LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE PatternGuards #
Copyright : ( c ) 2019 and
Maintainer : < >
Portability : GHC only
module Sapic (
translate
, module Sapic.Typing
, module Sapic.Warnings
, ) where
import Prelude hiding ((.),id)
import Control.Category ( Categ... |
4734ee8b39984c15c65c7452247b66befe4a53ee5e94130e0eae047ab674cff8 | obohrer/octia | doc_test.clj | (ns octia.doc-test
(:require [octia.doc :as doc]
[octia.endpoint :as endpoint])
(:use clojure.test
octia.core
midje.sweet))
(def stub "stub")
(deftest group-test
(let [r (group "" {}
(group "~api/users"
{:doc
{:description "A gr... | null | https://raw.githubusercontent.com/obohrer/octia/9e0ee78350c5defcf1a2c141e100ea38bf4312e0/test/octia/doc_test.clj | clojure | (ns octia.doc-test
(:require [octia.doc :as doc]
[octia.endpoint :as endpoint])
(:use clojure.test
octia.core
midje.sweet))
(def stub "stub")
(deftest group-test
(let [r (group "" {}
(group "~api/users"
{:doc
{:description "A gr... | |
bd4e144a9a6a9e59be5194b0d784c8eaa8be7a0d948a8a1f30ac93df5026045f | ssm-lang/sslang | ParseCommentsSpec.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
module Tests.ParseCommentsSpec where
import Sslang.Test
import Front.Ast
import Front.Parser ( parseProgram )
p :: HasCallStack => String -> Expectation
p = shouldPass . parseProgram
spec :: Spec
spec = do
... | null | https://raw.githubusercontent.com/ssm-lang/sslang/a8875eab80160a097dd59addc3248d15b25f79f0/test/text/Tests/ParseCommentsSpec.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE QuasiQuotes #
module Tests.ParseCommentsSpec where
import Sslang.Test
import Front.Ast
import Front.Parser ( parseProgram )
p :: HasCallStack => String -> Expectation
p = shouldPass . parseProgram
spec :: Spec
spec = do
it "parses a program with leading c... |
1a54bbd9fa704676f7d89adb648554183c81dda31fcb31f51fe96a9b1bfcc22b | ryszard/clsql | sqlite-loader.lisp | -*- Mode : LISP ; Syntax : ANSI - Common - Lisp ; Base : 10 -*-
;;;; *************************************************************************
;;;; FILE IDENTIFICATION
;;;;
Name : sqlite-loader.lisp
Purpose : SQLite library loader using UFFI
Programmer :
Date Started : Nov 2003
;;;;
... | null | https://raw.githubusercontent.com/ryszard/clsql/9aafcb72bd7ca1d7e908938b6a5319753b3371d9/db-sqlite/sqlite-loader.lisp | lisp | Syntax : ANSI - Common - Lisp ; Base : 10 -*-
*************************************************************************
FILE IDENTIFICATION
(), also known as the LLGPL.
************************************************************************* | Name : sqlite-loader.lisp
Purpose : SQLite library loader using UFFI
Programmer :
Date Started : Nov 2003
$ Id$
This file , part of CLSQL , is Copyright ( c ) 2003 by
CLSQL users are granted the rights to distribute and use this software
as governed by the terms of the Lisp Le... |
8eb44432a0a1acd79d6c96f2abb1fca81fef84cb26efd5ff009393aac2501772 | tonymorris/fp-course | ValidationTest.hs | # OPTIONS_GHC -fno - warn - type - defaults #
# OPTIONS_GHC -fno - warn - orphans #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE ScopedTypeVariables #
module Course.ValidationTest where
import qualified Prelude as P (either, fmap)
import Test.Tasty
import Test.Tasty.HUnit
import ... | null | https://raw.githubusercontent.com/tonymorris/fp-course/73a64c3d4d0df58654a1a9a0ee9d9b11c3818911/test/Course/ValidationTest.hs | haskell | # OPTIONS_GHC -fno - warn - type - defaults #
# OPTIONS_GHC -fno - warn - orphans #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE ScopedTypeVariables #
module Course.ValidationTest where
import qualified Prelude as P (either, fmap)
import Test.Tasty
import Test.Tasty.HUnit
import ... | |
21d7459fe0c4ab85c3f240ee90e96e0072285ea6b4a8bbcd2ccaa75b442afb62 | MaartenFaddegon/Hoed | Main.hs | -- A program with unexpected output.
import Digraph
import Debug.Hoed.Pure
main = runOwp properties $ print (prop_assoc1toNdigraph eg)
where
properties = [ Propositions [mkProposition digraphModule "prop_assoc1toNdigraph" `ofType` BoolProposition `withSignature` [Argument 0]]
Specify "assoc1toNd... | null | https://raw.githubusercontent.com/MaartenFaddegon/Hoed/8769d69e309928aab439b22bc3f3dbf5452acc77/examples/Digraph_not_data_invariant__with_properties/Main.hs | haskell | A program with unexpected output. | import Digraph
import Debug.Hoed.Pure
main = runOwp properties $ print (prop_assoc1toNdigraph eg)
where
properties = [ Propositions [mkProposition digraphModule "prop_assoc1toNdigraph" `ofType` BoolProposition `withSignature` [Argument 0]]
Specify "assoc1toNdigraph" []
, Propositi... |
ca3c9ffe825babf4dc180db526f83bfc9109cdf178b02ddd24d9f616aeecab9d | jeopard/haskell-checking-account | AccountResources.hs | # LANGUAGE DeriveGeneric , OverloadedStrings #
module Controllers.AccountResources (routes) where
import Data.Time.Calendar
import Data.UUID
import Network.HTTP.Types.Status
import Text.Read (readMaybe)
import Web.Scotty.Trans
import Core
import Models.Operation
import Persistence.Accounts
import Persistence.Operati... | null | https://raw.githubusercontent.com/jeopard/haskell-checking-account/27a889e507ad830ccb476a9663a5ab62aba8baa7/src/Controllers/AccountResources.hs | haskell | These are the nested routes under /accounts/:id/.
They provide functionality related to a given account
returns the transations or Nothing when the acocunt is not found
returns the transations or Nothing when the acocunt is not found
returns the transations or Nothing when the acocunt is not found
returns the fro... | # LANGUAGE DeriveGeneric , OverloadedStrings #
module Controllers.AccountResources (routes) where
import Data.Time.Calendar
import Data.UUID
import Network.HTTP.Types.Status
import Text.Read (readMaybe)
import Web.Scotty.Trans
import Core
import Models.Operation
import Persistence.Accounts
import Persistence.Operati... |
e9ad7f303a5128e302582ddbb626b5eea93b39ba1d9775d21d65db399c9153fa | vonzhou/LearnYouHaskellForGreatGood | example.hs | maximum' :: Ord a => [a] -> a
maximum' [] = error "maximum of empty list"
maximum' [x] = x
maximum' (x:xs) = max x (maximum' xs)
replicate' :: Int -> a -> [a]
replicate' n x
| n <= 0 = []
| otherwise = x : replicate' (n-1) x
take' :: (Num i, Ord i) => i -> [a] -> [a]
take' n _
| n <=0 = []
take' _ [] = []
... | null | https://raw.githubusercontent.com/vonzhou/LearnYouHaskellForGreatGood/439d848deac53ef6da6df433078b7f1dcf54d18d/chapter4/example.hs | haskell | maximum' :: Ord a => [a] -> a
maximum' [] = error "maximum of empty list"
maximum' [x] = x
maximum' (x:xs) = max x (maximum' xs)
replicate' :: Int -> a -> [a]
replicate' n x
| n <= 0 = []
| otherwise = x : replicate' (n-1) x
take' :: (Num i, Ord i) => i -> [a] -> [a]
take' n _
| n <=0 = []
take' _ [] = []
... | |
80df7db01a86230a4032344240f8ee2ede7a74509b981cac44cee69f01c8771d | ih/ikarus.dev | prefix-bigloo.scm | ;------------------------------------------------------------------------------
(module prefix (main main-entry)
(extern (include "sys/times.h")))
;INSERTCODE
(define (clock-to-msecs x)
(quotient (* x 1000) (pragma::int "CLK_TCK")))
(define (process-times)
(let ()
(pragma "struct tms buf")
(let ((real... | null | https://raw.githubusercontent.com/ih/ikarus.dev/8bb0c8e4d1122cf0f9aeb675cb51bc7df178959b/benchmarks.larceny/prefix/prefix-bigloo.scm | scheme | ------------------------------------------------------------------------------
INSERTCODE
------------------------------------------------------------------------------
(def-macro (quotient . lst) `(quotient ,@lst))
(def-macro (modulo . lst) `(modulo ,@lst))
(def-macro (odd? . lst) `(odd? ,@lst))
(def-macro (even? . ls... |
(module prefix (main main-entry)
(extern (include "sys/times.h")))
(define (clock-to-msecs x)
(quotient (* x 1000) (pragma::int "CLK_TCK")))
(define (process-times)
(let ()
(pragma "struct tms buf")
(let ((real::long (pragma::long "times(&buf)")))
(cons real
(+ (pragma::long "buf.tms... |
23761b42a911d75cf82dd795b7617f164fa44b9e924cecb8bc71ab66c106895a | spurious/chibi-scheme-mirror | repl.scm | ;; repl.scm - friendlier repl with line editing and signal handling
Copyright ( c ) 2012 - 2013 . All rights reserved .
;; BSD-style license:
;;> A user-friendly REPL with line editing and signal handling. The
> default REPL provided by chibi - scheme is very minimal , meant
;;> primarily to be small and work ... | null | https://raw.githubusercontent.com/spurious/chibi-scheme-mirror/49168ab073f64a95c834b5f584a9aaea3469594d/lib/chibi/repl.scm | scheme | repl.scm - friendlier repl with line editing and signal handling
BSD-style license:
> A user-friendly REPL with line editing and signal handling. The
> primarily to be small and work on any platform. This module
> provides an advanced REPL that handles vt100 line editing and
> signal handling, so that C-c will int... | Copyright ( c ) 2012 - 2013 . All rights reserved .
> default REPL provided by chibi - scheme is very minimal , meant
> - scheme -R } from the command line or within Emacs .
(define (with-signal-handler sig handler thunk)
(let ((old-handler #f))
(dynamic-wind
(lambda () (set! old-handler (set-signa... |
7c14bec284ddceefbfe37856ab6fe49f6b3f492f6462c42d0e49d2852b7b767e | tommaisey/aeon | tan.help.scm | ;; (u:tan a)
;; Tangent.
(let* ((a (line kr (- pi) pi 1 remove-synth))
(b (sub (fdiv (u:tan a) (/ pi 2)) 1))
(f (mul-add b 900 1600)))
(audition
(out 0 (mul (sin-osc ar f 0) 0.1))))
| null | https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/unary-ops/tan.help.scm | scheme | (u:tan a)
Tangent. |
(let* ((a (line kr (- pi) pi 1 remove-synth))
(b (sub (fdiv (u:tan a) (/ pi 2)) 1))
(f (mul-add b 900 1600)))
(audition
(out 0 (mul (sin-osc ar f 0) 0.1))))
|
138578ca4c29c9bcfbf75ae5885e69534289352dfad16a5dab35ff83a9aeaebf | joedevivo/hpack | huffman.erl | @private
-module(huffman).
-export([decode/1, encode/1]).
decode(Bin) -> decode(Bin, []).
decode(<< 16#1ff8:13,Bits/bits>>, Acc) -> decode(Bits, [ 0|Acc]);
decode(<< 16#7fffd8:23,Bits/bits>>, Acc) -> decode(Bits, [ 1|Acc]);
decode(<< 16#fffffe2:28,Bits/bits>>, Acc) -> decode(Bits, [ 2|Acc]);
decode(<< 16#ff... | null | https://raw.githubusercontent.com/joedevivo/hpack/d61d06bf156b6c9517b3a5c3e571b87ec81d7f5d/src/huffman.erl | erlang | @private
-module(huffman).
-export([decode/1, encode/1]).
decode(Bin) -> decode(Bin, []).
decode(<< 16#1ff8:13,Bits/bits>>, Acc) -> decode(Bits, [ 0|Acc]);
decode(<< 16#7fffd8:23,Bits/bits>>, Acc) -> decode(Bits, [ 1|Acc]);
decode(<< 16#fffffe2:28,Bits/bits>>, Acc) -> decode(Bits, [ 2|Acc]);
decode(<< 16#ff... | |
45dc89e2cf911af73dd4341ca5eb9a521102cf1d3544a4c1a0d7d70b9cda5ecf | mattmundell/nightshade | coerce-folder-name.lisp | ;;; Tests of mh:coerce-folder-name.
(in-package "MH")
(import '(deftest:deftest))
(deftest coerce-folder-name ("+folder" coerce-folder-name-0)
"Test `coerce-folder-name'."
(coerce-folder-name "folder"))
(deftest coerce-folder-name ("+folder" coerce-folder-name-1)
"Test `coerce-folder-name' with a leading +."
... | null | https://raw.githubusercontent.com/mattmundell/nightshade/7a67f9eac96414355de1463ec251b98237cb4009/src/tests/code/mh.lisp/coerce-folder-name.lisp | lisp | Tests of mh:coerce-folder-name.
Errors. |
(in-package "MH")
(import '(deftest:deftest))
(deftest coerce-folder-name ("+folder" coerce-folder-name-0)
"Test `coerce-folder-name'."
(coerce-folder-name "folder"))
(deftest coerce-folder-name ("+folder" coerce-folder-name-1)
"Test `coerce-folder-name' with a leading +."
(coerce-folder-name "+folder"))
(... |
73a7dce83bdd86beb3f0847ed0af6baabd025281126f8d00719f2ba6c7dfe9f7 | faylang/fay | fromIntegral.hs | module FromIntegral where
main :: Fay ()
main = print $ fromIntegral' 5
fromIntegral' :: Int -> Double
fromIntegral' = fromIntegral
| null | https://raw.githubusercontent.com/faylang/fay/8455d975f9f0db2ecc922410e43e484fbd134699/tests/fromIntegral.hs | haskell | module FromIntegral where
main :: Fay ()
main = print $ fromIntegral' 5
fromIntegral' :: Int -> Double
fromIntegral' = fromIntegral
| |
1c52934b883416cb209b325eaeab3e75e664343494acd85c02798637fc912aab | rtoy/cmucl | spill-test.lisp | (defun test (x y)
(snork (list y y y))
(prog1 (car x)
(snork 3)
(snork (list y y y))))
(defun snork (x)
(funcall 'identity x))
| null | https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/tests/spill-test.lisp | lisp | (defun test (x y)
(snork (list y y y))
(prog1 (car x)
(snork 3)
(snork (list y y y))))
(defun snork (x)
(funcall 'identity x))
| |
79ff796014efdf7d0831ba01c4657146aced49808ab6dd4dac83589649667fb3 | reiddraper/simple-check | project.clj | (defproject reiddraper/simple-check "0.5.7-SNAPSHOT"
:description "A QuickCheck inspired property-based testing library."
:url "-check"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies []
:profiles {:dev {:dependencies [[org.clojure/clojure "1.5.1"]
... | null | https://raw.githubusercontent.com/reiddraper/simple-check/c0ada3ba4290c999d9047d8083fa4038d9762f23/project.clj | clojure | (defproject reiddraper/simple-check "0.5.7-SNAPSHOT"
:description "A QuickCheck inspired property-based testing library."
:url "-check"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies []
:profiles {:dev {:dependencies [[org.clojure/clojure "1.5.1"]
... | |
518f9e2126b695f2aaca40ccb9fab689a8e66839c379ea3f205a1468c122b702 | tonsky/icfpc2019 | bot.clj | (ns icfpc.bot
(:require
[clojure.set :as set]
[clojure.spec.alpha :as s]
[clojure.string :as str]
[icfpc.core :refer :all]
[icfpc.level :refer :all])
(:import
[java.util Collection HashMap HashSet ArrayDeque]))
(def ^:dynamic *disabled* #{})
(def ^:dynamic *explore-depth* 5)
(def ^:dynamic *zones... | null | https://raw.githubusercontent.com/tonsky/icfpc2019/9f6869f78cc16ede79353a433b9aba93ecab8317/src/icfpc/bot.clj | clojure | up
left
down
moves
jumps
only paths with len > max-len left, maybe already have good solution?
not found anything, try expand | (ns icfpc.bot
(:require
[clojure.set :as set]
[clojure.spec.alpha :as s]
[clojure.string :as str]
[icfpc.core :refer :all]
[icfpc.level :refer :all])
(:import
[java.util Collection HashMap HashSet ArrayDeque]))
(def ^:dynamic *disabled* #{})
(def ^:dynamic *explore-depth* 5)
(def ^:dynamic *zones... |
84b43eb0370d2a997f2db016e11f9eaa47046c3cf2cb3b3ab3fc63abe40d44d6 | kofigumbs/codec-beam | Table.hs | module Codec.Beam.Internal.Table
( Table, empty, singleton, index, ensure, encode, size
) where
import Prelude hiding (map)
import qualified Data.Map as Map
import qualified Data.List as List
data Table k
= Table
{ _offset :: Int
, _map :: Map.Map k Int
}
empty :: Table k
empty =
Table 0 ... | null | https://raw.githubusercontent.com/kofigumbs/codec-beam/e445cd42fcbd7635833a7bcb988e15257daaf29f/src/Codec/Beam/Internal/Table.hs | haskell | | The atom table seems to follow some different rules.
- I\'m surprised '_offset' is needed at all, but without it there are
- off-by-one encoding errors.
| module Codec.Beam.Internal.Table
( Table, empty, singleton, index, ensure, encode, size
) where
import Prelude hiding (map)
import qualified Data.Map as Map
import qualified Data.List as List
data Table k
= Table
{ _offset :: Int
, _map :: Map.Map k Int
}
empty :: Table k
empty =
Table 0 ... |
d2a23cf55971ec669a85b35598bf7f5685caf9d9072449783510bfe7c1ccf378 | defunkydrummer/ninglex | ninglex.lisp | (in-package :cl-user)
(defpackage ninglex
(:use :cl)
(:import-from :lack.builder
:builder)
(:export
:*app*
:*http-status-codes*
:*handler*
:with-request-params
:set-route
:with-route
:string-response
:html-response
:json-response
:get-param-value
:start
:stop))
... | null | https://raw.githubusercontent.com/defunkydrummer/ninglex/22a6593a9770f92689ded4566f83159fae8aec1f/src/ninglex.lisp | lisp | ninglex:*app*
'global' reference to the instance of your application
Left there so you can use them someday...
else
name of var to create (symbol)
name of param (string)
define symbol
which will expand to:
Important Note: Clack expects that the return value from
the route function is:
(STATUS-CODE list body)... | (in-package :cl-user)
(defpackage ninglex
(:use :cl)
(:import-from :lack.builder
:builder)
(:export
:*app*
:*http-status-codes*
:*handler*
:with-request-params
:set-route
:with-route
:string-response
:html-response
:json-response
:get-param-value
:start
:stop))
... |
32bf886f8496d5ed26377fef27a35c7bc32572a2b60137711da6501d439f489f | malcolmsparks/plugboard | webfunctions.clj | Copyright 2010 .
;;
This file is part of Plugboard .
;;
Plugboard is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option ) any
;; later version.
... | null | https://raw.githubusercontent.com/malcolmsparks/plugboard/c1e78afc5dde60b08b48020c6f3ef800f05d1ada/src/test/clojure/plugboard/demos/accept/webfunctions.clj | clojure |
later version.
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
details.
| Copyright 2010 .
This file is part of Plugboard .
Plugboard is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option ) any
Plugboard is distribut... |
8a72a78e5bac1c060d1d1b5943cab106e072debdf153fdded1888e7d858bb8f1 | quchen/generative-art | Lookup2.hs | module Test.Geometry.LookupTable.Lookup2 (tests) where
import Geometry
import Geometry.LookupTable.Lookup2
import Control.DeepSeq
import Test.TastyAll
tests :: TestTree
tests = localOption (QuickCheckTests 1000) $ testGroup "2D lookup tables"
[ valueTableTests
, testGroup "Grid"
[ fromGridTests
... | null | https://raw.githubusercontent.com/quchen/generative-art/47877f7a3c1e7fc272b4c70b4ac1faf1831ed6d6/test/testsuite/Test/Geometry/LookupTable/Lookup2.hs | haskell | | A reasonably sized grid for its 'Arbitrary' instance. | module Test.Geometry.LookupTable.Lookup2 (tests) where
import Geometry
import Geometry.LookupTable.Lookup2
import Control.DeepSeq
import Test.TastyAll
tests :: TestTree
tests = localOption (QuickCheckTests 1000) $ testGroup "2D lookup tables"
[ valueTableTests
, testGroup "Grid"
[ fromGridTests
... |
6e1afaac7ea97d8bfeb2a13abed9b41269097945795f92ac4f84ff6d01ac7aa6 | alavrik/piqi | piq_ast.ml |
Copyright 2009 , 2010 , 2011 , 2012 , 2013 , 2014 , 2015 , 2017
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or... | null | https://raw.githubusercontent.com/alavrik/piqi/bcea4d44997966198dc295df0609591fa787b1d2/piqilib/piq_ast.ml | ocaml |
* Piq AST (abstract syntax tree)
TODO: string * ast
TODO: string * ast
typically, from is represented as (name, args) where name has type
* form_name defined below; however we are also reusing this element for
* single ast elements enclosed in parenthesis: (<ast>); such form is rarely
* used in pra... |
Copyright 2009 , 2010 , 2011 , 2012 , 2013 , 2014 , 2015 , 2017
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or... |
ba2b756ac8a3bf2cf9dd5e6c4855d83ee4369f2cd78069f925013b3ccd437030 | crategus/cl-cffi-gtk | gtk.bindings.lisp | ;;; ----------------------------------------------------------------------------
;;; gtk.bindings.lisp
;;;
The documentation of this file is taken from the GTK+ 3 Reference Manual
Version 3.24 and modified to document the Lisp binding to the GTK+ library .
;;; See <>. The API documentation of the Lisp bindin... | null | https://raw.githubusercontent.com/crategus/cl-cffi-gtk/ba198f7d29cb06de1e8965e1b8a78522d5430516/gtk/gtk.bindings.lisp | lisp | ----------------------------------------------------------------------------
gtk.bindings.lisp
See <>. The API documentation of the Lisp binding is
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License for Lisp
License, or (at y... | The documentation of this file is taken from the GTK+ 3 Reference Manual
Version 3.24 and modified to document the Lisp binding to the GTK+ library .
available from < -cffi-gtk/ > .
Copyright ( C ) 2013 - 2020
as published by the Free Software Foundation , either version 3 of the
the GNU Lesser ... |
e35fa06a89743e9916a22ac586e14c97f50941d23e122f83a31d5e6729e5582f | jordanthayer/ocaml-search | pq.ml | $ I d : pq.ml , v 1.1 2003/07/02 17:40:26 ruml Exp $
simple functional priority queues
simple functional priority queues
*)
type value = float
type 'a t = Leaf | Node of value * 'a * 'a t * 'a t
let empty = Leaf
(* always pushes larger-pri element down to the left, but swaps the left
... | null | https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/structs/pq.ml | ocaml | always pushes larger-pri element down to the left, but swaps the left
and right branches to give the effect of pushing new elements into
alternating sides of the tree
children of every touched branch are swapped
elt quietly disappears and lesser child recursively percolates
up | $ I d : pq.ml , v 1.1 2003/07/02 17:40:26 ruml Exp $
simple functional priority queues
simple functional priority queues
*)
type value = float
type 'a t = Leaf | Node of value * 'a * 'a t * 'a t
let empty = Leaf
let rec insert elt pri queue =
match queue with
Leaf -> Node (pri,... |
4278f71c891383d40ddada5045764ca4768a506207464b7c0fa6f07fcb60bf73 | aycanirican/hweblib | Rfc7231.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
{-# LANGUAGE OverloadedStrings #-}
-- |
-- Module : Network.Parser.7231
Copyright : Aycan iRiCAN , Utku Demir 2010 - 2020
-- License : BSD3
--
-- Maintainer :
-- Stability : experimental
-- Portability : unknown
--
-- Hypert... | null | https://raw.githubusercontent.com/aycanirican/hweblib/e0031eee26cb83f131ca2ccadf58456856b4c641/src/Network/Parser/Rfc7231.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE OverloadedStrings #
|
Module : Network.Parser.7231
License : BSD3
Maintainer :
Stability : experimental
Portability : unknown
Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content
<>
| 3.1. Representation Metadata
| 3.1.1.1. Media Type
... | # LANGUAGE DeriveGeneric #
Copyright : Aycan iRiCAN , Utku Demir 2010 - 2020
module Network.Parser.Rfc7231 where
import Control.Applicative
import Data.Attoparsec.ByteString as BS
import Data.Attoparsec.ByteString.Char8 as AC
import Data.ByteString
import Data.Monoid
import Data.Scientific
import Data.T... |
37afa530cc31c5b5391141b1c48c4aca29ec11860a1294be61eba755e4a0f073 | xvw/preface | indexed_comonad.ml | open Preface_core.Fun
open Preface_core.Fun.Infix
module Core_via_map_and_duplicate
(Req : Preface_specs.Indexed_comonad.WITH_MAP_AND_DUPLICATE) =
struct
include Req
let extend f = duplicate %> map f
let compose_left_to_right f g = duplicate %> map f %> g
end
module Core_via_extend (Req : Preface_specs.Ind... | null | https://raw.githubusercontent.com/xvw/preface/51892a7ce2ddfef69de963265da3617968cdb7ad/lib/preface_make/indexed_comonad.ml | ocaml | open Preface_core.Fun
open Preface_core.Fun.Infix
module Core_via_map_and_duplicate
(Req : Preface_specs.Indexed_comonad.WITH_MAP_AND_DUPLICATE) =
struct
include Req
let extend f = duplicate %> map f
let compose_left_to_right f g = duplicate %> map f %> g
end
module Core_via_extend (Req : Preface_specs.Ind... | |
bb6019b77ecd2cecc2ea085336f46c95e076f3597301de891cf05cf0aef039ab | HaskellForCats/HaskellForCats | primes.hs | {- :set expandtab
- :set ts=2 -}
module PrImEs where
factorial n = product [1 .. n ]
factors n = [x| x <- [1..n], n `mod` x == 0]
prime n = factors n == [1,n]
primes n = [x | x <- [2..n], prime x]
average ns = sum ns `div` length ns
avPrime n = prime (average (primes n))
sw... | null | https://raw.githubusercontent.com/HaskellForCats/HaskellForCats/2d7a15c0cdaa262c157bbf37af6e72067bc279bc/primes.hs | haskell | :set expandtab
- :set ts=2 |
module PrImEs where
factorial n = product [1 .. n ]
factors n = [x| x <- [1..n], n `mod` x == 0]
prime n = factors n == [1,n]
primes n = [x | x <- [2..n], prime x]
average ns = sum ns `div` length ns
avPrime n = prime (average (primes n))
swap (x,y) = (y,x)
pair x y ... |
e282542071fe13dc1684919441728d2aeadffe6d8493d179a568f6743cc13903 | robert-strandh/SICL | packages.lisp | (cl:in-package #:common-lisp-user)
(defpackage #:sicl-form-to-ast
(:use #:common-lisp)
(:export #:form-to-ast))
| null | https://raw.githubusercontent.com/robert-strandh/SICL/1d828708bcfa4ffda13bc5ea2172d0f8834e1d9f/Code/Compiler/Form-to-AST/packages.lisp | lisp | (cl:in-package #:common-lisp-user)
(defpackage #:sicl-form-to-ast
(:use #:common-lisp)
(:export #:form-to-ast))
| |
ab32ed1952fa41a006275d51ea008c875e01a0f8f388ea3b1e5d53022bb4e6df | NorfairKing/smos | Tags.hs | # LANGUAGE RecordWildCards #
module Smos.Query.Commands.Tags
( smosQueryTags,
)
where
import Conduit
import qualified Data.Conduit.Combinators as C
import qualified Data.Map as M
import Smos.Query.Commands.Import
import Smos.Report.Tags
smosQueryTags :: TagsSettings -> Q ()
smosQueryTags TagsSettings {..} = do
... | null | https://raw.githubusercontent.com/NorfairKing/smos/55442b20d13b75cd19d71a0fb6ef68e5c85be5b0/smos-query/src/Smos/Query/Commands/Tags.hs | haskell | # LANGUAGE RecordWildCards #
module Smos.Query.Commands.Tags
( smosQueryTags,
)
where
import Conduit
import qualified Data.Conduit.Combinators as C
import qualified Data.Map as M
import Smos.Query.Commands.Import
import Smos.Report.Tags
smosQueryTags :: TagsSettings -> Q ()
smosQueryTags TagsSettings {..} = do
... | |
1c007b425b69d5c6ff14868d117ee077961cebfef1b08079d806dff853580438 | ghc/packages-dph | Bool.hs | {-# OPTIONS_GHC -fvectorise #-}
module Data.Array.Parallel.Prelude.Bool
( Bool(..)
, P.otherwise
, (P.&&), (P.||), P.not, andP, orP
, fromBool, toBool)
where
-- Primitives needed by the vectoriser.
import Data.Array.Parallel.Prim
import Data.Array.Parallel.PArr
import Data.Array.Paral... | null | https://raw.githubusercontent.com/ghc/packages-dph/64eca669f13f4d216af9024474a3fc73ce101793/dph-lifted-vseg/Data/Array/Parallel/Prelude/Bool.hs | haskell | # OPTIONS_GHC -fvectorise #
Primitives needed by the vectoriser.
just temporary
just temporary
and ------------------------------------------------------------------------
or -------------------------------------------------------------------------
# VECTORISE (P.||) = (||*) #
# INLINE (||*) #
# NOVECTORISE (||*) ... |
module Data.Array.Parallel.Prelude.Bool
( Bool(..)
, P.otherwise
, (P.&&), (P.||), P.not, andP, orP
, fromBool, toBool)
where
import Data.Array.Parallel.Prim
import Data.Array.Parallel.PArr
import Data.Array.Parallel.Prelude.Base (Bool(..))
import Data.Array.Parallel.P... |
edb42d3009f9ec1493bc291cebd94047af3e41057928d8e72781e1a67cc0eb1e | ucsd-progsys/liquidhaskell | T1633.hs | # OPTIONS_GHC -Wno - missing - methods #
# LANGUAGE GADTs #
{-# LANGUAGE DeriveAnyClass #-}
{-@ LIQUID "--max-case-expand=0" @-}
{-@ LIQUID "--no-totality" @-}
module T1633 where
import Data.Void
data Relation a b where
Empty :: Relation Void Void
One :: Int -> Relation () ()
Join :: ... | null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f8c203f8f1d4c328b24f5be456e4b9ea514bc77e/tests/pos/T1633.hs | haskell | # LANGUAGE DeriveAnyClass #
@ LIQUID "--max-case-expand=0" @
@ LIQUID "--no-totality" @
Divide-and-conquer law
Fork fusion law
Join fusion law | # OPTIONS_GHC -Wno - missing - methods #
# LANGUAGE GADTs #
module T1633 where
import Data.Void
data Relation a b where
Empty :: Relation Void Void
One :: Int -> Relation () ()
Join :: Relation c b -> Relation d b -> Relation (Either c d) b
Fork :: Relation a c -> Relation a d -> Relation a (E... |
ecf2d41271006dda496ac07a32ed110613004bdd9b4fdb172b4f35a474f29cc6 | aaronallen8455/hi-fi | Utils.hs | module HiFi.TcPlugin.Utils
( makeWantedCt
) where
import qualified HiFi.GhcFacade as Ghc
makeWantedCt
:: Ghc.CtLoc
-> Ghc.Class
-> [Ghc.Type]
-> Ghc.TcPluginM (Ghc.Ct, Ghc.TcEvDest)
makeWantedCt ctLoc clss classArgs = do
let classPred = Ghc.mkClassPred clss classArgs
evidence <- Ghc.newWanted ctLoc cl... | null | https://raw.githubusercontent.com/aaronallen8455/hi-fi/2ddc5c4f5e2922806b35c70645c625b39e0820ea/src/HiFi/TcPlugin/Utils.hs | haskell | module HiFi.TcPlugin.Utils
( makeWantedCt
) where
import qualified HiFi.GhcFacade as Ghc
makeWantedCt
:: Ghc.CtLoc
-> Ghc.Class
-> [Ghc.Type]
-> Ghc.TcPluginM (Ghc.Ct, Ghc.TcEvDest)
makeWantedCt ctLoc clss classArgs = do
let classPred = Ghc.mkClassPred clss classArgs
evidence <- Ghc.newWanted ctLoc cl... | |
ffb8a7267bd36fb6294e7f4928ef67240e03503e650579967648146de7d80801 | mzp/websocket-ocaml | httpRequest.ml | open Base
open Parsec
open ExtString
type t = {
method_ : string;
path : string;
fields : (string * string) list;
}
let untilS c = parser
[< ret = String.implode $ until c; _ = char c >] ->
ret
let header = parser
[< method_ = untilS ' '; path = untilS ' '; _version = untilS '\r'; _ = char '\... | null | https://raw.githubusercontent.com/mzp/websocket-ocaml/b584bd20dfe6d95f65bc6e1ba8838b1ecfa8ec0e/webSocket/httpRequest.ml | ocaml | open Base
open Parsec
open ExtString
type t = {
method_ : string;
path : string;
fields : (string * string) list;
}
let untilS c = parser
[< ret = String.implode $ until c; _ = char c >] ->
ret
let header = parser
[< method_ = untilS ' '; path = untilS ' '; _version = untilS '\r'; _ = char '\... | |
22525aa89d76c838ab430840d432eb880291541ec69f1c5eb322c3e57b901089 | callum-oakley/advent-of-code | 11.clj | (ns aoc.2022.11
(:require
[clojure.math.numeric-tower :refer [lcm]]
[clojure.string :as str]
[clojure.test :refer [deftest is]])
(:import clojure.lang.PersistentQueue))
(defn parse [s]
(mapv (fn [block]
(let [lines (vec (str/split-lines block))]
{:items (into PersistentQueue/EMPTY
... | null | https://raw.githubusercontent.com/callum-oakley/advent-of-code/0f257a41435a7157efaf5c6b68a006ec4436ce94/src/aoc/2022/11.clj | clojure | We only care about whether worry levels are divisible by our tests, so we | (ns aoc.2022.11
(:require
[clojure.math.numeric-tower :refer [lcm]]
[clojure.string :as str]
[clojure.test :refer [deftest is]])
(:import clojure.lang.PersistentQueue))
(defn parse [s]
(mapv (fn [block]
(let [lines (vec (str/split-lines block))]
{:items (into PersistentQueue/EMPTY
... |
003d1eba46a7366ea8179d6075f601306fa224df44cba133d828be0406e8ebda | wardle/hermes | core_test.clj | (ns com.eldrix.hermes.core-test
(:require [clojure.set :as set]
[clojure.spec.alpha :as s]
[clojure.spec.test.alpha :as stest]
[clojure.test :refer [deftest is use-fixtures]]
[com.eldrix.hermes.core :as hermes]))
(stest/instrument)
(def ^:dynamic *svc* nil)
(defn liv... | null | https://raw.githubusercontent.com/wardle/hermes/e112127c44539f3d34ccfa03d0b4c213ef301d97/test/com/eldrix/hermes/core_test.clj | clojure | (ns com.eldrix.hermes.core-test
(:require [clojure.set :as set]
[clojure.spec.alpha :as s]
[clojure.spec.test.alpha :as stest]
[clojure.test :refer [deftest is use-fixtures]]
[com.eldrix.hermes.core :as hermes]))
(stest/instrument)
(def ^:dynamic *svc* nil)
(defn liv... | |
5c69ff7cc76aa0385b5b1c7d054c3578579452549243082d6b05bc3738fc2fc6 | sangkilc/ofuzz | conf.ml | (* ofuzz - ocaml fuzzing platform *)
* fuzz configuration
@author < sangkil.cha\@gmail.com >
@since 2014 - 03 - 19
@author Sang Kil Cha <sangkil.cha\@gmail.com>
@since 2014-03-19
*)
Copyright ( c ) 2014 ,
All rights reserved .
Redistribution and use in source and binary for... | null | https://raw.githubusercontent.com/sangkilc/ofuzz/ba53cc90cc06512eb90459a7159772d75ebe954f/src/conf.ml | ocaml | ofuzz - ocaml fuzzing platform
* exception: json parsing error
sanitization |
* fuzz configuration
@author < sangkil.cha\@gmail.com >
@since 2014 - 03 - 19
@author Sang Kil Cha <sangkil.cha\@gmail.com>
@since 2014-03-19
*)
Copyright ( c ) 2014 ,
All rights reserved .
Redistribution and use in source and binary forms , with or without
modification ,... |
810c963cbb60fdd913648ab40c0da1358147c787b47f76741c15be7e7efa8b2b | monadbobo/ocaml-core | raw_ivar.mli | open Core.Std
open Import
module Handler : sig
type ('a, 'execution_context) t
end
type ('a, 'execution_context) t with sexp_of
type ('a, 'execution_context) ivar = ('a, 'execution_context) t
val equal : ('a, 'b) t -> ('a, 'b) t -> bool
val create : unit -> ('a, _) t
val create_full : 'a -> ('a, _) t
val ... | null | https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/async/core/lib/raw_ivar.mli | ocaml | open Core.Std
open Import
module Handler : sig
type ('a, 'execution_context) t
end
type ('a, 'execution_context) t with sexp_of
type ('a, 'execution_context) ivar = ('a, 'execution_context) t
val equal : ('a, 'b) t -> ('a, 'b) t -> bool
val create : unit -> ('a, _) t
val create_full : 'a -> ('a, _) t
val ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.