_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
e52f4ed3927f39350ea6f124ceb61550ec4752e763d8bc0a48537f0e40ecb04b
AndrasKovacs/ELTE-func-lang
Notes08.hs
# LANGUAGE InstanceSigs , DeriveFunctor , , DeriveTraversable # DeriveTraversable #-} következő óra : regex import Data.Foldable import Data.Traversable import Control.Monad import Control.Applicative -- many, some isDigit : : Bool digitToInt : : Int import Debug.Trace -- trace :: ...
null
https://raw.githubusercontent.com/AndrasKovacs/ELTE-func-lang/32037ea3a2a27cd85a2ca8bbef3c09430cd67087/2021-22-1/gyak_1/Notes08.hs
haskell
many, some trace :: String -> a -> a traceShow :: Show b => b -> a -> a canvas: másik : Applicative f => (Int -> f Int) -> Tree -> f Tree ------------------------------------------------------------------------------ (parser "kombinátor" library) üres String olvasása output String 1-el rövidebb! konkrét S...
# LANGUAGE InstanceSigs , DeriveFunctor , , DeriveTraversable # DeriveTraversable #-} következő óra : regex import Data.Foldable import Data.Traversable import Control.Monad isDigit : : Bool digitToInt : : Int ( miért írjuk ? ) ( definíció bonyolultabb , a típushibák , mint a...
fa64c816c101b45e2310a3a46eb812326c178dad0f678a64eb8ef2cc7416b398
raspasov/neversleep
mysql_lib.clj
(ns neversleep-db.mysql-lib (:require [clojure.java.jdbc :as db-adapter] [neversleep-db.state :as state] [neversleep-db.println-m :refer [println-m]] [neversleep-db.env :as env]) (:import com.jolbox.bonecp.BoneCPDataSource)) ;MYSQL CONFIG (defn mysql-config [] (-> env/env :conf...
null
https://raw.githubusercontent.com/raspasov/neversleep/7fd968f4ab20fa6ef71e1049e3eec289ea6691e4/src/neversleep_db/mysql_lib.clj
clojure
MYSQL CONFIG min pool max pool (defn- get-last-insert-id [db-connection] (-> (db-adapter/query db-connection ["SELECT LAST_INSERT_ID() AS last_insert_id"]) :last_insert_id)) ([sql-vector] (db-adapter/with-db-transaction [db-connection (db-spec)] (...
(ns neversleep-db.mysql-lib (:require [clojure.java.jdbc :as db-adapter] [neversleep-db.state :as state] [neversleep-db.println-m :refer [println-m]] [neversleep-db.env :as env]) (:import com.jolbox.bonecp.BoneCPDataSource)) (defn mysql-config [] (-> env/env :config :mysql)) (d...
d079bfe0fe71fbb9585610c87f14312f0e21a4ab6343b0787f4f2942b5b7bac8
janestreet/async_kernel
laziness_preserving_deferred.ml
open Core open Async_kernel module T = struct type 'a t = | Eager of 'a Deferred.Or_error.t | Lazy of 'a Lazy_deferred.t | Bind of { mutable state : 'a bind } and 'a bind = | Ready : 'a t * ('a -> 'b t) -> 'b bind | Running : 'a t Deferred.Or_error.t -> 'a bind let return x = Eager (Deferre...
null
https://raw.githubusercontent.com/janestreet/async_kernel/9575c63faac6c2d6af20f0f21ec535401f310296/laziness_preserving_deferred/src/laziness_preserving_deferred.ml
ocaml
open Core open Async_kernel module T = struct type 'a t = | Eager of 'a Deferred.Or_error.t | Lazy of 'a Lazy_deferred.t | Bind of { mutable state : 'a bind } and 'a bind = | Ready : 'a t * ('a -> 'b t) -> 'b bind | Running : 'a t Deferred.Or_error.t -> 'a bind let return x = Eager (Deferre...
a53097d3ad7930eb4cbf4c22aa943946c155afac5dee6f01603445a87a7a6c3f
nuprl/gradual-typing-performance
main.rkt
#lang racket/base (require "echo.rkt") (define MESSAGE (make-string 1000)) (define (server-loop in out) (lambda () (echo in out))) (define (main n) (for ((_i (in-range n))) (define-values (in out) (make-pipe)) (define-values (_in _out) (make-pipe)) (define c (make-custodian)) (parameterize (...
null
https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/experimental/threads/communication/untyped/main.rkt
racket
#lang racket/base (require "echo.rkt") (define MESSAGE (make-string 1000)) (define (server-loop in out) (lambda () (echo in out))) (define (main n) (for ((_i (in-range n))) (define-values (in out) (make-pipe)) (define-values (_in _out) (make-pipe)) (define c (make-custodian)) (parameterize (...
9cb005309bc394f9ee4714a21a24fd49c4afd72e88858a9a6073578cfa0ef735
spechub/Hets
SFKT.hs
{-# LANGUAGE RankNTypes #-} | Module : ./Common / SFKT.hs Copyright : ( c ) 2005 , , , and License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : experimental Portability : non - portable ( RankNTypes ) Implementation of LogicT...
null
https://raw.githubusercontent.com/spechub/Hets/f582640a174df08d4c965d7c0a1ab24d1a31000d/Common/SFKT.hs
haskell
# LANGUAGE RankNTypes # Hinze's promote
| Module : ./Common / SFKT.hs Copyright : ( c ) 2005 , , , and License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : experimental Portability : non - portable ( RankNTypes ) Implementation of LogicT based on the two - continua...
7b34cd4b59f6fee35fe02a414dcfbfcad9b3120e78f32e47db439192d9217a7b
binaryage/chromex
autofill_private.clj
(ns chromex.ext.autofill-private "Use the chrome.autofillPrivate API to add, remove, or update autofill data from the settings UI. * available since Chrome master" (:refer-clojure :only [defmacro defn apply declare meta let partial]) (:require [chromex.wrapgen :refer [gen-wrap-helper]] [chro...
null
https://raw.githubusercontent.com/binaryage/chromex/33834ba5dd4f4238a3c51f99caa0416f30c308c5/src/exts_private/chromex/ext/autofill_private.clj
clojure
-- events ----------------------------------------------------------------------------------------------------------------- docs: /#tapping-events -- convenience ------------------------------------------------------------------------------------------------------------ --------------------------------------------...
(ns chromex.ext.autofill-private "Use the chrome.autofillPrivate API to add, remove, or update autofill data from the settings UI. * available since Chrome master" (:refer-clojure :only [defmacro defn apply declare meta let partial]) (:require [chromex.wrapgen :refer [gen-wrap-helper]] [chro...
121d203bed81a8bf137f3d209cf60df2cd099239bd177c561d2aa9005194d791
wattlebirdaz/rclref
brutal_kill_nodes_SUITE.erl
-module(brutal_kill_nodes_SUITE). -include_lib("common_test/include/ct.hrl"). -export([all/0, init_per_suite/1, end_per_suite/1]). -export([brutal_kill_nodes_test/1]). all() -> [brutal_kill_nodes_test]. init_per_suite(Config) -> application:ensure_all_started(rclref), Names = [node1, node2, node3, node4...
null
https://raw.githubusercontent.com/wattlebirdaz/rclref/0e31857de43e3930f69d4063f79a518fe9fdbb79/test/other/brutal_kill_nodes_SUITE.erl
erlang
brutal kill nodes check dead
-module(brutal_kill_nodes_SUITE). -include_lib("common_test/include/ct.hrl"). -export([all/0, init_per_suite/1, end_per_suite/1]). -export([brutal_kill_nodes_test/1]). all() -> [brutal_kill_nodes_test]. init_per_suite(Config) -> application:ensure_all_started(rclref), Names = [node1, node2, node3, node4...
2eaaaa5376b762926f0b96352f91287f6c036fbe6e1ca9a70a4eb7c545d11200
kblake/erlang-chat-demo
element_google_chart.erl
Nitrogen Web Framework for Erlang Copyright ( c ) 2008 - 2010 See MIT - LICENSE for licensing information . -module (element_google_chart). -compile(export_all). -include_lib ("wf.hrl"). -include_lib ("google_chart.hrl"). reflect() -> record_info(fields, google_chart). render_element(Record) -> % Path.....
null
https://raw.githubusercontent.com/kblake/erlang-chat-demo/6fd2fce12f2e059e25a24c9a84169b088710edaf/apps/nitrogen/src/elements/other/element_google_chart.erl
erlang
Path... Chart Type... Title... Title Color and Font Size... Size... Grid... Background Colors... Legend Location... Axes... Data... Calculate bar size... Render the image tag...
Nitrogen Web Framework for Erlang Copyright ( c ) 2008 - 2010 See MIT - LICENSE for licensing information . -module (element_google_chart). -compile(export_all). -include_lib ("wf.hrl"). -include_lib ("google_chart.hrl"). reflect() -> record_info(fields, google_chart). render_element(Record) -> Path = "...
099cd306f0f8cbb7a1d1986fac8fd3ffade47ed53c27fc362d2df9cae695ab6e
danfran/cabal-macosx
AppBuildInfo.hs
-- | Information used to help create an application bundle module Distribution.MacOSX.AppBuildInfo where import Distribution.Simple.LocalBuildInfo (LocalBuildInfo(..)) import System.FilePath import Distribution.MacOSX.Common -- | Information needed to build a bundle -- -- This exists to make it possible to have a ...
null
https://raw.githubusercontent.com/danfran/cabal-macosx/6714a7018ddcd71efd96044bd55c0e19fb690939/Distribution/MacOSX/AppBuildInfo.hs
haskell
| Information used to help create an application bundle | Information needed to build a bundle This exists to make it possible to have a standalone | Location of the application bundle being built | Location of the original executable that was built | | @toAppBuildInfo l m@ returns information for an applicat...
module Distribution.MacOSX.AppBuildInfo where import Distribution.Simple.LocalBuildInfo (LocalBuildInfo(..)) import System.FilePath import Distribution.MacOSX.Common - app executable without it necessarily having to know a lot of Cabal internals data AppBuildInfo = AppBuildInfo abAppPath :: FilePath ...
053883b9f8c3d853348bd01a967ebde7da2e7caadd647f4fd73b585f7349be1d
linuxscout/festival-tts-arabic-voices
ara_norm_ziad_hts.scm
;; ---------------------------------------------------------------- ;; Nagoya Institute of Technology and ; ; Carnegie Mellon University ; ; Copyright ( c ) 2002 ; ; ...
null
https://raw.githubusercontent.com/linuxscout/festival-tts-arabic-voices/5f2210698f5a40adf88516f25ddb1b01e8054f5a/voices/ara_norm_ziad_hts/festvox/ara_norm_ziad_hts.scm
scheme
---------------------------------------------------------------- ;; ; ; ; ; ;; Permission is hereby granted, free of charge, to use and ;; distribute this software and its documentation without ;; restriction, including...
(if (assoc 'ara_norm_ziad_hts voice-locations) (defvar ara_norm_ziad_hts::hts_dir (cdr (assoc 'ara_norm_ziad_hts voice-locations))) (defvar ara_norm_ziad_hts::hts_dir (string-append (pwd) "/"))) (defvar ara_norm_ziad::clunits_dir ara_norm_ziad_hts::hts_dir) (defvar ara_norm_ziad::clunits_loaded nil) (...
e4b6e3a89b696dfb71b125a869ef572987e31763b3efbf2bc4f6e385fc851cc7
lisp-korea/sicp
ex-1-2-lkbwww.scm
1.2.1 recursion, iteration process (define (factorial number) (define (fact-iter product counter) (if (> counter number) product (fact-iter (* product counter) (+ counter 1)))) (fact-iter 1 1)) Exercise 1.9 (define (inc x) (+ x 1)) (define (dec x) (- x 1)) (define (+ a b) (if (= a 0) ...
null
https://raw.githubusercontent.com/lisp-korea/sicp/4cdc1b1d858c6da7c9f4ec925ff4a724f36041cc/ch01/1.2/ex-1-2-lkbwww.scm
scheme
recursion iteration
1.2.1 recursion, iteration process (define (factorial number) (define (fact-iter product counter) (if (> counter number) product (fact-iter (* product counter) (+ counter 1)))) (fact-iter 1 1)) Exercise 1.9 (define (inc x) (+ x 1)) (define (dec x) (- x 1)) (define (+ a b) (if (= a 0) ...
a5454dc661c4408119bccc022bd8f56623bebb89bf5a3c6339346e5a0aaaabca
ocaml-omake/omake
omake_shell_lex.mli
(* * Lex a shell line. *) open Lm_glob open Omake_shell_type open Omake_command_type open! Omake_value_type (* * Commands with a leading \ are quoted. *) val parse_command_string : string -> simple_exe (* * Construct the pipe from the value. *) val pipe_of_value : Omake_env.t -> (Omake_env.t -> pos -> Lm...
null
https://raw.githubusercontent.com/ocaml-omake/omake/08b2a83fb558f6eb6847566cbe1a562230da2b14/src/shell/omake_shell_lex.mli
ocaml
* Lex a shell line. * Commands with a leading \ are quoted. * Construct the pipe from the value.
open Lm_glob open Omake_shell_type open Omake_command_type open! Omake_value_type val parse_command_string : string -> simple_exe val pipe_of_value : Omake_env.t -> (Omake_env.t -> pos -> Lm_location.t -> string -> (Lm_symbol.t * Omake_env.apply) option) -> glob_options -> pos -> Lm_location.t -> Omake_valu...
1137da107568817d6dc964a35575d58f4c37a5e3090530ea2e04b24962926e85
tsloughter/kuberl
kuberl_v1beta1_replica_set_status.erl
-module(kuberl_v1beta1_replica_set_status). -export([encode/1]). -export_type([kuberl_v1beta1_replica_set_status/0]). -type kuberl_v1beta1_replica_set_status() :: #{ 'availableReplicas' => integer(), 'conditions' => list(), 'fullyLabeledReplicas' => integer(), 'observedGeneration' => integer...
null
https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v1beta1_replica_set_status.erl
erlang
-module(kuberl_v1beta1_replica_set_status). -export([encode/1]). -export_type([kuberl_v1beta1_replica_set_status/0]). -type kuberl_v1beta1_replica_set_status() :: #{ 'availableReplicas' => integer(), 'conditions' => list(), 'fullyLabeledReplicas' => integer(), 'observedGeneration' => integer...
af58da0dbc2f1a89ddb1e740d07de2832ed9aaa9e93e389738ea9be991f7ddbe
turion/rhine
Terminal.hs
| Wrapper to write @terminal@ applications in Rhine , using concurrency . -} # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # # LANGUAGE RecordWildCards # module FRP.Rhine.Terminal ( TerminalEventClock (..) ...
null
https://raw.githubusercontent.com/turion/rhine/8b935a076f8899463bcde055eed3d799fb8f5827/rhine-terminal/src/FRP/Rhine/Terminal.hs
haskell
base exceptions time terminal transformers rhine | A clock that ticks whenever events or interrupts on the terminal arrive. | A function wrapping `flow` to use at the top level in order to run a `Rhine (TerminalT t m) cl ()` Example: @ mainRhine = tagS >-> arrMCl (liftIO . print) @@ TerminalEventClock m...
| Wrapper to write @terminal@ applications in Rhine , using concurrency . -} # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # # LANGUAGE RecordWildCards # module FRP.Rhine.Terminal ( TerminalEventClock (..) ...
1bba346d6efbb30556292e28b7683450b5bad52a6269c8b4b57b1277de646e7c
bitonic/anapo
RawHtml.hs
{-# LANGUAGE OverloadedStrings #-} module Anapo.TestApps.RawHtml (rawHtmlComponent) where import Control.Monad (when) import Anapo import Anapo.TestApps.Prelude rawHtmlComponent :: Node a Bool rawHtmlComponent = div_ [] $ do b <- ask n$ a_ [ href_ "#" , onclick_ $ \_ ev -> do preventDefault ev ...
null
https://raw.githubusercontent.com/bitonic/anapo/8f3c020973d16cecb5ee83a03d91fb00294d34c7/anapo-test-app/app/Anapo/TestApps/RawHtml.hs
haskell
# LANGUAGE OverloadedStrings #
module Anapo.TestApps.RawHtml (rawHtmlComponent) where import Control.Monad (when) import Anapo import Anapo.TestApps.Prelude rawHtmlComponent :: Node a Bool rawHtmlComponent = div_ [] $ do b <- ask n$ a_ [ href_ "#" , onclick_ $ \_ ev -> do preventDefault ev dispatch (modify not) ] (...
4371afd8464665c931cf5507d70d7aa23357ffa8485af6411d9533725d09cace
archaelus/tsung
rfc4515_parser.erl
%% Parsing functions for RFC4515 (String Representation of LDAP Search Filters) %% %% TODO: extensibleMatch features not implemented. %% Author : > -module(rfc4515_parser). -author(''). -export([tokenize/1,filter/1,filter_to_string/1]). %% tokenize/1 %% Tokenize the input string into a token list. Generat...
null
https://raw.githubusercontent.com/archaelus/tsung/b4ea0419c6902d8bb63795200964d25b19e46532/src/lib/rfc4515_parser.erl
erlang
Parsing functions for RFC4515 (String Representation of LDAP Search Filters) TODO: extensibleMatch features not implemented. tokenize/1 Tokenize the input string into a token list. Generated tokens: '(' , ')' , '=' , '<=' ,'>=' , '~=' , '*' , '&' , '|' , '*' , {text,Value} Ej: ldap_parser:tokenize("(&(!(prpr...
Author : > -module(rfc4515_parser). -author(''). -export([tokenize/1,filter/1,filter_to_string/1]). flatten because & amp ; , etc . in xml attributes ends in deep lists ej:[[38 ] ] tokenizer([$(|L],Current,Tokens) -> tokenizer(L,[],['('|add_current(Current,Tokens)]); tokenizer([$)|L],Current,Tokens...
dbf0895a9852f705fa6b9e252e39d5f3eba970068998bdb6f2b30e51c043b186
jimpil/Clondie24
core.clj
(ns Clondie24.lib.core (:require [Clondie24.lib.util :as ut] [clojure.core.reducers :as r] [enclog.training :as evo] [enclog.normalization :refer [prepare input output target-storage]] ) (:import [encog_java.customGA CustomNeuralGeneticAlgorithm Referee] [o...
null
https://raw.githubusercontent.com/jimpil/Clondie24/7045fab11bfd6e94cd95c032149a97146bae8d89/src/Clondie24/lib/core.clj
clojure
----------------------------------------<SOURCE>-------------------------------------------------------------------- ----------------------------------------<CODE>---------------------------------------------------------------------- optional in case you need mutation optional in case you need mutation {:post [(not ...
(ns Clondie24.lib.core (:require [Clondie24.lib.util :as ut] [clojure.core.reducers :as r] [enclog.training :as evo] [enclog.normalization :refer [prepare input output target-storage]] ) (:import [encog_java.customGA CustomNeuralGeneticAlgorithm Referee] [o...
d89d907640c433342d920b05abadf18d9782a6b777e64a4b90abd1d173d513ae
codedownio/sandwich
Main.hs
# LANGUAGE TypeOperators # # LANGUAGE DataKinds # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE QuasiQuotes # module Main where import Common import Control.Concurrent import Control.Monad.IO.Class import Data.Time.Clock import System.Random import Test.Sandwich landingDemo :: TopSpec landingDemo = describe "Arithme...
null
https://raw.githubusercontent.com/codedownio/sandwich/087ea530d4d9dd1333f6fcba53dc76ca13bc7c78/demos/demo-landing/app/Main.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeOperators # # LANGUAGE DataKinds # # LANGUAGE QuasiQuotes # module Main where import Common import Control.Concurrent import Control.Monad.IO.Class import Data.Time.Clock import System.Random import Test.Sandwich landingDemo :: TopSpec landingDemo = describe "Arithmetic tests" $ parallel $ do withTi...
c9184df78e2583fed2a62d86a5e1bd4ffc8529ba6615e3ce8a1f662c3374eb90
fossas/fossa-cli
VSIDeps.hs
module App.Fossa.VSIDeps ( analyzeVSIDeps, ) where import App.Fossa.Analyze.Project (ProjectResult (ProjectResult)) import App.Fossa.VSI.Analyze (runVsiAnalysis) import App.Fossa.VSI.IAT.Resolve (resolveGraph, resolveUserDefined) import App.Fossa.VSI.Types qualified as VSI import App.Types (ProjectRevision) import C...
null
https://raw.githubusercontent.com/fossas/fossa-cli/abac26299f1fce2d4c3f4b9b688a939064df20fa/src/App/Fossa/VSIDeps.hs
haskell
| VSI analysis is sufficiently different from other analysis types that it cannot be just another strategy. Instead, VSI analysis is run separately over the entire scan directory, outputting its own source unit.
module App.Fossa.VSIDeps ( analyzeVSIDeps, ) where import App.Fossa.Analyze.Project (ProjectResult (ProjectResult)) import App.Fossa.VSI.Analyze (runVsiAnalysis) import App.Fossa.VSI.IAT.Resolve (resolveGraph, resolveUserDefined) import App.Fossa.VSI.Types qualified as VSI import App.Types (ProjectRevision) import C...
9a3e074ecf3d3705b1132e27ab8777980cf8d2b893e6467051841c23ccf926e6
xclerc/ocamljava
threadGroup.mli
* This file is part of library . * Copyright ( C ) 2007 - 2015 . * * library is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation ; either version 3 of the License , or * ( at yo...
null
https://raw.githubusercontent.com/xclerc/ocamljava/8330bfdfd01d0c348f2ba2f0f23d8f5a8f6015b1/library/concurrent/src/threads/threadGroup.mli
ocaml
* Thread groups. * The type of thread groups, that are sets of threads organized into a hierarchy (every group except the initial one has a parent). Threads are added to a group at creation time and cannot change group afterwards. * Returns the maximum priority of the group; see {java java.lang.Threa...
* This file is part of library . * Copyright ( C ) 2007 - 2015 . * * library is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation ; either version 3 of the License , or * ( at yo...
1f0d83382b5f71ee66c19cb7c920a747235faab1825ea9dad7590302cb059fd2
airbus-seclab/bincat
x64Imports.ml
This file is part of BinCAT . Copyright 2014 - 2021 - Airbus BinCAT is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your opti...
null
https://raw.githubusercontent.com/airbus-seclab/bincat/e79cab4fad8b0e33e23f00be277ef79b4e9a3198/ocaml/src/disassembly/x64Imports.ml
ocaml
the return address expression is evaluated *after* cleaning up the stack (in stdcall), * so we need to look it up at the correct place, depending on the number of args
This file is part of BinCAT . Copyright 2014 - 2021 - Airbus BinCAT is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your opti...
6b3a6c40fafac92bf1530c871fac0d11a2634650e8f7f92bed9f3f7c10bb7a46
gonimo/gonimo
AcceptInvitation.hs
# LANGUAGE RecursiveDo # module Gonimo.Client.AcceptInvitation ( module UI ) where import Gonimo.Client.AcceptInvitation.UI as UI
null
https://raw.githubusercontent.com/gonimo/gonimo/f4072db9e56f0c853a9f07e048e254eaa671283b/front/src/Gonimo/Client/AcceptInvitation.hs
haskell
# LANGUAGE RecursiveDo # module Gonimo.Client.AcceptInvitation ( module UI ) where import Gonimo.Client.AcceptInvitation.UI as UI
1b7abcf9b5367625ab1d2005f32182358b90012d34085b180232e824b7b9673b
bradparker/bradparker.com
Home.hs
# LANGUAGE BlockArguments # # LANGUAGE DataKinds # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleContexts # # LANGUAGE NoFieldSelectors # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} # OPTIONS_GHC -Wall # module Home (render) where import qualified Data.ByteString.Lazy as LBS import Data.Fol...
null
https://raw.githubusercontent.com/bradparker/bradparker.com/843775de5d7939939c67043d9233706df2d7fd63/bradparker.com/usr/local/src/bradparker.com/builder/Home.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes #
# LANGUAGE BlockArguments # # LANGUAGE DataKinds # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleContexts # # LANGUAGE NoFieldSelectors # # OPTIONS_GHC -Wall # module Home (render) where import qualified Data.ByteString.Lazy as LBS import Data.Foldable (traverse_) import qualified Document import Post (Post(....
924cf1f8f6e7efdc0ab6c5e90ced186a2dc732cb4cd90344aed13f7ca6576a72
elbrujohalcon/witchcraft
magic.erl
@doc A module used to test some erlang magic for 's blog -module(magic). -export([whats_in/1, say/1]). -spec whats_in(term()) -> term(). whats_in(this_hat) -> case get(magic) of undefined -> nothing; Something -> Something end. -spec say(term()) -> ok. say(abracadabra) -> _ = put(magic, 'a rabbit'), ok.
null
https://raw.githubusercontent.com/elbrujohalcon/witchcraft/050e91f028a50874347fea9dc552a0e0a056018f/src/magic.erl
erlang
@doc A module used to test some erlang magic for 's blog -module(magic). -export([whats_in/1, say/1]). -spec whats_in(term()) -> term(). whats_in(this_hat) -> case get(magic) of undefined -> nothing; Something -> Something end. -spec say(term()) -> ok. say(abracadabra) -> _ = put(magic, 'a rabbit'), ok.
6bba563537da172c07715b9ea1d74b37807fec25a80490c69278e5bb7fa2775b
GrammaTech/sel
scopes-1.lisp
(let ((a 1)) (let ((b 2)) (let ((c 3)) (list a b c))))
null
https://raw.githubusercontent.com/GrammaTech/sel/a59174c02a454e8d588614e221cf281260cf12f8/test/etc/lisp-scopes/scopes-1.lisp
lisp
(let ((a 1)) (let ((b 2)) (let ((c 3)) (list a b c))))
4a1d873089acc7f4b5945882a2cf83ba6f4c4ba18595b30e3e533d3c826a7d62
FranklinChen/hugs98-plus-Sep2006
VertexArrays.hs
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.GL.VertexArrays Copyright : ( c ) 2002 - 2005 -- License : BSD-style (see the file libraries/OpenGL/LICENSE) -- -- Maintainer : -- Stability : provisional -- Portability...
null
https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/OpenGL/Graphics/Rendering/OpenGL/GL/VertexArrays.hs
haskell
------------------------------------------------------------------------------ | Module : Graphics.Rendering.OpenGL.GL.VertexArrays License : BSD-style (see the file libraries/OpenGL/LICENSE) Maintainer : Stability : provisional Portability : portable specs. --------------------------------...
Copyright : ( c ) 2002 - 2005 This module corresponds to section 2.8 ( Vertex Arrays ) of the OpenGL 1.5 module Graphics.Rendering.OpenGL.GL.VertexArrays ( NumComponents, DataType(..), Stride, VertexArrayDescriptor(..), * Specifying Data for the Arrays ClientArrayType(..), arrayPointer, Interlea...
9beecc84e0a72916f681a8a0c8f4fd1add7649a663884eea2b895a6c37f5ff76
mirage/capnp-rpc
connection.ml
module RO_array = Capnp_rpc.RO_array module Request = Capnp_direct.String_content.Request module Response = Capnp_direct.String_content.Response let src = Logs.Src.create "test-net" ~doc:"Cap'n Proto RPC tests" module Log = (val Logs.src_log src: Logs.LOG) module Stats = Capnp_rpc.Stats let stats_t = Alcotest.of_pp S...
null
https://raw.githubusercontent.com/mirage/capnp-rpc/097fd38d8bd0a320ea1867191274d8ef438419f8/test/testbed/connection.ml
ocaml
module RO_array = Capnp_rpc.RO_array module Request = Capnp_direct.String_content.Request module Response = Capnp_direct.String_content.Response let src = Logs.Src.create "test-net" ~doc:"Cap'n Proto RPC tests" module Log = (val Logs.src_log src: Logs.LOG) module Stats = Capnp_rpc.Stats let stats_t = Alcotest.of_pp S...
393fa04b742147d328325f5e87e26529707df87cc6c73623a8cc82641f4a0639
thesis/shale
webapp.cljs
(ns shale.webapp (:require [reagent.core :as reagent :refer [atom]] [reagent.session :as session] [secretary.core :as secretary :include-macros true] [accountant.core :as accountant] [ajax.core :refer [GET DELETE PUT]] [cemerick.url :refer [url]]...
null
https://raw.githubusercontent.com/thesis/shale/84180532e46ee5d9ee0218138da04ea035bcf7d2/src/cljs/shale/webapp.cljs
clojure
------------------------- Data ------------------------- Components ------------------------- Pages ------------------------- Routes -------------------------
(ns shale.webapp (:require [reagent.core :as reagent :refer [atom]] [reagent.session :as session] [secretary.core :as secretary :include-macros true] [accountant.core :as accountant] [ajax.core :refer [GET DELETE PUT]] [cemerick.url :refer [url]]...
58fe01ad6931b74eea2e2c6dac422c883bcc9950a3960b3ebd3e5c2f39b915d3
ghcjs/ghcjs
cgrun022.hs
-- !!! tests stack stubbing: if "f" doesn't stub "ns", -- !!! the program has a space leak. module Main where main = f (putStr "a") (take 1000000 (repeat True)) (putStr "b") f a ns b = if last ns then a else b
null
https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/test/ghc/codeGen/cgrun022.hs
haskell
!!! tests stack stubbing: if "f" doesn't stub "ns", !!! the program has a space leak.
module Main where main = f (putStr "a") (take 1000000 (repeat True)) (putStr "b") f a ns b = if last ns then a else b
440a622e98dd1bf14dd03ec2cbc37311a3298c1d6282ae1005ed6120425980c7
exoscale/clojure-kubernetes-client
v1_self_subject_access_review.clj
(ns clojure-kubernetes-client.specs.v1-self-subject-access-review (:require [clojure.spec.alpha :as s] [spec-tools.data-spec :as ds] [clojure-kubernetes-client.specs.v1-object-meta :refer :all] [clojure-kubernetes-client.specs.v1-self-subject-access-review-spec :refer :all] ...
null
https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/v1_self_subject_access_review.clj
clojure
(ns clojure-kubernetes-client.specs.v1-self-subject-access-review (:require [clojure.spec.alpha :as s] [spec-tools.data-spec :as ds] [clojure-kubernetes-client.specs.v1-object-meta :refer :all] [clojure-kubernetes-client.specs.v1-self-subject-access-review-spec :refer :all] ...
6f9233ef004c279d15d82f856dc1c6326532218feee550c21ab80182c536b9d1
dyzsr/ocaml-selectml
check_for_pack.ml
TEST * native - compiler * * setup - ocamlopt.byte - build - env * * * ocamlopt.byte flags = " -save - ir - after scheduling " ocamlopt_byte_exit_status = " 0 " * * * * script script = " touch empty.ml " * * * * * ocamlopt.byte flags = " -S check_for_pack.cmir - linear -for - pack f...
null
https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/testsuite/tests/tool-ocamlopt-save-ir/check_for_pack.ml
ocaml
TEST * native - compiler * * setup - ocamlopt.byte - build - env * * * ocamlopt.byte flags = " -save - ir - after scheduling " ocamlopt_byte_exit_status = " 0 " * * * * script script = " touch empty.ml " * * * * * ocamlopt.byte flags = " -S check_for_pack.cmir - linear -for - pack f...
058100ce3c4d8400dd0cab51696dca5469fcf5748d017127ddacfbd9e02aca63
TrustInSoft/tis-interpreter
unmarshal_nums.ml
(**************************************************************************) (* *) Copyright ( C ) 2009 - 2012 ( Institut National de Recherche en Informatique et en (* Automatique) ...
null
https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/libraries/datatype/unmarshal_nums.ml
ocaml
************************************************************************ Automatique) All rights reserved. ...
Copyright ( C ) 2009 - 2012 ( Institut National de Recherche en Informatique et en LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT open Unmarshal;; let readnat_big32 ch = let len = rea...
0737bb02a7141544f52672ec9d964cf60de7bcbfcf92741dfd97b32d839d94bc
NetComposer/nksip
nksip_registrar_plugin.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2019 . All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License . You may obtain %% a copy of the...
null
https://raw.githubusercontent.com/NetComposer/nksip/7fbcc66806635dc8ecc5d11c30322e4d1df36f0a/src/plugins/nksip_registrar_plugin.erl
erlang
------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissio...
Copyright ( c ) 2019 . All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY -module(nksip_registrar_plug...
11f19d28fc6949b53ac7ab30975ce58ddaa823cda1ac7aaaa3efe34a010401b4
journeyman-cc/smeagol
layout.clj
(ns ^{:doc "Render a page as HTML." :author "Simon Brooke"} smeagol.layout (:require [clojure.java.io :as cjio] [clojure.string :as s] [compojure.response :refer [Renderable]] [environ.core :refer [env]] [hiccup.core :refer [html]] [ring.util.anti-f...
null
https://raw.githubusercontent.com/journeyman-cc/smeagol/a775ef7b831a2fbcf9c98380367edc16d39c4c6c/src/smeagol/layout.clj
clojure
Smeagol: a very simple Wiki engine. This program is free software; you can redistribute it and/or either version 2 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 PURPOSE. See the GNU G...
(ns ^{:doc "Render a page as HTML." :author "Simon Brooke"} smeagol.layout (:require [clojure.java.io :as cjio] [clojure.string :as s] [compojure.response :refer [Renderable]] [environ.core :refer [env]] [hiccup.core :refer [html]] [ring.util.anti-f...
029ed53027e58ca9aa6ce52f9d3974d56f114253b9a94f7611477b9a602de8bd
facebook/flow
flow_cache.ml
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
null
https://raw.githubusercontent.com/facebook/flow/105ad30f566f401db9cafcb49cd2831fb29e87c5/src/typing/flow_cache.ml
ocaml
Cache that remembers pairs of types that are passed to __flow. Don't cache constraints involving type variables, since the corresponding typing rules are already sufficiently robust. Use ops are purely for better error messages: they should have no effect on type checking. However, recursively nest...
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
9a62c018c7fcf11746cd9408214e3ca3a3cc0c9aec266c26c148a481e6e700fc
raph-amiard/CamllVM
24_complexnums_clean.ml
open Complex let print_complex z = Printf.printf "%f + %f i\n" z.re z.im let () = let a = { re = 1.0; im = 1.0 } and b = { re = 3.14159; im = 1.25 } in print_complex (add a b); print_complex (mul a b); print_complex (inv a); print_complex (neg a); print_complex (conj a)
null
https://raw.githubusercontent.com/raph-amiard/CamllVM/d36928f0e81a6f4f65ddd3a8653887d187632dc2/test/testfiles/24_complexnums_clean.ml
ocaml
open Complex let print_complex z = Printf.printf "%f + %f i\n" z.re z.im let () = let a = { re = 1.0; im = 1.0 } and b = { re = 3.14159; im = 1.25 } in print_complex (add a b); print_complex (mul a b); print_complex (inv a); print_complex (neg a); print_complex (conj a)
31aedeee40dd5ac8e336a3a23d81128179155b8af5cc25708c7735758594a05b
mblake/jambi-hello-world
core.clj
(ns hello_world.core) (import 'com.trolltech.qt.gui.QApplication 'com.trolltech.qt.gui.QPushButton) (defn -main [] (QApplication/initialize (into-array [""])) (.show (new QPushButton "Hello World")) (QApplication/exec) )
null
https://raw.githubusercontent.com/mblake/jambi-hello-world/9495552b60266690e99a6f2a67d09b313baf6a21/src/hello_world/core.clj
clojure
(ns hello_world.core) (import 'com.trolltech.qt.gui.QApplication 'com.trolltech.qt.gui.QPushButton) (defn -main [] (QApplication/initialize (into-array [""])) (.show (new QPushButton "Hello World")) (QApplication/exec) )
1c4d02f046b3ceef284ad94dfff2a8b0377e08b00abd1f7da8a25e238c507168
colis-anr/morbig
CSTSerializers.mli
(**************************************************************************) (* -*- tuareg -*- *) (* *) Copyright ( C ) 2017 - 2021 , , . ...
null
https://raw.githubusercontent.com/colis-anr/morbig/42c5b9e2c806d4f9db210e7c100c70cd69ce7f08/src/CSTSerializers.mli
ocaml
************************************************************************ -*- tuareg -*- This is free software: you...
Copyright ( C ) 2017 - 2021 , , . under the terms of the GNU General Public License , version 3 . * for concrete syntax trees . val program_to_yojson : CST.program -> Yojson.Safe.t val program_of_yojson : Yojson.Safe.t -> CS...
06e6bde6e31c472e523fe5b930fbe3f395ec493cf84016f028629d7df1180d6f
gas2serra/mcclim-desktop
app-manager-config.lisp
(in-package :desktop-user) (setf (application-entry-fn *application*) #'(lambda (application &rest args) (declare (ignore application args)) (desktop-app-manager:run-app-manager)))
null
https://raw.githubusercontent.com/gas2serra/mcclim-desktop/f85d19c57d76322ae3c05f98ae43bfc8c0d0a554/dot-mcclim-desktop/config/app-manager-config.lisp
lisp
(in-package :desktop-user) (setf (application-entry-fn *application*) #'(lambda (application &rest args) (declare (ignore application args)) (desktop-app-manager:run-app-manager)))
5ebf873f49929859f121042e0115fbd9c661f28600fa03db41a85b5eb3c0cb2e
adamwalker/clash-utils
Butterfly.hs
module Clash.DSP.FFT.Butterfly ( Butterfly, difButterfly, ditButterfly ) where import Clash.Prelude type Butterfly dom twiddle input output = Signal dom twiddle -> Signal dom input -> Signal dom input -> (Signal dom output, Signal dom output) difButterfly :: Num a ...
null
https://raw.githubusercontent.com/adamwalker/clash-utils/95408d3f195b2e77b1f67b7ea045335f6e2abac6/src/Clash/DSP/FFT/Butterfly.hs
haskell
module Clash.DSP.FFT.Butterfly ( Butterfly, difButterfly, ditButterfly ) where import Clash.Prelude type Butterfly dom twiddle input output = Signal dom twiddle -> Signal dom input -> Signal dom input -> (Signal dom output, Signal dom output) difButterfly :: Num a ...
1d4f780d27ff7c0b08dbfcea74add598ab130147932918b133aa30d7a986caef
manavpatnaik/haskell
7_zip.hs
main = do zip : takes 2 lists and returns a list of pairs of the elements of the 2 lists print(zip [1,2,3] "dam") print(zip [1,2,3,4] "ab") print(zip [1,2,3] "abcde")
null
https://raw.githubusercontent.com/manavpatnaik/haskell/9e7c805afb2607468c2e2977247266ccc19d24b6/higher_order_functions/7_zip.hs
haskell
main = do zip : takes 2 lists and returns a list of pairs of the elements of the 2 lists print(zip [1,2,3] "dam") print(zip [1,2,3,4] "ab") print(zip [1,2,3] "abcde")
8851144bdbf51988703fa4bb68d75d480eca0d8df15242337d6f9c150c7a9085
racket/racket7
suggestions.rkt
#lang racket/base (require racket/set racket/path setup/dirs syntax/modcollapse (prefix-in db: "../db.rkt")) (provide pkg-catalog-suggestions-for-module) (define (choose-catalog-file) (define default (db:current-pkg-catalog-file)) (if (file-exists? default) default ...
null
https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/collects/pkg/private/suggestions.rkt
racket
#lang racket/base (require racket/set racket/path setup/dirs syntax/modcollapse (prefix-in db: "../db.rkt")) (provide pkg-catalog-suggestions-for-module) (define (choose-catalog-file) (define default (db:current-pkg-catalog-file)) (if (file-exists? default) default ...
62ca8b65b8ce17b68d24be574c4e3c6c28cf5cf11d6aabe2a7b006f26433edc2
bobeff/playground
010.rkt
Exercise 10 . Now relax , eat , sleep , and then tackle the next chapter . #lang racket (require racket/block) (define (life-cycle steps) (cond ((>= steps 0) (block (life-cycle (- steps 1)) (let ((step (remainder steps 3))) (cond ((= step 0) (println "relax")) ((= step...
null
https://raw.githubusercontent.com/bobeff/playground/7072dbd7e0acd690749abe1498dd5f247cc21637/htdp-second-edition/exercises/010.rkt
racket
Exercise 10 . Now relax , eat , sleep , and then tackle the next chapter . #lang racket (require racket/block) (define (life-cycle steps) (cond ((>= steps 0) (block (life-cycle (- steps 1)) (let ((step (remainder steps 3))) (cond ((= step 0) (println "relax")) ((= step...
287bfadd99b1f68ab10445ccc411e0f3ba9cc836b0ef7e36f376c309e7ce87fa
lispnik/iup
tuio-cffi.lisp
(defpackage #:iup-tuio-cffi (:use #:common-lisp)) (in-package #:iup-tuio-cffi) (cffi:define-foreign-library iup-tuio (:unix "libiuptuio.so") (:windows "iuptuio.dll") (t (:default "iuptuio"))) (cffi:use-foreign-library iup-tuio) (cffi:defcfun (%iup-tuio-open "IupTuioOpen") :int)
null
https://raw.githubusercontent.com/lispnik/iup/f8e5f090bae47bf8f91ac6fed41ec3bc01061186/tuio/tuio-cffi.lisp
lisp
(defpackage #:iup-tuio-cffi (:use #:common-lisp)) (in-package #:iup-tuio-cffi) (cffi:define-foreign-library iup-tuio (:unix "libiuptuio.so") (:windows "iuptuio.dll") (t (:default "iuptuio"))) (cffi:use-foreign-library iup-tuio) (cffi:defcfun (%iup-tuio-open "IupTuioOpen") :int)
d3db427ae1cb275a2f4e94ff004fd36438d164cbf5b74850fddf1c9f1bf91bc7
nammayatri/beckn-gateway
Subscriber.hs
Copyright 2022 - 23 , Juspay India Pvt Ltd This program is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any later version . This program ...
null
https://raw.githubusercontent.com/nammayatri/beckn-gateway/dcdadbb647a3049d62df283d35ae61eb5420d50e/app/mock-registry/src/Domain/Subscriber.hs
haskell
Copyright 2022 - 23 , Juspay India Pvt Ltd This program is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any later version . This program ...
f1926b7991d648c7904f482ee9cd622dbeef619af2bfd6b7aea37454a871a63f
robertmeta/cowboy-examples
redirect_sup.erl
-module(redirect_sup). -behaviour(supervisor). -export([init/1, start_link/0]). start_link() -> supervisor:start_link({local, ?MODULE}, ?MODULE, []). init([]) -> {ok, {{one_for_one, 10, 10}, []}}.
null
https://raw.githubusercontent.com/robertmeta/cowboy-examples/d03c289c9fb0d750eca11e3f1671e74d1841bd09/apps/redirect/src/redirect_sup.erl
erlang
-module(redirect_sup). -behaviour(supervisor). -export([init/1, start_link/0]). start_link() -> supervisor:start_link({local, ?MODULE}, ?MODULE, []). init([]) -> {ok, {{one_for_one, 10, 10}, []}}.
3150bc633f738f4ab749642ef33b327b07a29d98cddc758bcbc9b9775a73fbfa
janestreet/merlin-jst
location.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/janestreet/merlin-jst/980b574405617fa0dfb0b79a84a66536b46cd71b/src/ocaml/parsing/location.mli
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the * Source code locations ( ranges of positions ) , used in parsetree . { b Warning :} this module is ...
8f4f26f4ad1ba01fccf660c2d96fc3130b256f08c5cc95ece7ed29539eac5a03
philtomson/ClassifyDigits
classifyDigits.ml
OCaml version compile with : ocamlopt str.cmxa -o classifyDigits classifyDigits.ml compile with: ocamlopt str.cmxa -o classifyDigits classifyDigits.ml *) // This F # dojo is directly inspired by the // Digit Recognizer competition from Kaggle.com : // -recognizer // The datasets below ar...
null
https://raw.githubusercontent.com/philtomson/ClassifyDigits/876753ca89902b000dfef2be84b16100b8d8cd98/classifyDigits.ml
ocaml
OCaml version compile with : ocamlopt str.cmxa -o classifyDigits classifyDigits.ml compile with: ocamlopt str.cmxa -o classifyDigits classifyDigits.ml *) // This F # dojo is directly inspired by the // Digit Recognizer competition from Kaggle.com : // -recognizer // The datasets below ar...
62d361d682a2c2b7aefc2ba745b00ecee39a686a964f95ea698b52f4780053f8
flatironinstitute/flathub
FITS.hs
# LANGUAGE FlexibleInstances # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # module Output.FITS ( fitsOutput ) where import Control.Applicative ((<|>)) import Control.Monad (join) import Control.Monad.IO.Class (liftIO) import qualified Data.ByteString as BS import q...
null
https://raw.githubusercontent.com/flatironinstitute/flathub/767c97b32a7de729b5f076c5e4da54debe478541/src/Output/FITS.hs
haskell
# LANGUAGE OverloadedStrings # used fixed-format for all , tfZero = 0 tfZero = -127 count set by size below count set by length below XXX supposed to be ASCII -- will anyone care? supposed to be ASCII oh well
# LANGUAGE FlexibleInstances # # LANGUAGE RecordWildCards # module Output.FITS ( fitsOutput ) where import Control.Applicative ((<|>)) import Control.Monad (join) import Control.Monad.IO.Class (liftIO) import qualified Data.ByteString as BS import qualified Data.ByteString.Builder as...
5d7166777d540fcf50240a1bff58d8a626fed6b3c576ef90b43658a4cb17996e
janestreet/hardcaml
build_mode.ml
open Base type t = | Simulation | Synthesis [@@deriving sexp_of, compare, equal] let of_string = function | "simulation" -> Simulation | "synthesis" -> Synthesis | build_mode -> raise_s [%message "Invalid [Build_mode]" (build_mode : string)] ;;
null
https://raw.githubusercontent.com/janestreet/hardcaml/a9b1880ca2fb1a566eac66d935cacf344ec76b13/src/build_mode.ml
ocaml
open Base type t = | Simulation | Synthesis [@@deriving sexp_of, compare, equal] let of_string = function | "simulation" -> Simulation | "synthesis" -> Synthesis | build_mode -> raise_s [%message "Invalid [Build_mode]" (build_mode : string)] ;;
fa5df283e11aae94d927ed970dfe69a428998800c21a1c1e625b81f024532255
aldosolorzano/structurizr-clj
shape_test.clj
(ns structurizr-clj.shape-test (:require [clojure.test :refer :all] [structurizr-clj.shape :as structurizr.shape]) (:import (com.structurizr.view Shape))) (deftest shape-test (is (= structurizr.shape/box Shape/Box)) (is (= structurizr.shape/rounded-box Shape/RoundedBox)) (is (= structurizr.shape/...
null
https://raw.githubusercontent.com/aldosolorzano/structurizr-clj/20354fc97c660dd5ce44972f4a1d3935a4f32e4c/test/structurizr_clj/shape_test.clj
clojure
(ns structurizr-clj.shape-test (:require [clojure.test :refer :all] [structurizr-clj.shape :as structurizr.shape]) (:import (com.structurizr.view Shape))) (deftest shape-test (is (= structurizr.shape/box Shape/Box)) (is (= structurizr.shape/rounded-box Shape/RoundedBox)) (is (= structurizr.shape/...
648c09c986a3506f0298b33aa39e13d379325b825bc5979485e9e9a84f3cdd33
danieljharvey/mimsa
Entity.hs
{-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # {-# LANGUAGE OverloadedStrings #-} module Language.Mimsa.Core.Types.Module.Entity where -- a thing -- terrible, pls improve import qualified Data.Aeson as JSON import GHC.Generics import Language.Mimsa.Core.Printer import Langu...
null
https://raw.githubusercontent.com/danieljharvey/mimsa/e6b177dd2c38e8a67d6e27063ca600406b3e6b56/core/src/Language/Mimsa/Core/Types/Module/Entity.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE OverloadedStrings # a thing terrible, pls improve | a variable, `dog` | an infix operator, `<|>` | a typename, `Maybe` | a namespaced typename, `Prelude.Either` | a constructor, `Just` \| a namespaced constructor, `Maybe.Just`
# LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # module Language.Mimsa.Core.Types.Module.Entity where import qualified Data.Aeson as JSON import GHC.Generics import Language.Mimsa.Core.Printer import Language.Mimsa.Core.Types.AST.InfixOp import Language.Mimsa.Core.Types.Identifiers import Language.Mimsa.Cor...
a161ec03a47bd2eab3cb1eac8aaee7d05254d03f8dd600f699035e8e17b3fdec
ShamoX/cash
signal_3_9.mli
(***********************************************************************) (* Cash *) (* *) , projet Cristal , INRIA Rocquencourt (* ...
null
https://raw.githubusercontent.com/ShamoX/cash/aa97231154c3f64c9d0a62823e1ed71e32ab8718/signal_3_9.mli
ocaml
********************************************************************* Cash under the terms of the GNU Lesser Gene...
, projet Cristal , INRIA Rocquencourt Copyright 2002 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed Cash is based on , by . value signal_process : Procobj.proc -> int -> unit; va...
1ccaa6fafe6093d54a1d2912fb657c4c00df6f94a45c938b86c70e4dcd72acb6
prikhi/xmonad-config
StatusBar.hs
{-# LANGUAGE OverloadedStrings #-} module StatusBar (startupHook, eventHook, stopHook) where import XMonad (X, Event, ScreenId(S), spawn) import XMonad.Hooks.DynamicBars (dynStatusBarStartup, dynStatusBarEventHook) import Xmobar ( Config(..), XPosition(OnScreen, Top, TopP), Date(Date) , Monitors(Network, Cpu, ...
null
https://raw.githubusercontent.com/prikhi/xmonad-config/8357d9d6fcc988193d568874581b88d8c2b64cae/src/StatusBar.hs
haskell
# LANGUAGE OverloadedStrings # Hooks | Start the Status Bars & System Tray. | Start the Status Bar for the Screen. | Kill all Status Bar & System Tray Processes. | Start the System Tray Process. | Stop the System Tray Process. The process ID of the bar will be added to the `StatusBarStorage` so it can be kille...
module StatusBar (startupHook, eventHook, stopHook) where import XMonad (X, Event, ScreenId(S), spawn) import XMonad.Hooks.DynamicBars (dynStatusBarStartup, dynStatusBarEventHook) import Xmobar ( Config(..), XPosition(OnScreen, Top, TopP), Date(Date) , Monitors(Network, Cpu, Weather, MPD), Runnable(Run), defau...
8e89e21c28330356437c674262b779d5bd9175622f4b5816e6cbe675605c6b1d
GlideAngle/flare-timing
Rational.hs
# OPTIONS_GHC -fno - warn - partial - type - signatures # module Internal.Sphere.PointToPoint.Rational ( distance , azimuthFwd , azimuthRev ) where import Prelude hiding (flip) import Data.Ratio((%)) import qualified Data.Number.FixedFunctions as F import Data.UnitsOfMeasure (One, (-:), (*:), u, conve...
null
https://raw.githubusercontent.com/GlideAngle/flare-timing/27bd34c1943496987382091441a1c2516c169263/lang-haskell/earth/library/Internal/Sphere/PointToPoint/Rational.hs
haskell
| Spherical distance using haversines and rational numbers. SEE: -type.co.uk/scripts/latlong.html
# OPTIONS_GHC -fno - warn - partial - type - signatures # module Internal.Sphere.PointToPoint.Rational ( distance , azimuthFwd , azimuthRev ) where import Prelude hiding (flip) import Data.Ratio((%)) import qualified Data.Number.FixedFunctions as F import Data.UnitsOfMeasure (One, (-:), (*:), u, conve...
fbbc0d86e3cabb8f18739beaa7f3a0132852e11c3c9fabf2e99f3cb8bbf62722
clojure/core.typed
helpers.cljs
(ns cljs.core.typed.test.dnolen.utils.helpers) (defn ^{:ann '[Any Any -> Any]} index-of [xs x] (let [len (count xs)] (loop [i 0] (if (< i len) (if (= (nth xs i) x) i (recur (inc i))) -1))))
null
https://raw.githubusercontent.com/clojure/core.typed/f5b7d00bbb29d09000d7fef7cca5b40416c9fa91/typed/checker.js/test/cljs/cljs/core/typed/test/dnolen/utils/helpers.cljs
clojure
(ns cljs.core.typed.test.dnolen.utils.helpers) (defn ^{:ann '[Any Any -> Any]} index-of [xs x] (let [len (count xs)] (loop [i 0] (if (< i len) (if (= (nth xs i) x) i (recur (inc i))) -1))))
b86196b7757b4e0b5b933ab49886bd46210860345edb234b01d53ce6407cbdee
fractalide/fractalide
adder.rkt
#lang racket/base (require fractalide/modules/rkt/rkt-fbp/agent) (define-agent #:input-array '("in") ; in array port #:output '("out") ; out port (define sum (for/fold ([sum 0]) ([(k v) (input-array "in")]) (+ sum (recv v)))) (send (output "out") sum))
null
https://raw.githubusercontent.com/fractalide/fractalide/9c54ec2615fcc2a1f3363292d4eed2a0fcb9c3a5/modules/rkt/rkt-fbp/agents/adder.rkt
racket
in array port out port
#lang racket/base (require fractalide/modules/rkt/rkt-fbp/agent) (define-agent (define sum (for/fold ([sum 0]) ([(k v) (input-array "in")]) (+ sum (recv v)))) (send (output "out") sum))
3c8dea483fc121c8ea965980dbe626127c955f2894fa063cd28d0b3a5c4a0bb9
agrafix/Spock
Action.hs
# LANGUAGE DataKinds # {-# LANGUAGE DoAndIfThenElse #-} # LANGUAGE FlexibleContexts # {-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # module Web.Spock.Action ( -- * Action types ActionT, W.ActionCtxT, -- * Handling requests reque...
null
https://raw.githubusercontent.com/agrafix/Spock/6055362b54f2fae5418188c3fc2fc1659ca43e79/Spock-core/src/Web/Spock/Action.hs
haskell
# LANGUAGE DoAndIfThenElse # # LANGUAGE GADTs # # LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # * Action types * Handling requests * Working with context * Sending responses * Basic HTTP-Auth
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # module Web.Spock.Action ActionT, W.ActionCtxT, request, header, rawHeader, cookies, cookie, reqMethod, preferredFormat, ClientPreferredFormat (..), body, jsonBody, jsonBody', f...
a5a1b02fe036e95843c3fcaf3a712377b4e6347e9305d044dcda98e0d0d23002
Workiva/eva
types.clj
Copyright 2015 - 2019 Workiva Inc. ;; ;; Licensed under the Eclipse Public License 1.0 (the "License"); ;; you may not use this file except in compliance with the License. ;; You may obtain a copy of the License at ;; ;; -1.0.php ;; ;; Unless required by applicable law or agreed to in writing, software dist...
null
https://raw.githubusercontent.com/Workiva/eva/b7b8a6a5215cccb507a92aa67e0168dc777ffeac/core/src/eva/v2/messaging/node/manager/types.clj
clojure
Licensed under the Eclipse Public License 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at -1.0.php Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expre...
Copyright 2015 - 2019 Workiva Inc. distributed under the License is distributed on an " AS IS " BASIS , (ns eva.v2.messaging.node.manager.types (:require [clojure.spec.alpha :as s])) TODO : multispec (s/def ::config map?) (defmulti messenger-node-discriminator "Returns a unique 'identity' for a messenger...
f9b9195e1343511ef1048552c019b8a88d3276040355d8239ea5af27540f5699
goldfirere/units
Units.hs
# LANGUAGE DataKinds , TypeFamilies , TypeOperators # module Tests.Compile.Units where import Data.Metrology data Meter = Meters data Foot = Feet data Yard = Yards type Length = MkQu_U Meter type Time = MkQu_U Second data LengthD = LengthD instance Dimension LengthD data TimeD = TimeD instance Dimension TimeD ins...
null
https://raw.githubusercontent.com/goldfirere/units/0ffc07627bb6c1eacd60469fd9366346cbfde334/units-test/Tests/Compile/Units.hs
haskell
# LANGUAGE DataKinds , TypeFamilies , TypeOperators # module Tests.Compile.Units where import Data.Metrology data Meter = Meters data Foot = Feet data Yard = Yards type Length = MkQu_U Meter type Time = MkQu_U Second data LengthD = LengthD instance Dimension LengthD data TimeD = TimeD instance Dimension TimeD ins...
94c71776d9650b91037621d33ff1876693cd138d8ed254ed1a5a76e1221f3670
instedd/planwise
collections.clj
(ns planwise.util.collections) (defn find-by [coll field value] (reduce #(when (= value (field %2)) (reduced %2)) nil coll)) (defn sum-by [key coll] (reduce + (filter number? (map key coll)))) (defn merge-collections-by [key merge-fn & colls] (map (fn [[id same-key-maps]] (apply merge-fn same-key-maps)) ...
null
https://raw.githubusercontent.com/instedd/planwise/1bc2a5742ae3dc377dddf1f9e9bb60f0d2f59084/src/planwise/util/collections.clj
clojure
(ns planwise.util.collections) (defn find-by [coll field value] (reduce #(when (= value (field %2)) (reduced %2)) nil coll)) (defn sum-by [key coll] (reduce + (filter number? (map key coll)))) (defn merge-collections-by [key merge-fn & colls] (map (fn [[id same-key-maps]] (apply merge-fn same-key-maps)) ...
944d72ae950011a504fd357fa0c6a38eab47d33fe2f2a432ed1e97c59e53dcef
lambdamikel/DLMAPS
nrql-server-case.lisp
(in-package cl-user) ;;; ;;;-------------------------------------------- ;;; Automatically Generated nRQL Server Case Version : 1.9.1 ;;;-------------------------------------------- ;;; (defun process-nrql-request (expr stream n state output-string-stream) (case (first expr) ((xml-output) ...
null
https://raw.githubusercontent.com/lambdamikel/DLMAPS/7f8dbb9432069d41e6a7d9c13dc5b25602ad35dc/src/query/nrql-server-case.lisp
lisp
-------------------------------------------- Automatically Generated nRQL Server Case --------------------------------------------
(in-package cl-user) Version : 1.9.1 (defun process-nrql-request (expr stream n state output-string-stream) (case (first expr) ((xml-output) (process-racer-expr (second expr) nil n state output...
6a5b3dd2b348c6da8a2c8bbca3d6eef220077a66a92c81d822cb5d5340e14dfd
NorfairKing/smos
Formatting.hs
module Smos.Report.Formatting where import Data.Time daysSince :: UTCTime -> UTCTime -> Int daysSince now t = i where i = diffInDays now t :: Int diffInDays :: UTCTime -> UTCTime -> Int diffInDays t1 t2 = floor $ diffUTCTime t1 t2 / nominalDay
null
https://raw.githubusercontent.com/NorfairKing/smos/f72b26c2e66ab4f3ec879a1bedc6c0e8eeb18a01/smos-report/src/Smos/Report/Formatting.hs
haskell
module Smos.Report.Formatting where import Data.Time daysSince :: UTCTime -> UTCTime -> Int daysSince now t = i where i = diffInDays now t :: Int diffInDays :: UTCTime -> UTCTime -> Int diffInDays t1 t2 = floor $ diffUTCTime t1 t2 / nominalDay
0d41256befb323e57e38a161122d22286c30d7fb5a23318617d104712cbde4e0
gnl/ghostwheel
test_utils_cljs.cljc
Copyright ( c ) . All rights reserved . ;; The use and distribution terms for this software are covered by the Eclipse Public License 2.0 ( -2.0/ ) ;; which can be found in the file LICENSE at the root of this distribution. ;; By using this software in any fashion, you are agreeing to be bound by ;; the terms of ...
null
https://raw.githubusercontent.com/gnl/ghostwheel/a85c3510178fc4fbcb95125b86116d698e2a232a/test/ghostwheel/test_utils_cljs.cljc
clojure
The use and distribution terms for this software are covered by the which can be found in the file LICENSE at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software.
Copyright ( c ) . All rights reserved . Eclipse Public License 2.0 ( -2.0/ ) (ns ghostwheel.test-utils-cljs) (defmacro do+expand! [form] `(do ~form (macroexpand-1 (quote ~form)))) (defmacro expand [form] `(macroexpand-1 (quote ~form))) (defmacro expand-full [form] `(macroexpand (quote ~form...
2dcc6e6929f61a3b655aa07d7b72ef1c3380de486e48a75b241ce5a3325b4220
teamwalnut/graphql-ppx
schema_printer.ml
open Schema let rec print_type_ref (type_ref : type_ref) = match type_ref with | Schema.Named n -> n | List t -> "[" ^ print_type_ref t ^ "]" | NonNull t -> print_type_ref t ^ "!" let print_field ({ fm_name; fm_field_type } : field_meta) = fm_name ^ ": " ^ (fm_field_type |> print_type_ref) let print_input_...
null
https://raw.githubusercontent.com/teamwalnut/graphql-ppx/8276452ebe8d89a748b6b267afc94161650ab620/src/graphql_compiler/schema_printer.ml
ocaml
open Schema let rec print_type_ref (type_ref : type_ref) = match type_ref with | Schema.Named n -> n | List t -> "[" ^ print_type_ref t ^ "]" | NonNull t -> print_type_ref t ^ "!" let print_field ({ fm_name; fm_field_type } : field_meta) = fm_name ^ ": " ^ (fm_field_type |> print_type_ref) let print_input_...
7c3c6300f14579612480c8c8acb97807a11ecc9840e37ce2a5ee3687c5ebc6c9
Apress/haskell-quick-syntax-reference
ch6.hs
[1, 2, 3] ['a', 'x'] [True, False, False, True] :t [True, False, False, True] let numList = [3, 1, 0.5] :t numList ['a', 5] null [] null [3.2] head [0,1,2,3,4,5] tail [0,1,2,3,4,5,6] last [1,2,3,4,5,6,7] init [1,2,3,4,5,6,7] [1,2,3] ++ [4,5] "Haskell" ++ " " ++ "programming" 0 : [1,2] [0] ++ [1,2] len...
null
https://raw.githubusercontent.com/Apress/haskell-quick-syntax-reference/8bcb2773532de752d6297a91a3aaf49fd92ed03b/ch6.hs
haskell
[1, 2, 3] ['a', 'x'] [True, False, False, True] :t [True, False, False, True] let numList = [3, 1, 0.5] :t numList ['a', 5] null [] null [3.2] head [0,1,2,3,4,5] tail [0,1,2,3,4,5,6] last [1,2,3,4,5,6,7] init [1,2,3,4,5,6,7] [1,2,3] ++ [4,5] "Haskell" ++ " " ++ "programming" 0 : [1,2] [0] ++ [1,2] len...
25c0c85da29e30af8f8b63677b169b85b27c296abde47dd52b69dad119077d32
paulgray/exml
exml_query_tests.erl
%%%------------------------------------------------------------------- @author < > ( C ) 2011 , Erlang Solutions Ltd. %%% @doc Unit tests for exml_query module %%% @end %%%------------------------------------------------------------------- -module(exml_query_tests). -include_lib("eunit/include/eunit.hrl"). -i...
null
https://raw.githubusercontent.com/paulgray/exml/d04d0dfc956bd2bf5d9629a7524c6840eb02df28/test/exml_query_tests.erl
erlang
------------------------------------------------------------------- @doc Unit tests for exml_query module @end ------------------------------------------------------------------- -------------------------------------------------------------------- tests ---------------------------------------------------------------...
@author < > ( C ) 2011 , Erlang Solutions Ltd. -module(exml_query_tests). -include_lib("eunit/include/eunit.hrl"). -include("exml.hrl"). -compile(export_all). -define(MY_SPOON, xml(<<"<spoon whose='my'>", "<problem no='1'>is too big</problem>", "<problem n...
012b64ff0e11345e849fd63a8432065b64e73269a9bb3b419f6350f76f1d286f
dsorokin/aivika
StreamMemo.hs
import Control.Monad import Control.Monad.Trans import Control.Arrow import Simulation.Aivika specs = Specs 0 10 0.1 RungeKutta4 SimpleGenerator model :: Simulation () model = do let display n a = do t <- liftDynamics time liftIO $ do putStr "n = " putSt...
null
https://raw.githubusercontent.com/dsorokin/aivika/7a14f460ab114b0f8cdfcd05d5cc889fdc2db0a4/tests/StreamMemo.hs
haskell
import Control.Monad import Control.Monad.Trans import Control.Arrow import Simulation.Aivika specs = Specs 0 10 0.1 RungeKutta4 SimpleGenerator model :: Simulation () model = do let display n a = do t <- liftDynamics time liftIO $ do putStr "n = " putSt...
e05fe45a44aaa2fdac03cb91730594d562c81414ca3fa804ff57865e6b3d6e6b
benjaminselfridge/fifteen
UI.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE TemplateHaskell # module Fifteen.UI where import Fifteen.Logic import qualified Brick as B import qualified Brick.Widgets.Border as B import qualified Brick.Widgets.Center as B import qualified Graphics.Vty as V import Data.Time.Clock import Lens.Micro.Platform import Sy...
null
https://raw.githubusercontent.com/benjaminselfridge/fifteen/fdefcde9a334f9720395d2f08f95dce2d503087d/src/Fifteen/UI.hs
haskell
# LANGUAGE OverloadedStrings # | The only additional event we use is a timer event from the outside world matter how often these ticks are received, as long as they are requently enough that we can know how many seconds has passed (so something like every ^ When we receive a 'Tick', we update the current time in ^...
# LANGUAGE TemplateHaskell # module Fifteen.UI where import Fifteen.Logic import qualified Brick as B import qualified Brick.Widgets.Border as B import qualified Brick.Widgets.Center as B import qualified Graphics.Vty as V import Data.Time.Clock import Lens.Micro.Platform import System.Random import Text.Printf ( pr...
02b9f329e07fe833499f94899d065a171dd4a0a99a66d808caa41f8666356571
haskell/haskell-language-server
Hole.hs
foo = _new_def
null
https://raw.githubusercontent.com/haskell/haskell-language-server/bc18cedf157e19c75c5676d8defcb982d6488fad/plugins/hls-refactor-plugin/test/data/golden/add-arg/Hole.hs
haskell
foo = _new_def
9cd31fe55241930d2d028a767468d8ca73dbc19ecf8a5e4c8ea0066c75ab0c87
kenkeiras/EPC
mochiutf8.erl
@copyright 2010 Mochi Media , Inc. @author < > @doc Algorithm to convert any binary to a valid UTF-8 sequence by ignoring %% invalid bytes. -module(mochiutf8). -export([valid_utf8_bytes/1, codepoint_to_bytes/1, codepoints_to_bytes/1]). -export([bytes_to_codepoints/1, bytes_foldl/3, codepoint_foldl/3]). ...
null
https://raw.githubusercontent.com/kenkeiras/EPC/1e903475e1e597fd602158df45c5805a764333bf/src/mochiutf8.erl
erlang
invalid bytes. External API U+0000 - U+007F - 7 bits U+10000 - U+10FFFF - 21 bits U+0000 - U+007F - 7 bits U+10000 - U+10FFFF - 21 bits or bad code point (surrogate U+D800 - U+DFFF or > U+10FFFF). Internal API U+0000 - U+007F - 7 bits Upper bound U+FFFF does not need to be checked U+10000 - U+10FFF...
@copyright 2010 Mochi Media , Inc. @author < > @doc Algorithm to convert any binary to a valid UTF-8 sequence by ignoring -module(mochiutf8). -export([valid_utf8_bytes/1, codepoint_to_bytes/1, codepoints_to_bytes/1]). -export([bytes_to_codepoints/1, bytes_foldl/3, codepoint_foldl/3]). -export([read_codepoint...
61db0c7673561a060dfee814a23a20d2e445f53a794e2706340e1f8832ee3b39
ajhc/ajhc
ReaderWriter.hs
# LANGUAGE UnboxedTuples # module Util.ReaderWriter(ReaderWriter(),runReaderWriter) where import Data.Monoid import Control.Monad.Reader import Control.Monad.Writer -- strict unboxed ReaderWriter monad newtype ReaderWriter r w a = ReaderWriter { _runReaderWriter :: r -> (# a, w #) } runReaderWriter :: ReaderWriter r...
null
https://raw.githubusercontent.com/ajhc/ajhc/8ef784a6a3b5998cfcd95d0142d627da9576f264/src/Util/ReaderWriter.hs
haskell
strict unboxed ReaderWriter monad
# LANGUAGE UnboxedTuples # module Util.ReaderWriter(ReaderWriter(),runReaderWriter) where import Data.Monoid import Control.Monad.Reader import Control.Monad.Writer newtype ReaderWriter r w a = ReaderWriter { _runReaderWriter :: r -> (# a, w #) } runReaderWriter :: ReaderWriter r w a -> r -> (a,w) runReaderWriter (R...
51aba9fbd3d48f901321ac2a5ba990df1dcbd4d9c9c1a3896dc82f5245a261fe
artyom-poptsov/guile-deck
device.scm
;;; device.scm -- A description of <device> class. Copyright ( C ) 2021 < > ;; ;; This program 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) a...
null
https://raw.githubusercontent.com/artyom-poptsov/guile-deck/608fbc6aa38bcd2091b32af2bb2f6ad05037190c/modules/deck/core/types/device.scm
scheme
device.scm -- A description of <device> class. This program is free software: you can redistribute it and/or modify (at your option) any later version. The 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 P...
Copyright ( C ) 2021 < > 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 (define-module (deck core types device) #:use-module (scheme document...
7dc081d786102eb1d4911d3aaf74d8823e9f826ad4d43124052c11e509b79293
freizl/dive-into-haskell
query-cis.hs
{-# LANGUAGE OverloadedStrings #-} module Main where import System.Time import System.Locale import qualified Data.Text.IO as T import Test.WebDriver import Test.WebDriver.Commands.Wait import Control.Monad.IO.Class (liftIO) import qualified Data.ByteString.Lazy as BS url = "" defConfig = defaul...
null
https://raw.githubusercontent.com/freizl/dive-into-haskell/b18a6bfe212db6c3a5d707b4a640170b8bcf9330/codes/functional-test/query-cis.hs
haskell
# LANGUAGE OverloadedStrings #
module Main where import System.Time import System.Locale import qualified Data.Text.IO as T import Test.WebDriver import Test.WebDriver.Commands.Wait import Control.Monad.IO.Class (liftIO) import qualified Data.ByteString.Lazy as BS url = "" defConfig = defaultConfig { wdCapabilities = allCaps ...
73a9e328fbd85b7e960105a37caf2c292fcb9d78ad44e0c4fed5ba32a2c8b1e1
ucsd-progsys/nate
typeclass.ml
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet Cri...
null
https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/typing/typeclass.ml
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 . open Misc open Parsetree open Asttypes op...
e7365c5a3007f9a847ddde2179c683068e7f70309019a9fb746cf43dd3515aee
lem-project/lem
yason-utils.lisp
(defpackage :lem-lsp-base/yason-utils (:use :cl) (:import-from :bordeaux-threads :*default-special-bindings*) (:export :with-yason-bindings :parse-json)) (in-package :lem-lsp-base/yason-utils) (defparameter *yason-bindings* '((yason:*parse-json-null-as-keyword* . t) (yason:*parse...
null
https://raw.githubusercontent.com/lem-project/lem/241587211277ac628a9c1ed96d512ac81235bb09/lib/lsp-base/yason-utils.lisp
lisp
(defpackage :lem-lsp-base/yason-utils (:use :cl) (:import-from :bordeaux-threads :*default-special-bindings*) (:export :with-yason-bindings :parse-json)) (in-package :lem-lsp-base/yason-utils) (defparameter *yason-bindings* '((yason:*parse-json-null-as-keyword* . t) (yason:*parse...
b6eb13a9265073a24904536d9a76a836bd26e4e89c2bc9c78ee44bbfbb9484d7
marcelosousa/llvmvf
Function.hs
# LANGUAGE UnicodeSyntax # ------------------------------------------------------------------------------- -- Module : Analysis.Type.Inference.Function Copyright : ( c ) 2013 -- Type Constraints Function ------------------------------------------------------------------------------- module Analysis.Type.Inf...
null
https://raw.githubusercontent.com/marcelosousa/llvmvf/c314e43aa8bc8bb7fd9c83cebfbdcabee4ecfe1b/src/Analysis/Type/Inference/Function.hs
haskell
----------------------------------------------------------------------------- Module : Analysis.Type.Inference.Function Type Constraints Function ----------------------------------------------------------------------------- τℂ ∷ → Function → State Γ (S.Set Τℂ)
# LANGUAGE UnicodeSyntax # Copyright : ( c ) 2013 module Analysis.Type.Inference.Function where import Language.LLVMIR import Analysis.Type.Inference.Base import Analysis.Type.Inference.Instruction import Analysis.Type.Inference.Initial import Analysis.Type.Memory.Util import Analysis.Type.Memory.TyAnn insta...
4ea7a102808091a185df202488771af77f032b7b46867b1186823cd5b0c0b2dd
TyOverby/mono
main.ml
open! Core let () = print_endline ""
null
https://raw.githubusercontent.com/TyOverby/mono/9e3d64c1e3fdf536b3e62fae7f7ff7107d710342/lib/furby/bin/main.ml
ocaml
open! Core let () = print_endline ""
f063290e3773bc6bcd5294a0b6e07b135b3747e0f1f7bdc05ee3b48593dc3d61
alanb2718/wallingford
pulser.rkt
#lang s-exp rosette ; pulsing circle example (require "reactive.rkt") (require "pulser-class.rkt") make a new pulser and a viewer on it : (define p (new pulser%)) (make-viewer p #:title "Pulser")
null
https://raw.githubusercontent.com/alanb2718/wallingford/9dd436c29f737d210c5b87dc1b86b2924c0c5970/reactive/pulser.rkt
racket
pulsing circle example
#lang s-exp rosette (require "reactive.rkt") (require "pulser-class.rkt") make a new pulser and a viewer on it : (define p (new pulser%)) (make-viewer p #:title "Pulser")
5062ff8ccafb84e6417390ffade5a6ea103b79d080b3d598b57441e934a21b18
xapi-project/xcp-networkd
network_server.ml
* Copyright ( C ) Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking described in file LI...
null
https://raw.githubusercontent.com/xapi-project/xcp-networkd/5a2f9565f018b0eaf6cbd337575a6be174030544/networkd/network_server.ml
ocaml
Remove dhclient conf (if any) for the old and new gateway interfaces. * This ensures that dhclient gets restarted with an updated conf file when * necessary. the function is meant to be idempotent and we want to avoid CA-239919 add the link_local and clean the old one only when needed Only a...
* Copyright ( C ) Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking described in file LI...
3734106680a5cc5a3b5081c6b3f3b4af4dd281086d1ebbd81c88658ee4f21a0e
5HT/ant
GeneratePDF.ml
open XNum; open Unicode.Types; open GlyphMetric; open FontMetric; open Logging; type font_ref = { font : font_metric; first_glyph_index : int; (* minimal glyph index (from font-metric) *) used_glyphs : mutable int;(* number of used glyphs *) glyph_map :...
null
https://raw.githubusercontent.com/5HT/ant/6acf51f4c4ebcc06c52c595776e0293cfa2f1da4/Runtime/GeneratePDF.ml
ocaml
minimal glyph index (from font-metric) number of used glyphs mapping internal glyph-index -> PDF index filename, object id font subset: "AAAAAA+" ^ fm.ps_name images text mode page contents document structure save old stream restore stream
open XNum; open Unicode.Types; open GlyphMetric; open FontMetric; open Logging; type font_ref = { font : font_metric; }; type text_state = { font_major : int; font_minor : int; font_size : float; x_pos : float; y_pos : float }; type state = { pdf : PDF.pdf_file IO.ostre...
1db4b226397328f175088a984d2820aa2c7b64471351da86c4c4ac3381eb6d0f
tel/serv
Rec.hs
{-# LANGUAGE DataKinds #-} # LANGUAGE ExplicitNamespaces # {-# LANGUAGE GADTs #-} # LANGUAGE PolyKinds # | Re - exports of useful " Data . Vinyl " ' Rec ' types module Serv.Wai.Rec ( -- * Specialized records * * ' ' ElField (..) , FieldRec * * ' HList ' , Identity (....
null
https://raw.githubusercontent.com/tel/serv/7967761d6c47f13f0edd567f8af9b1c7dc8b9a23/serv-wai/src/Serv/Wai/Rec.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE GADTs # * Specialized records * Type-level methods ---------------------------------------------------------------------------- | A more kind polymorphic element field than what's normally available ------------------------------------------------------------...
# LANGUAGE ExplicitNamespaces # # LANGUAGE PolyKinds # | Re - exports of useful " Data . Vinyl " ' Rec ' types module Serv.Wai.Rec ( * * ' ' ElField (..) , FieldRec * * ' HList ' , Identity (..) , HList , (=:) , Rec (..) , (<+>) , (++) , type (++) ) where import Da...
60d496cf08af2a8a0802a919e6b27f67b1fdc59b079fe34969d459622ef616fd
wdebeaum/step
deenergise.lisp
;;;; ;;;; w::deenergise ;;;; (define-words :pos W::V :TEMPL AGENT-AFFECTED-XP-NP-TEMPL :words ( (w::deenergise (senses ((LF-parent ont::deactivate-turn-off) ;change-device-state) (lf-form w::deenergize)) ((LF-parent ont::deactivate-turn-off) ;change-device-state) (templ agent-t...
null
https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/deenergise.lisp
lisp
w::deenergise change-device-state) change-device-state)
(define-words :pos W::V :TEMPL AGENT-AFFECTED-XP-NP-TEMPL :words ( (w::deenergise (senses (lf-form w::deenergize)) (templ agent-templ) (Example "Intransitive usage: how do I deenergize ")) )) ))
46730c0d4ac59acf12acd14acbf5235343e1c6ed0663ae3325e4c2d99ad49c9f
rescript-lang/rescript-compiler
js_record_iter.ml
Copyright ( C ) 2015- , Authors of ReScript * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the License , or * ( at your option ) any later vers...
null
https://raw.githubusercontent.com/rescript-lang/rescript-compiler/b0fbc77a531b6fcd42bdf2c134a9397b08fa74e0/jscomp/core/js_record_iter.ml
ocaml
Copyright ( C ) 2015- , Authors of ReScript * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the License , or * ( at your option ) any later vers...
d6b2266fbfdde24260efa212c64f19e807900fcfb38d3b42b30de63b3003d33f
naoiwata/sicp
ex3.45.scm
;; ;; @author naoiwata SICP Chapter3 Exercise 3.45 . ;; ; ------------------------------------------------------------------------ ; question ; ------------------------------------------------------------------------ (define (make-account-and-serializer balance) (define (withdraw amount) (if (>= balance amo...
null
https://raw.githubusercontent.com/naoiwata/sicp/7314136c5892de402015acfe4b9148a3558b1211/chapter3/ex3.45.scm
scheme
@author naoiwata ------------------------------------------------------------------------ question ------------------------------------------------------------------------ ------------------------------------------------------------------------ discussion -------------------------------------------------------...
SICP Chapter3 Exercise 3.45 . (define (make-account-and-serializer balance) (define (withdraw amount) (if (>= balance amount) (begin (set! balance (- balance amount)) balance) "Insufficient funds")) (define (deposit amount) (set! balance (+ balance amount)) bal...
3e892f7ef40ec09e12d1a204aea1d20c31b19fcc32ee9b62c164616e07b8f3f8
eeng/mercurius
authenticate.clj
(ns mercurius.accounts.domain.use-cases.authenticate (:require [clojure.spec.alpha :as s] [mercurius.accounts.domain.repositories.user-repository :refer [find-by-username]])) (s/def ::username string?) (s/def ::password string?) (s/def ::command (s/keys :req-un [::username ::password])) (defn- check-pas...
null
https://raw.githubusercontent.com/eeng/mercurius/f83778ddde99aa13692e4fe2e70b2e9dc2fd70e9/src/mercurius/accounts/domain/use_cases/authenticate.clj
clojure
(ns mercurius.accounts.domain.use-cases.authenticate (:require [clojure.spec.alpha :as s] [mercurius.accounts.domain.repositories.user-repository :refer [find-by-username]])) (s/def ::username string?) (s/def ::password string?) (s/def ::command (s/keys :req-un [::username ::password])) (defn- check-pas...
4e2e1179d92733d7de21f657753f66d410d976e5df915941618ec61be253bdfe
BranchTaken/Hemlock
cmpable.mli
(** Functors for comparable types. *) open CmpableIntf (** Comparisons for monomorphic types. *) module Make (T : IMono) : SMono with type t := T.t * Comparisons for monomorphic types that include zero in their ranges . module MakeZero (T : IMonoZero) : SMonoZero with type t := T.t (** Comparisons for polymorphic t...
null
https://raw.githubusercontent.com/BranchTaken/Hemlock/207ede78129be95ec063cf2bb3c955760c2fd303/bootstrap/src/basis/cmpable.mli
ocaml
* Functors for comparable types. * Comparisons for monomorphic types. * Comparisons for polymorphic types. * Comparisons for polymorphic types. * Comparisons for polymorphic types.
open CmpableIntf module Make (T : IMono) : SMono with type t := T.t * Comparisons for monomorphic types that include zero in their ranges . module MakeZero (T : IMonoZero) : SMonoZero with type t := T.t module MakePoly (T : IPoly) : SPoly with type 'a t := 'a T.t module MakePoly2 (T : IPoly2) : SPoly2 with type ...
73e27d82fb2ccd8803067c66a0a132a9f4d51ddb903a1879a17cb0bd84c5d873
hiroshi-unno/coar
zip_map_int1.ml
let rec loop x = loop x let rec zip x y = if x = 0 then if y = 0 then 0 else loop () else if y = 0 then loop () else 1 + zip (x - 1) (y - 1) let rec map x = if x = 0 then 0 else 1 + map (x - 1) let main n = assert (map (zip n n) = n) [@@@assert "typeof(main) <: int -> unit"]
null
https://raw.githubusercontent.com/hiroshi-unno/coar/90a23a09332c68f380efd4115b3f6fdc825f413d/benchmarks/OCaml/safety/tacas2015/zip_map_int1.ml
ocaml
let rec loop x = loop x let rec zip x y = if x = 0 then if y = 0 then 0 else loop () else if y = 0 then loop () else 1 + zip (x - 1) (y - 1) let rec map x = if x = 0 then 0 else 1 + map (x - 1) let main n = assert (map (zip n n) = n) [@@@assert "typeof(main) <: int -> unit"]
955a77848d77b37f61157fee8536eb3e7db510cf890c6aa4c98a4cb604c1cbfc
hyperfiddle/electric
electric_call_semanatics.clj
(ns user.electric.electric-call-semanatics (:require [hyperfiddle.electric :as e] [hyperfiddle.rcf :refer [tests tap % with]])) (e/def trace! println) (e/defn Foo [n] (let [x (trace! (+ n 2))] ; this is computed once, as you'd expect (e/fn [y] (+ y x)))) (e/defn Bar [c n] (let [F (Fo...
null
https://raw.githubusercontent.com/hyperfiddle/electric/2446937b21440bf4faed8123e2ee544110203cee/src-docs/user/electric/electric_call_semanatics.clj
clojure
this is computed once, as you'd expect
(ns user.electric.electric-call-semanatics (:require [hyperfiddle.electric :as e] [hyperfiddle.rcf :refer [tests tap % with]])) (e/def trace! println) (e/defn Foo [n] (e/fn [y] (+ y x)))) (e/defn Bar [c n] (let [F (Foo. c)] (e/for [x (range n)] (F. x)))) (tests (def !n (atom 3)...
65e60113a535f35d0f77ce30bb74dd6b521d7299b0128758619ea7a4e76e48e7
michiakig/LispInSmallPieces
chap10m.scm
$ I d : , v 4.0 1995/07/10 ;;;(((((((((((((((((((((((((((((((( L i S P )))))))))))))))))))))))))))))))) ;;; This file is part of the files that accompany the book: LISP Implantation Semantique Programmation ( InterEditions , France ) By Christian Queinnec < > ;;; Newest version may be retrieved from: ...
null
https://raw.githubusercontent.com/michiakig/LispInSmallPieces/0a2762d539a5f4c7488fffe95722790ac475c2ea/src/chap10m.scm
scheme
(((((((((((((((((((((((((((((((( L i S P )))))))))))))))))))))))))))))))) This file is part of the files that accompany the book: Newest version may be retrieved from: Check the README file before using this file. (((((((((((((((((((((((((((((((( L i S P )))))))))))))))))))))))))))))))) The letify generic function ...
$ I d : , v 4.0 1995/07/10 LISP Implantation Semantique Programmation ( InterEditions , France ) By Christian Queinnec < > ( IP 128.93.2.54 ) ftp.inria.fr : INRIA / Projects / icsla / Books / LiSP*.tar.gz (define-generic (letify (o Program) env) (update-walk! letify (clone o) env) ) (define-...
39b8aa780834cb173c1e77bd4cd6d09a4577ce7f67041fa64f08cee6bf82b1b0
vmchale/morphism-zoo
Suffix.hs
-- | This module defines variations on a function `suffix`, which does the following: -- -- > λ:> suffix "tails" -- > ["ails","ils","ls","s"] -- -- > λ:> suffix "s" -- > [] module Suffix ( suffix , suffixPattern , suffixPattern2 , suffixList , suffixFunctor ...
null
https://raw.githubusercontent.com/vmchale/morphism-zoo/4f1a040ddb3cb1f0292f94d98d34f3075c97d738/src/Suffix.hs
haskell
| This module defines variations on a function `suffix`, which does the following: > λ:> suffix "tails" > ["ails","ils","ls","s"] > λ:> suffix "s" > [] | Just wanted this available somewhere | This uses a hylomorphism | Another one, suggested from online | This uses recursion schemes | This is not technical...
module Suffix ( suffix , suffixPattern , suffixPattern2 , suffixList , suffixFunctor , suffixPattern3 , suffixZipper , suffixHylo , suffixPattern4 ) where import Data.Functor.Foldable...
3a801cb7e835956a9992570faeb4a003309814a980938ac9da95e078a7896012
danehuang/augurv2
PyXface.hs
- Copyright 2017 under the Apache License , Version 2.0 ( the " License " ) ; - you may not use this file except in compliance with the License . - You may obtain a copy of the License at - - -2.0 - - Unless required by applicable law or agreed to in writing , software - distributed...
null
https://raw.githubusercontent.com/danehuang/augurv2/480459bcc2eff898370a4e1b4f92b08ea3ab3f7b/compiler/augur/src/Xface/PyXface.hs
haskell
-------------------------------------------------------------------- --------------------------------- == Generate model object --------------------------------- == Generate types
- Copyright 2017 under the Apache License , Version 2.0 ( the " License " ) ; - you may not use this file except in compliance with the License . - You may obtain a copy of the License at - - -2.0 - - Unless required by applicable law or agreed to in writing , software - distributed...
91f26da5687abd5b56bea300b4bd06bb66e61dda008aec8c4bcb7ea0ccfa197e
minoki/unboxing-vector
Enum.hs
# LANGUAGE DerivingVia # # LANGUAGE UndecidableInstances # module Enum where import qualified Data.Vector.Unboxing as V import Data.Int data OrderingEq = LT | LE | EQ | GE | GT deriving (Eq, Ord, Enum, Bounded, Read, Show) deriving V.Unboxable via V.Enum OrderingEq data Direction = North | South | East | West d...
null
https://raw.githubusercontent.com/minoki/unboxing-vector/ca13ee80eb92e2a9a650eddbb75e8c5ebb03dfc1/test-deriving-via/Enum.hs
haskell
# LANGUAGE DerivingVia # # LANGUAGE UndecidableInstances # module Enum where import qualified Data.Vector.Unboxing as V import Data.Int data OrderingEq = LT | LE | EQ | GE | GT deriving (Eq, Ord, Enum, Bounded, Read, Show) deriving V.Unboxable via V.Enum OrderingEq data Direction = North | South | East | West d...
1399ba84afcd057476c430c1229e3b644121009001b9989d63a0b9e40d0a2c41
diasbruno/language-js
Helpers.hs
module Test.Helpers where import Language.JS.Parser hiding (parse) import qualified Language.JS.Parser as JS import Text.Parsec testExpression = parse expressions "dummy.js" >>= return . show testStatement = parse statements "dummy.js" >>= return . show testTopLevelStatement = parse topLevelStatements "dummy.js" >>= ...
null
https://raw.githubusercontent.com/diasbruno/language-js/c986bb904e717fa8dd84f52473440ea726a275be/t/Test/Helpers.hs
haskell
module Test.Helpers where import Language.JS.Parser hiding (parse) import qualified Language.JS.Parser as JS import Text.Parsec testExpression = parse expressions "dummy.js" >>= return . show testStatement = parse statements "dummy.js" >>= return . show testTopLevelStatement = parse topLevelStatements "dummy.js" >>= ...
468a2f1d2aae26327db0dd195871cd17a8d345e9bd518c7b367f1cc6b54acb30
dzen-dhall/dzen-dhall
Data.hs
# LANGUAGE TemplateHaskell # # LANGUAGE StandaloneDeriving # # LANGUAGE TypeFamilies # module DzenDhall.Data where import Data.IORef import Data.Text (Text) import Data.Vector import Data.Void import DzenDhall.Config import GHC.Generics import Lens....
null
https://raw.githubusercontent.com/dzen-dhall/dzen-dhall/ee43b74272d6776ce57adfd7b7d85650580a6cbb/src/DzenDhall/Data.hs
haskell
# LANGUAGE TemplateHaskell # # LANGUAGE StandaloneDeriving # # LANGUAGE TypeFamilies # module DzenDhall.Data where import Data.IORef import Data.Text (Text) import Data.Vector import Data.Void import DzenDhall.Config import GHC.Generics import Lens....
ad210d925c4852e7002512ccbe98ba8b710df7b544a3e8eabd9e09d65d31c451
semilin/layoup
Typehack.lisp
(MAKE-LAYOUT :NAME "Typehack" :MATRIX (APPLY #'KEY-MATRIX '("jghpfqvou;" "rsntkyiael" "zwmdbc,'.x")) :SHIFT-MATRIX NIL :KEYBOARD NIL)
null
https://raw.githubusercontent.com/semilin/layoup/27ec9ba9a9388cd944ac46206d10424e3ab45499/data/layouts/Typehack.lisp
lisp
(MAKE-LAYOUT :NAME "Typehack" :MATRIX (APPLY #'KEY-MATRIX '("jghpfqvou;" "rsntkyiael" "zwmdbc,'.x")) :SHIFT-MATRIX NIL :KEYBOARD NIL)
e1fbe5a6d58fcccee09a9d8b228a7a914bfd5f4548c4ff78e3a46f31b95c53f6
MedeaMelana/Magic
Magic.hs
module Magic ( module Magic.Abilities, module Magic.Combat, module Magic.Core, module Magic.Cost, module Magic.Engine, module Magic.Events, module Magic.Labels, module Magic.Layers, module Magic.Monads, module Magic.Object, module Magic.ObjectTypes, module Magic.Predicate...
null
https://raw.githubusercontent.com/MedeaMelana/Magic/7bd87e4e1d54a7c5e5f81661196cafb87682c62a/Magic/src/Magic.hs
haskell
module Magic ( module Magic.Abilities, module Magic.Combat, module Magic.Core, module Magic.Cost, module Magic.Engine, module Magic.Events, module Magic.Labels, module Magic.Layers, module Magic.Monads, module Magic.Object, module Magic.ObjectTypes, module Magic.Predicate...
8296c53cfd7317ce95b34e4960673448b87564e90726604ba717d2dd7537be8d
yogsototh/yosog
Home.hs
# LANGUAGE TupleSections , OverloadedStrings # module Handler.Home where import Import -- This is a handler function for the GET request method on the HomeR -- resource pattern. All of your resource patterns are defined in -- config/routes -- The majority of the code you will write in Yesod lives in these handler -...
null
https://raw.githubusercontent.com/yogsototh/yosog/7d69df9c1c955f14a72dfb97c826abad4b9ed041/Handler/Home.hs
haskell
This is a handler function for the GET request method on the HomeR resource pattern. All of your resource patterns are defined in config/routes functions. You can spread them across multiple files if you are so inclined, or create a single monolithic file.
# LANGUAGE TupleSections , OverloadedStrings # module Handler.Home where import Import The majority of the code you will write in Yesod lives in these handler getHomeR :: Handler RepHtml getHomeR = do (formWidget, formEnctype) <- generateFormPost sampleForm let submission = Nothing :: Maybe (FileInfo, Text)...
b8132dec9d9adf205e5db78cbe18693f641f63152b14808990f393c4646e3f30
shayan-najd/NativeMetaprogramming
T11563.hs
module T11563 where data T a = MkT class C t instance C s => C T
null
https://raw.githubusercontent.com/shayan-najd/NativeMetaprogramming/24e5f85990642d3f0b0044be4327b8f52fce2ba3/testsuite/tests/typecheck/should_fail/T11563.hs
haskell
module T11563 where data T a = MkT class C t instance C s => C T
b64a7f1d742f27674e87bea6a61182d8809ec7f6f41db3953baf6491a30ca725
penpot/penpot
media_object.cljc
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. ;; ;; Copyright (c) KALEIDOS INC (ns app.common.types.file.media-object (:require [app.common.spec :as us] [clojure.spec.alpha :as s]))...
null
https://raw.githubusercontent.com/penpot/penpot/5463671db13441ba3f730a34118547d34a5a36f1/common/src/app/common/types/file/media_object.cljc
clojure
Copyright (c) KALEIDOS INC NOTE: This is marked as nilable for backward compatibility, but right now is just exists or not exists. We can thin in a gradual migration and then mark it as not nilable.
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (ns app.common.types.file.media-object (:require [app.common.spec :as us] [clojure.spec.alpha :as s])) (s/def ::id uuid?) (s/def ::nam...