_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 |
|---|---|---|---|---|---|---|---|---|
b89858a6c4dd44e7a69953c56f4b30990b8003f57c9e1b1798d8de368e7af141 | melange-re/melange | a.ml | let x = Other.t
let t = 1
| null | https://raw.githubusercontent.com/melange-re/melange/d32fb9a210790274f37632b4b5b0d699e9c554fa/test/dune-melange-mode-unwrapped.t/libA/a.ml | ocaml | let x = Other.t
let t = 1
| |
45b336951bf5314bb835a3ba31f4e41f3e736c91ea64a42e0f9c5d16724c287d | ocaml/merlin | from_a_pattern.ml | module Blah = struct
type t =
| A
| B
end
let f = function
| Blah.Q -> ()
| null | https://raw.githubusercontent.com/ocaml/merlin/e576bc75f11323ec8489d2e58a701264f5a7fe0e/tests/test-dirs/locate/context-detection/cd-from_a_pattern.t/from_a_pattern.ml | ocaml | module Blah = struct
type t =
| A
| B
end
let f = function
| Blah.Q -> ()
| |
0ee6b850619a007e130d087fbb859411e00df9a07cb9461de2fff8cb6dba9b08 | haskell/hackage-security | Local.hs | -- | Local repository
module Hackage.Security.Client.Repository.Local (
LocalRepo
, LocalFile -- opaque
, withRepository
) where
import MyPrelude
import Hackage.Security.Client.Formats
import Hackage.Security.Client.Repository
import Hackage.Security.Client.Repository.Cache
import Hackage.Security.Client.Ver... | null | https://raw.githubusercontent.com/haskell/hackage-security/745b294e8cda2b46a21a6d1766a87f699a0277a8/hackage-security/src/Hackage/Security/Client/Repository/Local.hs | haskell | | Local repository
opaque
| Location of the repository
Note that we regard the local repository as immutable; we cache files just
like we do for remote repositories.
| Initialize the repository (and cleanup resources afterwards)
the local repository interprets it relative to a local directory.
It uses the sa... | module Hackage.Security.Client.Repository.Local (
LocalRepo
, withRepository
) where
import MyPrelude
import Hackage.Security.Client.Formats
import Hackage.Security.Client.Repository
import Hackage.Security.Client.Repository.Cache
import Hackage.Security.Client.Verify
import Hackage.Security.TUF
import Hackage... |
25fc3846ed909d8544494276a0c28c4068ee7351d3349fdb095467a5f822c1ed | zxymike93/SICP | 342.rkt | ;; Original version
(define (make-account balance)
;; ...
(let ((protected (make-serializer)))
(define (dispatch m)
(cond ((eq? m 'withdraw) (protected withdraw))
((eq? m 'deposit) (protected deposit))
;; ...
))))
's version
(define (make-account balance)
;; ...
... | null | https://raw.githubusercontent.com/zxymike93/SICP/9d8e84d6a185bf4d7f28c414fc3359741384beb5/chapter3/342.rkt | racket | Original version
...
...
...
...
典型的 usage 如下(进行对 (make-account) 的并行计算) | (define (make-account balance)
(let ((protected (make-serializer)))
(define (dispatch m)
(cond ((eq? m 'withdraw) (protected withdraw))
((eq? m 'deposit) (protected deposit))
))))
's version
(define (make-account balance)
(let ((protected (make-serializer)))
(let ((protecte... |
e44f095f7029f4b7d5b40db7ceee22bda2abf4365ca044829da23ab5d51f6f1b | kar7hik/mfcc | audio-io.lisp | (in-package #:mfcc)
;;; Wave Class
(defclass wave-signal ()
((duration :initarg :duration
:initform *seconds*
:accessor duration
:type 'single-float)
(sample-rate :initarg :sample-rate
:initform *sample-rate*
:accessor sample-rate
... | null | https://raw.githubusercontent.com/kar7hik/mfcc/26852ec7e7ffb6cfd78fb11fbe64ddb0c390a406/src/audio-io/audio-io.lisp | lisp | Wave Class
Wave Header
fmt subchunk:
Initialization
Initialization
Record audio
(save-to-file audio-filename source-buffer)
Wave Generate - User API
For testing | (in-package #:mfcc)
(defclass wave-signal ()
((duration :initarg :duration
:initform *seconds*
:accessor duration
:type 'single-float)
(sample-rate :initarg :sample-rate
:initform *sample-rate*
:accessor sample-rate
:type 'dou... |
2b1c3546cf1ad7ecc2ede956a1b431f182d939d00749ad89169bc169010fc961 | myShoggoth/deckbuilder | CardsSpec.hs | # LANGUAGE DataKinds #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleContexts #
# LANGUAGE NoMonomorphismRestriction #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE OverloadedLabels #-}
module Dominion.CardsSpec
( spec
) where
import Control.Lens ( (^... | null | https://raw.githubusercontent.com/myShoggoth/deckbuilder/48462901e9389f32b6e6f4a63c550230ed11fdc5/test/Dominion/CardsSpec.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE OverloadedLabels # | # LANGUAGE DataKinds #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleContexts #
# LANGUAGE NoMonomorphismRestriction #
module Dominion.CardsSpec
( spec
) where
import Control.Lens ( (^.), (^?), Ixed(ix) )
import Control.Monad.State ( execState )
import Data.Generics.Pro... |
57f806156e61688d1698d49cd8359d9f89bebc1764b0e9ba8db81bb1ae00a8d9 | fabricate-site/fabricate | sketch.clj | (ns site.fabricate.sketch
"Namespace for mapping out concepts that are not yet prototypes.
Highly experimental, subject to arbitrary changes."
(:require
[malli.core :as m]
[malli.error :as me]
[malli.util :as mu]
[hiccup2.core :as hiccup]
[site.fabricate.prototype.read :as read]
[site.fabricate.... | null | https://raw.githubusercontent.com/fabricate-site/fabricate/3b82946fd8d4b7295cd4805572fcb8ca1130ed65/src/site/fabricate/sketch.clj | clojure | optional keys could be used in a state machine
e.g. when a value for the key is assoc'd into the map,
perform an action
enumerating the cases in a data structure
rather than in a function
function dispatch on the results of m/parse
assoc-ing new functions into maps like the one above is
how users could potentia... | (ns site.fabricate.sketch
"Namespace for mapping out concepts that are not yet prototypes.
Highly experimental, subject to arbitrary changes."
(:require
[malli.core :as m]
[malli.error :as me]
[malli.util :as mu]
[hiccup2.core :as hiccup]
[site.fabricate.prototype.read :as read]
[site.fabricate.... |
6246b2a5bf13dca22949c2ca1ac761b3130b8c3a7c82f0ca4ef47b08cd2c265c | NorfairKing/writing-a-text-editor-in-haskell-with-brick | Tui.hs | {-# LANGUAGE OverloadedStrings #-}
module Tui where
import System.Directory
import Brick.AttrMap
import Brick.Main
import Brick.Types
import Brick.Util
import Brick.Widgets.Border
import Brick.Widgets.Center
import Brick.Widgets.Core
import Control.Monad
import Cursor.Brick.TextField
import Cursor.TextField
import C... | null | https://raw.githubusercontent.com/NorfairKing/writing-a-text-editor-in-haskell-with-brick/b1b87b8e39274b0ee93865814cc269769429221a/text-editor/src/Tui.hs | haskell | # LANGUAGE OverloadedStrings #
TODO: Implement Undo
TODO: Go to next line if at end of line and press right
TODO: duplicate line
TODO: Copy-pasting
TODO: replace mode
TODO: move to end of line
TODO: move to end of word
TODO: uppercase mode
TODO: uppercase current char
TODO: uppercase current word |
module Tui where
import System.Directory
import Brick.AttrMap
import Brick.Main
import Brick.Types
import Brick.Util
import Brick.Widgets.Border
import Brick.Widgets.Center
import Brick.Widgets.Core
import Control.Monad
import Cursor.Brick.TextField
import Cursor.TextField
import Cursor.Types
import Data.Maybe
impor... |
ec7338dc39585e90e89b473e1e5924e83acfdc748f3898e2a9c20c27d48a09c3 | mrkkrp/zip | Main.hs | # LANGUAGE CPP #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# OPTIONS_GHC -fno - warn - orphans #
module Main (main) where
import Codec.Archive.Zip
import Codec.Archive.Zip.CP437
import Codec.Archive.Zip.Unix
import Control.Monad
import Control.Monad.IO.Class
import Data... | null | https://raw.githubusercontent.com/mrkkrp/zip/2afd5b6cd6d6786a3f528495b80a51d42a77331f/tests/Main.hs | haskell | # LANGUAGE OverloadedStrings #
of data locally is problematic and even more problematic on CI.
--------------------------------------------------------------------------
Arbitrary instances and generators
ORMOLU_DISABLE
--------------------------------------------------------------------------
Pure operations and ... | # LANGUAGE CPP #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# OPTIONS_GHC -fno - warn - orphans #
module Main (main) where
import Codec.Archive.Zip
import Codec.Archive.Zip.CP437
import Codec.Archive.Zip.Unix
import Control.Monad
import Control.Monad.IO.Class
import Data.Bits
import Data.ByteString (ByteS... |
1615dae2c827a1cabd1a53e6fd391ef52af7d23c615c08ce0cd54cba2a7a09ee | fujita-y/ypsilon | library.scm | Copyright ( c ) 2004 - 2022 Yoshikatsu Fujita / LittleWing Company Limited .
;;; See LICENSE file for terms and conditions of use.
(define scheme-library-paths (make-parameter '()))
(define scheme-library-exports (make-parameter (make-core-hashtable)))
(define scheme-library-versions (make-parameter (make-core-hasht... | null | https://raw.githubusercontent.com/fujita-y/ypsilon/41a29dd26b4e958f584a403cbc6ff96a48470a85/heap/boot/macro/library.scm | scheme | See LICENSE file for terms and conditions of use. | Copyright ( c ) 2004 - 2022 Yoshikatsu Fujita / LittleWing Company Limited .
(define scheme-library-paths (make-parameter '()))
(define scheme-library-exports (make-parameter (make-core-hashtable)))
(define scheme-library-versions (make-parameter (make-core-hashtable)))
(define exact-nonnegative-integer? (lambda (o... |
bed534f1e670549353820d564c08665226d40e81ed2cbc22dcf4a87863d35ff5 | agda/agda | Debug.hs |
module Agda.TypeChecking.Monad.Debug
( module Agda.TypeChecking.Monad.Debug
, Verbosity, VerboseKey, VerboseLevel
) where
import qualified Control.Exception as E
import qualified Control.DeepSeq as DeepSeq (force)
import Control.Applicative ( liftA2 )
import Control.Monad.IO.Class ( MonadIO(..) ... | null | https://raw.githubusercontent.com/agda/agda/42e7b7e2e0a3c6c8e60b9b7670179fd962d2cbfe/src/full/Agda/TypeChecking/Monad/Debug.hs | haskell | # SOURCE #
# SOURCE #
| Print brackets around debug messages issued by a computation.
| Check whether we are currently debug printing.
| Flag in a computation that we are currently debug printing.
default implementation of transformed debug monad
Default implementations (working around the restriction to only
| P... |
module Agda.TypeChecking.Monad.Debug
( module Agda.TypeChecking.Monad.Debug
, Verbosity, VerboseKey, VerboseLevel
) where
import qualified Control.Exception as E
import qualified Control.DeepSeq as DeepSeq (force)
import Control.Applicative ( liftA2 )
import Control.Monad.IO.Class ( MonadIO(..) ... |
59062d30f88ee5ba26027ccf04bbb147cc995105e919b3a9838ade5ae9a655b6 | thheller/shadow-cljs | browser_test.clj | (ns shadow.build.targets.browser-test
(:refer-clojure :exclude (compile flush resolve))
(:require
[shadow.build :as build]
[shadow.build.modules :as modules]
[shadow.build.classpath :as cp]
[shadow.build.targets.browser :as browser]
[shadow.cljs.util :as util]
[hiccup.page :refer (html5)]
... | null | https://raw.githubusercontent.com/thheller/shadow-cljs/ba0a02aec050c6bc8db1932916009400f99d3cce/src/main/shadow/build/targets/browser_test.clj | clojure | meh, should not be writing this file. use a handler instead.
always
FIXME: can't yet dynamically inject the http-root config
need a proper way to use worker lifecycle for "extended" services
so a worker can start its own services
:http-root test-dir
since :configure is only called once in :dev
we delay setting ... | (ns shadow.build.targets.browser-test
(:refer-clojure :exclude (compile flush resolve))
(:require
[shadow.build :as build]
[shadow.build.modules :as modules]
[shadow.build.classpath :as cp]
[shadow.build.targets.browser :as browser]
[shadow.cljs.util :as util]
[hiccup.page :refer (html5)]
... |
3572c05cfdac561e7cd19163b0c26c2db353b9b1ccbd59c62b0d0987cebf80fb | karamellpelle/grid | Fancy.hs | grid is a game written in Haskell
Copyright ( C ) 2018
--
-- This file is part of grid.
--
-- grid is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
-- (at your optio... | null | https://raw.githubusercontent.com/karamellpelle/grid/56729e63ed6404fd6cfd6d11e73fa358f03c386f/source/Game/LevelPuzzle/LevelPuzzleWorld/OutputState/Fancy.hs | haskell |
This file is part of grid.
grid is free software: you can redistribute it and/or modify
(at your option) any later version.
grid is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GN... | grid is a game written in Haskell
Copyright ( C ) 2018
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
module Game.LevelPuzzle.LevelPuzzleWorld.OutputStat... |
e5568f13e1f7c3ecf9d3d9cab16403fa362d494102392d4dd37bd50be7cf077c | haskell-cryptography/libsodium-bindings | Comparison.hs | # LANGUAGE CApiFFI #
# LANGUAGE Trustworthy #
| Module : LibSodium . Bindings . Comparison
-- Description: Helper functions for constant-time comparison
Copyright : ( C ) 2022
-- License: BSD-3-Clause
-- Maintainer:
-- Stability: Stable
Portability : GHC only
--
-- Secure comparison functions, designed to run... | null | https://raw.githubusercontent.com/haskell-cryptography/libsodium-bindings/127113199e7b3f91305cc34b169b06a2622d65da/libsodium-bindings/src/LibSodium/Bindings/Comparison.hs | haskell | Description: Helper functions for constant-time comparison
License: BSD-3-Clause
Maintainer:
Stability: Stable
Secure comparison functions, designed to run in constant time for a given
input length.
| Compares the given amount of bytes at the given locations for equality.
Constant-time for any given length.
... | # LANGUAGE CApiFFI #
# LANGUAGE Trustworthy #
| Module : LibSodium . Bindings . Comparison
Copyright : ( C ) 2022
Portability : GHC only
module LibSodium.Bindings.Comparison
( sodiumMemcmp
, sodiumIsZero
)
where
import Foreign.C.Types (CInt (CInt), CSize (CSize), CUChar)
import Foreign.Ptr (Ptr)
@sin... |
2a370cb4a983ebbbfa12024798b14951a1ab79a03dbaf2384f8ea2d63b02b1ef | sirherrbatka/vellum | conditions.lisp | (cl:in-package #:vellum)
(define-condition row-cant-be-created
(more-conditions:chainable-condition)
())
(define-condition file-input-row-cant-be-created
(row-cant-be-created cl-ds:file-releated-error)
())
| null | https://raw.githubusercontent.com/sirherrbatka/vellum/7f31e9d17aa7dd9bf5acfcac47ca6f85a05dbbd6/src/api/conditions.lisp | lisp | (cl:in-package #:vellum)
(define-condition row-cant-be-created
(more-conditions:chainable-condition)
())
(define-condition file-input-row-cant-be-created
(row-cant-be-created cl-ds:file-releated-error)
())
| |
d277e85a33676595bd2436d15128c99ffafd2435934f59dfb7bfc1528b8c7c88 | elukey/ErlangTW | lcg.erl | %
% This file is part of ErlangTW. ErlangTW is free software: you can
% redistribute it and/or modify it under the terms of the GNU General Public
License as published by the Free Software Foundation , version 2 .
%
% This program is distributed in the hope that it will be useful, but WITHOUT
% ANY WARRANTY; without... | null | https://raw.githubusercontent.com/elukey/ErlangTW/1ac00f179ee761c5a0c7512815b7a6b792614b79/src/lcg.erl | erlang |
This file is part of ErlangTW. ErlangTW is free software: you can
redistribute it and/or modify it under the terms of the GNU General Public
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR ... | License as published by the Free Software Foundation , version 2 .
You should have received a copy of the GNU General Public License along with
this program ; if not , write to the Free Software Foundation , Inc. , 51
Franklin Street , Fifth Floor , Boston , USA .
Copyright 2012 , , ,
Computer Sci... |
fa75d64285124729dfa7ca9c1325a28442a025f1686a02c3840a479012c881eb | dtgoitia/civil-autolisp | AutoLoadTest.lsp | (defun c:xx ()
; Trigger
(DT:AutoLoadFileFromCivilTemp "AutoLoadTest.lsp")
(c:1)
v0.0 - 2017.07.25 - First issue
Author :
Last revision : 2017.07.25
)
(defun c:1 () (princ "\nI'm alive!")(princ))
| null | https://raw.githubusercontent.com/dtgoitia/civil-autolisp/72d68139d372c84014d160f8e4918f062356349f/Dump%20folder/AutoLoadTest.lsp | lisp | Trigger | (defun c:xx ()
(DT:AutoLoadFileFromCivilTemp "AutoLoadTest.lsp")
(c:1)
v0.0 - 2017.07.25 - First issue
Author :
Last revision : 2017.07.25
)
(defun c:1 () (princ "\nI'm alive!")(princ))
|
1e0442a630515388a1830669dea2a15dfef0118f643f2b5ae3fe301809d34834 | lilyball/projecteuler-ocaml | prob20.ml |
n ! means n x ( n - 1 ) x ... x 3 x 2 x 1
Find the sum of the digits in the number 100 !
n! means n x (n - 1) x ... x 3 x 2 x 1
Find the sum of the digits in the number 100!
*)
open Big_int
let fact_big_int i =
let rec fact_big_int_aux i acc =
if i = 0 then acc
else fact_big_int_au... | null | https://raw.githubusercontent.com/lilyball/projecteuler-ocaml/a88ed8355b565ad0726cfcac4916d2b80512da7a/prob20.ml | ocaml |
n ! means n x ( n - 1 ) x ... x 3 x 2 x 1
Find the sum of the digits in the number 100 !
n! means n x (n - 1) x ... x 3 x 2 x 1
Find the sum of the digits in the number 100!
*)
open Big_int
let fact_big_int i =
let rec fact_big_int_aux i acc =
if i = 0 then acc
else fact_big_int_au... | |
9ecd20d43a51a8144cb98a1b18af098bc44403167e6065a96f0af5acfe65d498 | otakar-smrz/elixir-fm | E.hs |
module Elixir.Data.Sunny.Complex.E (section) where
import Elixir.Lexicon
lexicon = include section
cluster_1 = cluster
|> "^s b b" <| [
FaCL `verb` {- <^sabb> -} [ unwords [ ['g','r','o','w'], ['u','p'] ] ]
`imperf` FiCL
... | null | https://raw.githubusercontent.com/otakar-smrz/elixir-fm/fae5bab6dd53c15d25c1e147e7787b2c254aabf0/Haskell/ElixirFM/Elixir/Data/Sunny/Complex/E.hs | haskell | <^sabb>
<^sabb>
<^sabb>
<^sabbab>
<ta^sabbab>
<^sabb>
<^sabAb>
<^sabAbIy>
<^subUb>
<^sabbAbaT>
<^sAbb>
<^sAbb>
<^sabb>
<^sAbbaT>
<^sabbaT>
<^sabA>
<^sUbayr>
<^satt>
<^sattat>
<ta^sattat>
<^satt>
<^sattY>
<^satAt>
<ta^stIt>
<^satA>
<^sattY>
<ta^sattY>
<^sitA'>
<^s... |
module Elixir.Data.Sunny.Complex.E (section) where
import Elixir.Lexicon
lexicon = include section
cluster_1 = cluster
|> "^s b b" <| [
`imperf` FiCL
`pfirst` FaCaL
`masdar` FaCAL
... |
a242933549f50a4615285cd0736bb9b0059b2cf378781eb285aedeac359685c6 | TerrorJack/ghc-alter | length001.hs |
module Main (main) where
import Data.List
main :: IO ()
main = do print (genericLength [1..10000000] :: Int)
print (genericLength [1..10000000] :: Integer)
| null | https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/boot-lib/base/tests/length001.hs | haskell |
module Main (main) where
import Data.List
main :: IO ()
main = do print (genericLength [1..10000000] :: Int)
print (genericLength [1..10000000] :: Integer)
| |
2f08d324b6799168b3680d695c4fe2b1ec10d58f07bf7618aab99ba9b8ab25c8 | nikita-volkov/rebase | Trans.hs | module Rebase.Control.Monad.Trans
(
module Control.Monad.Trans
)
where
import Control.Monad.Trans
| null | https://raw.githubusercontent.com/nikita-volkov/rebase/7c77a0443e80bdffd4488a4239628177cac0761b/library/Rebase/Control/Monad/Trans.hs | haskell | module Rebase.Control.Monad.Trans
(
module Control.Monad.Trans
)
where
import Control.Monad.Trans
| |
7057b53aac71fe0036ffc384dabd88253c65039ee34765fb40db8d2b6bb2688b | marigold-dev/easier-proofs | list.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2021 Marigold < >
(* ... | null | https://raw.githubusercontent.com/marigold-dev/easier-proofs/1fd7d36e3a41d1c2bdb85dcdfb834a0966b2dfcf/examples/list/list.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2021 Marigold < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER ... |
ea44a08f02fa2d2c761455113b3cc2008e6607eccd5b7f0bcbeaecb84b00dd1b | lesguillemets/sicp-haskell | 1.42.hs | module OneFortytwo where
compose' = (.)
-- just kidding ...
compose :: (b -> c) -> (a -> b) -> a -> c
compose f g x = f (g x)
| ( ( compose square inc ) 6 )
> > > compose ( ^2 ) succ $ 6
49
| null | https://raw.githubusercontent.com/lesguillemets/sicp-haskell/df524a1e28c45fb16a56f539cad8babc881d0431/exercise/chap01/sect3/1.42.hs | haskell | just kidding ... | module OneFortytwo where
compose' = (.)
compose :: (b -> c) -> (a -> b) -> a -> c
compose f g x = f (g x)
| ( ( compose square inc ) 6 )
> > > compose ( ^2 ) succ $ 6
49
|
1ac14549ab2ce7b58434a6a119ffacc64fe6f2201bfd2d244ed386618e165c19 | Ptival/yugioh | BlueEyesWhiteDragon.hs | -- | An iconic card, the Blue Eyes White Dragon.
module YuGiOh.Card.BlueEyesWhiteDragon
( blueEyesWhiteDragon,
)
where
import YuGiOh.Attribute
import YuGiOh.Card
import YuGiOh.Type
blueEyesWhiteDragon :: Card
blueEyesWhiteDragon =
Card
{ _name = "Blue Eyes White Dragon",
_attribute = Light,
_lev... | null | https://raw.githubusercontent.com/Ptival/yugioh/855e8f22c3ff322c7ca1d0a1fa96c50a54724aeb/lib/YuGiOh/Card/BlueEyesWhiteDragon.hs | haskell | | An iconic card, the Blue Eyes White Dragon. | module YuGiOh.Card.BlueEyesWhiteDragon
( blueEyesWhiteDragon,
)
where
import YuGiOh.Attribute
import YuGiOh.Card
import YuGiOh.Type
blueEyesWhiteDragon :: Card
blueEyesWhiteDragon =
Card
{ _name = "Blue Eyes White Dragon",
_attribute = Light,
_level = 8,
_monsterType = Dragon,
_descr... |
6dda2c9218c3710fc9eb83e302981e2d79b1fc556e4e6c6f3fd02ebd30b48628 | yuriy-chumak/ol | file-chooser-dialog.scm | (define-library (lib gtk-3 file-chooser-dialog)
(export
GtkFileChooserDialog*
gtk_file_chooser_dialog_new
gtk_file_chooser_dialog_new_with_backend
(exports (lib gtk-3 window))
(exports (lib gtk-3 file-chooser))
)
(import
(scheme core)
(otus ffi)
(lib gtk-3 wind... | null | https://raw.githubusercontent.com/yuriy-chumak/ol/535c92c3898cacd31d0d5c90906add622cebbdfe/libraries/lib/gtk-3/file-chooser-dialog.scm | scheme | (define-library (lib gtk-3 file-chooser-dialog)
(export
GtkFileChooserDialog*
gtk_file_chooser_dialog_new
gtk_file_chooser_dialog_new_with_backend
(exports (lib gtk-3 window))
(exports (lib gtk-3 file-chooser))
)
(import
(scheme core)
(otus ffi)
(lib gtk-3 wind... | |
b31b8e2d134667bb0d9d09f6ca806adbc5d898316318950be1561c8f4373162c | wavewave/hxournal | Clipboard.hs | # LANGUAGE TemplateHaskell #
-----------------------------------------------------------------------------
-- |
-- Module : Application.HXournal.Type.Clipboard
Copyright : ( c ) 2011 , 2012
--
-- License : BSD3
Maintainer : < >
-- Stability : experimental
Portability : GHC
--
----------... | null | https://raw.githubusercontent.com/wavewave/hxournal/b8eb538a2d1a474cc74bc0b5f5c7f251dafe75b9/lib/Application/HXournal/Type/Clipboard.hs | haskell | ---------------------------------------------------------------------------
|
Module : Application.HXournal.Type.Clipboard
License : BSD3
Stability : experimental
---------------------------------------------------------------------------
|
|
|
|
|
|
| | # LANGUAGE TemplateHaskell #
Copyright : ( c ) 2011 , 2012
Maintainer : < >
Portability : GHC
module Application.HXournal.Type.Clipboard where
import Control.Category
import Data.Label
import Prelude hiding ((.), id)
import Data.Xournal.BBox
newtype Clipboard = Clipboard { unClipboard :: [Stro... |
2b7c78619688a03391455cd61e98caec70bcf241f46dd14690b17701bf961522 | b3nj5m1n/xdg-ninja | AddProgram.hs | # LANGUAGE DeriveGeneric #
{-# LANGUAGE OverloadedStrings #-}
I do not know , this code is probably shit
module AddProgram where
import Data.Aeson
import Data.Aeson.Encode.Pretty
import Data.Aeson.Types
import qualified Data.ByteString.Lazy as B
import Data.List.Ex... | null | https://raw.githubusercontent.com/b3nj5m1n/xdg-ninja/881b8a05e8719fb86cb4aa5cc1a77409995eb758/lib/AddProgram.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE DeriveGeneric #
I do not know , this code is probably shit
module AddProgram where
import Data.Aeson
import Data.Aeson.Encode.Pretty
import Data.Aeson.Types
import qualified Data.ByteString.Lazy as B
import Data.List.Extra
import Data.Maybe
imp... |
c9e821362ad528a4e7e2a8739e6b108d38f2d569d57efe2233a24b8d515e9ef0 | aantron/luv | luv_unix.ml | This file is part of Luv , released under the MIT license . See LICENSE.md for
details , or visit .
details, or visit . *)
module C = Luv__C
module Error = Luv.Error
module Os_fd =
struct
module Fd =
struct
include Luv.Os_fd.Fd
external from_unix_helper : Unix.file_descr -> nativeint -> unit... | null | https://raw.githubusercontent.com/aantron/luv/decdaad7511855d012e31f22b35538ddd874c08d/src/unix/luv_unix.ml | ocaml | This file is part of Luv , released under the MIT license . See LICENSE.md for
details , or visit .
details, or visit . *)
module C = Luv__C
module Error = Luv.Error
module Os_fd =
struct
module Fd =
struct
include Luv.Os_fd.Fd
external from_unix_helper : Unix.file_descr -> nativeint -> unit... | |
7ae3711a6539dbd53de90c1e5112b87502d1b140dcea7d507a0f9e212d106994 | OCamlPro/typerex-lint | plugin_typedtree.module_utilization.2.ml | open String
| null | https://raw.githubusercontent.com/OCamlPro/typerex-lint/6d9e994c8278fb65e1f7de91d74876531691120c/tools/ocp-lint-doc/examples/plugin_typedtree.module_utilization.2.ml | ocaml | open String
| |
bb30ab6ffe0781a8ec88f8ce5969f49a291c6dca103fa25754024afc52de4650 | dparis/gen-phzr | utils.cljs | (ns phzr.utils
(:require [phzr.impl.utils.core :refer [clj->phaser phaser->clj]]
[phzr.impl.extend :as ex]
[cljsjs.phaser])
(:refer-clojure :exclude [extend]))
(defn extend-
"This is a slightly modified version of /
Parameters:
* deep (boolean) - Perform a deep copy?
* target (... | null | https://raw.githubusercontent.com/dparis/gen-phzr/e4c7b272e225ac343718dc15fc84f5f0dce68023/out/utils.cljs | clojure | (ns phzr.utils
(:require [phzr.impl.utils.core :refer [clj->phaser phaser->clj]]
[phzr.impl.extend :as ex]
[cljsjs.phaser])
(:refer-clojure :exclude [extend]))
(defn extend-
"This is a slightly modified version of /
Parameters:
* deep (boolean) - Perform a deep copy?
* target (... | |
b9dc61a4361c841c650e3a79711c123cba5093830431fd10cfd2b077bca272a2 | korya/efuns | asttypes.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/korya/efuns/78b21d9dff45b7eec764c63132c7a564f5367c30/ocamlsrc/compat/3.00/include/asttypes.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ I d : asttypes.mli , v 1.1 2000/05/... |
1e5ef9fa2592c9f3048ee4a9a27321aa6597d676c0bfa6b0ad76f557444e032b | acl2/acl2 | top@useless-runes.lsp | (DM::PRIMEP1487384939)
(DM::PRIMEP1518205867
(1 1 (:REWRITE DEFAULT-CDR))
(1 1 (:REWRITE DEFAULT-CAR))
)
| null | https://raw.githubusercontent.com/acl2/acl2/f64742cc6d41c35f9d3f94e154cd5fd409105d34/books/kestrel/crypto/primes/.sys/top%40useless-runes.lsp | lisp | (DM::PRIMEP1487384939)
(DM::PRIMEP1518205867
(1 1 (:REWRITE DEFAULT-CDR))
(1 1 (:REWRITE DEFAULT-CAR))
)
| |
6648e0086ca34544ea5515a912605e06c798231c4bad0798e50e0b306b487dff | NicolasT/landlock-hs | landlocked.hs | module Main (main) where
import Control.Applicative (many, (<**>))
import Control.Exception.Base (displayException, handleJust)
import Control.Monad (forM_, unless)
import Data.List (intercalate, sortOn)
import Data.Maybe (listToMaybe)
import Data.Ord (Down (Down))
import Data.Version (versionBranch)
import Options.Ap... | null | https://raw.githubusercontent.com/NicolasT/landlock-hs/54cae782a1ae6e3e2557c6d0edeb58d27c7f5db2/landlock/bin/landlocked.hs | haskell | This is not really useful. It could be if 'ReaderM' were 'MonadIO' | module Main (main) where
import Control.Applicative (many, (<**>))
import Control.Exception.Base (displayException, handleJust)
import Control.Monad (forM_, unless)
import Data.List (intercalate, sortOn)
import Data.Maybe (listToMaybe)
import Data.Ord (Down (Down))
import Data.Version (versionBranch)
import Options.Ap... |
8e8bee0e8132a39a803b9466649d8090f0650b3bf88b7814093849189e766abf | Eduap-com/WordMat | costf1.lisp | ;;; Compiled by f2cl version:
( " f2cl1.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ "
" f2cl2.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ "
" f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl5.l , v 95098eb54f13 2013/04/01 00:45:16 toy $... | null | https://raw.githubusercontent.com/Eduap-com/WordMat/83c9336770067f54431cc42c7147dc6ed640a339/Windows/ExternalPrograms/maxima-5.45.1/share/maxima/5.45.1/share/fftpack5/lisp/costf1.lisp | lisp | Compiled by f2cl version:
Using Lisp CMU Common Lisp snapshot-2020-04 (21D Unicode)
Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t)
(:coerce-assigns :as-needed) (:array-type ':array)
(:array-slicing t) (:declare-common nil)
(:float-format single-float)) | ( " f2cl1.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ "
" f2cl2.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ "
" f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl5.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ "
" f2cl6.l , v 1d5cbacbb9... |
4a75e1ebb7f3db37cede4c2816d9399a748892dddc441324424d0a5fdeb7770d | RefactoringTools/HaRe | Signature2r.expected.hs | {-# LANGUAGE Rank2Types #-}
module LiftToTopLevel.Signature2 where
{- Lifting baz to the top level should bring in xx and a as parameters,
and update the signature to include these.
The refactoring can be completed as the Rank2Types extension is enabled
-}
foo a = (baz xx a)
where
xx :: (Num t) => t -> t ... | null | https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/test/testdata/LiftToToplevel/Signature2r.expected.hs | haskell | # LANGUAGE Rank2Types #
Lifting baz to the top level should bring in xx and a as parameters,
and update the signature to include these.
The refactoring can be completed as the Rank2Types extension is enabled
| module LiftToTopLevel.Signature2 where
foo a = (baz xx a)
where
xx :: (Num t) => t -> t -> t
xx p1 p2 = p1 + p2
baz:: (forall t. Num t => t -> t -> t) -> Int ->Int
baz xx a= xx 1 a
|
65c93d2c2b2f5e4078ba9d1cc44df67b8bee34d8e7e80a492751f8b0f33424b7 | input-output-hk/ouroboros-network | MockFS.hs | {-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCa... | null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/0dcda09b6958205fe362524a7e5ea35dea320196/ouroboros-consensus-test/src/Test/Util/FS/Sim/MockFS.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveFunctor #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
| Mock file system implementation
Int... | # LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
# LANGUAGE TupleSections #
> import Test . Util . . MockFS ( MockFS )
> import qualified Test . Util . . MockFS as Mock
module Test.Util... |
600ababb2510f9d323ac2cb2c839108b783250586880f69e22bfaeab2054bfaa | lokke-org/lokke | pcre2.scm | Copyright ( C ) 2020 < >
SPDX - License - Identifier : LGPL-2.1 - or - later OR EPL-1.0 +
(define-module (lokke pcre2)
#:version (0 0 0)
document u32 arrays must be host byte order ( does not handle BOM )
#:export (
<pcre2-code-u32>
<pcre2-code-u8>
<pcre2-code-utf32>
... | null | https://raw.githubusercontent.com/lokke-org/lokke/a6616b3de60b62d787bf9b98206f8ad9eeb10844/mod/lokke/pcre2.scm | scheme | quashes PCRE2_NO_UTF_CHECK if PCRE2_UTF or PCRE2_MATCH_INVALID_UTF
quashes PCRE2_NO_UTF_CHECK if PCRE2_UTF or PCRE2_MATCH_INVALID_UTF
pcre2-match-ovector-length
pcre2-match-ovector-ref
Compile a matcher for the internal bytes...
%compile-string-units
compiles string as is by pcre2-compile-u8 or pcre2-compile-u32
... | Copyright ( C ) 2020 < >
SPDX - License - Identifier : LGPL-2.1 - or - later OR EPL-1.0 +
(define-module (lokke pcre2)
#:version (0 0 0)
document u32 arrays must be host byte order ( does not handle BOM )
#:export (
<pcre2-code-u32>
<pcre2-code-u8>
<pcre2-code-utf32>
... |
7abeb468b8d4bdb23a53dc9b1de25afc1e71848e887de9c5e50b2d3eb329ff90 | cobaweel/piffle | PPrint.hs | | Pretty print module based on Philip Wadlers \"prettier printer\ " :
\"A prettier printer\ " , draft paper , April 1997 , revised March 1998 ,
-- <-labs.com/cm/cs/who/wadler/papers/prettier/prettier.ps>
Modified by as part of the Piffle compiler to , among
other things , be even prettier : now in COLOR !
... | null | https://raw.githubusercontent.com/cobaweel/piffle/7c4cfb5301c5c55c229098d3938d3b023d69cde4/src/Syntax/PPrint.hs | haskell | <-labs.com/cm/cs/who/wadler/papers/prettier/prettier.ps>
| The document (list xs) comma seperates the documents xs and
encloses them in square brackets. The documents are rendered
horizontally if that fits the page. Otherwise they are aligned
vertically. All comma seperators are put in front of the elements.
| T... | | Pretty print module based on Philip Wadlers \"prettier printer\ " :
\"A prettier printer\ " , draft paper , April 1997 , revised March 1998 ,
Modified by as part of the Piffle compiler to , among
other things , be even prettier : now in COLOR !
module Syntax.PPrint ( Doc, Pretty, pretty, show, putDoc, hPu... |
a86472d62929c8480e8356317cd2fcf63d7f2ae26537259e95efc310abdb53ad | equill/restagraph | pure-tests.lisp | Copyright 2021 < >
;
Licensed under the GNU General Public License
- for details , see LICENSE.txt in the top - level directory
;;;; Test suite for pure code.
;;;; I.e, functions and methods without side-effects.
(in-package #:restagraph-test)
(declaim (optimize (compilation-speed 0)
... | null | https://raw.githubusercontent.com/equill/restagraph/f850ffb8e7b2218d36b093bde61ed4a1129c6e16/test/internal_tests/pure-tests.lisp | lisp |
Test suite for pure code.
I.e, functions and methods without side-effects.
Confirm it isn't dependent
Simple check for no attributes at all
Simple check for valid attribute
Simple check for invalid attribute
Simple check for invalid value
Combo-check for enums
Text
Basic validation
Basic validation
Basic v... | Copyright 2021 < >
Licensed under the GNU General Public License
- for details , see LICENSE.txt in the top - level directory
(in-package #:restagraph-test)
(declaim (optimize (compilation-speed 0)
(speed 2)
(safety 3)
(debug 3)))
(fiveam:def... |
4a8cc299aa8fb4714469674b6348e1a57ed51b9efd0512ed978371fefba4544b | gwathlobal/CotD | init-lvl-mod-controlled-by.lisp | (in-package :cotd)
;;---------------------------------
;; Controlled By level modifiers
;;---------------------------------
(set-level-modifier :id +lm-controlled-by-none+ :type :level-mod-controlled-by
:name "Uncontrolled"
:priority 25
:is-available-for-mis... | null | https://raw.githubusercontent.com/gwathlobal/CotD/d01ef486cc1d3b21d2ad670ebdb443e957290aa2/src/level-modifiers/init-lvl-mod-controlled-by.lisp | lisp | ---------------------------------
Controlled By level modifiers
---------------------------------
is not available for world sectors in hell
add starting points for demons
is not available for missions where demons attack
place nw post
place ne post
place sw post
place se post
is not available for missions whe... | (in-package :cotd)
(set-level-modifier :id +lm-controlled-by-none+ :type :level-mod-controlled-by
:name "Uncontrolled"
:priority 25
:is-available-for-mission #'(lambda (world-sector-type-id mission-type-id world-time)
... |
0aa1c58ce1f8443c35fa0b388b14f68c7d91dd9deb61211206cd0f56e79576b7 | dmitryvk/cl-gtk2 | gobject.type-designator.lisp | (in-package :gobject.ffi)
(defctype g-type gsize)
(defstruct gtype name %id)
(defvar *name-to-gtype* (make-hash-table :test 'equal))
(defvar *id-to-gtype* (make-hash-table))
(defvar *gtype-lock* (bt:make-lock "gtype lock"))
(defun invalidate-gtypes ()
(bt:with-lock-held (*gtype-lock*)
(clrhash *id-to-gtype*)
... | null | https://raw.githubusercontent.com/dmitryvk/cl-gtk2/a3108fbc701dbab93b899e04b9637ded2f813410/glib/gobject.type-designator.lisp | lisp | subtract the G_SIGNAL_TYPE_STATIC_SCOPE | (in-package :gobject.ffi)
(defctype g-type gsize)
(defstruct gtype name %id)
(defvar *name-to-gtype* (make-hash-table :test 'equal))
(defvar *id-to-gtype* (make-hash-table))
(defvar *gtype-lock* (bt:make-lock "gtype lock"))
(defun invalidate-gtypes ()
(bt:with-lock-held (*gtype-lock*)
(clrhash *id-to-gtype*)
... |
868aeed68fc4ac3649bf5215fd2acd1987270544b9160a1c314a165eb2a6017f | emqx/hocon | hocon_schema_builtin.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2021 - 2022 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
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 o... | null | https://raw.githubusercontent.com/emqx/hocon/04206f910caae871568dd1035b05003d1dcce555/src/hocon_schema_builtin.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2021 - 2022 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(hocon_schema_builtin).
-include_lib("typerefl/include/types.hrl").
-include("hoconsc.h... |
91642f9d14da81b9bf9e3b50eadc255a69220bd8e21c420dd69af38c88251191 | GrammaTech/sel | ancestral-git.lisp | ;;; ancestral-git.lisp --- class adding ancestry tracking via git to software
;;;
;;; Add documentation here explaining usage and how to analyze logs.
;;;
;;; @texi{ancestral-git}
(defpackage :software-evolution-library/software/ancestral-git
(:nicknames :sel/software/ancestral-git :sel/sw/ancestral-git)
(:use :gt/... | null | https://raw.githubusercontent.com/GrammaTech/sel/3346277784ffe13c5c9906bf7a756bc8514ab173/software/ancestral-git.lisp | lisp | ancestral-git.lisp --- class adding ancestry tracking via git to software
Add documentation here explaining usage and how to analyze logs.
@texi{ancestral-git}
Ancestral Git
are stored as a commit in the cloned repo. This is to allow for
"replaying" the evolutionary loop if desired. Technically git ... | (defpackage :software-evolution-library/software/ancestral-git
(:nicknames :sel/software/ancestral-git :sel/sw/ancestral-git)
(:use :gt/full
:software-evolution-library
:software-evolution-library/components/file
:software-evolution-library/software/parseable
:software-evolution-libr... |
f2308f6a1ac90f9494a7b35c4549d978bb0519f8265c0d443454812931c8e70b | input-output-hk/ouroboros-network | Ledger.hs | {-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE RecordWildCards #
{-# LANGUAGE ScopedTypeVariables #-}
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -Wno -... | null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/ebb34fa4d1ba1357e3b803a49f750d2ae3df19e5/ouroboros-consensus-byron-test/src/Ouroboros/Consensus/ByronDual/Ledger.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
* Shorthand
* Bridge
* Block forging
------------------------------------------------------------------------------
Shorthand
-------------------------------------------------... | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -Wno - orphans #
module Ouroboros.Consensus.ByronDual.Ledger (
DualByronBlock
, DualByronBridge
, ByronSpecBridge (..)
, SpecToImplIds (..)
, bridgeT... |
bd7ebfc91eeffd3382670f399ff42135fdd433674a369dfb8303f0c42ea82807 | bitemyapp/bloodhound | Import.hs | module Bloodhound.Import
( module X,
LByteString,
Method,
omitNulls,
parseNEJSON,
parseReadText,
readMay,
showText,
deleteSeveral,
oPath,
tshow,
)
where
import Control.Applicative as X (Alternative (..), optional)
import Control.Exception as X (Exception)
import Control.Mona... | null | https://raw.githubusercontent.com/bitemyapp/bloodhound/c5a10dd2922e0a2debaeb8985e53112700a1998b/src/Bloodhound/Import.hs | haskell | module Bloodhound.Import
( module X,
LByteString,
Method,
omitNulls,
parseNEJSON,
parseReadText,
readMay,
showText,
deleteSeveral,
oPath,
tshow,
)
where
import Control.Applicative as X (Alternative (..), optional)
import Control.Exception as X (Exception)
import Control.Mona... | |
126eb0c777f08986595881bdba1899f6258060686eb2f90ef294de7c4916e50c | number571/Haskell | read_write.hs | module Main where
main :: IO()
main = do
writeFile path "Hello World!\n"
appendFile path "Hello World!"
readFile path >>= \x -> putStrLn x
where path = "file.txt"
| null | https://raw.githubusercontent.com/number571/Haskell/7da2676c2604706d43791dc89c0ca8c9842aea48/Templates/read_write.hs | haskell | module Main where
main :: IO()
main = do
writeFile path "Hello World!\n"
appendFile path "Hello World!"
readFile path >>= \x -> putStrLn x
where path = "file.txt"
| |
fcbeb19b1c1a8e279a33eecca8b3d736b78391685a55d619ddfb46d9a3751949 | bendoerr/real-world-haskell | BrokenClass.hs | instance (JSON a) => JSON [a] where
toJValue = undefined
fromJValue = undefined
instance (JSON a) => JSON [(String, a)] where
toJValue = undefined
fromJValue = undefined
| null | https://raw.githubusercontent.com/bendoerr/real-world-haskell/fa43aa59e42a162f5d2d5655b274b964ebeb8f0a/ch06/BrokenClass.hs | haskell | instance (JSON a) => JSON [a] where
toJValue = undefined
fromJValue = undefined
instance (JSON a) => JSON [(String, a)] where
toJValue = undefined
fromJValue = undefined
| |
3769fb8c1f6b824a4070b2d1c00e91ad822c7dc87166947c17ab30340134316e | FranklinChen/hugs98-plus-Sep2006 | Core.hs | -----------------------------------------------------------------------------
-- |
-- Module : Graphics.HGL.Core
Copyright : ( c ) , 1999 - 2003
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer :
-- Stability : provisional
-- Portability : non-portable (requires c... | null | https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/HGL/Graphics/HGL/Core.hs | haskell | ---------------------------------------------------------------------------
|
Module : Graphics.HGL.Core
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : provisional
Portability : non-portable (requires concurrency)
-------------------------------------------... | Copyright : ( c ) , 1999 - 2003
Core functions of a simple graphics library .
module Graphics.HGL.Core
( module Graphics.HGL.Units
, module Graphics.HGL.Run
, module Graphics.HGL.Window
, module Graphics.HGL.Draw
, module Graphics.HGL.Key
) where
import Graphics.HGL.Units
import Graphics.HGL.Run
impo... |
1c62b79730cb81094f121f5543463cdfbe83201d19821fc73a6c499190303b9f | prg-titech/baccaml | fib.ml | ;;
let rec fib n = if n <= 1 then n else fib (n - 1) + fib (n - 2) in
print_int (fib 10)
| null | https://raw.githubusercontent.com/prg-titech/baccaml/a3b95e996a995b5004ca897a4b6419edfee590aa/etc/example/fib.ml | ocaml | ;;
let rec fib n = if n <= 1 then n else fib (n - 1) + fib (n - 2) in
print_int (fib 10)
| |
e285f6c18835019227efacc2d2d243f2517313eccbd8bc5134cf23d9828e6a02 | bsansouci/bsb-native | opttopmain.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/bsansouci/bsb-native/9a89457783d6e80deb0fba9ca7372c10a768a9ea/vendor/ocaml/toplevel/opttopmain.ml | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
open Clflags
let usage =
"Usage: oc... |
e37b3e4b2c0953267b427d2ca3640650d627a276db68376136bc6bffb5a3b059 | Millak/my-guix | buildbot.scm | Copyright © 2022 Efraim < >
;;;
;;; This file is an addendum to GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 3 of the License , or ( at
;;; your option) any later v... | null | https://raw.githubusercontent.com/Millak/my-guix/4cacc02eabc50df7aae15efdedc07e77036d55f6/wip/buildbot.scm | scheme |
This file is an addendum to 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 warranty of
MERCHANTABILITY or FITNESS FOR A P... | Copyright © 2022 Efraim < >
under the terms of the GNU General Public License as published by
You should have received a trivial of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (wip buildbot)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix dow... |
14a8a5e66373680323dee073d51ca6b6757fa0b2a1b00cf4f0357bb9162cda0c | beala/symbolic | Concrete.hs | module Concrete where
import Foundation
import Foundation.Collection
import Prelude (getLine, read)
import qualified Data.Map.Strict as M
import Control.Monad (when)
import System.IO (hFlush, stdout)
import Types
import Util
run :: Bool -> Prog -> State-> IO [Word32]
run trace prg st@(pc, _, stack) =
case prg ! (... | null | https://raw.githubusercontent.com/beala/symbolic/439bd8670d9e337a7d6a566b3af9d80ec239eafe/src/Concrete.hs | haskell | module Concrete where
import Foundation
import Foundation.Collection
import Prelude (getLine, read)
import qualified Data.Map.Strict as M
import Control.Monad (when)
import System.IO (hFlush, stdout)
import Types
import Util
run :: Bool -> Prog -> State-> IO [Word32]
run trace prg st@(pc, _, stack) =
case prg ! (... | |
abc83077b13223672a323d37b9fb07bf00f10414f0bb34ad41bd728bb3d25151 | haskell-mafia/mismi | Amazonka.hs | # LANGUAGE NoImplicitPrelude #
module Mismi.SQS.Amazonka (
module A
) where
import Network.AWS.Env as A hiding (within)
import Network.AWS.SQS as A
| null | https://raw.githubusercontent.com/haskell-mafia/mismi/f6df07a52c6c8b1cf195b58d20ef109e390be014/mismi-sqs/src/Mismi/SQS/Amazonka.hs | haskell | # LANGUAGE NoImplicitPrelude #
module Mismi.SQS.Amazonka (
module A
) where
import Network.AWS.Env as A hiding (within)
import Network.AWS.SQS as A
| |
85a75d4397f01b3c66cc5925f6f179cdbb014cac8c21c2318bc8d87f7de92cf5 | sgbj/MaximaSharp | zbknu.lisp | ;;; Compiled by f2cl version:
( " f2cl1.l , v 46c1f6a93b0d 2012/05/03 04:40:28 toy $ "
" f2cl2.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
;;; "f2cl5.l,v 46c1f6a93b0d 2012/05/03 04:40:28 toy $... | null | https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/src/numerical/slatec/zbknu.lisp | lisp | Compiled by f2cl version:
"f2cl5.l,v 46c1f6a93b0d 2012/05/03 04:40:28 toy $"
Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t)
(:coerce-assigns :as-needed) (:array-type ':simple-array)
(:array-slicing nil) (:declare-common nil)
(:float-format double-float)) | ( " f2cl1.l , v 46c1f6a93b0d 2012/05/03 04:40:28 toy $ "
" f2cl2.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl6.l , v 1d5cbacbb977 2008/08/24 00:56:27 rtoy $ "
" macros.l , v fceac53... |
110cae44eb47c4af27d6a9808c0b785caba85f637b27aafbde422b92214ad0b2 | PeterDWhite/Osker | FileName.hs | Copyright ( C ) , 2001 , 2002 , 2003
Copyright ( c ) OHSU , 2001 , 2002 , 2003
module FileName
( FileName -- Data type for file names
, outFileName -- Nicer print out for file names
, outRelativeFileName -- Print out for relative file names
, outRelativeList -- Print out a ... | null | https://raw.githubusercontent.com/PeterDWhite/Osker/301e1185f7c08c62c2929171cc0469a159ea802f/Posix/FileName.hs | haskell | Data type for file names
Nicer print out for file names
Print out for relative file names
Print out a list of relative file names
Determine if directory is "."
Determine if directory is ".."
"/" file name
--------------------------------------------------------------------
The POSIX file name specification.
Al... | Copyright ( C ) , 2001 , 2002 , 2003
Copyright ( c ) OHSU , 2001 , 2002 , 2003
module FileName
Remove leading " " from file name
) where
import List
type FileName = [String]
outFileName :: FileName -> String
outFileName fn = "/" ++ outRelativeFileName fn
outRelativeFileName :: FileName -> String
outR... |
fc592f2110a1dbfd2524f957842ff21cd9d0d18d92aeb8c6c7fce944fe7ce1dd | Feuerlabs/yang | yang_scan_erl.erl | %%%---- BEGIN COPYRIGHT -------------------------------------------------------
%%%
Copyright ( C ) 2007 - 2012 , Rogvall Invest AB , < >
%%%
%%% This software is licensed as described in the file COPYRIGHT, which
%%% you should have received as part of this distribution. The terms
%%% are also available at .
%%%
%%... | null | https://raw.githubusercontent.com/Feuerlabs/yang/92330c742cdd2a8e7ce07f99b34c0fe761806e82/src/yang_scan_erl.erl | erlang | ---- BEGIN COPYRIGHT -------------------------------------------------------
This software is licensed as described in the file COPYRIGHT, which
you should have received as part of this distribution. The terms
are also available at .
You may opt to use, copy, modify, merge, publish, distribute and/or sell
furni... | Copyright ( C ) 2007 - 2012 , Rogvall Invest AB , < >
copies of the Software , and permit persons to whom the Software is
This software is distributed on an " AS IS " basis , WITHOUT WARRANTY OF ANY
@author < >
, reference implementation
Created : 4 Jan 2012 by < >
-module(yang_scan_erl).
-... |
7a39294172af376ff56becb0155dddd981fffaf62f00c4fe6b7b873220c1372c | bcc32/advent-of-code | b.ml | open! Core
open! Async
open! Import
let main () =
let%bind points =
Reader.with_file "input" ~f:(fun r ->
r |> Reader.lines |> Pipe.map ~f:Point.of_string |> Pipe.to_list)
in
let secs =
Points.to_sequence points
|> Sequence.fold_until
~init:(Int.max_value, -1)
~f:(fun (last_ar... | null | https://raw.githubusercontent.com/bcc32/advent-of-code/86a9387c3d6be2afe07d2657a0607749217b1b77/2018/10/b.ml | ocaml | open! Core
open! Async
open! Import
let main () =
let%bind points =
Reader.with_file "input" ~f:(fun r ->
r |> Reader.lines |> Pipe.map ~f:Point.of_string |> Pipe.to_list)
in
let secs =
Points.to_sequence points
|> Sequence.fold_until
~init:(Int.max_value, -1)
~f:(fun (last_ar... | |
67bd0bb6ab75bd902d7fa540453aff313bd8382314a33527869af400e8f28e9f | blockfrost/blockfrost-haskell | Tag.hs | | Tag for OpenAPI 3 docs
{-# OPTIONS_HADDOCK hide #-}
module Blockfrost.Util.Tag
( Tag
) where
import GHC.TypeLits (Symbol)
-- | Attaches a tag to documentation.
Server / client implementations remains intact .
data Tag (name :: Symbol)
| null | https://raw.githubusercontent.com/blockfrost/blockfrost-haskell/d9b9537b4e74f9eb0e94a061deec82638152d377/blockfrost-api/src/Blockfrost/Util/Tag.hs | haskell | # OPTIONS_HADDOCK hide #
| Attaches a tag to documentation. | | Tag for OpenAPI 3 docs
module Blockfrost.Util.Tag
( Tag
) where
import GHC.TypeLits (Symbol)
Server / client implementations remains intact .
data Tag (name :: Symbol)
|
b8236588402f628e829ed01a7351cee03aad6544245bf83d18509c3c86016ed1 | erlyaws/yaws | wiki_format_txt.erl | -module(wiki_format_txt).
%% File : wiki_format_txt.erl
Author : ( )
: , minor modifications ( )
%% Purpose : Wiki formatting engine
%%
%% Rules:
%% Inline annotations:
%% * Bold
'' Italic
%% ''' ... | null | https://raw.githubusercontent.com/erlyaws/yaws/da198c828e9d95ca2137da7884cddadd73941d13/applications/wiki/src/wiki_format_txt.erl | erlang | File : wiki_format_txt.erl
Purpose : Wiki formatting engine
Rules:
Inline annotations:
* Bold
''' Code
~[a-zA-Z1-9]+ Wiki link
http://... URL
[ Note
... | -module(wiki_format_txt).
Author : ( )
: , minor modifications ( )
'' Italic
Blocks ( denoted by special characters in column 1 ):
{ Preformatted
< Writable region within a
... |
8e54d48fd5eba541641ed3a2bc23e798cb03e31c60a67e091ad4e1e660575c54 | xclerc/ocamljava | bytecodeutils.mli |
* This file is part of compiler .
* Copyright ( C ) 2007 - 2015 .
*
* compiler is free software ; you can redistribute it and/or modify
* it under the terms of the Q Public License as published by
* ( with a change to choice of law ) .
*
* compiler is distributed in the hope that it ... | null | https://raw.githubusercontent.com/xclerc/ocamljava/8330bfdfd01d0c348f2ba2f0f23d8f5a8f6015b1/compiler/javacomp/bytecodeutils.mli | ocaml | * Some constants and utility functions for bytecode compilation.
* Constructs a class name from the passed string.
* Constructs a field name from the passed string.
* Constructs a method name from the passed string,
the name being normalized through [normalize_function_name].
* Returns the instruction tree need... |
* This file is part of compiler .
* Copyright ( C ) 2007 - 2015 .
*
* compiler is free software ; you can redistribute it and/or modify
* it under the terms of the Q Public License as published by
* ( with a change to choice of law ) .
*
* compiler is distributed in the hope that it ... |
d89f93166ed370f3728550b0734ded961ba21fbb5eb4bc627c759ac33da51433 | analyticbastard/xicotrader | controller.clj | (ns xicotrader.controller
(:require
[clojure.core.async :as a :refer [go-loop >! <!]]
[clojure.tools.logging :as log]
[com.stuartsierra.component :as component]))
(defn- receive-loop [{:keys [rec s-to]}]
(go-loop []
(when-let [data (<! rec)]
(>! s-to data)
(recur))))
(defn- send-loop [... | null | https://raw.githubusercontent.com/analyticbastard/xicotrader/67e15143d853649afabbb9a778225457e97c70cd/src/clj/xicotrader/controller.clj | clojure | (ns xicotrader.controller
(:require
[clojure.core.async :as a :refer [go-loop >! <!]]
[clojure.tools.logging :as log]
[com.stuartsierra.component :as component]))
(defn- receive-loop [{:keys [rec s-to]}]
(go-loop []
(when-let [data (<! rec)]
(>! s-to data)
(recur))))
(defn- send-loop [... | |
cc0e50448796cfc9e29f6d94a518fc37dcac6fac6ea0582cfe442ad5222d9049 | gersak/vura | parser.clj | (ns vura.timezones.parser
(:refer-clojure :exclude [second])
(:require
clojure.string
clojure.java.io
[vura.core :refer :all]
[instaparse.core :as insta]
clojure.pprint))
(def ^:dynamic *tz-dir* nil)
(alter-var-root #'vura.core/*timezone* (constantly nil))
(def zones ["europe" "africa" "nort... | null | https://raw.githubusercontent.com/gersak/vura/e7c3fc8b738b73eaa00255f39d889afab611a069/timezones/compiler/vura/timezones/parser.clj | clojure | Return result in form of actual current timezone
and previous history
Use current rule
And update until with UTC value
There is history so we can compare previous offset
If it is standard clock time than use previous offset to
calculate exact UTC time.... TODO - maybe include rules if not to complicated for now
... | (ns vura.timezones.parser
(:refer-clojure :exclude [second])
(:require
clojure.string
clojure.java.io
[vura.core :refer :all]
[instaparse.core :as insta]
clojure.pprint))
(def ^:dynamic *tz-dir* nil)
(alter-var-root #'vura.core/*timezone* (constantly nil))
(def zones ["europe" "africa" "nort... |
feb09bc6d23afd5c82c335e73bfec537893c8643928f53d450f7bb7d0b2d34a6 | clojerl/clojerl | clojerl.IChunkedSeq.erl | %%% Code generate by scripts/generate-protocols
-module('clojerl.IChunkedSeq').
-include("clojerl.hrl").
-include("clojerl_int.hrl").
-clojure(true).
-protocol(true).
-export(['chunked_first'/1, 'chunked_next'/1, 'chunked_more'/1]).
-export([?SATISFIES/1]).
-export([?EXTENDS/1]).
-callback 'chunked_first'(any()) ->... | null | https://raw.githubusercontent.com/clojerl/clojerl/aa35847ca64e1c66224867ca4c31ca6de95bc898/src/erl/lang/protocols/clojerl.IChunkedSeq.erl | erlang | Code generate by scripts/generate-protocols | -module('clojerl.IChunkedSeq').
-include("clojerl.hrl").
-include("clojerl_int.hrl").
-clojure(true).
-protocol(true).
-export(['chunked_first'/1, 'chunked_next'/1, 'chunked_more'/1]).
-export([?SATISFIES/1]).
-export([?EXTENDS/1]).
-callback 'chunked_first'(any()) -> any().
-callback 'chunked_next'(any()) -> any()... |
07a468bfea0024230b7b41b1a02b1a474ab74f1cb5f443f1c1b0c9af8ff81cee | mirage/mirage-kv | test.ml | open Mirage_kv
let key = Alcotest.testable Key.pp Key.equal
let path_v () =
let check s e = Alcotest.(check string) s e Key.(to_string @@ v s) in
check "/foo/bar" "/foo/bar";
check "/foo" "/foo";
check "/" "/";
check "foo/bar" "/foo/bar";
check "" "/"
let path_add () =
let check p ... | null | https://raw.githubusercontent.com/mirage/mirage-kv/1e3cdbd8167193de8a78b924fd3ccdf3f09c4afa/test/test.ml | ocaml | open Mirage_kv
let key = Alcotest.testable Key.pp Key.equal
let path_v () =
let check s e = Alcotest.(check string) s e Key.(to_string @@ v s) in
check "/foo/bar" "/foo/bar";
check "/foo" "/foo";
check "/" "/";
check "foo/bar" "/foo/bar";
check "" "/"
let path_add () =
let check p ... | |
b6cef2e47c0784864b6eb694cf9071fefc79d008b9fb12becd58115ab2c4ca24 | OCamlPro/OCamlPro-OCaml-Branch | odoc_analyse.mli | (***********************************************************************)
(* OCamldoc *)
(* *)
, projet Cristal , INRIA Rocquencourt
(* ... | null | https://raw.githubusercontent.com/OCamlPro/OCamlPro-OCaml-Branch/3a522985649389f89dac73e655d562c54f0456a5/inline-more/ocamldoc/odoc_analyse.mli | ocaml | *********************************************************************
OCamldoc
... | , projet Cristal , INRIA Rocquencourt
Copyright 2001 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ Id$
val analyse_files :
?init: O... |
1e19cf1b54487038a0128f2b40b771b4aa5bdc27dd312e988dc3782200becc03 | ijvcms/chuanqi_dev | citytitle_lib.erl | %%%-------------------------------------------------------------------
@author yubing
( C ) 2015 , < COMPANY >
%%% @doc
%%%
%%% @end
Created : 24 . 十二月 2015 09:52
%%%-------------------------------------------------------------------
-module(citytitle_lib).
-include("record.hrl").
-include("cache.hrl").
-includ... | null | https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/business/careertitle/citytitle_lib.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
根据玩家的id查询出当前的称号信息
更新城主称号 | @author yubing
( C ) 2015 , < COMPANY >
Created : 24 . 十二月 2015 09:52
-module(citytitle_lib).
-include("record.hrl").
-include("cache.hrl").
-include("common.hrl").
-export([get_city_title_player_id/1,update_city_title/1]).
get_city_title_player_id(PlayerId) ->
case city_lib:get_city_officer_player(PlayerId,... |
cfba25f2191e81a710a48f6e69cf1aa4a6515df2762011f6c256df41a3beb8cc | takikawa/racket-clojure | clojure.rkt | #lang racket/base
Clojure compatibility
(require (prefix-in rkt: racket/base)
(prefix-in rkt: racket/set)
racket/stxparam
"nil.rkt"
"printer.rkt"
(for-syntax racket/base
racket/list
syntax/parse
syntax/strip-... | null | https://raw.githubusercontent.com/takikawa/racket-clojure/6a65b4348770dee984bd6fe8d0e33445887fff17/clojure/clojure.rkt | racket | basic forms
used for let and loop
thrush operators
modify lexical syntax via macros
lists - examine
useful functions
sequences | #lang racket/base
Clojure compatibility
(require (prefix-in rkt: racket/base)
(prefix-in rkt: racket/set)
racket/stxparam
"nil.rkt"
"printer.rkt"
(for-syntax racket/base
racket/list
syntax/parse
syntax/strip-... |
a0e30dc5699b61626e6f71ca27099c0296079a406cd6b407af8e22f8a0509334 | tisnik/clojure-examples | dependencies.clj | {[clojure-complete "0.2.5" :exclusions [[org.clojure/clojure]]] nil,
[expectations "2.0.9"] {[junit "4.8.1"] nil},
[nrepl "0.7.0" :exclusions [[org.clojure/clojure]]] nil,
[org.clojure/clojure "1.10.1"]
{[org.clojure/core.specs.alpha "0.2.44"] nil,
[org.clojure/spec.alpha "0.2.176"] nil},
[venantius/ultra "0.6.0... | null | https://raw.githubusercontent.com/tisnik/clojure-examples/6f5d1817c406c49626fdd32991c4b5bbde07321e/expectations-demo/doc/dependencies.clj | clojure | {[clojure-complete "0.2.5" :exclusions [[org.clojure/clojure]]] nil,
[expectations "2.0.9"] {[junit "4.8.1"] nil},
[nrepl "0.7.0" :exclusions [[org.clojure/clojure]]] nil,
[org.clojure/clojure "1.10.1"]
{[org.clojure/core.specs.alpha "0.2.44"] nil,
[org.clojure/spec.alpha "0.2.176"] nil},
[venantius/ultra "0.6.0... | |
e971bbca61867ccfff18a3716aa7d5a65b39203e7d07d0023104c952ab7a3243 | racket/typed-racket | pr241-variation-5.rkt | #lang racket/base
;; Check that any-wrap/c handles all base types
;; We do this by:
;; - enumerating the base types from `base-env/base-types.rkt`
;; - for each type:
;; - define a value
;; - typecheck the value
;; - wrap the value as 'Any', check failure / use in untyped code
(require
(for-syntax racket/base... | null | https://raw.githubusercontent.com/racket/typed-racket/1dde78d165472d67ae682b68622d2b7ee3e15e1e/typed-racket-test/succeed/shallow/pr241-variation-5.rkt | racket | Check that any-wrap/c handles all base types
We do this by:
- enumerating the base types from `base-env/base-types.rkt`
- for each type:
- define a value
- typecheck the value
- wrap the value as 'Any', check failure / use in untyped code
When #t, print a warning if some base-types do not have tests
`kno... | #lang racket/base
(require
(for-syntax racket/base)
racket/require
(for-syntax racket/extflonum))
(begin-for-syntax
(define (->fl n) (if (single-flonum-available?) (real->single-flonum n) n))
(define-syntax-rule (ext e)
(if (extflonum-available?)
`(e)
null))
(define-syntax-rule (sing... |
ade783ca8129b0d3aa273c97527a57fa5dc81875858d780a7fffdec00b96a32b | innoq/innoq-blockchain-erlang | erl_sals_chain_app.erl | %%%-------------------------------------------------------------------
%% @doc erl_sals_chain public API
%% @end
%%%-------------------------------------------------------------------
-module(erl_sals_chain_app).
-behaviour(application).
%% Application callbacks
-export([start/2, stop/1]).
%%=======================... | null | https://raw.githubusercontent.com/innoq/innoq-blockchain-erlang/52187e5f572a3d9681fe172b38dd32758fde2602/erl_sals_chain/apps/erl_sals_chain/src/erl_sals_chain_app.erl | erlang | -------------------------------------------------------------------
@doc erl_sals_chain public API
@end
-------------------------------------------------------------------
Application callbacks
====================================================================
API
=================================================... |
-module(erl_sals_chain_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) ->
{ok, Pid} = erl_sals_chain_sup:start_link(),
Routes = [ {
'_',
[
{"/", erl_sals_chain_root, []},
{"/blocks", erl_sals_chain_blocks, []},
{"/... |
a071d61266f63728156bb939a6467da8705d9486438fa72f3b412f739777f81c | atlas-engineer/nyxt | repeat.lisp | SPDX - FileCopyrightText : Atlas Engineer LLC
SPDX - License - Identifier : BSD-3 - Clause
(in-package :nyxt/tests)
TODO enabling repeat - mode invokes a prompt . That depends on
;; prompt-buffer-generic-history, which is a browser object.
(define-test toggle-repeat-mode ()
(let ((buffer (make-instance 'mod... | null | https://raw.githubusercontent.com/atlas-engineer/nyxt/65a9aa568b16c109281fa403a7c045b3b6d87025/tests/offline/mode/repeat.lisp | lisp | prompt-buffer-generic-history, which is a browser object. | SPDX - FileCopyrightText : Atlas Engineer LLC
SPDX - License - Identifier : BSD-3 - Clause
(in-package :nyxt/tests)
TODO enabling repeat - mode invokes a prompt . That depends on
(define-test toggle-repeat-mode ()
(let ((buffer (make-instance 'modable-buffer)))
(with-current-buffer buffer
(assert-... |
1abf7c54059ed8d7cb1991701b6b01ffbb46ac9e9711006602de5ea82acd6eb3 | potatosalad/erlang-jose | jose_chacha20_poly1305_unsupported.erl | -*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*-
%% vim: ts=4 sw=4 ft=erlang noet
%%%-------------------------------------------------------------------
@author < >
2014 - 2022 ,
%%% @doc
%%%
%%% @end
Created : 31 May 2016 by < >
%%%---------------------------... | null | https://raw.githubusercontent.com/potatosalad/erlang-jose/dbc4074066080692246afe613345ef6becc2a3fe/src/jwa/chacha20_poly1305/jose_chacha20_poly1305_unsupported.erl | erlang | vim: ts=4 sw=4 ft=erlang noet
-------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
jose_chacha20_poly1305 callbacks
====================================================================
jose_chacha20_poly1305 callbacks
===... | -*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*-
@author < >
2014 - 2022 ,
Created : 31 May 2016 by < >
-module(jose_chacha20_poly1305_unsupported).
-behaviour(jose_chacha20_poly1305).
-export([decrypt/5]).
-export([encrypt/4]).
-export([authenticate/3]).
-e... |
3ec934239637d69585c7a6dd4b717ea1c8a2240d0a71320f78723d8ced570c82 | binsec/binsec | aarch64_options.ml | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2022
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/binsec/8ed9991d36451a3ae7487b966c4b38acca21a5b3/src/disasm/aarch64/aarch64_options.ml | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2022
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
95bbd0bb7ceb22f1bdfaceea25f2da9ecb4071dcf49ae6c15f9939a0f99e049c | Lovesan/doors | osversion.lisp | ;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
Copyright ( C ) 2010 - 2011 , < >
;;; Permission is hereby granted, free of charge, to any person
;;; obtaining a copy of this software and associated documentation
files ( the " Software " ) , to deal in the Software without
;;; restriction, including without lim... | null | https://raw.githubusercontent.com/Lovesan/doors/12a2fe2fd8d6c42ae314bd6d02a1d2332f12499e/system/osversion.lisp | lisp | -*- Mode: lisp; indent-tabs-mode: nil -*-
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies
furnished to do... |
Copyright ( C ) 2010 - 2011 , < >
files ( the " Software " ) , to deal in the Software without
of the Software , and to permit persons to whom the Software is
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ,
(in-packag... |
7bd021e914374689087e6899912b4aeefe8ed28264c370eea9edc98a6a85d196 | sifbiri/project-resources-operations | import.clj | (ns app.model.import
(:require
[tinklj.encryption.aead :refer [encrypt decrypt]]
[tinklj.keys.keyset-handle :as keyset-handle]
[tinklj.primitives :as primitives]
[com.wsscode.pathom.connect :as pc]
[clj-fuzzy.metrics :as fm]
[com.fulcrologic.fulcro.algorithms.tempid :as tempid]
[com.fulcrologic.f... | null | https://raw.githubusercontent.com/sifbiri/project-resources-operations/b08adb09ef03f123ca7ad19ec1c2bdc070a66291/src/main/app/model/import.clj | clojure | import history | (ns app.model.import
(:require
[tinklj.encryption.aead :refer [encrypt decrypt]]
[tinklj.keys.keyset-handle :as keyset-handle]
[tinklj.primitives :as primitives]
[com.wsscode.pathom.connect :as pc]
[clj-fuzzy.metrics :as fm]
[com.fulcrologic.fulcro.algorithms.tempid :as tempid]
[com.fulcrologic.f... |
d813a9164caaf07b677af56c101502a4f9df1e5860a5ebaef183e02d66d0dd01 | wdebeaum/DeepSemLex | whey.lisp | ;;;;
;;;; W::WHEY
;;;;
(define-words :pos W::n
:words (
(W::WHEY
(senses
((LF-PARENT ONT::MILK)
(TEMPL MASS-PRED-TEMPL)
(syntax (W::morph (:forms (-none))))
)
)
)
))
| null | https://raw.githubusercontent.com/wdebeaum/DeepSemLex/ce0e7523dd2b1ebd42b9e88ffbcfdb0fd339aaee/trips/src/LexiconManager/Data/new/whey.lisp | lisp |
W::WHEY
|
(define-words :pos W::n
:words (
(W::WHEY
(senses
((LF-PARENT ONT::MILK)
(TEMPL MASS-PRED-TEMPL)
(syntax (W::morph (:forms (-none))))
)
)
)
))
|
1267d7a4015ee00803392b703b141bf8314a7a4b97a7948c62366d7d8c78f4c8 | hoytech/antiweb | awp.lisp | Antiweb ( C )
(defvar awp-reserved-options
'(:doctype :title :css
:pre-html
:layout :layout-width
:html
:post-html
:js-extern :js-main))
(defvar awp-loaded-pages (make-hash-table :test #'equal))
(defvar awp-glue-modules nil)
(defstruct awp-page
mtime glues post-handlers get-handlers fail... | null | https://raw.githubusercontent.com/hoytech/antiweb/53c38f78ea01f04f6d1a1ecdca5c012e7a9ae4bb/src/awp.lisp | lisp | -javascript-fast
remove comments
collapse space
add line breaks
remove last break
trim inside brackets
trim inside brackets
returns t on success, otherwise throws error
(post-handler "/blah" (cookie) ...)
(get-handler #~m|^/blah/(.*)| () ... $1 ...)
NOT reversed
-)
/ s))
/ s))
/ s)) | Antiweb ( C )
(defvar awp-reserved-options
'(:doctype :title :css
:pre-html
:layout :layout-width
:html
:post-html
:js-extern :js-main))
(defvar awp-loaded-pages (make-hash-table :test #'equal))
(defvar awp-glue-modules nil)
(defstruct awp-page
mtime glues post-handlers get-handlers fail... |
a7e7b928d303c188ef6da593cdcfc10d8c9f461be952b6fd293e43ba2b4f8bf8 | geophf/1HaskellADay | Solution.hs | {-# LANGUAGE OverloadedStrings #-}
module Y2021.M02.D15.Solution where
-
Look at this directory structure !
wine - reviews - aa - aa - aa - aa
wine - reviews - aa - aa - aa - ab - aa - aa
wine - reviews - aa - aa - aa - ab - aa - ab - aa - aa
... 60 more files ...
wine - reviews - ai - ab - ab
wine - r... | null | https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2021/M02/D15/Solution.hs | haskell | # LANGUAGE OverloadedStrings #
}
}
- BONUS ------------------------------------------------------------------
Now that you've identified the problem areas, ... fix the file.
-
} |
module Y2021.M02.D15.Solution where
-
Look at this directory structure !
wine - reviews - aa - aa - aa - aa
wine - reviews - aa - aa - aa - ab - aa - aa
wine - reviews - aa - aa - aa - ab - aa - ab - aa - aa
... 60 more files ...
wine - reviews - ai - ab - ab
wine - reviews - aj
wine - reviews - ak
... |
d4bb5fbbc6d516c5dab9c02d0c1252c9fd664b6f2fad381b2e6ae2341fd0fd53 | jaspervdj/blaze-html | Strict.hs | -- WARNING: The next block of code was automatically generated by
-- src/Util/GenerateHtmlCombinators.hs:69
--
{-# LANGUAGE OverloadedStrings #-}
-- | This module exports HTML combinators used to create documents.
--
module Text.Blaze.Html4.Strict
( module Text.Blaze.Html
, docType
, docTypeHtml
, a
... | null | https://raw.githubusercontent.com/jaspervdj/blaze-html/1c76db3cf02712569fd22b021fb0a367df028eb4/src/Text/Blaze/Html4/Strict.hs | haskell | WARNING: The next block of code was automatically generated by
src/Util/GenerateHtmlCombinators.hs:69
# LANGUAGE OverloadedStrings #
| This module exports HTML combinators used to create documents.
WARNING: The next block of code was automatically generated by
src/Util/GenerateHtmlCombinators.hs:77
WARNING: Th... | module Text.Blaze.Html4.Strict
( module Text.Blaze.Html
, docType
, docTypeHtml
, a
, abbr
, acronym
, address
, area
, b
, bdo
, big
, blockquote
, body
, br
, button
, caption
, cite
, code
, col
, colgroup
, dd
, del
, dfn
... |
507f4cca7732bd9a701d4f6dff8afa4c0ce51896362bb71dc16ac4063fbb8a3a | Magalame/fastest-matrices | Alloc.hs | # LANGUAGE DataKinds #
# LANGUAGE OverloadedLists #
module Main where
import qualified Data.Vector.Unboxed as U
import Data.Vector.Unboxed (Vector)
import qualified Data.Vector as V
DLA
import qualified Statistics.Matrix as M
import qualified Statistics.Matrix.Fast as MF
import qualifi... | null | https://raw.githubusercontent.com/Magalame/fastest-matrices/521cc66e9ae2e4adbb349e257d423549723bea32/bench/Alloc.hs | haskell | hmatrix
numhask
data.matrix from matrix
massiv
| # LANGUAGE DataKinds #
# LANGUAGE OverloadedLists #
module Main where
import qualified Data.Vector.Unboxed as U
import Data.Vector.Unboxed (Vector)
import qualified Data.Vector as V
DLA
import qualified Statistics.Matrix as M
import qualified Statistics.Matrix.Fast as MF
import qualifi... |
4086f50609a03cb025ef8e33f6f2a42f3f19543af7d440520738b9a647b51011 | fp-works/2019-winter-Haskell-school | Main.hs | module Main where
main :: IO ()
main = putStr "main hs"
| null | https://raw.githubusercontent.com/fp-works/2019-winter-Haskell-school/823b67f019b9e7bc0d3be36711c0cc7da4eba7d2/cis194/week5/tien/app/Main.hs | haskell | module Main where
main :: IO ()
main = putStr "main hs"
| |
5a867b72159e1a89db3aaf237f17d86f960243782aaeee93d491331c4aca5ddd | cdaringe/freshawair | Console.ml | let logger = print_endline
let error = prerr_endline
let log = logger
| null | https://raw.githubusercontent.com/cdaringe/freshawair/e0736cdadcd9c76461725e8f168ea18db351f212/lib/freshcommon/Console.ml | ocaml | let logger = print_endline
let error = prerr_endline
let log = logger
| |
63227baed1d14667a5339470e2aecde904482fe621c3bea5656361b3401ae097 | xxyzz/SICP | Exercise_2_37.rkt | #lang racket/base
(define (accumulate op initial sequence)
(if (null? sequence)
initial
(op (car sequence)
(accumulate op initial (cdr sequence)))))
(define (accumulate-n op init seqs)
(if (null? (car seqs))
null
(cons (accumulate op init (map (lambda (x) (car x)) s... | null | https://raw.githubusercontent.com/xxyzz/SICP/e26aea1c58fd896297dbf5406f7fcd32bb4f8f78/2_Building_Abstractions_with_Data/2.2_Hierarchical_Data_and_the_Closure_Property/Exercise_2_37.rkt | racket |
wow | #lang racket/base
(define (accumulate op initial sequence)
(if (null? sequence)
initial
(op (car sequence)
(accumulate op initial (cdr sequence)))))
(define (accumulate-n op init seqs)
(if (null? (car seqs))
null
(cons (accumulate op init (map (lambda (x) (car x)) s... |
12530cd15a28b2146d301f63c49aac58563d86ad9343d5d361d99d68b08448a9 | ygmpkk/house | Handle.hs | -- #hide
-----------------------------------------------------------------------------
-- |
-- Module : Timer.Handle
Copyright : ( c ) 2002
-- License : BSD-style
--
-- Maintainer :
-- Stability : provisional
-- Portability : portable
--
-----------------------------------------------------... | null | https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/libraries/ObjectIO/Graphics/UI/ObjectIO/Timer/Handle.hs | haskell | #hide
---------------------------------------------------------------------------
|
Module : Timer.Handle
License : BSD-style
Maintainer :
Stability : provisional
Portability : portable
---------------------------------------------------------------------------
The internal implementation ... | Copyright : ( c ) 2002
module Graphics.UI.ObjectIO.Timer.Handle where
import Graphics.UI.ObjectIO.CommonDef
import Graphics.UI.ObjectIO.Receiver.Handle
import Graphics.UI.ObjectIO.StdTimerDef
data TimerHandles ps
= TimerHandles
}
data TimerStateHandle ps
data TimerLSHandle ls ps
= TimerLSHan... |
2f3413158f4e8c9714f3e26e2d79ae2458caf12c98b49225833f2eb09d4026d7 | ktakashi/sagittarius-scheme | oauth2.scm | #!read-macro=sagittarius/regex
#!read-macro=sagittarius/bv-string
(import (rnrs)
(sagittarius)
(sagittarius regex)
(sagittarius socket)
(rfc oauth2)
(rfc http-connections)
(rfc x.509)
(rfc :5322)
(rfc tls)
(clos user)
(net server)
(crypto)
(prefix (binary io) binary:)
(text json)
(srfi :18)
(srfi :19)
(... | null | https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/3971b131d463696297c320dbe595dffd08867dac/test/tests/rfc/oauth2.scm | scheme | something went terribly wrong | #!read-macro=sagittarius/regex
#!read-macro=sagittarius/bv-string
(import (rnrs)
(sagittarius)
(sagittarius regex)
(sagittarius socket)
(rfc oauth2)
(rfc http-connections)
(rfc x.509)
(rfc :5322)
(rfc tls)
(clos user)
(net server)
(crypto)
(prefix (binary io) binary:)
(text json)
(srfi :18)
(srfi :19)
(... |
7bba9c901e526b1ebdef2d22e375265c78630499b3cc93c4cbbd6bd69d476642 | csabahruska/jhc-components | C.hs | module Jhc.Type.C where
import Jhc.Type.Word
import Jhc.Type.Float
-- | Haskell representation for @errno@ values.
-- The implementation is deliberately exposed, to allow users to add
-- their own definitions of 'Errno' values.
newtype Errno = Errno CInt
newtype {-# CTYPE "char" #-} CChar = CChar Int8
n... | null | https://raw.githubusercontent.com/csabahruska/jhc-components/a7dace481d017f5a83fbfc062bdd2d099133adf1/lib/jhc/Jhc/Type/C.hs | haskell | | Haskell representation for @errno@ values.
The implementation is deliberately exposed, to allow users to add
their own definitions of 'Errno' values.
# CTYPE "char" #
# CTYPE "signed char" #
# CTYPE "unsigned char" #
# CTYPE "short" #
# CTYPE "unsigned short" #
# CTYPE "int" #
# CTYPE "unsigned" #
# CTYPE "long" #... | module Jhc.Type.C where
import Jhc.Type.Word
import Jhc.Type.Float
newtype Errno = Errno CInt
newtype CIntMax = CIntMax IntMax
newtype CUIntMax = CUIntMax WordMax
newtype CIntPtr = CIntPtr IntPtr
newtype CUIntPtr = CUIntPtr WordPtr
newtype CFloat = CFloat Float
newtype CDouble = CDouble Double
# CTYPE " FIL... |
20e1b17454d5ec146109db7cf6919265cc11dc244e2e623c48ebc0803fa03b92 | bytekid/mkbtt | loop.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/nontermination/loop.ml | ocaml | ** OPENS *******************************************************************
** MODULES *****************************************************************
** TYPES *******************************************************************
** FUNCTIONS ***************************************************************
Constructor... | 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... |
a465f887a3e3512716d6d2c12405c6cc1547121522eeeb873ab90f28aaa941dc | soegaard/metapict | pict-lite.rkt | #lang racket/base
;;;
;;; This module exports all identifiers from pict,
that does n't collide with .
;;;
(require pict)
(provide (except-out (all-from-out pict)
arrow circle rectangle rounded-rectangle filled-rounded-rectangle scale text))
(provide (prefix-out pict: scale))
| null | https://raw.githubusercontent.com/soegaard/metapict/47ae265f73cbb92ff3e7bdd61e49f4af17597fdf/metapict/pict-lite.rkt | racket |
This module exports all identifiers from pict,
| #lang racket/base
that does n't collide with .
(require pict)
(provide (except-out (all-from-out pict)
arrow circle rectangle rounded-rectangle filled-rounded-rectangle scale text))
(provide (prefix-out pict: scale))
|
d3d93fa4a65109ce14250712f971f2152ac4cbe825b95c297dc0c854428462db | fossas/fossa-cli | LicenseScanning.hs | # LANGUAGE RecordWildCards #
module Control.Carrier.FossaApiClient.Internal.LicenseScanning (
getSignedLicenseScanUrl,
finalizeLicenseScan,
uploadLicenseScanResult,
) where
import Control.Algebra (Has)
import Control.Carrier.FossaApiClient.Internal.FossaAPIV1 qualified as API
import Control.Effect.Diagnostics (... | null | https://raw.githubusercontent.com/fossas/fossa-cli/c8367f402a6d403fb55a3925cdb27354b5c5b190/src/Control/Carrier/FossaApiClient/Internal/LicenseScanning.hs | haskell | # LANGUAGE RecordWildCards #
module Control.Carrier.FossaApiClient.Internal.LicenseScanning (
getSignedLicenseScanUrl,
finalizeLicenseScan,
uploadLicenseScanResult,
) where
import Control.Algebra (Has)
import Control.Carrier.FossaApiClient.Internal.FossaAPIV1 qualified as API
import Control.Effect.Diagnostics (... | |
17673aa526b39fc9498a93aec8a10eb0c24c519a472e682f6f0d7bf4afe18b3d | oakmac/humble-animations | animate.clj | (ns humble-animations.animate
"Manages a queue of animations and provides a tick! function to implement
incremental progress as the animation occurs."
(:require
[tween-clj.core :as tween]))
(def *request-frame-fn (atom nil))
(defn now
"returns the current time in milliseconds"
[]
(System/currentTimeMi... | null | https://raw.githubusercontent.com/oakmac/humble-animations/b3c6d54747da904fdc60025da7892570f89175a5/src/humble_animations/animate.clj | clojure | TODO: should we warn here?
TODO: good candidate for unit tests
TODO: good candidate for unit tests
NOTE: this should not happen
FIXME: not working yet
process the queue
calculate the tween value for this animation
we have reached their end-val
it is past time
run their provided on-tick function with the val
... | (ns humble-animations.animate
"Manages a queue of animations and provides a tick! function to implement
incremental progress as the animation occurs."
(:require
[tween-clj.core :as tween]))
(def *request-frame-fn (atom nil))
(defn now
"returns the current time in milliseconds"
[]
(System/currentTimeMi... |
56f16940802d0658a8f3e6ee84851403cabc285052fd08013ec8e8c9ac1b23f8 | dalaing/little-languages | Text.hs | |
Copyright : ( c ) , 2016
License : :
Stability : experimental
Portability : non - portable
Copyright : (c) Dave Laing, 2016
License : BSD3
Maintainer :
Stability : experimental
Portability : non-portable
-}
module Test.Term.Text (
textTests
) where
-- from 'tasty'
import ... | null | https://raw.githubusercontent.com/dalaing/little-languages/9f089f646a5344b8f7178700455a36a755d29b1f/code/b/tests/Test/Term/Text.hs | haskell | from 'tasty'
from 'tasty-quickcheck'
from 'QuickCheck'
local | |
Copyright : ( c ) , 2016
License : :
Stability : experimental
Portability : non - portable
Copyright : (c) Dave Laing, 2016
License : BSD3
Maintainer :
Stability : experimental
Portability : non-portable
-}
module Test.Term.Text (
textTests
) where
import Test.T... |
89712bd8a1ee61348c6bc568bbdb676f0a7b541b5a08741806e3b21277757f2d | copton/haskell-examples | maybe.hs | import Prelude hiding (Maybe, Nothing, Just)
data Maybe a = Nothing
| Just a
deriving (Show)
instance Monad Maybe where
Nothing >>= _ = Nothing
Just a >>= f = f a
return x = Just x
f :: (Num a) => a -> a -> Maybe a
f x y | x /= 0 = Just (x + y)
| otherwise = Nothing
... | null | https://raw.githubusercontent.com/copton/haskell-examples/27c297848ca0f77aa152ab815d1aacd1e01d0830/real-world-haskell/monads/maybe.hs | haskell | import Prelude hiding (Maybe, Nothing, Just)
data Maybe a = Nothing
| Just a
deriving (Show)
instance Monad Maybe where
Nothing >>= _ = Nothing
Just a >>= f = f a
return x = Just x
f :: (Num a) => a -> a -> Maybe a
f x y | x /= 0 = Just (x + y)
| otherwise = Nothing
... | |
32b62ae8a11d7d568f12b14285663a35cebff02ba0e5e9aee70c0b2c21108101 | racket/typed-racket | check-below.rkt | #lang racket/base
(require "../utils/utils.rkt"
racket/match (prefix-in - (contract-req))
racket/format
"../env/lexical-env.rkt"
"../types/utils.rkt"
"../types/subtype.rkt"
"../types/prop-ops.rkt"
"../types/abbrev.rkt"
"../types/tc-result.rkt"
... | null | https://raw.githubusercontent.com/racket/typed-racket/1dde78d165472d67ae682b68622d2b7ee3e15e1e/typed-racket-lib/typed-racket/typecheck/check-below.rkt | racket | If expected is #f, then just return tr1
else behave as check-below
value-mismatch : tc-results/c tc-results/c -> void?
Helper to print messages of the form
check-below : (/\ (Results Type -> Result)
(Results Results -> Result)
(Type Type -> Type))
where multiple values are ex... | #lang racket/base
(require "../utils/utils.rkt"
racket/match (prefix-in - (contract-req))
racket/format
"../env/lexical-env.rkt"
"../types/utils.rkt"
"../types/subtype.rkt"
"../types/prop-ops.rkt"
"../types/abbrev.rkt"
"../types/tc-result.rkt"
... |
e9ed9b786c1d4880dad3ac093f2deb694f84d3af80908dd0305386177b7234f6 | CryptoKami/cryptokami-core | Spec.hs | module Main where
import Universum
import qualified APISpec as API
import qualified MarshallingSpec as Marshalling
import qualified SwaggerSpec as Swagger
import Test.Hspec
-- | Tests whether or not some instances (JSON, Bi, etc) roundtrips.
main :: IO ()
main = hspec $ do
Marshalling.spec
... | null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/wallet-new/test/Spec.hs | haskell | | Tests whether or not some instances (JSON, Bi, etc) roundtrips. | module Main where
import Universum
import qualified APISpec as API
import qualified MarshallingSpec as Marshalling
import qualified SwaggerSpec as Swagger
import Test.Hspec
main :: IO ()
main = hspec $ do
Marshalling.spec
API.spec
Swagger.spec
|
1fa2fa103a84591c7a9686322afdb33c6fa2e4ff0946537e32b7dc5872b9b404 | achirkin/vulkan | Sampler.hs | # OPTIONS_HADDOCK ignore - exports #
{-# LANGUAGE DataKinds #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE KindSignatures #
{-# LANGUAGE PatternSynonyms #-}
# LANGUAGE StandaloneDeriving #
{-# LANGUAGE Strict ... | null | https://raw.githubusercontent.com/achirkin/vulkan/b2e0568c71b5135010f4bba939cd8dcf7a05c361/vulkan-api/src-gen/Graphics/Vulkan/Types/Enum/Sampler.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE PatternSynonyms #
# LANGUAGE Strict #
# LANGUAGE TypeSynonymInstances #
| type = @enum@
<-extensions/html/vkspec.html#VkSamplerAddressMode VkSamplerAddressMode registry at www.khronos.org>
| type = @enum@
| Choose nearest mi... | # OPTIONS_HADDOCK ignore - exports #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE KindSignatures #
# LANGUAGE StandaloneDeriving #
module Graphics.Vulkan.Types.Enum.Sampler
(VkSamplerAddressMode(VkSamplerAddressMode,
... |
ee1558af9bdd7fee8d57b0813dec4b2bef655a3585b9398ccb75c35fdc4ee83f | franks42/naclj | hash_blake2b.clj | (ns naclj.hash-blake2b
(:import
(com.github.franks42.naclj NaCl)
(com.github.franks42.naclj NaCl$Sodium)
[clojure.lang IFn]
[clojure.lang.AFn])
(:refer-clojure :exclude [update])
(:require
[naclj.hash-protocol :refer :all]
[naclj.encode-util :refer :all]
[naclj.fixture :as f]))
;; sodium c... | null | https://raw.githubusercontent.com/franks42/naclj/0658915a860513340c5036fd759cc71510f91879/src/naclj/hash_blake2b.clj | clojure | sodium constants
public int crypto_generichash_blake2b_init_salt_personal(@Out byte[] state,
@In byte[] key, @u_int64_t long keylen,
@u_int64_t long outlen,
@In byte[] salt, @In byte[] pe... | (ns naclj.hash-blake2b
(:import
(com.github.franks42.naclj NaCl)
(com.github.franks42.naclj NaCl$Sodium)
[clojure.lang IFn]
[clojure.lang.AFn])
(:refer-clojure :exclude [update])
(:require
[naclj.hash-protocol :refer :all]
[naclj.encode-util :refer :all]
[naclj.fixture :as f]))
(def generi... |
6b12483de9caac23fa678adf68a2c0699d3b00864428e07a9802155b23511edf | aeyakovenko/rbm | MLP.hs | module Test.MLP(test) where
import Data.MLP as P
import qualified Data.DNN.Trainer as T
import qualified Data.Matrix as M
--utils
import Control.Monad.Identity(runIdentity)
import Control.Monad(forever,when,foldM)
--test modules
import System.Exit (exitFailure)
import Test.QuickCheck(verboseCheckWithResult)
import T... | null | https://raw.githubusercontent.com/aeyakovenko/rbm/e1767257ba7499e09b31b34b1ec76c14272ba127/Test/MLP.hs | haskell | utils
test modules
(1+0+1 ignored since its bias, sigmoid of -1+0+1) | module Test.MLP(test) where
import Data.MLP as P
import qualified Data.DNN.Trainer as T
import qualified Data.Matrix as M
import Control.Monad.Identity(runIdentity)
import Control.Monad(forever,when,foldM)
import System.Exit (exitFailure)
import Test.QuickCheck(verboseCheckWithResult)
import Test.QuickCheck.Test(isS... |
4b0632eac2c454e4d50260d7314076603cc48863899aad915f8c963e2ceb50ff | ragkousism/Guix-on-Hurd | ftp.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2014 , 2015 < >
Copyright © 2015 < >
Copyright © 2015 < >
Copyright © 2016 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Publ... | null | https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/gnu/packages/ftp.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 © 2014 , 2015 < >
Copyright © 2015 < >
Copyright © 2015 < >
Copyright © 2016 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu packag... |
56134ecf32a47add4b236f61d69c7ab847862f7fbd3f913cbc562ab84b057f5d | dstarcev/stepic-haskell | Task10.hs | module Module5.Task10 where
import Data.Char (isDigit)
-- system code
data Token = Number Int | Plus | Minus | LeftBrace | RightBrace
deriving (Eq, Show)
-- solution code
asToken :: String -> Maybe Token
asToken x = case x of
[] -> Nothing
"(" -> Just LeftBrace
")" -> Just RightBrace
"-" -> Just Minus
"+... | null | https://raw.githubusercontent.com/dstarcev/stepic-haskell/6a8cf4b3cc17333ac4175e825db57dbe151ebae0/src/Module5/Task10.hs | haskell | system code
solution code | module Module5.Task10 where
import Data.Char (isDigit)
data Token = Number Int | Plus | Minus | LeftBrace | RightBrace
deriving (Eq, Show)
asToken :: String -> Maybe Token
asToken x = case x of
[] -> Nothing
"(" -> Just LeftBrace
")" -> Just RightBrace
"-" -> Just Minus
"+" -> Just Plus
_ | all isDi... |
7d7d752e4592f7ca9a3c90d6dc93ae02086511e80b5424a6d74a6d1eca9b2c7a | andreasabel/helf | ExplSubst.hs | | Values implemented as terms with explicit substitutions in weak head normal form .
--
-- Call - by - value .
-- Relying on a - like generation of fresh names .
--
-- Call-by-value.
-- Relying on a gensym-like generation of fresh names.
-}
# LANGUAGE OverlappingInstances , IncoherentInstances , Undecidable... | null | https://raw.githubusercontent.com/andreasabel/helf/b0f9a48598012af4ab8459b94cd0de90553b5b7b/src/ExplSubst.hs | haskell |
Call - by - value .
Relying on a - like generation of fresh names .
Call-by-value.
Relying on a gensym-like generation of fresh names.
* Values
^ @x^a cls^-1 | c^a cls^-1@
^ @s@
^ constant function
^ @\xe@ abstraction
^ @Pi a ((\xe)[rho])@
^ e[rho]
Ne h@Def{} t vs -> VDef h t (reverse vs)
* smar... | | Values implemented as terms with explicit substitutions in weak head normal form .
-}
# LANGUAGE OverlappingInstances , IncoherentInstances , UndecidableInstances ,
PatternGuards , TupleSections #
PatternGuards, TupleSections #-}
module ClosVal where
import Prelude hiding (pi,abs,mapM)
import Contro... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.