_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 |
|---|---|---|---|---|---|---|---|---|
ac755eb81f946895441085a294aca8ac950aa5394d96acab60fa0296b17c6a6e | BinRoot/Haskell-Data-Analysis-Cookbook | Main.hs | {-# LANGUAGE OverloadedStrings #-}
import Text.LaTeX
import Text.LaTeX.Base.Class
import Text.LaTeX.Base.Syntax
import qualified Data.Map as M
-- Exporting to LaTeX
main :: IO ()
main = execLaTeXT myDoc >>= renderFile "output.tex"
myDoc :: Monad m => LaTeXT_ m
myDoc = do
thePreamble
document theBody
thePreamble :... | null | https://raw.githubusercontent.com/BinRoot/Haskell-Data-Analysis-Cookbook/f8c46987d78f4a6c1828b353c5f906b9314c2ef9/Ch12/Code06_tex/Main.hs | haskell | # LANGUAGE OverloadedStrings #
Exporting to LaTeX |
import Text.LaTeX
import Text.LaTeX.Base.Class
import Text.LaTeX.Base.Syntax
import qualified Data.Map as M
main :: IO ()
main = execLaTeXT myDoc >>= renderFile "output.tex"
myDoc :: Monad m => LaTeXT_ m
myDoc = do
thePreamble
document theBody
thePreamble :: Monad m => LaTeXT_ m
thePreamble = do
documentclass []... |
c89718747b709035a1bfadfdcb3a14e2328e342df35832cd76f806414e2e6880 | exercism/clojurescript | two_fer_test.cljs | (ns two-fer-test
(:require two-fer
[cljs.test :refer [deftest testing is] :as t :include-macros true]))
(deftest two-fer-no-args-test
(let [no-args-result "One for you, one for me."
sarah-result "One for Sarah, one for me."]
(testing "Two-Fer testing with argument..."
(is (= (two-fer/... | null | https://raw.githubusercontent.com/exercism/clojurescript/32d90042959a44edc1c7fbf4ec70a87ceaf7621f/exercises/practice/two-fer/test/two_fer_test.cljs | clojure | (ns two-fer-test
(:require two-fer
[cljs.test :refer [deftest testing is] :as t :include-macros true]))
(deftest two-fer-no-args-test
(let [no-args-result "One for you, one for me."
sarah-result "One for Sarah, one for me."]
(testing "Two-Fer testing with argument..."
(is (= (two-fer/... | |
24b6c30536bfdc1f0d1e26ad9b739531d513c412e9ee2532834ac938055dff65 | dongcarl/guix | readline.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2012 , 2013 , 2014 , 2020 < >
Copyright © 2016 , 2019 < >
Copyright © 2016 Jan Nieuwenhuizen < >
Copyright © 2018 , 2021 < >
Copyright © 2019 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redis... | null | https://raw.githubusercontent.com/dongcarl/guix/d2b30db788f1743f9f8738cb1de977b77748567f/gnu/packages/readline.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2012 , 2013 , 2014 , 2020 < >
Copyright © 2016 , 2019 < >
Copyright © 2016 Jan Nieuwenhuizen < >
Copyright © 2018 , 2021 < >
Copyright © 2019 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
... |
7cf6d53a8285f526e7b2b84d55ea2c5cc2030919383c067f1ed6c1bae0fdaaa1 | input-output-hk/project-icarus-importer | Local.hs | {-# LANGUAGE Rank2Types #-}
-- | Methods that operate on 'SscLocalData'.
module Pos.Ssc.State.Local
(
sscResetLocal
, sscNewLocalData
) where
import Universum
import Pos.Core (SlotId (..), HasProtocolConstants)
import Pos.DB (MonadDBRead)
import ... | null | https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/ssc/Pos/Ssc/State/Local.hs | haskell | # LANGUAGE Rank2Types #
| Methods that operate on 'SscLocalData'.
| Reset local data to empty state. This function can be used when
we detect that something is really bad. In this case it makes sense
to remove all local data to be sure it's valid.
| Create new (empty) local data. We are using this function instea... |
module Pos.Ssc.State.Local
(
sscResetLocal
, sscNewLocalData
) where
import Universum
import Pos.Core (SlotId (..), HasProtocolConstants)
import Pos.DB (MonadDBRead)
import Pos.Slotting (MonadSlots (getCurrentSlot))
import Pos.Ssc.Mem (... |
33cec9503fb45e5ba07c8ce6c6b75f261ab7092adcd6590234c0b331fff1035b | gedge-platform/gedge-platform | ra_monitors.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2017 - 2020 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(ra_monitors).
-include("ra.hrl").
-export... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/ra/src/ra_monitors.erl | erlang |
holds static or rarely changing fields
fake event for newly registered component
so that it discovers the current node state
if pid, demonitor using ref
nodes aren't removed when down | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2017 - 2020 VMware , Inc. or its affiliates . All rights reserved .
-module(ra_monitors).
-include("ra.hrl").
-export([
... |
97fc2e0359fb48bbb06f37a4c94e1ca305832f2f78f0bc0398fe830797b80d8e | srid/emanote.obelisk | App.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuantifiedConstraints #
# LANGUAGE RecursiveDo #
# LANGUAGE TypeApplications #
module Frontend.App
( runApp,
mkBackendRequest,
withBackendResponse,
Em... | null | https://raw.githubusercontent.com/srid/emanote.obelisk/de935cff82fc57085adef1904094c7129c02d995/frontend/src/Frontend/App.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
Application top-level runner
----------------------------
Widget-level request/response handling
These provide a higher abstraction over the type/functions below
-----------------------------------------
Make a request to the backend.
... | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE QuantifiedConstraints #
# LANGUAGE RecursiveDo #
# LANGUAGE TypeApplications #
module Frontend.App
( runApp,
mkBackendRequest,
withBackendResponse,
EmanoteRequester,
requestingDynamic,
pollRevUpdates,
)
where
import Common.Api (Em... |
a537cdd5d84ab7035a55f522c1045685a2302e1f10f28e2eb7f137bb02dc9bfd | ocaml-doc/odoc-parser | loc.ml | type point = { line : int; column : int }
type span = { file : string; start : point; end_ : point }
type +'a with_location = { location : span; value : 'a }
let at location value = { location; value }
let location { location; _ } = location
let value { value; _ } = value
let map f annotated = { annotated with value =... | null | https://raw.githubusercontent.com/ocaml-doc/odoc-parser/370f1cf044d7b2b89de35f72bb168c5fca66864d/src/loc.ml | ocaml | type point = { line : int; column : int }
type span = { file : string; start : point; end_ : point }
type +'a with_location = { location : span; value : 'a }
let at location value = { location; value }
let location { location; _ } = location
let value { value; _ } = value
let map f annotated = { annotated with value =... | |
c0c0b41058812563c187e878fc66a52c33a32b951c4576f7f0c9dce1a838676e | argp/bap | batISet.mli | $ I d : iSet.mli , v 1.1 2003/12/19 17:24:34 yori Exp $
Copyright 2003 . distributed with LGPL
(** DIET : Discrete Interval Encoding Trees
Sets of integers represented as ranges
This data structure is efficient for large sets of integers where
many adjacent integers are all part of the set. This w... | null | https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/batteries/src/batISet.mli | ocaml | * DIET : Discrete Interval Encoding Trees
Sets of integers represented as ranges
This data structure is efficient for large sets of integers where
many adjacent integers are all part of the set. This will have
higher overhead for sets with lots of point elements, but will be
much more efficient f... | $ I d : iSet.mli , v 1.1 2003/12/19 17:24:34 yori Exp $
Copyright 2003 . distributed with LGPL
type t = (int * int) BatAvlTree.tree
type elt = int
val empty : t
val is_empty : t -> bool
val mem : int -> t -> bool
val add : int -> t -> t
val add_range : int -> int -> t -> t
val singleton : int -> t
val r... |
b3005b27e3580f4c06a3e675ff5053c5e55f79bac4f6eecfd6000ee80dcd5f3e | plewto/Cadejo | scanner_panel.clj | (ns cadejo.instruments.masa.editor.scanner-panel
(:use [cadejo.instruments.masa.masa-constants])
(:require [cadejo.ui.util.lnf :as lnf])
(:require [cadejo.ui.util.sgwr-factory :as sfactory])
(:require [cadejo.ui.instruments.subedit])
(:require [sgwr.util.math :as math])
(:require [sgwr.components.image :as ... | null | https://raw.githubusercontent.com/plewto/Cadejo/2a98610ce1f5fe01dce5f28d986a38c86677fd67/src/cadejo/instruments/masa/editor/scanner_panel.clj | clojure | map rate positions
min-scanner-rate <= (fn pos) <= max-scanner-rate
Usees quadratic mapping.
Returns current program value of parameter | (ns cadejo.instruments.masa.editor.scanner-panel
(:use [cadejo.instruments.masa.masa-constants])
(:require [cadejo.ui.util.lnf :as lnf])
(:require [cadejo.ui.util.sgwr-factory :as sfactory])
(:require [cadejo.ui.instruments.subedit])
(:require [sgwr.util.math :as math])
(:require [sgwr.components.image :as ... |
d4f14c6d430eced42969b65127cc289c850b4af2c21fcf03260430b65ec017d8 | RefactoringTools/HaRe | tiBig.hs | module TiBig where
-- Type checking the generated selector functions takes a lot of time.
data Big = B {x1,x2,x3,x4,x5,x6,x7,x8,x9,z1,z2,z3,z4,z5,z6,z7,z8,z9,
y1,y2,y3,y4,y5,y6,y7,y8,y9::Big}
{-
f _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _... | null | https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/old/tools/base/tests/tiBig.hs | haskell | Type checking the generated selector functions takes a lot of time.
f _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ x _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ... | module TiBig where
data Big = B {x1,x2,x3,x4,x5,x6,x7,x8,x9,z1,z2,z3,z4,z5,z6,z7,z8,z9,
y1,y2,y3,y4,y5,y6,y7,y8,y9::Big}
|
7802daf14d17baec105e97bbdc1e3238af2a16af89ade7a80d9dda7962f1e153 | freizl/dive-into-haskell | Parsing.hs | module Parsing where
import Monad
import Char
infixr 5 +++
newtype Parser a = P (String -> [(a, String)])
instance Monad Parser where
return v = P (\inp -> [(v, inp)])
p >>= f = P (\inp -> case parse p inp of
[] -> []
[(v, out)] -> parse (f v) out)
instance... | null | https://raw.githubusercontent.com/freizl/dive-into-haskell/b18a6bfe212db6c3a5d707b4a640170b8bcf9330/readings/programming-in-haskell/Parsing.hs | haskell | Derived primitives
-
-------------------------------- Exercise
?? How to consume \n | module Parsing where
import Monad
import Char
infixr 5 +++
newtype Parser a = P (String -> [(a, String)])
instance Monad Parser where
return v = P (\inp -> [(v, inp)])
p >>= f = P (\inp -> case parse p inp of
[] -> []
[(v, out)] -> parse (f v) out)
instance... |
bf1712a8128d94996673c42b970e4a1e65b52362c08b55b84b579a60575c125c | jarcane/merkki | headers_test.cljc | Merkki - a Clojure library for Markdown generation
;;;
Copyright ( c ) 2016
;;;
;;; This file is licensed under the Eclipse Public License v1.0. See LICENSE for more details
(ns merkki.headers-test
(:require #?(:clj [clojure.test :refer :all]
:cljs [cljs.test :refer-macros [deftest testing is]... | null | https://raw.githubusercontent.com/jarcane/merkki/49b6614a4a488a6455bdc8e501e938cab6abc9c3/test/merkki/headers_test.cljc | clojure |
This file is licensed under the Eclipse Public License v1.0. See LICENSE for more details
Header functions
| Merkki - a Clojure library for Markdown generation
Copyright ( c ) 2016
(ns merkki.headers-test
(:require #?(:clj [clojure.test :refer :all]
:cljs [cljs.test :refer-macros [deftest testing is]])
[merkki.headers :refer [header h1 h2 h3 h4 h5 h6 u-header uh1 uh2]]))
(deftest header... |
a6e09ab75b8b21f7a280ddd4ddb88e310ae772313bde69a0683e65a8eb8baabb | expipiplus1/vulkan | VK_KHR_push_descriptor.hs | {-# language CPP #-}
-- | = Name
--
-- VK_KHR_push_descriptor - device extension
--
-- == VK_KHR_push_descriptor
--
-- [__Name String__]
--
-- [__Extension Type__]
-- Device extension
--
-- [__Registered Extension Number__]
81
--
-- [__Revision__]
2
--
-- [__Extension and Version Dependencies__]
... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/095bcc6195c6f30e167945f6d3d15e8fdb7aa386/src/Vulkan/Extensions/VK_KHR_push_descriptor.hs | haskell | # language CPP #
| = Name
VK_KHR_push_descriptor - device extension
== VK_KHR_push_descriptor
[__Name String__]
[__Extension Type__]
Device extension
[__Registered Extension Number__]
[__Revision__]
[__Extension and Version Dependencies__]
- Requires @VK_KHR_get_physical_device_properties2@... |
81
2
- Requires support for Vulkan 1.0
-
2017 - 09 - 12
- , NVIDIA
- , Imagination Technologies
< -extensions/html/vkspec.html#versions-1.1 Version 1.1 >
' Vulkan . ' :
' Vulkan . Core10.Enums . . ' :
- ' Vulkan . Core10.Enums ... |
5544d4a4af697908dc1de7c2b8c2e8e56bd095ba87d277b3ac3102519cdf4a6e | zepto-lang/zepto | Test.hs | module Test where
import Zepto.Types
exports :: [(String, [LispVal] -> IOThrowsError LispVal, String)]
exports = [("ret-one", retOne, "always returns one")]
retOne :: [LispVal] -> IOThrowsError LispVal
retOne [] = return $ fromSimple $ Number $ NumS 1
| null | https://raw.githubusercontent.com/zepto-lang/zepto/564fc1db72530040100d55538f49fec6fd9ff300/examples/ffi/Test.hs | haskell | module Test where
import Zepto.Types
exports :: [(String, [LispVal] -> IOThrowsError LispVal, String)]
exports = [("ret-one", retOne, "always returns one")]
retOne :: [LispVal] -> IOThrowsError LispVal
retOne [] = return $ fromSimple $ Number $ NumS 1
| |
8e23308347dc271167674a17fe46745b072f1e9391667a06ea3244f865094161 | ruricolist/FXML | package.lisp | package.lisp
(defpackage #:fxml.sanitize
(:use #:cl #:alexandria #:serapeum)
(:export #:define-sanitize-mode
#:wrap-sanitize
#:mode
#:default
#:restricted
#:basic
#:relaxed
#:sanitize))
| null | https://raw.githubusercontent.com/ruricolist/FXML/a0e73bb48ef03adea94a55986cc27f522074c8e1/sanitize/package.lisp | lisp | package.lisp
(defpackage #:fxml.sanitize
(:use #:cl #:alexandria #:serapeum)
(:export #:define-sanitize-mode
#:wrap-sanitize
#:mode
#:default
#:restricted
#:basic
#:relaxed
#:sanitize))
| |
7a6e4d7c3a341c346f40bd192556f66768c9a0b381c94552b307cbec9d3d0010 | simmone/racket-simple-xlsx | xlsx.rkt | #lang racket
(require "../lib/lib.rkt")
(require "../lib/dimension.rkt")
(require "../sheet/sheet.rkt")
(require "../style/style.rkt")
(require "../style/border-style.rkt")
(require "../style/fill-style.rkt")
(require "../style/font-style.rkt")
(require "../style/number-style.rkt")
(provide (contract-out
[s... | null | https://raw.githubusercontent.com/simmone/racket-simple-xlsx/e0ac3190b6700b0ee1dd80ed91a8f4318533d012/simple-xlsx/xlsx/xlsx.rkt | racket | #lang racket
(require "../lib/lib.rkt")
(require "../lib/dimension.rkt")
(require "../sheet/sheet.rkt")
(require "../style/style.rkt")
(require "../style/border-style.rkt")
(require "../style/fill-style.rkt")
(require "../style/font-style.rkt")
(require "../style/number-style.rkt")
(provide (contract-out
[s... | |
bb06477366dde5eae23990c0009018efa07385a7d056e5a9d886c53cf1735ed8 | exoscale/vinyl | query.clj | (ns exoscale.vinyl.query
"A miniature DSL for building queries and prepared
queries for the FoundationDB record layer"
(:require [clojure.spec.alpha :as s]
[exoscale.ex :as ex])
(:import com.apple.foundationdb.record.query.RecordQuery
com.apple.foundationdb.record.qu... | null | https://raw.githubusercontent.com/exoscale/vinyl/c2dc08e4f53d404b02b76098968456c12f91672f/src/exoscale/vinyl/query.clj | clojure | (ns exoscale.vinyl.query
"A miniature DSL for building queries and prepared
queries for the FoundationDB record layer"
(:require [clojure.spec.alpha :as s]
[exoscale.ex :as ex])
(:import com.apple.foundationdb.record.query.RecordQuery
com.apple.foundationdb.record.qu... | |
68afd634616fd646ea755e481245c76e649ce93fd2466996d450f59e8d166781 | alaricsp/chicken-scheme | posix.import.scm | ;;;; posix.import.scm - import library for "posix" module
;
Copyright ( c ) 2008 - 2009 , The Chicken Team
; All rights reserved.
;
; Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following
; conditions are met:
;
; Redistributions of source code mu... | null | https://raw.githubusercontent.com/alaricsp/chicken-scheme/1eb14684c26b7c2250ca9b944c6b671cb62cafbc/posix.import.scm | scheme | posix.import.scm - import library for "posix" module
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following
conditions are met:
Redistributions of source code must retain the above copyright notice, this list of condition... | Copyright ( c ) 2008 - 2009 , The Chicken Team
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND ANY EXPRESS
CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR
CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED TO , PROCUREMENT OF SUBSTITUTE... |
00f21778bd258774ba0d2f1674e442b9fd59cfe9ad2fa3206911656468db0d63 | mfoemmel/erlang-otp | wxFrame.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/wx/src/gen/wxFrame.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 2008 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(wxFrame).
-include("wxe.hrl").
-e... |
4850554973e90b155c7adbce6d394ca882d15ebb416c5d761588d9647d424c98 | mishun/tangles | TestTangles.hs | module Main (main) where
import Test.Framework (Test, testGroup, defaultMain)
import qualified Math.Topology.KnotTh.ChordDiagram.Test
import qualified Math.Topology.KnotTh.Algebra.Cobordism.CobordismMatrix.Test
import qualified Math.Topology.KnotTh.Algebra.Cobordism.DottedCobordism.Test
import qualified Math.Topology.... | null | https://raw.githubusercontent.com/mishun/tangles/9af39dd48e3dcc5e3944f8d060c8769ff3d81d02/test/TestTangles.hs | haskell | module Main (main) where
import Test.Framework (Test, testGroup, defaultMain)
import qualified Math.Topology.KnotTh.ChordDiagram.Test
import qualified Math.Topology.KnotTh.Algebra.Cobordism.CobordismMatrix.Test
import qualified Math.Topology.KnotTh.Algebra.Cobordism.DottedCobordism.Test
import qualified Math.Topology.... | |
d690d5f64095dd7e89be2b43bcff1e80f18066cc31a5fdc33479794149cb9e80 | ocaml-multicore/ocaml-tsan | bool.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
(* ... | null | https://raw.githubusercontent.com/ocaml-multicore/ocaml-tsan/ae9c1502103845550162a49fcd3f76276cdfa866/stdlib/bool.ml | ocaml | ************************************************************************
OCaml
The... | Copyright 2018 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
type t = bool = false | true
external not : bool -> bool = "%boolnot"
external ( && ) : bool -> bool -> bool = "%sequand"
external ( || ) : bool -> bool -> bool = "%sequ... |
1622ce7fc2b1300fd619a9cb10b607f8615f563e7833c56757284fd7227d8198 | steinuil/nene | json.ml | type input = Yojson.Safe.t
type error =
[ Combinators.error | `Json_error of string | `Trailing_elements_detected ]
type 'a t = input -> ('a, error) result
let null : unit t = function
| `Null -> Ok ()
| _ -> Error (`Json_error "expected uh")
let bool : bool t = function
| `Bool b -> Ok b
| _ -> Error (`J... | null | https://raw.githubusercontent.com/steinuil/nene/7fd538a826fc1c7ad107d931849b1be1b87b0692/patche/json.ml | ocaml | type input = Yojson.Safe.t
type error =
[ Combinators.error | `Json_error of string | `Trailing_elements_detected ]
type 'a t = input -> ('a, error) result
let null : unit t = function
| `Null -> Ok ()
| _ -> Error (`Json_error "expected uh")
let bool : bool t = function
| `Bool b -> Ok b
| _ -> Error (`J... | |
6fd3ef44c6d1e81636f87c2f937b80fca52a3c8580f6541500d3e30212b6ad9b | FranklinChen/hugs98-plus-Sep2006 | SimpleTestD.hs | module Main where
import IO
import System (getArgs)
--import List (isPrefixOf)
import Text.XML.HaXml.XmlContent
-- Test stuff
data MyType a = ConsA Int a
| ConsB String
{-! derive : XmlContent !-}
instance Eq a => Eq (MyType a) where
(ConsA a b) == (ConsA c d) = a==c && b==d
(ConsB e) ... | null | https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/HaXml/examples/SimpleTestD.hs | haskell | import List (isPrefixOf)
Test stuff
! derive : XmlContent !
Hand - written example of preferred instance declaration .
Hand-written example of preferred instance declaration.
Main wrapper
ReadMode -> hGetContents f >>= \content ->
let ivalue = (fromXml . xmlParse) content in
Machine generated ... | module Main where
import IO
import System (getArgs)
import Text.XML.HaXml.XmlContent
data MyType a = ConsA Int a
| ConsB String
instance Eq a => Eq (MyType a) where
(ConsA a b) == (ConsA c d) = a==c && b==d
(ConsB e) == (ConsB f) = e `isPrefixOf` f || f `isPrefixOf` e
_ == _ ... |
8e4a9faf1a26f73f46f888090add33c9adb48f19b21622c2cd41c7c2e3d8604d | startalkIM/ejabberd | meck_cover.erl | %%=============================================================================
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agr... | null | https://raw.githubusercontent.com/startalkIM/ejabberd/718d86cd2f5681099fad14dab5f2541ddc612c8b/deps/meck/src/meck_cover.erl | erlang | =============================================================================
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expr... | Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@private
-module(meck_cover).
Interface exports
-export([compile_beam/2]).
-export([rename_module/2]).
Interface exports
compile_beam(OriginalMod, Bin) ->
alter_c... |
f3928f7faacbb6005627feb86918e04bfe75c552a1af2d4759bc298ac70aeb0f | bytekid/mkbtt | sccs.ml | Copyright 2008 , Christian Sternagel ,
* GNU Lesser General Public License
*
* This file is part of TTT2 .
*
* TTT2 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 ve... | null | https://raw.githubusercontent.com/bytekid/mkbtt/c2f8e0615389b52eabd12655fe48237aa0fe83fd/src/processors/src/termination/sccs.ml | ocaml | ** OPENS *******************************************************************
** MODULES *****************************************************************
** TYPES *******************************************************************
** GLOBALS *****************************************************************
** FUNCTIONS... | Copyright 2008 , Christian Sternagel ,
* GNU Lesser General Public License
*
* This file is part of TTT2 .
*
* TTT2 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 ve... |
b2fef8727a5812231dc129c083301dc19f7faa5b739ad01a9271b81f1f25c31b | NorfairKing/intray | Types.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingVia #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
module Intray.API.Protected.Account.Types
( module Intray.API.Protected.Account.Types,
module Data.UUID.Typed,
... | null | https://raw.githubusercontent.com/NorfairKing/intray/669b0939ca67535c2494ed84ecbcf2a62133db87/intray-api/src/Intray/API/Protected/Account/Types.hs | haskell | # LANGUAGE OverloadedStrings #
Number of extra items that they're still allowed | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingVia #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
module Intray.API.Protected.Account.Types
( module Intray.API.Protected.Account.Types,
module Data.UUID.Typed,
)
where
import Autodocodec
import ... |
1f96609c5969570d31df5b1de25590d7872f7581c5eb2f5394eff9272fdd42d2 | rainbyte/frag | HGL.hs | {-# LANGUAGE BangPatterns #-}
module HGL where
data Event
= Char { char :: !Char, isDown :: !Bool }
| Button { pt :: !Point, isLeft, isDown :: !Bool }
| MouseMove { pt :: !Point }
deriving Show
data Point = Point !(Int,Int) deriving Show
| null | https://raw.githubusercontent.com/rainbyte/frag/28893048f093f369c896932ff297150ef8ed2dd0/src/HGL.hs | haskell | # LANGUAGE BangPatterns # |
module HGL where
data Event
= Char { char :: !Char, isDown :: !Bool }
| Button { pt :: !Point, isLeft, isDown :: !Bool }
| MouseMove { pt :: !Point }
deriving Show
data Point = Point !(Int,Int) deriving Show
|
67a63e3fe6f140023251fb3306bf8d94412f0188b61494baf2782dafdbaa83e8 | vmchale/madlang | Resolve.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
| Module containing IO stuff to get / parse files with external dependencies
module Text.Madlibs.Ana.Resolve (
parseFile
, runFile
, makeTree
, runText
, runFileN
, pathSep
, cacheFile
) where
import Control.Arrow ... | null | https://raw.githubusercontent.com/vmchale/madlang/321e349d693bde3d133f5e251259afdcfc041526/src/Text/Madlibs/Ana/Resolve.hs | haskell | # LANGUAGE OverloadedStrings #
^ variables to substitute into the template
^ folder
^ filepath within folder
| Generate text from file with inclusions
| Cache the parsed strucutre (and libraries it depends on) as a binary file
| Generate randomized text from a file containing a template
^ List of variables to su... | # LANGUAGE FlexibleContexts #
| Module containing IO stuff to get / parse files with external dependencies
module Text.Madlibs.Ana.Resolve (
parseFile
, runFile
, makeTree
, runText
, runFileN
, pathSep
, cacheFile
) where
import Control.Arrow (first)
import Con... |
b8ed0c3fc63aca03a57517b761f15c46bec394f16022be4428a70f7b4f6a6ea2 | VisionsGlobalEmpowerment/webchange | categorize_synonyms.clj | (ns webchange.dev-templates.categorize-synonyms
(:require [webchange.dev-templates :as t]
[webchange.templates.core :as templates]
[webchange.course.core :as core]))
(defn- copy-activity
[course-name-source activity-name]
(let [scene-data (core/get-scene-latest-version course-name-source ... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/118ba5ee407ba1261bac40a6ba5729ccda6e8150/env/dev/clj/webchange/dev_templates/categorize_synonyms.clj | clojure | (get-in [:objects])
(keys)
(sort) | (ns webchange.dev-templates.categorize-synonyms
(:require [webchange.dev-templates :as t]
[webchange.templates.core :as templates]
[webchange.course.core :as core]))
(defn- copy-activity
[course-name-source activity-name]
(let [scene-data (core/get-scene-latest-version course-name-source ... |
a12ae87eb35b73de592b3ba6316a887850a7274e8b65112a85b491ea79281e2f | rescript-association/genType | TypeEnv.ml | open GenTypeCommon
type moduleEquation = {internal : bool; dep : dep}
type t = {
mutable componentModuleItem : Runtime.moduleItem;
mutable map : entry StringMap.t;
mutable mapModuleTypes : (Typedtree.signature * t) StringMap.t;
mutable moduleEquation : moduleEquation option;
mutable moduleItem : Runtime.mod... | null | https://raw.githubusercontent.com/rescript-association/genType/c7a5413d1c46fd1481f9cbb54e1702d89d994338/src/TypeEnv.ml | ocaml | not nested | open GenTypeCommon
type moduleEquation = {internal : bool; dep : dep}
type t = {
mutable componentModuleItem : Runtime.moduleItem;
mutable map : entry StringMap.t;
mutable mapModuleTypes : (Typedtree.signature * t) StringMap.t;
mutable moduleEquation : moduleEquation option;
mutable moduleItem : Runtime.mod... |
85c453b1f26d858700e2bf2f3b801587518845d1108453cfb29877faa75a576d | mejgun/haskell-tdlib | GetPremiumLimit.hs | {-# LANGUAGE OverloadedStrings #-}
-- |
module TD.Query.GetPremiumLimit where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified TD.Data.PremiumLimitType as PremiumLimitType
import qualified Utils as U
-- |
Returns information about a limit , increased for Premium users . Retu... | null | https://raw.githubusercontent.com/mejgun/haskell-tdlib/eba1ae3f364d43aabc4f5d2a56ffb1ffb88fe482/src/TD/Query/GetPremiumLimit.hs | haskell | # LANGUAGE OverloadedStrings #
|
|
| |
module TD.Query.GetPremiumLimit where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified TD.Data.PremiumLimitType as PremiumLimitType
import qualified Utils as U
Returns information about a limit , increased for Premium users . Returns a 404 error if the limit is unknown of ... |
72d7adc718b66f411e4f09f268d9a1385762ba3caed7dcf822a844ad976b95e9 | Helium4Haskell/helium | DupMaybeYouMeant.hs | (+!!) :: Int -> Int -> Int
(+!!) _ _ = 1
(+!!) :: Int -> Int -> Int
(+!!) _ _ = 1
(+!!) :: Int -> Int -> Int
(+!!) _ _ = 1
main = (+!?)
| null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/staticerrors/DupMaybeYouMeant.hs | haskell | (+!!) :: Int -> Int -> Int
(+!!) _ _ = 1
(+!!) :: Int -> Int -> Int
(+!!) _ _ = 1
(+!!) :: Int -> Int -> Int
(+!!) _ _ = 1
main = (+!?)
| |
c43f6d9feb4cc504d0b856a6a35b255ae7471cbefada2506fa80d0875ad2604a | polytypic/f-omega-mu | FomPP.ml | open Rea
open StdlibPlus
open FomPPrint
open FomParser
module Kind = struct
module UnkMap = FomAST.Kind.UnkMap
module Numbering = struct
include FomAST.Kind.UnkMap
type nonrec t = int t ref
let create () = ref empty
end
let pp ?(numbering = Numbering.create ()) kind =
let rec pp atomize kin... | null | https://raw.githubusercontent.com/polytypic/f-omega-mu/bf176d4b1dd7808399a41206876103a5192ef075/src/main/FomPP/FomPP.ml | ocaml | open Rea
open StdlibPlus
open FomPPrint
open FomParser
module Kind = struct
module UnkMap = FomAST.Kind.UnkMap
module Numbering = struct
include FomAST.Kind.UnkMap
type nonrec t = int t ref
let create () = ref empty
end
let pp ?(numbering = Numbering.create ()) kind =
let rec pp atomize kin... | |
9d5b85511901c32317c009b50bd44eaf6179da35491ce06f71ca1611736f7c8b | vaibhavsagar/experiments | IO.hs | {-# OPTIONS_GHC -#include "HsBase.h" #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Array.IO
Copyright : ( c ) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer :
-- Stability : e... | null | https://raw.githubusercontent.com/vaibhavsagar/experiments/378d7ba97eabfc7bbeaa4116380369ea6612bfeb/hugs/packages/base/Data/Array/IO.hs | haskell | # OPTIONS_GHC -#include "HsBase.h" #
---------------------------------------------------------------------------
|
Module : Data.Array.IO
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : experimental
Portability : non-portable (uses Data.Array.MArray)
------... | Copyright : ( c ) The University of Glasgow 2001
Mutable boxed and unboxed arrays in the IO monad .
module Data.Array.IO (
* arrays with boxed elements
instance of : ,
* arrays with unboxed elements
instance of : ,
: : IOUArray i a - > IO ( IOUArray i b )
module Data.Array.MArray,
* Do... |
3d204242c40434caef3febaa6838a675e9ab25a44833b21d96295dd0538a8472 | lisp-korea/sicp2014 | ex-1.18.scm | ¿¬½À¹®Á¦ 1.18
(define (* a b)
(define (fast-prod a b n t)
(cond ((= b n) t)
((= n 0) (fast-prod a b (+ n 1) a))
((> b (double n)) (fast-prod a b (double n) (double t)))
(else (fast-prod a b (+ n 1) (+ t a)))))
(fast-prod a b 0 0))
(define (double x) (+ x x))
| null | https://raw.githubusercontent.com/lisp-korea/sicp2014/9e60f70cb84ad2ad5987a71aebe1069db288b680/soulawaker/1.2/ex-1.18.scm | scheme | ¿¬½À¹®Á¦ 1.18
(define (* a b)
(define (fast-prod a b n t)
(cond ((= b n) t)
((= n 0) (fast-prod a b (+ n 1) a))
((> b (double n)) (fast-prod a b (double n) (double t)))
(else (fast-prod a b (+ n 1) (+ t a)))))
(fast-prod a b 0 0))
(define (double x) (+ x x))
| |
04c6939236a58717872de31f2fca175b1a2dc66380fa07661c0df85a3d9d039b | w2l0o5/observerweb | observerweb_pro.erl | %%%-------------------------------------------------------------------
@author
( C ) 2017 , Freecnpro
%%% @doc
%%%
%%% @end
Created : 2017 - 04 - 17
%%%-------------------------------------------------------------------
-module(observerweb_pro).
-author("").
-behaviour(gen_server).
-include_lib("runtime_tool... | null | https://raw.githubusercontent.com/w2l0o5/observerweb/0e4237c3765e7e69813974cec8c68407c28516e5/apps/observerweb/src/observerweb_pro.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API
gen_server callbacks
Defines
===================================================================
API
==============================================================... | @author
( C ) 2017 , Freecnpro
Created : 2017 - 04 - 17
-module(observerweb_pro).
-author("").
-behaviour(gen_server).
-include_lib("runtime_tools/include/observer_backend.hrl").
-export([start_link/0, update/0, change_node/1]).
-export([init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
... |
45fe7b3cc53f3543e1c2dd1bacdce33a3201e355abccf6b9182299105d8feb8a | basho/riak_cs | riak_cs_wm_error_handler.erl | %% ---------------------------------------------------------------------
%%
Copyright ( c ) 2007 - 2013 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . Y... | null | https://raw.githubusercontent.com/basho/riak_cs/c0c1012d1c9c691c74c8c5d9f69d388f5047bcd2/src/riak_cs_wm_error_handler.erl | erlang | ---------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permiss... | Copyright ( c ) 2007 - 2013 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
... |
c7f9b57318cd96b9717f9eca3609ba9fa6978e89dbffcc031df4e5232f362d87 | mirage/mirage-nat | nat_packet.mli | type t =
[`IPv4 of Ipv4_packet.t * [ `TCP of Tcp.Tcp_packet.t * Cstruct.t
| `UDP of Udp_packet.t * Cstruct.t
| `ICMP of Icmpv4_packet.t * Cstruct.t
]
]
type error
val icmp_type : Icmpv4_packet.t -> [ `Query | `Error ]
val pp_erro... | null | https://raw.githubusercontent.com/mirage/mirage-nat/1bed6c49b7554123a99e5e56d1f0967707424bb2/lib/nat_packet.mli | ocaml | * [to_cstruct packet] is the list of cstructs representing [packet].
It returns a list of fragments to be sent, or an error if fragmentation
was needed, but disallowed by the provided ip header. | type t =
[`IPv4 of Ipv4_packet.t * [ `TCP of Tcp.Tcp_packet.t * Cstruct.t
| `UDP of Udp_packet.t * Cstruct.t
| `ICMP of Icmpv4_packet.t * Cstruct.t
]
]
type error
val icmp_type : Icmpv4_packet.t -> [ `Query | `Error ]
val pp_erro... |
17e447a7f17120ed09228b207a0c2c475c76ce3879f6fa9e99f54833bfcb9e0f | RefactoringTools/wrangler | core_arithmetics.erl | %%%-------------------------------------------------------------------
@author , < >
( C ) 2014 , , ,
%%% @doc
%% Arithmetic Operators Core - Covers arithmetic expressions.
%%
The simplifications performed are divided into two minor cores : < a href="core_arit_simpl.html">Arithmetic Simpl... | null | https://raw.githubusercontent.com/RefactoringTools/wrangler/1c33ad0e923bb7bcebb6fd75347638def91e50a8/src/symbolic_evaluation/core/core_arithmetics.erl | erlang | -------------------------------------------------------------------
@doc
Arithmetic Operators Core - Covers arithmetic expressions.
@end
-------------------------------------------------------------------
Include files
--------------------------------------------------------------------
@doc
@end
------------... | @author , < >
( C ) 2014 , , ,
The simplifications performed are divided into two minor cores : < a href="core_arit_simpl.html">Arithmetic Simplifications Core</a > and < a href="core_arit_calc.html">Arithmetic Calculations Core</a > .
-module(core_arithmetics).
-include("wrangler.hrl").
... |
f9f5e6f542a106558ce1bec97e6d01f7c3d0afdb8cc4ce53b44742fd8797875e | nextjournal/clerk-demo | sicmutils.clj | # Exercise 1.44 : The double pendulum
;; This namespace explores [Exercise
1.44]( / sicm / chapter001.html#Exe_1 - 44 ) from
and Wisdom 's [ Structure and Interpretation of Classical
;; Mechanics](/), using
;; the [SICMUtils]() Clojure library and
;; the Clerk rendering environment.
#_{:clj-kondo/ignore [:refe... | null | https://raw.githubusercontent.com/nextjournal/clerk-demo/08cb85f8190b77a7f9d5cc14f68ba8f3872d1c67/notebooks/sicmutils.clj | clojure | This namespace explores [Exercise
Mechanics](/), using
the [SICMUtils]() Clojure library and
the Clerk rendering environment.
## Lagrangian
Lagrangian with the familiar form of `T - V`.
coordinates.
`V` describes a uniform gravitational potential with coefficient `g`, acting
written in rectangular coordinates... | # Exercise 1.44 : The double pendulum
1.44]( / sicm / chapter001.html#Exe_1 - 44 ) from
and Wisdom 's [ Structure and Interpretation of Classical
#_{:clj-kondo/ignore [:refer-all]}
(ns sicmutils
(:refer-clojure
:exclude [+ - * / partial ref zero? numerator denominator compare = run!])
(:require [nextjou... |
a5280b7ab492aa3c5bf3cb13ecc0eb5e566b5389b06cf501819b59c5f88f13b6 | imalooney/t3tr0s | lobby.cljs | (ns client.pages.lobby
(:require-macros [hiccups.core :as hiccups])
(:require
[cljs.reader :refer [read-string]]
hiccups.runtime
[client.dom :as dom]
[client.socket :as socket]
client.state
[client.util :as util]))
(def $ js/jQuery)
;;-------------------------------------------------------... | null | https://raw.githubusercontent.com/imalooney/t3tr0s/2f9529e7138a0bc3a8578aa89c9661fc89e81cc0/src/client/pages/lobby.cljs | clojure | ------------------------------------------------------------------------------
HTML
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Chat
-----------------------------------------------------------------------... | (ns client.pages.lobby
(:require-macros [hiccups.core :as hiccups])
(:require
[cljs.reader :refer [read-string]]
hiccups.runtime
[client.dom :as dom]
[client.socket :as socket]
client.state
[client.util :as util]))
(def $ js/jQuery)
(hiccups/defhtml chat-html []
[:div.hdr-93a4f
[:a ... |
b48909514e8f777a5365a712e12cefb1b3f1500c3ba172c3743c2c591e5b4721 | huangjs/cl | r1updt.lisp | ;;; Compiled by f2cl version:
( " f2cl1.l , v 1.215 2009/04/07 22:05:21 rtoy Exp $ "
" f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ "
" f2cl5.l , v 1.200 2009/01/19 02:38:17 rtoy Exp $ "
" f2cl6.l ,... | null | https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/maxima/share/minpack/lisp/r1updt.lisp | lisp | Compiled by f2cl version:
Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls nil)
(:coerce-assigns :as-needed) (:array-type ':array)
(:array-slicing t) (:declare-common nil)
(:float-format double-float)) | ( " f2cl1.l , v 1.215 2009/04/07 22:05:21 rtoy Exp $ "
" f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ "
" f2cl5.l , v 1.200 2009/01/19 02:38:17 rtoy Exp $ "
" f2cl6.l , v 1.48 2008/08/24 00:56:27 rt... |
03bb279c8007fec781c1077b33f09e67bb2ebd2f0788ab78637a18a4572d3041 | jonschoning/espial | Settings.hs | -- | Settings are centralized, as much as possible, into this file. This
-- includes database connection settings, static file locations, etc.
In addition , you can configure a number of different aspects of Yesod
by overriding methods in the Yesod typeclass . That instance is
declared in the Foundation.hs file .... | null | https://raw.githubusercontent.com/jonschoning/espial/368c5db5105e431b5c08017a59ec648a641e85e8/src/Settings.hs | haskell | | Settings are centralized, as much as possible, into this file. This
includes database connection settings, static file locations, etc.
| Runtime settings to configure this application. These settings can be
loaded from various sources: defaults, environment variables, config files,
theoretically even a database.... | In addition , you can configure a number of different aspects of Yesod
by overriding methods in the Yesod typeclass . That instance is
declared in the Foundation.hs file .
module Settings where
import ClassyPrelude.Yesod
import qualified Control.Exception as Exception
import Data.Aeson (Result (... |
6336068c6a6d8aedf4c2dd42acc66e5912dfb83cc1373f0771637a7b99323f4e | AbstractMachinesLab/caramel | subst.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/ocaml-lsp-server/vendor/merlin/upstream/ocaml_403/typing/subst.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Misc
open Path
open Types
open Btype
type t =
{ types: (Ident.t, Path.t) Tbl.t;
modules: (Id... |
4c09ceb202a5daf9cded522c1a0cea32e30c42d6a4d68d7049705b513bc454bc | rabbitmq/rabbitmq-jms-topic-exchange | rjms_topic_selector_SUITE.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2013 - 2020 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rjms_topic_selector_SUITE).
-compile(exp... | null | https://raw.githubusercontent.com/rabbitmq/rabbitmq-jms-topic-exchange/484ae191b96265467408a2d35b05709813234137/test/rjms_topic_selector_SUITE.erl | erlang |
Useful test constructors
-------------------------------------------------------------------
Test suite setup/teardown.
-------------------------------------------------------------------
-------------------------------------------------------------------
Test cases.
-------------------------------------------... | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2013 - 2020 VMware , Inc. or its affiliates . All rights reserved .
-module(rjms_topic_selector_SUITE).
-compile(export_al... |
32ae0a67caaa52aed64a4dc007c564b343b9eb8642e570160fae2a452803173c | uxbox/uxbox-old | core.cljs | (ns uxbox.ui.icon-sets.core
(:require
[uxbox.ui.icon-sets.material-design-actions]
[uxbox.ui.icon-sets.material-design-alert]
[uxbox.ui.icon-sets.material-design-av]
[uxbox.ui.icon-sets.material-design-communication]
[uxbox.ui.icon-sets.material-design-content]
[uxbox.ui.icon-sets.material-design-de... | null | https://raw.githubusercontent.com/uxbox/uxbox-old/9c3c3c406a6c629717cfc40e3da2f96df3bdebf7/src/frontend/uxbox/ui/icon_sets/core.cljs | clojure | (ns uxbox.ui.icon-sets.core
(:require
[uxbox.ui.icon-sets.material-design-actions]
[uxbox.ui.icon-sets.material-design-alert]
[uxbox.ui.icon-sets.material-design-av]
[uxbox.ui.icon-sets.material-design-communication]
[uxbox.ui.icon-sets.material-design-content]
[uxbox.ui.icon-sets.material-design-de... | |
d4890dea863bd95ba8e36ec2baa5346daa5225ca6cc1aeec9a992ea282b0b967 | janestreet/universe | async_reader.ml | open Core
open Async
type ('sexp, 'a, 'b) load =
?allow_includes:bool -> string -> ('sexp -> 'a) -> 'b Deferred.t
module Macro_loader = Macro.Loader (struct
module Monad = struct
type 'a t = 'a Deferred.t
let return = return
module Monad_infix = Deferred.Monad_infix
module List = stru... | null | https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/sexp_macro/src/async_reader.ml | ocaml | open Core
open Async
type ('sexp, 'a, 'b) load =
?allow_includes:bool -> string -> ('sexp -> 'a) -> 'b Deferred.t
module Macro_loader = Macro.Loader (struct
module Monad = struct
type 'a t = 'a Deferred.t
let return = return
module Monad_infix = Deferred.Monad_infix
module List = stru... | |
f0a23a961b5d641af784c5a8b42837cd6ca6dbc52983802b10d8f0620e37c950 | Soyn/sicp | Ex2.86.rkt | #lang racket
Ex2.86
Created by .
;; @Brief:Suppose we want to handle complex numbers whose real parts, imaginary parts,
;; magnitudes, and angles can be either ordinary numbers, rational numbers, or other numbers we might wish
;; to add to the system. Describe and implement the changes to the system needed to a... | null | https://raw.githubusercontent.com/Soyn/sicp/d2aa6e3b053f6d4c8150ab1b033a18f61fca7e1b/CH2/CH2.5/Ex2.86.rkt | racket | @Brief:Suppose we want to handle complex numbers whose real parts, imaginary parts,
magnitudes, and angles can be either ordinary numbers, rational numbers, or other numbers we might wish
to add to the system. Describe and implement the changes to the system needed to accommodate this. You
will have to define opera... | #lang racket
Ex2.86
Created by .
( define ( 'sine x) ( apply-generic 'sine x))
( define ( cosine x) ( apply-generic cosine x))
( put 'sine 'scheme-number
( lambda (x) ( tag ( sin x))))
( put 'cosine 'scheme-number
( lambda ( x) ( tag ( cos x))))
( put 'sine 'rational
( lambda (x) ( tag ( sin... |
9d19430e70fcc0c72747e1bdda441d196ba20df358b9df3cc7ff9984c6005cff | ChristopherBiscardi/snap-for-beginners | Site.hs | # LANGUAGE FlexibleInstances #
{-# LANGUAGE OverloadedStrings #-}
------------------------------------------------------------------------------
-- | This module is where all the routes and handlers are defined for your
-- site. The 'app' function is the initializer that combines everything
-- together and is exported ... | null | https://raw.githubusercontent.com/ChristopherBiscardi/snap-for-beginners/d35a4bbdd0a459983e2f37400fbc2bf8c8bf6239/code/auth-postgres-app/src/Site.hs | haskell | # LANGUAGE OverloadedStrings #
----------------------------------------------------------------------------
| This module is where all the routes and handlers are defined for your
site. The 'app' function is the initializer that combines everything
together and is exported by this module.
---------------------------... | # LANGUAGE FlexibleInstances #
module Site
( app
) where
import Control.Applicative
import Control.Monad.State.Class
import Data.ByteString (ByteString)
import qualified Data.Text as T
import Heist
import qualifie... |
5fa1336da6f70bd7acba1e242c6c6c6255f11884d78d4a992c96ce470069a005 | netvl/udisksevt | Disk.hs | -- udisksevt source file
Copyright ( C ) , 2010
-- Disk structure related functions
module UDisksEvt.Disk where
import Control.Monad
import Control.Concurrent.STM
import DBus.Types
import Data.Maybe
import qualified Data.Map as M
import qualified Data.Text as B
import UDisksEvt.Datatypes
-- Cast ObjectPath valu... | null | https://raw.githubusercontent.com/netvl/udisksevt/72b90b8c4bf37ef93180233335a2e18ab3129c45/UDisksEvt/Disk.hs | haskell | udisksevt source file
Disk structure related functions
Cast ObjectPath value to string
Get device property from cache
Get the whole device property Map
Get device info structure from runtime state | Copyright ( C ) , 2010
module UDisksEvt.Disk where
import Control.Monad
import Control.Concurrent.STM
import DBus.Types
import Data.Maybe
import qualified Data.Map as M
import qualified Data.Text as B
import UDisksEvt.Datatypes
objectPathToString :: ObjectPath -> String
objectPathToString = B.unpack . objectPat... |
19e09ac2a702b7a2721ee1239470592706be99df27c9d2bdde2bf18472b38c20 | choener/ADPfusion | Edge.hs |
module ADPfusion.Core.Term.Edge where
import Data.Strict.Tuple
import Data.Proxy
import Data.PrimitiveArray
import ADPfusion.Core.Classes
import ADPfusion.Core.Multi
newtype From = From { getFrom :: Int }
deriving (Eq,Ord,Show)
newtype To = To { getTo :: Int }
deriving (Eq,Ord,Show)
-- | An edge in a graph... | null | https://raw.githubusercontent.com/choener/ADPfusion/fcbbf05d0f438883928077e3d8a7f1cbf8c2e58d/ADPfusion/Core/Term/Edge.hs | haskell | | An edge in a graph. As a parsing symbol, it will provide (From:.To)
pairs.
# Inline getElm #
| In case our sets have a @First@ boundary, then we always point from
From@.
the set.
| And if the set has a @Last@ boundary, then we point from somewhere in
OF@ the set. |
module ADPfusion.Core.Term.Edge where
import Data.Strict.Tuple
import Data.Proxy
import Data.PrimitiveArray
import ADPfusion.Core.Classes
import ADPfusion.Core.Multi
newtype From = From { getFrom :: Int }
deriving (Eq,Ord,Show)
newtype To = To { getTo :: Int }
deriving (Eq,Ord,Show)
data Edge = Edge
inst... |
c28fd0ddcc1eab8042c5fedad891e1e15a3f8ca404dddc8f4f9a4dc83827e6a7 | thephoeron/bit-smasher | aliases.lisp |
(in-package :bit-smasher)
(setf (fdefinition 'bit+) (fdefinition 'bit-sum))
(setf (fdefinition 'bit-) (fdefinition 'bit-difference))
(setf (fdefinition 'bit*) (fdefinition 'bit-product))
(setf (fdefinition 'bit/) (fdefinition 'bit-quotient))
(setf (fdefinition '<<) (fdefinition 'lshift))
(setf (fdefinition '>>) ... | null | https://raw.githubusercontent.com/thephoeron/bit-smasher/c2dcb3b5ec0e485484be681fe17c4e81e58790d9/src/aliases.lisp | lisp |
(in-package :bit-smasher)
(setf (fdefinition 'bit+) (fdefinition 'bit-sum))
(setf (fdefinition 'bit-) (fdefinition 'bit-difference))
(setf (fdefinition 'bit*) (fdefinition 'bit-product))
(setf (fdefinition 'bit/) (fdefinition 'bit-quotient))
(setf (fdefinition '<<) (fdefinition 'lshift))
(setf (fdefinition '>>) ... | |
434ba232e1106a44c8a503f44ad4bb9e4fdb5889eb81d2f3ed106967f53d3f7b | stepcut/plugins | Null.hs | module Null where
import qualified Prelude
import API
resource = null
| null | https://raw.githubusercontent.com/stepcut/plugins/52c660b5bc71182627d14c1d333d0234050cac01/testsuite/unload/sjwtrap/Null.hs | haskell | module Null where
import qualified Prelude
import API
resource = null
| |
20912c00ccf3a0d41ad1997b24cf5ed14381d761782dd88c6d2d700eb435fbd7 | tomlokhorst/AwesomePrelude | Pointed.hs | # LANGUAGE MultiParamTypeClasses #
module Generic.Control.Pointed where
import Prelude ()
import Generic.Control.Functor
class Functor j f => Pointed j f where
pure :: j a -> j (f a)
| null | https://raw.githubusercontent.com/tomlokhorst/AwesomePrelude/c06fc73e1489aecdd3556b0395d427065245efee/src/Generic/Control/Pointed.hs | haskell | # LANGUAGE MultiParamTypeClasses #
module Generic.Control.Pointed where
import Prelude ()
import Generic.Control.Functor
class Functor j f => Pointed j f where
pure :: j a -> j (f a)
| |
77c56e223dcfaa54ebc47d49f0af81c100f10b4726fa3b91b33f3fcc215945dd | facebook/infer | Timeable.ml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/facebook/infer/b1284587e56d95c81ebdd856894563c335fffa83/infer/src/base/Timeable.ml | ocaml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | |
7c0bcd247e2b02a0bc40f8037eafb0513d8bdab600eba8814c06ac58a1d14631 | helins/timer.cljs | test.cljs | 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 /.
(ns helins.timer.test
""
{:author "Adam Helinski"}
(:require [clojure.test :as t]
[helins.timer :as timer]))
;;;;;;;;;;... | null | https://raw.githubusercontent.com/helins/timer.cljs/debd003234b767c9ba6c57d31b5c59bff3a4b832/src/test/helins/timer/test.cljs | clojure | .setInterval and .setTimeout
"Immediate" async tasks
Ensuring order is correct when mixing tasks with micro-tasks
.requestAnimationFrame | 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 /.
(ns helins.timer.test
""
{:author "Adam Helinski"}
(:require [clojure.test :as t]
[helins.timer :as timer]))
(def tol... |
fba760e3bac7ef8a797a1dcf4c1109ebb43ceb68db743944bf50bad4f8c97f5d | Vaguery/klapaucius | dsl_test.clj | (ns push.instructions.dsl-test
(:require [push.util.stack-manipulation :as u]
[push.interpreter.core :as i]
[push.instructions.core :as inst]
[push.core :as push]
[push.type.definitions.snapshot :as snap]
[push.util.code-wrangling :as fix]
[push... | null | https://raw.githubusercontent.com/Vaguery/klapaucius/17b55eb76feaa520a85d4df93597cccffe6bdba4/test/push/instructions/dsl_test.clj | clojure | fixtures
helper functions
scratch map
max-collection-size
count-of
`delete-top-of [stackname]`
`consume-top-of [stackname :as local]`
`consume-stack [stackname :as local]`
`delete-stack [stackname]`
`save-max-collection-size [as kwd]`
`delete-nth-of [stackname :at where]`
`replace-stack [stackname local]`
... | (ns push.instructions.dsl-test
(:require [push.util.stack-manipulation :as u]
[push.interpreter.core :as i]
[push.instructions.core :as inst]
[push.core :as push]
[push.type.definitions.snapshot :as snap]
[push.util.code-wrangling :as fix]
[push... |
9072a4041d897875de41304ef72d31d518b91367a7fbef6e59129b9a595a9ee4 | janestreet/base | option.mli | * The option type indicates whether a meaningful value is present . It is frequently used
to represent success or failure , using [ None ] for failure . To be more descriptive
about why a function failed , see the { ! Or_error } module .
Usage example from a utop session follows . Hash table lookups ... | null | https://raw.githubusercontent.com/janestreet/base/1462b7d5458e96569275a1c673df968ecbf3342f/src/option.mli | ocaml | * Extracts the underlying value if present, otherwise returns [default].
* Extracts the underlying value, or raises if there is no value present. The
error raised can be augmented using the [~here], [~error], and [~message]
optional arguments.
* Extracts the underlying value and applies [f] to it if present, ... | * The option type indicates whether a meaningful value is present . It is frequently used
to represent success or failure , using [ None ] for failure . To be more descriptive
about why a function failed , see the { ! Or_error } module .
Usage example from a utop session follows . Hash table lookups ... |
41879f11268d6f77fe3ba6f8499a29bd3707bbac139e528ef7e21a41263366ab | lisp/de.setf.resource | api.lisp | -*- Mode : lisp ; Syntax : ansi - common - lisp ; Base : 10 ; Package : de.setf.resource.implementation ; -*-
(in-package :de.setf.resource.implementation)
(:documentation
"This file defines a the API for the `de.setf.resource` CLOS linked data library."
(copyright
"Copyright 2010 [james anderson](mailto:... | null | https://raw.githubusercontent.com/lisp/de.setf.resource/27bf6dfb3b3ca99cfd5a6feaa5839d99bfb4d29e/api.lisp | lisp | Syntax : ansi - common - lisp ; Base : 10 ; Package : de.setf.resource.implementation ; -*-
without even the
terminate at the end of the cache chain
terminate at the end of the cache chain |
(in-package :de.setf.resource.implementation)
(:documentation
"This file defines a the API for the `de.setf.resource` CLOS linked data library."
(copyright
"Copyright 2010 [james anderson](mailto:) All Rights Reserved"
"'de.setf.resource' is free software: you can redistribute it and/or modify it under ... |
cb14551c542ae125431026ed4e4af20a9cc2e3aac7b643347fa3120f64160f1e | ruanpienaar/goanna | prop_goanna_common_tests.erl | -module(prop_goanna_common_tests).
-include_lib("proper/include/proper.hrl").
-include_lib("eunit/include/eunit.hrl").
% prop_prop_value() ->
% ?FORALL(
% X,
% list({Key=term(), term()}),
% true(X, goanna_common:prop_value(Key, X, default))
% ).
% ?FORALL(
% X,
% a... | null | https://raw.githubusercontent.com/ruanpienaar/goanna/52d75566fd6f9760fbdebe53b2ca3c82fdb44e01/test/prop_goanna_common_tests.erl | erlang | prop_prop_value() ->
?FORALL(
X,
list({Key=term(), term()}),
true(X, goanna_common:prop_value(Key, X, default))
).
?FORALL(
X,
atom(),
?FORALL(
Y,
proplist(),
?FORALL(
Z,
any(),
true(goanna_common:pro... | -module(prop_goanna_common_tests).
-include_lib("proper/include/proper.hrl").
-include_lib("eunit/include/eunit.hrl").
|
7fd9871d53b9506e5025070822912faeb8cc9c4a43e8131dc8c4a15aa06bc722 | sbocq/cronit | timegrid.clj | (ns timegrid
(:require [sbocq.cronit :as c]))
(defn show [{:keys [:context :c-expr :format :date :zone-id]}]
(c/show c-expr {:context context, :format format, :date date, :zone-id zone-id}))
| null | https://raw.githubusercontent.com/sbocq/cronit/05fe4a092fcb3a9598b0b276d8652146a7d89b02/examples/timegrid.clj | clojure | (ns timegrid
(:require [sbocq.cronit :as c]))
(defn show [{:keys [:context :c-expr :format :date :zone-id]}]
(c/show c-expr {:context context, :format format, :date date, :zone-id zone-id}))
| |
cb7a9c6d90a06d8748f58994c544f2fae13fa5b00c7b8ba6b2b4fbe21358c6bf | JohnLato/language-objc | CheckGccArgs.hs | {-# OPTIONS #-}
-----------------------------------------------------------------------------
-- |
Module : CCheckGccArgs
Copyright : ( c ) 2008
-- License : BSD-style
-- Maintainer :
--
-- Check if the given gcc args are fine to perform a parse test.
Essentially a ' one - liner ' , used b... | null | https://raw.githubusercontent.com/JohnLato/language-objc/8e9455f15b32229f7caf13769c8945d8544c79f0/test/src/CheckGccArgs.hs | haskell | # OPTIONS #
---------------------------------------------------------------------------
|
License : BSD-style
Maintainer :
Check if the given gcc args are fine to perform a parse test.
---------------------------------------------------------------------------
exclude ./configure stuff | Module : CCheckGccArgs
Copyright : ( c ) 2008
Essentially a ' one - liner ' , used by cc - wrapper .
module Main (main)
where
import System.Environment
import System.Exit
import Language.C.Test.Environment
main :: IO ()
main = do
args <- getArgs
case mungeCcArgs args of
Ignore -> exitW... |
505fa2f3c61289d9e5e68badbf2582614f6b1166ee26b6ff06f8bd5206ff1d31 | Apress/practical-webdev-haskell | Auth.hs | module Adapter.PostgreSQL.Auth where
import ClassyPrelude
import qualified Domain.Auth as D
import Text.StringRandom
import Data.Has
import Data.Pool
import Database.PostgreSQL.Simple.Migration
import Database.PostgreSQL.Simple
import Data.Time
type State = Pool Connection
type PG r m = (Has State r, MonadReader r... | null | https://raw.githubusercontent.com/Apress/practical-webdev-haskell/17b90c06030def254bb0497b9e357f5d3b96d0cf/10/src/Adapter/PostgreSQL/Auth.hs | haskell | issue query
interpret result | module Adapter.PostgreSQL.Auth where
import ClassyPrelude
import qualified Domain.Auth as D
import Text.StringRandom
import Data.Has
import Data.Pool
import Database.PostgreSQL.Simple.Migration
import Database.PostgreSQL.Simple
import Data.Time
type State = Pool Connection
type PG r m = (Has State r, MonadReader r... |
189a91c58b15feeedc683c0363bb857a5656254f510182d714f4bc366ce9b0c1 | expipiplus1/vulkan | ImageViewCreateFlagBits.hs | {-# language CPP #-}
-- No documentation found for Chapter "ImageViewCreateFlagBits"
module Vulkan.Core10.Enums.ImageViewCreateFlagBits ( ImageViewCreateFlags
, ImageViewCreateFlagBits( IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DEFERRED_BIT_EXT
... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/70d8cca16893f8de76c0eb89e79e73f5a455db76/src/Vulkan/Core10/Enums/ImageViewCreateFlagBits.hs | haskell | # language CPP #
No documentation found for Chapter "ImageViewCreateFlagBits"
| VkImageViewCreateFlagBits - Bitmask specifying additional parameters of
an image view
= See Also
<-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
| 'IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DEFERRED_BIT_EXT' specifies tha... | module Vulkan.Core10.Enums.ImageViewCreateFlagBits ( ImageViewCreateFlags
, ImageViewCreateFlagBits( IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DEFERRED_BIT_EXT
, IMAGE_VIEW_CREATE_DESCRIPTOR_BU... |
6c4a326f34088007e688f41b5299710f79c5f45b9c253d193fb999b625bd12ed | LaPingvino/Climacs | io.lisp | ;;; -*- Mode: Lisp; Package: CLIMACS-CORE -*-
( c ) copyright 2004 by
( )
( c ) copyright 2006 by
( )
;;; This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundati... | null | https://raw.githubusercontent.com/LaPingvino/Climacs/d5e45094b76dab0c716b2de7764a85e35e8bea4e/io.lisp | lisp | -*- Mode: Lisp; Package: CLIMACS-CORE -*-
This library is free software; you can redistribute it and/or
either
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
License... |
( c ) copyright 2004 by
( )
( c ) copyright 2006 by
( )
modify it under the terms of the GNU Library General Public
version 2 of the License , or ( at your option ) any later version .
Library General Public License for more details .
You should have received a copy of the ... |
891b95e229661056f89d34dfd3d8901f577c4038f875a43cd26a301e993581fd | adamwalker/clash-utils | MultiplierSpec.hs | module Arithmetic.MultiplierSpec where
import qualified Clash.Prelude as Clash
import Clash.Prelude (Signal, Vec(..), BitVector, Index, Signed, Unsigned, SFixed, Bit, SNat(..),
simulate, simulate_lazy, listToVecTH, KnownNat, pack, unpack, (++#), mealy, mux, bundle, unbundle,
... | null | https://raw.githubusercontent.com/adamwalker/clash-utils/96dbb94db9c2502687a6b909f8f6ff89da7c1eeb/tests/Arithmetic/MultiplierSpec.hs | haskell | module Arithmetic.MultiplierSpec where
import qualified Clash.Prelude as Clash
import Clash.Prelude (Signal, Vec(..), BitVector, Index, Signed, Unsigned, SFixed, Bit, SNat(..),
simulate, simulate_lazy, listToVecTH, KnownNat, pack, unpack, (++#), mealy, mux, bundle, unbundle,
... | |
0bc51cd5d3f65b2a00e59f15f16e86b967c085cff21bc6030f07e653d4cf6d22 | unisonweb/unison | Bytes.hs | # OPTIONS_GHC -fno - warn - orphans #
# OPTIONS_GHC -fno - warn - unused - top - binds #
module Unison.Util.Bytes
( Bytes (..),
Chunk,
fromByteString,
toByteString,
fromWord8s,
toWord8s,
fromBase16,
toBase16,
fromBase32,
toBase32,
fromBase64,
toBase64,
fromBase64UrlUnp... | null | https://raw.githubusercontent.com/unisonweb/unison/cf278f9fb66ccb9436bf8a2eb4ab03fc7a92021d/lib/unison-util-bytes/src/Unison/Util/Bytes.hs | haskell | # OPTIONS_GHC -fno - warn - orphans #
# OPTIONS_GHC -fno - warn - unused - top - binds #
module Unison.Util.Bytes
( Bytes (..),
Chunk,
fromByteString,
toByteString,
fromWord8s,
toWord8s,
fromBase16,
toBase16,
fromBase32,
toBase32,
fromBase64,
toBase64,
fromBase64UrlUnp... | |
1b80915f7da917b5806a8144c3350f8a502b9ef5db9132488580b48b3fd15b2d | namenu/advent-of-code | day08.clj | ;; --- Day 8: I Heard You Like Registers ---
(ns aoc.year2017.day08
(:require [clojure.string :as str]
[clojure.java.io :as io]))
(defmacro inst->expr [reg op value lhs pred rhs]
(let [m (gensym)]
`(fn [~m]
(if (~pred (~lhs ~m 0) ~rhs)
(update ~m ~reg (fnil ~op 0) ~value)
~... | null | https://raw.githubusercontent.com/namenu/advent-of-code/83f8cf05931f814dab76696bf46fec1bb1276fac/2017/clojure/src/aoc/year2017/day08.clj | clojure | --- Day 8: I Heard You Like Registers --- | (ns aoc.year2017.day08
(:require [clojure.string :as str]
[clojure.java.io :as io]))
(defmacro inst->expr [reg op value lhs pred rhs]
(let [m (gensym)]
`(fn [~m]
(if (~pred (~lhs ~m 0) ~rhs)
(update ~m ~reg (fnil ~op 0) ~value)
~m))))
(defn parse-inst [s]
(let [[reg op v... |
b79d73e08680c541e43d4b9135c3cff135e07696ec8a2ef4783dbfef88597205 | twosigma/waiter | async_request.clj | ;;
Copyright ( c ) Two Sigma Open Source , LLC
;;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;; -2.0
;;
;; Unless required by applicable law or agreed to in writing, software... | null | https://raw.githubusercontent.com/twosigma/waiter/6fd81abb42e004420df6fd6a6394cdf0e331fc07/waiter/src/waiter/async_request.clj | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permi... | Copyright ( c ) Two Sigma Open Source , LLC
distributed under the License is distributed on an " AS IS " BASIS ,
(ns waiter.async-request
(:require [clj-time.core :as t]
[clojure.core.async :as async]
[clojure.string :as str]
[clojure.tools.logging :as log]
[metrics... |
12f0574cc4c47441d0954acef3de5035e6488e6fdfa8f740eb1bc3536bc37e4b | RunOrg/RunOrg | key.ml | (* © 2014 RunOrg *)
open Std
module I = struct
include Id.Phantom
end
module Hash = type module
[ `SHA1 "SHA-1"
]
(* Events and event stream
======================= *)
module Events = type module
[ `Created of <
id : I.t ;
pid : PId.t option ;
ip : IpAddress.t ;
... | null | https://raw.githubusercontent.com/RunOrg/RunOrg/b53ee2357f4bcb919ac48577426d632dffc25062/server/key.ml | ocaml | © 2014 RunOrg
Events and event stream
=======================
Views and projections
=====================
Commands
========
Who is allowed to create new forms ?
Queries
======= |
open Std
module I = struct
include Id.Phantom
end
module Hash = type module
[ `SHA1 "SHA-1"
]
module Events = type module
[ `Created of <
id : I.t ;
pid : PId.t option ;
ip : IpAddress.t ;
hash : Hash.t ;
key : string >
]
module Store = Cqrs.Stream(str... |
ba3259fd0eed704ca069b3fdb74f02ddb8fd0f4fc4f4534d1368764f36ac2cd0 | Helium4Haskell/helium | ClassesErrors3.hs | class PrimaClass a
instance PrimaClass a where
| null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/typeClassesParse/ClassesErrors3.hs | haskell | class PrimaClass a
instance PrimaClass a where
| |
4b42fc547660c4c89cf10f0160e8bec5fe6bf72f510b1f0410476e99c8807b8d | clojure/tools.build | test_jar.clj | Copyright ( c ) . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; ... | null | https://raw.githubusercontent.com/clojure/tools.build/0563a69670437fb236df9c08d3cb74e1e378aefb/src/test/clojure/clojure/tools/build/tasks/test_jar.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) . All rights reserved .
(ns clojure.tools.build.tasks.test-jar
(:require
[clojure.string :as str]
[clojure.test :refer :all]
[clojure.java.io :as jio]
[clojure.tools.build.api :as api]
[clojure.tools.build.test-util :refer :all]
[clojure.tools.build.util.zip :as zip])
... |
878b092841cb68db7893ad5aaa2ebebd57074317251f6eb7b0194a9431f8870a | haskell/haskell-platform | Releases2016.hs | module Releases2016 where
import PlatformDB
import Types
releases2016 :: [Release]
releases2016 = [hp_8_0_1, hp_8_0_2]
hp_8_0_1 :: Release
hp_8_0_1 =
releaseWithMinimal "8.0.1"
[ incGHC "8.0.1"
, incGHCLib "Cabal" "1.24.0.0"
, incGHCLib "array"... | null | https://raw.githubusercontent.com/haskell/haskell-platform/6357fb6645782278f43fc8340bf46771f1c2768d/hptool/src/Releases2016.hs | haskell | , incTool "cabal-install" "1.25.0.0"
needed by OpenGL
, incTool "cabal-install" "1.25.0.0"
needed by OpenGL | module Releases2016 where
import PlatformDB
import Types
releases2016 :: [Release]
releases2016 = [hp_8_0_1, hp_8_0_2]
hp_8_0_1 :: Release
hp_8_0_1 =
releaseWithMinimal "8.0.1"
[ incGHC "8.0.1"
, incGHCLib "Cabal" "1.24.0.0"
, incGHCLib "array"... |
8aacd1d2642a455b56945ee009dd0852382364d90e2662b2cae6a125145f548b | kupl/VeriSmart-public | itvDom.ml | open Itv
open GTaint
open Lang
open Vocab
module Loc = struct
type t = id * typ
let compare (id1,t1) (id2,t2) = BatString.compare id1 id2
let of_var id t = (id,t)
let typ_of (id,t) = t
let to_string (id,t) = id
end
module Val = struct
type t = Itv.t * GTaint.t * BTaint.t
let itv_of (a,_,_) = a
let g... | null | https://raw.githubusercontent.com/kupl/VeriSmart-public/858af814fbdab0c9d85b758e4c4575402ebf2bdf/src/pre/interval/itvDom.ml | ocaml | for linearization purpose, taint values will not be used | open Itv
open GTaint
open Lang
open Vocab
module Loc = struct
type t = id * typ
let compare (id1,t1) (id2,t2) = BatString.compare id1 id2
let of_var id t = (id,t)
let typ_of (id,t) = t
let to_string (id,t) = id
end
module Val = struct
type t = Itv.t * GTaint.t * BTaint.t
let itv_of (a,_,_) = a
let g... |
bc00be50e573298102e1719d6802d71eab2256f494323b7bdb285ed391ed9f44 | cyverse-archive/DiscoveryEnvironmentBackend | errors.clj | (ns kifshare.errors
(:use hiccup.core
[kifshare.common :only [layout]]
[ring.util.response :only [status]])
(:require [cheshire.core :as cheshire]))
(def ERR_TICKET_EXPIRED "ERR_TICKET_EXPIRED")
(def ERR_TICKET_USED_UP "ERR_TICKET_USED_UP")
(def ERR_TICKET_NOT_FOUND "ERR_TICKET_NOT_FOUND")
(def ERR... | null | https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/services/kifshare/src/kifshare/errors.clj | clojure | (ns kifshare.errors
(:use hiccup.core
[kifshare.common :only [layout]]
[ring.util.response :only [status]])
(:require [cheshire.core :as cheshire]))
(def ERR_TICKET_EXPIRED "ERR_TICKET_EXPIRED")
(def ERR_TICKET_USED_UP "ERR_TICKET_USED_UP")
(def ERR_TICKET_NOT_FOUND "ERR_TICKET_NOT_FOUND")
(def ERR... | |
809c50f57bd7e3590edb84f0cebf2967cf10b2452653d00d1b422a24050b8d98 | paurkedal/ocaml-caqti | caqti_lwt.ml | Copyright ( C ) 2022 < >
*
* 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 3 of the License , or ( at your
* option ) any later version , with the ... | null | https://raw.githubusercontent.com/paurkedal/ocaml-caqti/eca8ecb9fe9679abd6881a4ea3a193a0b1ab1a81/caqti-lwt/lib/caqti_lwt.ml | ocaml | Copyright ( C ) 2022 < >
*
* 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 3 of the License , or ( at your
* option ) any later version , with the ... | |
66df81bc5230edb14bdcf451364e7ff7eb9d649db1d9a14571ab387a2d9e10b1 | AndrasKovacs/setoidtt | EvalInCxt.hs |
module EvalInCxt (
eval, forceF, forceFU, forceFUE, forceFUE', quote, vEq
, (Eval.$$), (Eval.$$$), Eval.vApp, Eval.vAppSE
, Eval.vProj1, Eval.vProj2, Eval.vProjField) where
import Common
import Cxt
import Syntax
import Values
import qualified Evaluation as Eval
eval :: Cxt -> Tm -> Val
eval cxt t = Eval.eva... | null | https://raw.githubusercontent.com/AndrasKovacs/setoidtt/621aef2c4ae5a6acb418fa1153575b21e2dc48d2/setoidtt/src/EvalInCxt.hs | haskell | # inline quote # |
module EvalInCxt (
eval, forceF, forceFU, forceFUE, forceFUE', quote, vEq
, (Eval.$$), (Eval.$$$), Eval.vApp, Eval.vAppSE
, Eval.vProj1, Eval.vProj2, Eval.vProjField) where
import Common
import Cxt
import Syntax
import Values
import qualified Evaluation as Eval
eval :: Cxt -> Tm -> Val
eval cxt t = Eval.eva... |
6d7a62323c76feae4d2cb7cf28a6f78eed0ccbae574e5166ea7bda6fba1664f0 | ngorogiannis/cyclist | ord_constraints.ml | open Lib
open Symbols
open MParser
module Tag = Tags.Elt
module Constraint = struct
type t = LT of (Tag.t * Tag.t) | LTE of (Tag.t * Tag.t)
let compare c c' =
match (c, c') with
| LT (t, t'), LT (t'', t''') | LTE (t, t'), LTE (t'', t''') ->
let fst = Tag.compare t t'' in
if not (Int.eq... | null | https://raw.githubusercontent.com/ngorogiannis/cyclist/c93a168d586b308ab2a2c730cd1b2375ab263167/src/generic/ord_constraints.ml | ocaml | open Lib
open Symbols
open MParser
module Tag = Tags.Elt
module Constraint = struct
type t = LT of (Tag.t * Tag.t) | LTE of (Tag.t * Tag.t)
let compare c c' =
match (c, c') with
| LT (t, t'), LT (t'', t''') | LTE (t, t'), LTE (t'', t''') ->
let fst = Tag.compare t t'' in
if not (Int.eq... | |
758ab5b0935c768a29e6d57db42326060cf308f0f24a9938cb9ed2a86b49493c | marick/specter-book-code | select_all.clj | (ns specter-reference.ch1.select-all
(:use com.rpl.specter com.rpl.specter.macros)
(:use midje.sweet commons.clojure.core))
(fact "all by itself is a no-op"
(select [ALL] [1 2 3 4]) => [1 2 3 4]
(fact "except that ALL blows up given a non-collection"
(select [ALL] 1) => (throws)))
(fact "Since ALL 'spread... | null | https://raw.githubusercontent.com/marick/specter-book-code/e416d4ce8164084057d36d29d89b17d114d1ab28/src/specter_reference/ch1/select_all.clj | clojure | (ns specter-reference.ch1.select-all
(:use com.rpl.specter com.rpl.specter.macros)
(:use midje.sweet commons.clojure.core))
(fact "all by itself is a no-op"
(select [ALL] [1 2 3 4]) => [1 2 3 4]
(fact "except that ALL blows up given a non-collection"
(select [ALL] 1) => (throws)))
(fact "Since ALL 'spread... | |
5e13f1629fa868b3116e149b72d185f7d8d05f6a6aa4eeb6db0a98150ff3fad7 | genenetwork/guix-bioinformatics | node.scm | (define-module (gn packages node)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix utils)
#:use-module (guix packages)
#:use-module (guix git-download)
#:use-module (guix build-system node)
#:use-module (gnu packages lisp-xyz)
#:use-module (gnu packages node-xyz))
(define-public node-a... | null | https://raw.githubusercontent.com/genenetwork/guix-bioinformatics/9e1e668e4f9f9e2b595620fda831da0525db4095/gn/packages/node.scm | scheme | ("node-events" ,node-events)
("node-jshint" ,node-jshint)
("node-knox" ,node-knox)
("node-mr" ,node-mr)
("node-opener" ,node-opener)
("node-q" ,node-q)
("node-q-io" ,node-q-io)
("node-saucelabs" ,node-saucelabs)
("node-wd" ,node-wd)
("node-weak-map" ,node-weak-map)
("node-benchmark" ,node-benchmark)
TODO: Unbundle fon... | (define-module (gn packages node)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix utils)
#:use-module (guix packages)
#:use-module (guix git-download)
#:use-module (guix build-system node)
#:use-module (gnu packages lisp-xyz)
#:use-module (gnu packages node-xyz))
(define-public node-a... |
15a8e25ea7534c31aa23670c94d4a61ab3cc6a30950cd5e35348390ce30bfae7 | eait-itig/rdp_proto | credssp.erl | %%
%% rdpproxy
%% remote desktop proxy
%%
Copyright 2012 - 2021 < >
The University of Queensland
%% All rights reserved.
%%
%% Redistribution and use in source and binary forms, with or without
%% modification, are permitted provided that the following conditions
%% are met:
1 . Redistributions of source code ... | null | https://raw.githubusercontent.com/eait-itig/rdp_proto/2b6ef3fa93fa7b3035933821a713f5607dea646b/src/credssp.erl | erlang |
rdpproxy
remote desktop proxy
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
notice, this list of conditions and the following disclaimer.
notice, this list of conditions and the followi... | Copyright 2012 - 2021 < >
The University of Queensland
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ` ` AS IS '' AND ANY EXPRESS OR
INCIDENTAL , SPECIAL , EXEMPLARY , OR CON... |
f6ed45871d3b4803781721b02094966388ccbb443dddb93eab28d6f9f592707e | basho/riak_sysmon | riak_sysmon_example_handler.erl | Copyright ( c ) 2011 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the License at
%%
%% -2.0
%%
%% Unless required by app... | null | https://raw.githubusercontent.com/basho/riak_sysmon/0ab94b3186ff67501b833543f0c3f52be5b7ca7a/src/riak_sysmon_example_handler.erl | erlang |
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
@doc A simple example for addi... | Copyright ( c ) 2011 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-modul... |
5faa54f1772634bf680a4cc2a3c21818b33b9b4306d7599f6ec9e0336903f0c7 | google/ormolu | gadt-out.hs | module Main where
-- | Foo.
data Foo a b where
-- | Something
Foo :: Foo Int Int
-- | Something else
Bar
:: Foo
Char
Char
| null | https://raw.githubusercontent.com/google/ormolu/ffdf145bbdf917d54a3ef4951fc2655e35847ff0/data/examples/declaration/data/field-layout/gadt-out.hs | haskell | | Foo.
| Something
| Something else | module Main where
data Foo a b where
Foo :: Foo Int Int
Bar
:: Foo
Char
Char
|
277845a9c4f1c74eafc89c0f13845c7dc4c9c422b723a6a61907b07c940c902c | dancrumb/clojure-brave-and-true | chapter8.clj | (ns clojure-brave-and-true.chapter8 (:gen-class))
(use 'clojure.pprint)
(def order-details
{:name "Mitchard Blimmons"
:email "mitchard.blimmonsgmail.com"})
(def order-details-validations
{:name
["Please enter a name" not-empty]
:email
["Please enter an email address" not-empty
"Your email addre... | null | https://raw.githubusercontent.com/dancrumb/clojure-brave-and-true/6ae47dcfc3274b6751156f54c486b0732d0e5edc/src/clojure_brave_and_true/chapter8.clj | clojure | (ns clojure-brave-and-true.chapter8 (:gen-class))
(use 'clojure.pprint)
(def order-details
{:name "Mitchard Blimmons"
:email "mitchard.blimmonsgmail.com"})
(def order-details-validations
{:name
["Please enter a name" not-empty]
:email
["Please enter an email address" not-empty
"Your email addre... | |
d64c335ac9f953bb7e63ae218297c40f5d0e9de91fd0acc7d0df8ebf99665e0b | echeran/clj-thamil | format.cljc | (ns clj-thamil.format
(:require [clojure.set :as set])
#?(:clj (:use clj-thamil.core)))
;;;;;;;;;;
;; letters
;;;;;;;;;;
(def letters [["ஃ" "அ" "ஆ" "இ" "ஈ" "உ" "ஊ" "எ" "ஏ" "ஐ" "ஒ" "ஓ" "ஔ"]
["க்" "க" "கா" "கி" "கீ" "கு" "கூ" "கெ" "கே" "கை" "கொ" "கோ" "கௌ"]
["ங்" "ங" "ஙா" "ஙி" "ஙீ" "ஙு" "... | null | https://raw.githubusercontent.com/echeran/clj-thamil/692a6d94329bb14cb58fb39b875792e5d774d2c4/src/clj_thamil/format.cljc | clojure |
letters
else
loop is like a procedural for loop or while loop
test if we've consumed our entire input string
test whether we have handled entire input string, or if
there are still chars still not fully processed
start next iteration
if adding the next character makes a prefix in trie no
longer in trie, th... | (ns clj-thamil.format
(:require [clojure.set :as set])
#?(:clj (:use clj-thamil.core)))
(def letters [["ஃ" "அ" "ஆ" "இ" "ஈ" "உ" "ஊ" "எ" "ஏ" "ஐ" "ஒ" "ஓ" "ஔ"]
["க்" "க" "கா" "கி" "கீ" "கு" "கூ" "கெ" "கே" "கை" "கொ" "கோ" "கௌ"]
["ங்" "ங" "ஙா" "ஙி" "ஙீ" "ஙு" "ஙூ" "ஙெ" "ஙே" "ஙை" "ஙொ" "ஙோ" "ஙௌ"... |
9b9e8a8b6b9dcf27555b1aa7e9ac52f0f96042084ae1636d6ed211f08c60ec7e | bytekid/mkbtt | quasiRootLabeling.ml | Copyright 2008 , Christian Sternagel ,
* GNU Lesser General Public License
*
* This file is part of TTT2 .
*
* TTT2 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 ve... | null | https://raw.githubusercontent.com/bytekid/mkbtt/c2f8e0615389b52eabd12655fe48237aa0fe83fd/src/processors/src/transformation/labeling/quasiRootLabeling.ml | ocaml | ** OPENS *******************************************************************
** TYPES *******************************************************************
** GLOBALS *****************************************************************
** FUNCTIONS ***************************************************************
Destructors... | Copyright 2008 , Christian Sternagel ,
* GNU Lesser General Public License
*
* This file is part of TTT2 .
*
* TTT2 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 ve... |
82e3d1f4d94937db2f12674222b60e33bc96135ff6b23890f4ac34c06b0effc5 | RedPRL/algaett | Quote.mli | val con : size:int -> Domain.t -> Syntax.t
val cut : size:int -> Domain.cut -> Syntax.t
| null | https://raw.githubusercontent.com/RedPRL/algaett/fb3b9dec5532ef59bcd7c3c5e0d28ab48a97a88d/src/nbe/Quote.mli | ocaml | val con : size:int -> Domain.t -> Syntax.t
val cut : size:int -> Domain.cut -> Syntax.t
| |
a1ffc89fc94da55cfa96cb4bf6949d58843221fe7b7864468ce2ceac0c9287cd | sid5432/cljotdr | datapts.clj | (ns cljotdr.datapts
(:require
[cljotdr.utils :refer :all]
[me.raynes.fs]
)
(:gen-class))
(def offset-type
method used by STV : minimum reading shifted to zero
method used by AFL / Noyes Trace . Net : maximum reading shifted to zero ( approx )
"STV" ; "AFL" or "STV"
)
(defn- xscale
"use x-axis ... | null | https://raw.githubusercontent.com/sid5432/cljotdr/26141424a889b347864b5170a6ad7f9085fceca7/src/cljotdr/datapts.clj | clojure | "AFL" or "STV"
doall
with-open
let
invert
cond
let
if dump
recur
let
do
if
loop
defn-
pass back
get block header
end let
end if
--- main parsing ------
let | (ns cljotdr.datapts
(:require
[cljotdr.utils :refer :all]
[me.raynes.fs]
)
(:gen-class))
(def offset-type
method used by STV : minimum reading shifted to zero
method used by AFL / Noyes Trace . Net : maximum reading shifted to zero ( approx )
)
(defn- xscale
"use x-axis scale of 0.1 for OFL250, ... |
c982f6384696d0ca5388206356e99ba8ff8a8bf3b3b1f2f88308d6e6fe4e2d5d | hiratara/Haskell-Nyumon-Sample | chap03-samples-3-6.hs | module Main (main) where
data TreeDict k v = TDEmpty
| TDNode k v (TreeDict k v) (TreeDict k v)
deriving (Show)
-- k(Ordの型制約)、v、TreeDict型を引数にTreeDict型を返す。
insert :: Ord k => k -> v -> TreeDict k v -> TreeDict k v
-- 第三引数のTreeDictの型でinsertの実装を分ける。
TDEmptyコンストラクタの場合 。
insert k v TD... | null | https://raw.githubusercontent.com/hiratara/Haskell-Nyumon-Sample/ac52b741e3b96722f6fc104cfa84078e39f7a241/chap03-samples/chap03-samples-3-6.hs | haskell | k(Ordの型制約)、v、TreeDict型を引数にTreeDict型を返す。
第三引数のTreeDictの型でinsertの実装を分ける。 | module Main (main) where
data TreeDict k v = TDEmpty
| TDNode k v (TreeDict k v) (TreeDict k v)
deriving (Show)
insert :: Ord k => k -> v -> TreeDict k v -> TreeDict k v
TDEmptyコンストラクタの場合 。
insert k v TDEmpty = TDNode k v TDEmpty TDEmpty
TDNodeコンストラクタの場合 。
insert k v (TDNode k'... |
c196cb669ae71d9a2fdd47b3d7fd1fabc44896cd0774e67a8eae54340a571143 | ftomassetti/civs | society.clj | (ns
^{:author ftomassetti}
civs.model.society
(:require [civs.model.core :refer :all]
[civs.model.language :refer :all]
[civs.logic.basic :refer :all])
(:import [civs.model.core Population Group Culture Game Population Settlement PoliticalEntity]))
See
;
;
; Societies evolve thr... | null | https://raw.githubusercontent.com/ftomassetti/civs/dc76bfff4241f67d4bc1081de3947a725ea75c39/src/civs/model/society.clj | clojure |
Societies evolve through these steps:
A Chiefdom can include different villages
A Civilization will have different forms
=============================================
Band society
=============================================
See
* it is the initial kind of society
A band can evolve into a trib... | (ns
^{:author ftomassetti}
civs.model.society
(:require [civs.model.core :refer :all]
[civs.model.language :refer :all]
[civs.logic.basic :refer :all])
(:import [civs.model.core Population Group Culture Game Population Settlement PoliticalEntity]))
See
1 ) : band Gatherer ... |
0d36bc272ca2d5f6714b251a1f157c332f66e1ddf199ddd15b34c641a72bdc5a | buildsome/buildsome | MagicFiles.hs | module Buildsome.MagicFiles
( inputIgnored, outputIgnored
, allowedUnspecifiedOutput
) where
import Prelude.Compat hiding (FilePath)
import Lib.FilePath (FilePath)
import qualified Data.ByteString.Char8 as BS8
specialFile :: FilePath -> Bool
specialFile path = any (`BS8.isPrefixOf` path) ["/dev", "/proc", "/sy... | null | https://raw.githubusercontent.com/buildsome/buildsome/479b92bb74a474a5f0c3292b79202cc850bd8653/src/Buildsome/MagicFiles.hs | haskell | module Buildsome.MagicFiles
( inputIgnored, outputIgnored
, allowedUnspecifiedOutput
) where
import Prelude.Compat hiding (FilePath)
import Lib.FilePath (FilePath)
import qualified Data.ByteString.Char8 as BS8
specialFile :: FilePath -> Bool
specialFile path = any (`BS8.isPrefixOf` path) ["/dev", "/proc", "/sy... | |
609ef6654b2240a63c281f9440c52928d5e37ce7ed2df00d2a350b11bdf8d1e6 | Cantido/clj-bittorrent | hash.clj | (ns clj-bittorrent.math.hash
"Hashing functions."
(:require [schema.core :as schema]
[clj-bittorrent.math.binary :as bin])
(:import (java.security MessageDigest)))
(def Sha1Hash
(schema/constrained bin/ByteArray #(= 20 (count %))))
(schema/defn sha1 :- Sha1Hash
"Hash a byte array with SHA-1."
... | null | https://raw.githubusercontent.com/Cantido/clj-bittorrent/5fea93e318f9d07e4bbee6aced12e10ae0f46f2a/src/clj_bittorrent/math/hash.clj | clojure | (ns clj-bittorrent.math.hash
"Hashing functions."
(:require [schema.core :as schema]
[clj-bittorrent.math.binary :as bin])
(:import (java.security MessageDigest)))
(def Sha1Hash
(schema/constrained bin/ByteArray #(= 20 (count %))))
(schema/defn sha1 :- Sha1Hash
"Hash a byte array with SHA-1."
... | |
dd0345bd4cbc56b376d51b2199c673cbaa7d33065791ba4758c5ab6efbfce6cc | ucsd-progsys/mist | assume.hs | a as Int
a = True
| null | https://raw.githubusercontent.com/ucsd-progsys/mist/0a9345e73dc53ff8e8adb8bed78d0e3e0cdc6af0/tests/Tests/Integration/pos/assume.hs | haskell | a as Int
a = True
| |
2215da96f086c4ae7037ced26c1cca42c57e595718cc47068c77787aa09424fc | herbelin/coq-hh | smartlocate.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/herbelin/coq-hh/296d03d5049fea661e8bdbaf305ed4bf6d2001d2/interp/smartlocate.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
This file provides high-level name ... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Created by from code form... |
de6ff3757ebb7548fd8fb0d0c3f6060e9a1b459bccb57603b5e5f41e82a0c77c | digitallyinduced/ihp | Redirect.hs | |
Module : IHP.Controller . Redirect
Description : redirect helpers
Copyright : ( c ) digitally induced GmbH , 2020
Module: IHP.Controller.Redirect
Description: redirect helpers
Copyright: (c) digitally induced GmbH, 2020
-}
module IHP.Controller.Redirect
( redirectTo
, redirectToPath
, redirectToUrl
, redirect... | null | https://raw.githubusercontent.com/digitallyinduced/ihp/ca4691970a130a1589506c66fe8257ac8670e905/IHP/Controller/Redirect.hs | haskell | | Redirects to an action
__Example:__
> redirectTo ShowProjectAction { projectId = get #id project }
Use 'redirectToPath' if you want to redirect to a non-action url.
TODO: redirectTo user
| Redirects to a path (given as a string)
__Example:__
> redirectToPath "/blog/wp-login.php"
Use 'redirectTo' if you... | |
Module : IHP.Controller . Redirect
Description : redirect helpers
Copyright : ( c ) digitally induced GmbH , 2020
Module: IHP.Controller.Redirect
Description: redirect helpers
Copyright: (c) digitally induced GmbH, 2020
-}
module IHP.Controller.Redirect
( redirectTo
, redirectToPath
, redirectToUrl
, redirect... |
7ace64ac166df026e2ec20dce51ed58e7e77e13dec2c04db410e57043ea520b2 | korya/efuns | interactive.ml | (***********************************************************************)
(* *)
xlib for
(* *)
Fabrice Le Fessant , projet Para / SOR , INRIA Rocq... | null | https://raw.githubusercontent.com/korya/efuns/78b21d9dff45b7eec764c63132c7a564f5367c30/efuns/interactive.ml | ocaml | *********************************************************************
... | xlib for
Fabrice Le Fessant , projet Para / SOR , INRIA Rocquencourt
Copyright 1998 Institut National de Recherche en Informatique et
Automatique . Distributed only by permission .
open Efuns
open Text
open Frame
open Simple
open Select
open... |
d5d054443985812c764aa63db92a362fe2c4e71b83372e65f47b700e4231b7c6 | jafingerhut/thalia | project.clj | (defproject thalia "0.2.0-SNAPSHOT"
:description "Documentation for Clojure functions, macros, protocols, vars"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.10.0"]]
;;:dependencies [[org.clojure/clojure "1.10.0-master-SNAPSHOT"]]
Vers... | null | https://raw.githubusercontent.com/jafingerhut/thalia/20c98eec8168ff72c5b3965cc048b817d34a4583/project.clj | clojure | :dependencies [[org.clojure/clojure "1.10.0-master-SNAPSHOT"]]
These are fixed with this PR:
Version 0.2.4 of org.clojure/data.int-map causes some test
failures. These are fixed with the patch proposed on this
These are fixed with the patch proposed on this ticket:
-10
The following line interferes with creating... | (defproject thalia "0.2.0-SNAPSHOT"
:description "Documentation for Clojure functions, macros, protocols, vars"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.10.0"]]
Version 1.5.7 of org.flatland/ordered causes some test failures .
-co... |
de08d04b2aef302a68d40073e81b1632b0ec3148c6ff8ec7500754cebab21296 | CarlWright/NGerlguten | eg_font_16.erl | -module(eg_font_16).
-export([width/1, kern/2, fontName/0, firstChar/0,lastChar/0]).
-export([index/0,ascender/0,capHeight/0,descender/0,italicAngle/0]).
-export([xHeight/0, flags/0, type/0, stemV/0,fontBBox/0,widths/0]).
-export([encoding/0]).
fontName() -> "OCR-A-Digits".
index() -> 16.
type() -> external.
encoding()... | null | https://raw.githubusercontent.com/CarlWright/NGerlguten/3c87f2e3a44ae9069f9379933b99c0feb8262d66/lib/ngerlguten/src/eg_font_16.erl | erlang | -module(eg_font_16).
-export([width/1, kern/2, fontName/0, firstChar/0,lastChar/0]).
-export([index/0,ascender/0,capHeight/0,descender/0,italicAngle/0]).
-export([xHeight/0, flags/0, type/0, stemV/0,fontBBox/0,widths/0]).
-export([encoding/0]).
fontName() -> "OCR-A-Digits".
index() -> 16.
type() -> external.
encoding()... | |
16da18b68af3c3492236f97a1d75e841db02347d03305f0849bac31cd2a540e6 | mstksg/inCode | doc.hs | #!/usr/bin/env stack
-- stack --install-ghc ghci --resolver lts-16 --package prettyprinter
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
import qualified Data.Text.Prettyprint.Doc as PP
data Schema =
RecordType [Field]
| SumType [Choice]
| SchemaLeaf Primitive
deriving Show... | null | https://raw.githubusercontent.com/mstksg/inCode/e1f80a3dfd83eaa2b817dc922fd7f331cd1ece8a/code-samples/functor-structures/doc.hs | haskell | stack --install-ghc ghci --resolver lts-16 --package prettyprinter
# LANGUAGE OverloadedStrings #
^ name
^ schema | #!/usr/bin/env stack
# LANGUAGE LambdaCase #
import qualified Data.Text.Prettyprint.Doc as PP
data Schema =
RecordType [Field]
| SumType [Choice]
| SchemaLeaf Primitive
deriving Show
data Field = Field
{ fieldName :: String
, fieldValue :: Schema
}
deriving Show
data Ch... |
f1bf651bf38282658046aec3f10f065123100cd8c4e3c8e3e5f634c3edb9eae1 | erlymon/erlymon | erlymon_sup.erl | %%%-------------------------------------------------------------------
@author
( C ) 2015 , < >
%%% @doc
Erlymon is an open source GPS tracking system for various GPS tracking devices .
%%%
Copyright ( C ) 2015 , < > .
%%%
This file is part of Erlymon .
%%%
Erlymon is free software : yo... | null | https://raw.githubusercontent.com/erlymon/erlymon/2250619783d6da1e33a502911a8fa52ce016c094/apps/erlymon/src/erlymon_sup.erl | erlang | -------------------------------------------------------------------
@doc
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
along with this program. If not, see </>.
@end
-------------------------------------------------------... | @author
( C ) 2015 , < >
Erlymon is an open source GPS tracking system for various GPS tracking devices .
Copyright ( C ) 2015 , < > .
This file is part of Erlymon .
Erlymon is free software : you can redistribute it and/or modify
it under the terms of the GNU Affero General Publ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.