code
stringlengths
2
1.05M
repo_name
stringlengths
5
101
path
stringlengths
4
991
language
stringclasses
3 values
license
stringclasses
5 values
size
int64
2
1.05M
module B where import A (message) main :: IO () main = do putStrLn message
sdiehl/ghc
testsuite/tests/driver/T16500/B.hs
Haskell
bsd-3-clause
81
{-# LANGUAGE OverloadedStrings #-} module Poly1305 (tests) where import qualified Data.ByteString as B import qualified Data.ByteString.Char8 as B () import Imports import Crypto.Error import qualified Crypto.MAC.Poly1305 as Poly1305 import qualified Data.ByteArray as B (convert) instance Show Poly1305.Auth where ...
tekul/cryptonite
tests/Poly1305.hs
Haskell
bsd-3-clause
1,410
module Test15 where f n = n * (f (n - 1)) g = 13 * (f (13 - 1))
SAdams601/HaRe
old/testing/refacFunDef/Test15_AstOut.hs
Haskell
bsd-3-clause
67
{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE DeriveDataTypeable #-} module TypedIds where import Data.Maybe(isJust) import Data.Generics {-+ Haskell declaration introduce names in two name spaces. Type classes and types live in one n...
kmate/HaRe
old/tools/base/Modules/TypedIds.hs
Haskell
bsd-3-clause
3,831
-- -- (c) The University of Glasgow -- {-# LANGUAGE DeriveDataTypeable #-} module Avail ( Avails, AvailInfo(..), IsPatSyn(..), avail, patSynAvail, availsToNameSet, availsToNameSetWithSelectors, availsToNameEnv, availName, availNames, availNonFldNames, availNamesWithSelectors, ...
tjakway/ghcjvm
compiler/basicTypes/Avail.hs
Haskell
bsd-3-clause
7,103
module Main where import Control.Concurrent import qualified Control.Exception as E trapHandler :: MVar Int -> MVar () -> IO () trapHandler inVar caughtVar = (do E.mask_ $ do trapMsg <- takeMVar inVar putStrLn ("Handler got: " ++ show trapMsg) trapHandler inVar caughtVar ) `E.catch` ...
ezyang/ghc
testsuite/tests/concurrent/should_run/conc035.hs
Haskell
bsd-3-clause
1,544
{-# LANGUAGE RankNTypes, ScopedTypeVariables #-} -- Trac #2494, should generate an error message module Foo where foo :: (forall m. Monad m => Maybe (m a) -> Maybe (m a)) -> Maybe a -> Maybe a foo _ x = x {-# RULES "foo/foo" forall (f :: forall m. Monad m => Maybe (m a) -> Maybe (m a)) (g :: forall m. M...
wxwxwwxxx/ghc
testsuite/tests/typecheck/should_compile/T2494.hs
Haskell
bsd-3-clause
400
-- !!! Duplicate export of constructor module M(T(K1,K1)) where data T = K1
urbanslug/ghc
testsuite/tests/module/mod5.hs
Haskell
bsd-3-clause
76
{-# OPTIONS_GHC -Wall #-} module CSI where data Boy = Matthew | Peter | Jack | Arnold | Carl deriving (Eq,Show) boys :: [Boy] boys = [Matthew, Peter, Jack, Arnold, Carl] -- says accuser accused = True says :: Boy -> Boy -> Bool -- None of the kids has claimed guilty, so we assume that all of them claim i...
Gurrt/software-testing
week-1/CSI.hs
Haskell
mit
1,530
import Data.List import Data.Char data Fig = W | B | WD | BD | E deriving (Show, Eq) type Board = [[Fig]] type Pos = (Int, Int) charToFig :: Char -> Fig charToFig 'w' = W charToFig 'W' = WD charToFig 'b' = B charToFig 'B' = BD charToFig '.' = E figToChar :: Fig -> Char figToChar W = 'w' figToChar WD = 'W' fig...
RAFIRAF/HASKELL
warcaby-trening.hs
Haskell
mit
4,456
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TupleSections #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {-| Module : PostgREST.QueryBuilder Description : PostgREST SQL generating functions. This module provides functions to consume data types that represent database objects (e.g. Relation, Schema, SqlQuery) an...
NikolayS/postgrest
src/PostgREST/QueryBuilder.hs
Haskell
mit
17,914
module Problem45 where {-- Task description: Triangle, pentagonal, and hexagonal numbers are generated by the following formulae: Triangle Tn=n(n+1)/2 1, 3, 6, 10, 15, ... Pentagonal Pn=n(3n−1)/2 1, 5, 12, 22, 35, ... Hexagonal Hn=n(2n−1) 1, 6, 15, 28, 45, ... It can be verified that T285 =...
runjak/projectEuler
src/Problem45.hs
Haskell
mit
1,073
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE TemplateHaskell #-} module Main where import Filesystem import Control.Applicative import Control.Monad import Stackage.CLI import Options.Applicative (Parser) import Options.Applicative.Builder (strArgument, metavar, value) import Da...
fpco/stackage-cabal
main/Init.hs
Haskell
mit
3,252
{-# LANGUAGE MultiWayIf #-} module Data.Bitsplit.Types (Address, mkAddress, Split, mkSplit, unpackSplit, isEmpty) where import Data.Ratio import Data.Natural import Data.Map (fromList, toList) --import qualified Network.Bitcoin.Types as BT newtype Address = Address String deriving (Eq, Show, Ord) --BT.Address mkAddre...
micmarsh/bitsplit-hs
src/Data/Bitsplit/Types.hs
Haskell
mit
1,401
module Jhc.Function where {-# SUPERINLINE id, const, (.), ($), ($!), flip #-} infixr 9 . infixr 0 $, $!, `seq` id x = x const x _ = x f . g = \x -> f (g x) f $ x = f x f $! x = x `seq` f x flip f x y = f y x -- asTypeOf is a type-restricted version of const. It is usually used -- as an infix operator, and its ty...
m-alvarez/jhc
lib/jhc/Jhc/Function.hs
Haskell
mit
1,869
{-# LANGUAGE CPP #-} module GHCJS.DOM.StyleSheet ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.StyleSheet #else module Graphics.UI.Gtk.WebKit.DOM.StyleSheet #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/StyleSheet.hs
Haskell
mit
435
{-# LANGUAGE CPP #-} module GHCJS.DOM.Coordinates ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.Coordinates #else #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) import GHCJS.DOM.JSFFI.Generated...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/Coordinates.hs
Haskell
mit
346
module MinHS.Evaluator where import qualified MinHS.Env as E import MinHS.Syntax import MinHS.Pretty import qualified Text.PrettyPrint.ANSI.Leijen as PP type VEnv = E.Env Value data VFun = VFun (Value -> Value) instance Show VFun where show _ = error "Tried to show lambda" data Value = I Integer | B Bo...
pierzchalski/cs3161a1
MinHS/Evaluator.hs
Haskell
mit
2,781
-- Sum of Digits / Digital Root -- http://www.codewars.com/kata/541c8630095125aba6000c00/ module DigitalRoot where import Data.Char (digitToInt) digitalRoot :: Integral a => a -> a digitalRoot n | (n `div` 10) == 0 = n | otherwise = digitalRoot . fromIntegral . sum . map digitToInt . show . fromIntegra...
gafiatulin/codewars
src/6 kyu/DigitalRoot.hs
Haskell
mit
326
module GHCJS.DOM.ClientRectList ( ) where
manyoo/ghcjs-dom
ghcjs-dom-webkit/src/GHCJS/DOM/ClientRectList.hs
Haskell
mit
44
-- Code to deal with star colors module Color where data Color = RGB { colorR :: Double , colorG :: Double , colorB :: Double } deriving (Show,Eq) addColors :: Color -> Color -> Color addColors a b = RGB { colorR = ((colorR a) + (colorR b)) , col...
j3camero/galaxyatlas
OldCrap/haskell/stardata/src/Color.hs
Haskell
mit
577
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module NFKD (specs) where import Data.Monoid import Data.Text.Normal.NFKD import Data.String import Test.Hspec import Test.Hspec.QuickCheck import Test.QuickCheck (Arbitrary(..)) import Test.QuickCheck.Instan...
pikajude/text-normal
tests/NFKD.hs
Haskell
mit
2,103
{-| This module provides 'xmlFormatter' that can be used with 'Test.Hspec.Runner.hspecWith'. Example usage: > import Test.Hspec.Formatters.Jenkins (xmlFormatter) > import Test.Hspec.Runner > > main :: IO () > main = do > summary <- withFile "results.xml" WriteMode $ \h -> do > let c = defaultCon...
worksap-ate/hspec-jenkins
lib/Test/Hspec/Formatters/Jenkins.hs
Haskell
mit
1,988
{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances #-} -- |Multi-parameter variant of Applicative. -- The contained data type is an explicit type parameter, -- allowing instances to be made dependent on it. -- -- The Applicative type class is split into two classes: -- @Pure f a@, which provides...
ombocomp/MultiParamMonad
Control/Applicative/MultiParam.hs
Haskell
mit
2,542
{-# LANGUAGE Arrows, OverlappingInstances, UndecidableInstances, IncoherentInstances, NoMonomorphismRestriction, MultiParamTypeClasses, FlexibleInstances, RebindableSyntax #-} -- Das Modul \hsSource{Circuit.ShowType.Instance} ...
frosch03/arrowVHDL
src/System/ArrowVHDL/Circuit/ShowType/Instance.hs
Haskell
cc0-1.0
3,970
module StartingOut ( doubleMe, doubleUs, doubleSmallNumber, listComprehension ) where doubleMe x = x + x doubleUs x y = doubleMe x + doubleMe y doubleSmallNumber x = if x > 100 then x else x*2 -- We usually use ' to either denote a strict version of a functio...
mboogerd/hello-haskell
src/lyah/StartingOut.hs
Haskell
apache-2.0
1,254
-- 1234567890 -- oooxoxoooo dec2oct 0 = [] dec2oct n = let a = n `mod` 8 b = n `div` 8 in a:(dec2oct b) oct2ans s [] = s oct2ans s (n:ns) = let n' = if n <= 3 then n else if n <= 4 then n + 1 else n + 2 s' = s * 10 + n' in oct2ans s' ns...
a143753/AOJ
0208.hs
Haskell
apache-2.0
507
{-# LANGUAGE BangPatterns, FlexibleContexts #-} -- | -- Module : Statistics.Transform -- Copyright : (c) 2011 Bryan O'Sullivan -- License : BSD3 -- -- Maintainer : bos@serpentine.com -- Stability : experimental -- Portability : portable -- -- Fourier-related transformations of mathematical functions. -- -- Thes...
fpco/statistics
Statistics/Transform.hs
Haskell
bsd-2-clause
5,058
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QCalendarWidget.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:35 Warning : this file is machine generated - ...
keera-studios/hsQt
Qtc/Enums/Gui/QCalendarWidget.hs
Haskell
bsd-2-clause
6,712
module Main (main) where import Test.Hspec (hspecX, descriptions) import Control.Monad (msum) import qualified Web.MusicBrainz.Testing.XML as X main :: IO () main = hspecX $ descriptions [X.specs]
ocharles/Web-MusicBrainz
Web/MusicBrainz/Testing/Main.hs
Haskell
bsd-2-clause
200
{-# LANGUAGE PackageImports #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE DataKinds #-} module Propellor.PrivData ( withPrivData, withSomePrivData, addPrivData, setPrivData, unsetPrivData, unsetPriv...
ArchiveTeam/glowing-computing-machine
src/Propellor/PrivData.hs
Haskell
bsd-2-clause
9,424
module TestModuleMany where import HEP.Automation.EventGeneration.Type import HEP.Automation.JobQueue.JobType import HEP.Automation.MadGraph.Model import HEP.Automation.MadGraph.Model.SM import HEP.Automation.MadGraph.SetupType import HEP.Automation.MadGraph.Type import HEP.Storage.WebDAV.Type psetup :: ProcessSetup ...
wavewave/jobqueue-sender
TestModuleMany.hs
Haskell
bsd-2-clause
1,097
{-# LANGUAGE OverloadedStrings #-} module Main where import Control.Exception (bracketOnError) import Control.Monad.State.Lazy import Data.Maybe (fromMaybe) import qualified Data.Text as T import qualified Data.Text.IO as T import ...
epost/psc-ide
server/Main.hs
Haskell
bsd-3-clause
3,181
module Day20 where {-# LANGUAGE TupleSections #-} -- Improvements to Day18 import Control.Monad.Gen import Control.Monad.Trans.Either import Control.Monad.Reader import qualified Data.Map as Map data Type = Function Type Type -- a -> b | RecordT [(String, Type)] -- a * b | VariantT [(String, Type)] --...
joelburget/daily-typecheckers
src/Day20.hs
Haskell
bsd-3-clause
12,440
module Husky.Wai.FileApplication ( fileApplication ) where import System.FilePath import Control.Monad.IO.Class (liftIO) import qualified Data.ByteString.Char8 as B import qualified Data.ByteString.Lazy.Char8 as LB import Data.Enumerator (yield, Stream(EOF)) import Data.CaseInsensitive ( mk ) ...
abaw/husky
Husky/Wai/FileApplication.hs
Haskell
bsd-3-clause
1,362
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE ScopedTypeVariables #-} module Model where import Data.Time.Clock import Database.PostgreSQL.Simple import Database.PostgreSQL.Simple.SqlQQ import Database.PostgreSQL.Simple.Types import Database.PostgreSQL.Sim...
sivteck/hs-pastebin
src/Model.hs
Haskell
bsd-3-clause
1,248
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE GADTs #-} module Main where type X a b = Y a b type Function c d = c -> Int -> d -> Int newtype A = B Int data C = D String | E deriving (Show) data Z a b = Z (X a b) (X a b , X a b) data F = F { c :: String, d :: String } deriving (Eq, Show) d...
hecrj/haskell-format
test/specs/types/input.hs
Haskell
bsd-3-clause
754
{-# LANGUAGE TypeOperators #-} module LiuMS.Config ( Config (..), Language, SiteInfo (..) , liuMSInfo, mkConfig , askContentPath, askCacheManager, askSiteInfo ) where import Control.Monad.Reader import Control.Monad.Trans.Except import Servant import LiuMS.CacheManager import LiuMS.Compiler import LiuMS.Comp...
notcome/liu-ms-adult
src/LiuMS/Config.hs
Haskell
bsd-3-clause
1,960
{-# LANGUAGE FlexibleInstances, FlexibleContexts #-} module Obsidian.MonadObsidian.PureAPI where import Obsidian.MonadObsidian.Exp import Obsidian.MonadObsidian.Arr -- import Bitwise --import Data.Bits import Control.Monad import Data.Foldable -------------------------------------------------------...
svenssonjoel/MonadObsidian
Obsidian/MonadObsidian/PureAPI.hs
Haskell
bsd-3-clause
7,686
-- | -- Module: Control.Proxy.ByteString.List -- Copyright: (c) 2013 Ertugrul Soeylemez -- License: BSD3 -- Maintainer: Ertugrul Soeylemez <es@ertes.de> module Control.Proxy.ByteString.List ( -- * Basic operations fromLazyS, unfoldrS, unpackD, -- * Substreams dropD, dro...
ertes/pipes-bytestring
Control/Proxy/ByteString/List.hs
Haskell
bsd-3-clause
3,137
{- | Maintainer : simons@cryp.to Stability : experimental Portability : portable The preferred method for rendering a 'Document' or single 'Content' is by using the pretty printing facility defined in "Pretty". Pretty-printing does not work well for cases, however, where the formatting in th...
FranklinChen/hugs98-plus-Sep2006
packages/HaXml/src/Text/XML/HaXml/Verbatim.hs
Haskell
bsd-3-clause
3,563
module ReadPNG where import Data.Array.Repa.IO.DevIL import Data.Array.Repa as R import Data.Array.Repa.Repr.ForeignPtr import Data.Array.Accelerate.IO import Data.Array.Accelerate as A import Data.Array.Accelerate.Interpreter import Control.Monad import ReadDist import Codec.BMP import System.Environment exec = do ...
vmchale/EMD
src/ReadPNG.hs
Haskell
bsd-3-clause
884
-- | Basebull library module module Basebull where import qualified Data.Foldable as F import qualified Data.ByteString.Lazy as BL import Data.Csv.Streaming -- a simple type alias for data type BaseballStats = (BL.ByteString, Int, BL.ByteString, Int) fourth :: (a, b, c, d) -> d fourth (_, _, _, d) = d baseballSt...
emaphis/Haskell-Practice
basebull/src/Basebull.hs
Haskell
bsd-3-clause
653
module Backend.InterpreterSpec where import Test.Hspec import qualified Data.Map as Map import Frontend.Parser import Backend.Interpreter testEnv = Map.fromList [("x", Int 1), ("y", Int 2)] spec :: Spec spec = describe "eval" $ do it "evaluates ints" $ eval (Int 1) testEnv `shouldBe` 1 it "evaluates ...
JCGrant/JLang
test/Backend/InterpreterSpec.hs
Haskell
bsd-3-clause
690
{-# LANGUAGE MagicHash,UnboxedTuples #-} module Data.Util.Size ( unsafeSizeof , strictUnsafeSizeof )where import GHC.Exts import Foreign unsafeSizeof :: a -> Int unsafeSizeof a = case unpackClosure# a of (# x, ptrs, nptrs #) -> sizeOf header + I# (sizeofByteArray# (unsafeCoerce...
cutsea110/data-util
Data/Util/Size.hs
Haskell
bsd-3-clause
486
{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} -- | module VK.App.Actions (VKAction(..) , module Ex...
eryx67/vk-api-example
src/VK/App/Actions.hs
Haskell
bsd-3-clause
1,208
{-# LANGUAGE DataKinds, ExplicitForAll, FlexibleContexts, OverloadedStrings #-} {-# LANGUAGE RecursiveDo, ScopedTypeVariables, TypeApplications #-} {-# LANGUAGE TypeFamilies, TypeOperators #-} {-# OPTIONS_GHC -fdefer-typed-holes #-} module Shaped.Reflex where import Ref...
meditans/shaped
src/Shaped/Reflex.hs
Haskell
bsd-3-clause
8,282
module YandexDirect.Entity ( module YandexDirect.Entity.Core , module YandexDirect.Entity.Ad , module YandexDirect.Entity.AdExtension , module YandexDirect.Entity.AdGroup , module YandexDirect.Entity.Campaign , module YandexDirect.Entity.Dictionary , module YandexDirect.Entity.Keyword , module YandexDir...
effectfully/YandexDirect
src/YandexDirect/Entity.hs
Haskell
bsd-3-clause
640
{-# LANGUAGE ScopedTypeVariables #-} {-# OPTIONS_GHC -fno-warn-orphans #-} -- In the test suite, so OK module Main(main) where import Safe import Safe.Exact import qualified Safe.Foldable as F import Control.DeepSeq import Control.Exception import Control.Monad import Data.Char import Data.List import Data.Maybe imp...
ndmitchell/safe
Test.hs
Haskell
bsd-3-clause
5,953
module Recommendations(recommendedMoviesFor) where import Data as Data(PersonName, title, name, rate, allItems, tryFindByName) import Utils as Utils(tryList, reverseBy, except, groupBy) recommendedMoviesFor :: PersonName -> (PersonName -> PersonName -> Either String Float) ...
vprokopchuk256/programming-collective-intelligence
src/Recommendations.hs
Haskell
bsd-3-clause
1,108
module PreludeList ( map, (++), filter, concat, concatMap, head, last, tail, init, null, length, (!!), foldl, foldl1, scanl, scanl1, foldr, foldr1, scanr, scanr1, iterate, repeat, replicate, cycle, take, drop, splitAt, takeWhile, dropWhile, span, break, lines, words, unlines, unwords, reverse, and, or,...
rodrigogribeiro/mptc
test/Data/Full/PreludeList.hs
Haskell
bsd-3-clause
6,265
#!/usr/bin/env runhaskell {-# LANGUAGE OverloadedStrings #-} module Main where import Control.Concurrent (threadDelay) import Control.Concurrent.MVar (MVar (..), putMVar, takeMVar) import Control.Exception (tryJust) import Control.Monad (forever, guard) imp...
radix/json-log-viewer
src/Messin.hs
Haskell
mit
2,922
module Text.HTML.TagSoup2.Str(module Text.StringLike) where import Text.StringLike data Pos str = Pos Position str instance StringLike str => StringLike (Pos str) where position :: Tag (Position str) -> Tag str position = undefined
ndmitchell/tagsoup
src/Text/HTML/TagSoup2/Str.hs
Haskell
bsd-3-clause
239
-- dets.hs -- bugs from the Erlang's dets library -- -- Copyright (c) 2017-2020 Rudy Matela. -- Distributed under the 3-Clause BSD licence (see the file LICENSE). -- -- -- In 2016, John Hughes wrote a paper titled: -- -- "Experiences with QuickCheck: Testing the Hard Stuff And Staying Sane" -- -- http://publications.li...
rudymatela/llcheck
bench/dets.hs
Haskell
bsd-3-clause
6,570
-- |Binary instances for images. Currently it only supports the type -- `Image Grayscale D32`. {-#LANGUAGE ScopedTypeVariables, FlexibleInstances#-} module CV.Binary where import CV.Image (Image,GrayScale,D32) import CV.Conversions import Data.Maybe (fromJust) import Data.Binary import Data.Array.CArray import Data.A...
BeautifulDestinations/CV
CV/Binary.hs
Haskell
bsd-3-clause
726
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeFamilies #-} module Main (main) where import Control.Monad (join) import Control.Monad.Reader (ReaderT(..)) import Control.Concurrent.STM (STM, atomically) import Data.Kind (Type) class Monad (Transaction m) => MonadPersist m where...
sdiehl/ghc
testsuite/tests/simplCore/should_run/T16066.hs
Haskell
bsd-3-clause
778
{-# LANGUAGE FlexibleInstances #-} -- -- Licensed to the Apache Software Foundation (ASF) under one -- or more contributor license agreements. See the NOTICE file -- distributed with this work for additional information -- regarding copyright ownership. The ASF licenses this file -- to you under the Apache License, Ver...
jcgruenhage/dendrite
vendor/src/github.com/apache/thrift/lib/hs/src/Thrift/Transport/HttpClient.hs
Haskell
apache-2.0
2,967
-- ------------------------------------------------------------------------------------- -- Author: Sourabh S Joshi (cbrghostrider); Copyright - All rights reserved. -- For email, run on linux (perl v5.8.5): -- perl -e 'print pack "H*","736f75726162682e732e6a6f73686940676d61696c2e636f6d0...
cbrghostrider/Hacking
HackerRank/Algorithms/Greedy/priyankaAndToys.hs
Haskell
mit
739
-- | Helper functions for template Haskell, to avoid stage restrictions. module Strive.Internal.TH ( options , makeLenses ) where import Data.Aeson.TH (Options, defaultOptions, fieldLabelModifier) import Data.Char (isUpper, toLower, toUpper) import Data.Maybe (isJust) import qualified Language.Haskell.TH as TH i...
liskin/strive
library/Strive/Internal/TH.hs
Haskell
mit
3,523
{-# htermination foldM :: Monad m => (a -> b -> m a) -> a -> [b] -> m a #-} import Monad
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Monad_foldM_2.hs
Haskell
mit
90
{-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- | -- Module with consumer properties types and functions. ----------------------------------------------------------------------------- module Kafka.Consumer.ConsumerProperties ( ConsumerProperties(..) ,...
haskell-works/kafka-client
src/Kafka/Consumer/ConsumerProperties.hs
Haskell
mit
7,103
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE TypeFamilies #-} -------------------------------------------------------------------- -- | -- Copyright : © Oleg Grenrus 2014 -- License : MIT -- Maintainer: Oleg Grenrus <oleg.grenrus@iki.fi> -- Stability : experimental -- Portability: non-portable -- ---------------...
phadej/boolean-normal-forms
src/Data/Algebra/Boolean/NormalForm.hs
Haskell
mit
1,275
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE BangPatterns #-} -- | This module provides the ability to create reapers: dedicated cleanup -- threads. These threads will automatically spawn and die based on the -- presence of a workload to process on. Example uses include: -- -- * Killing long-running jobs -- ...
tolysz/wai
auto-update/Control/Reaper.hs
Haskell
mit
10,059
import Control.Applicative import Text.Parsec import Text.Parsec.String (Parser) import Text.Parsec.Language (haskellStyle) import qualified Text.Parsec.Token as Tok data Expr = Add String String deriving Show lexer :: Tok.TokenParser () lexer = Tok.makeTokenParser style where ops = ["->","\\","+","*","-","="] ...
riwsky/wiwinwlh
src/parsec_applicative.hs
Haskell
mit
747
{-# OPTIONS_GHC -fno-warn-orphans #-} {-# LANGUAGE QuasiQuotes #-} module Graphics.Urho3D.Resource.Cache( ResourceCache , resourceCacheContext , priorityLast , cacheAddResourceDir , cacheGetResource ) where import qualified Language.C.Inline as C import qualified Language.C.Inline.Cpp as C import Graphi...
Teaspot-Studio/Urho3D-Haskell
src/Graphics/Urho3D/Resource/Cache.hs
Haskell
mit
3,048
module Server.Swagger where import API import Servant.Swagger import Data.Swagger import Servant swaggerServer :: Handler Swagger swaggerServer = return (toSwagger basicApi)
lierdakil/markco
server/src/Server/Swagger.hs
Haskell
mit
176
{-#LANGUAGE FlexibleContexts #-} {-#LANGUAGE FlexibleInstances #-} {-#LANGUAGE OverloadedStrings #-} {-#LANGUAGE TupleSections #-} {-#LANGUAGE TypeSynonymInstances #-} {-#LANGUAGE MultiParamTypeClasses #-} {-#LANGUAGE ScopedTypeVariables #-} module Text.Ginger.Run.FuncUtils where import Prelude ( (.), ($), (==), (/=) ...
tdammers/ginger
src/Text/Ginger/Run/FuncUtils.hs
Haskell
mit
7,011
module Day3Spec (main, spec) where import Test.Hspec import Test.Hspec.QuickCheck import Test.QuickCheck import Test.QuickCheck.Property import Test.QuickCheck.Modifiers import Test.Hspec import Day3 main :: IO () main = hspec spec spec :: Spec spec = do describe "When Santa is alone" $ do it "visits only o...
AndrewSinclair/aoc-haskell
test/Day3Spec.hs
Haskell
mit
1,203
module Optimization where import Numeric.LinearAlgebra class Optimize a where --optimizeInit :: a -> Double -> Double -> (Int, Int) -> a paramUpdate :: a -> a data SGD = SGD { sgdLearningRate :: Double, sgdDecay :: Double, sgdMomentum :: Double, sgdParams :: [Matrix R], sgdGparams :: [Matrix R], sgd...
neutronest/vortex
vortex/Optimization.hs
Haskell
mit
3,455
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE OverloadedStrings #-} ------------------------------------------------------------------------------ -- | This module defines our application's state type and an alias for its -- handler monad. module Ap...
santolucito/Peers
src/Application.hs
Haskell
apache-2.0
1,096
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QGLWidget.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:32 Warning : this file is machine generated - do not...
uduki/hsQt
Qtc/Opengl/QGLWidget.hs
Haskell
bsd-2-clause
70,417
{-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} module YesodDsl.ParserState (ParserMonad, initParserState, getParserState, getPath, getParsed, setParserState, runParser, pushScope, popScope, declare, declareClassInstances, declareGlobal, SymType(..), addClassInstances, Pa...
tlaitinen/yesod-dsl
YesodDsl/ParserState.hs
Haskell
bsd-2-clause
16,297
module HSH.Evaluate where import HSH.CommandLineParse import HSH.ShellState import HSH.Exec import Control.Monad import Control.Monad.State import System.IO import qualified System.Environment as SysEnv import qualified System.Posix.Directory as Posix import qualified Data.Map as Map import Data.Maybe import Data....
jessekempf/hsh
src/HSH/Evaluate.hs
Haskell
bsd-2-clause
2,746
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 Type checking of type signatures in interface files -} {-# LANGUAGE CPP #-} module TcIface ( tcLookupImported_maybe, importDecl, checkWiredInTyCon, tcHiBootIface, typecheckIface, tcIfaceDecl, tcIf...
vTurbine/ghc
compiler/iface/TcIface.hs
Haskell
bsd-3-clause
66,022
module Benchmarks.Day04 (benchmarks) where import Criterion (Benchmark, bench, nf) import Day04 import Text.Heredoc benchmarks :: [Benchmark] benchmarks = [ bench "findAdventCoin5" $ nf (findAdventCoin input) 5 , bench "findAdventCoin6" $ nf (findAdventCoin input) 6 ] input = [there|./inputs/Day04....
patrickherrmann/advent
bench/Benchmarks/Day04.hs
Haskell
bsd-3-clause
325
{-# LANGUAGE OverloadedStrings #-} {-| Module : Network.Spotify.Api.Types.Scope Description : OAuth scopes for the Spotify Web API Stability : experimental Scopes let you specify exactly what types of data your application wants to access, and the set of scopes you pass in your call determines what access perm...
chances/servant-spotify
src/Network/Spotify/Api/Types/Scope.hs
Haskell
bsd-3-clause
3,257
import Test.Hspec (hspec) import ParseTest (parseSpecs) import GeometryTest (geometrySpecs) main :: IO () main = hspec $ do parseSpecs geometrySpecs
albertov/kml2obj
tests/main.hs
Haskell
bsd-3-clause
155
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE QuasiQuotes #-} module Horbits.UI.Camera.Trace(logCamera, orthoCameraColatitudeDeg, orthoCameraLongitudeDeg) where import Control.Lens import Data.Foldable (mapM_) import Data.StateVar import Linear import ...
chwthewke/horbits
src/horbits/Horbits/UI/Camera/Trace.hs
Haskell
bsd-3-clause
1,499
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} {-| Module : Numeric.AERN.RealArithmetic.Basis.MPFR.FieldOps Description : rounded arithmetic instances for MPFR Copyright : (c) Michal Konecny License : BSD3 Maintainer : mikkonecny@gmail.com Stability : ex...
michalkonecny/aern
aern-mpfr-rounded/src/Numeric/AERN/RealArithmetic/Basis/MPFR/FieldOps.hs
Haskell
bsd-3-clause
4,335
module Sexy.Instances.Nil.Function where import Sexy.Classes (Nil(..)) instance (Nil b) => Nil (a -> b) where nil = (\_ -> nil)
DanBurton/sexy
src/Sexy/Instances/Nil/Function.hs
Haskell
bsd-3-clause
133
module Graphics.Gnuplot.Frame.OptionSet ( OptionSet.T, deflt, OptionSet.add, OptionSet.remove, OptionSet.boolean, OptionSet.addBool, size, title, key, keyInside, keyOutside, xRange2d, yRange2d, xRange3d, yRange3d, zRange3d, xLabel, yLabel, zLabel, xTicks2d, ...
kubkon/gnuplot
src/Graphics/Gnuplot/Frame/OptionSet.hs
Haskell
bsd-3-clause
7,742
-- | -- This module reexports most of the types from \"containers\", -- \"unordered-containers\", \"array\", and \"vector\". No -- functions are exported. -- module Prelude.Containers.Types ( module E ) where -- array types import Data.Array as E (Array) import Data.Array.IArray as E (IArray) import Data.Array.IO ...
andrewthad/lens-prelude
src/Prelude/Containers/Types.hs
Haskell
bsd-3-clause
953
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} module Webcrank.Internal.ReqData where import Control.Applicative import Control.Lens import Control.Monad.State import Data.ByteString (ByteString) import qualified Data.ByteString.Lazy as LB import qualified Data.HashMap.Strict as HashMap import D...
webcrank/webcrank.hs
src/Webcrank/Internal/ReqData.hs
Haskell
bsd-3-clause
2,186
{-# LANGUAGE ScopedTypeVariables, GeneralizedNewtypeDeriving, TypeSynonymInstances, FlexibleInstances, OverlappingInstances #-} ----------------------------------------------------------------------------- -- | -- Module : XMonad.Actions.GridSelect -- Copyright : Clemens Fruhwirth <clemens@endorphin.org> -- Li...
MasseR/xmonadcontrib
XMonad/Actions/GridSelect.hs
Haskell
bsd-3-clause
27,412
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.Raw.EXT.FogCoord -- Copyright : (c) Sven Panne 2013 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : portable -- -- ...
mfpi/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/EXT/FogCoord.hs
Haskell
bsd-3-clause
1,004
module Main where import System.Environment (getArgs) import Data.Either.Combinators (fromRight') import Text.Blaze.Html.Renderer.Pretty (renderHtml) import Parse (iParse, doc) import Semantics (semantic) import Compile (compile) main :: IO () main = do [f] <- getArgs s <- readFile f case iParse doc...
RoganMurley/dreamail
app/Main.hs
Haskell
bsd-3-clause
436
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE TupleSections #-} {-# OPTIONS_GHC -fno-warn-type-defaults #-} module NeuroSpider.UiManager ( setupMenuToolBars , UiAction(..) ) where import BasicPrelude hiding (empty, on) import Data.Char (isUpper) import Data.Text (pack, unpack, toLower, breakOn) import Graphics.UI.Gt...
pavelkogan/NeuroSpider
src/NeuroSpider/UiManager.hs
Haskell
bsd-3-clause
4,273
{-# LANGUAGE GeneralizedNewtypeDeriving, DoRec, ExistentialQuantification, FlexibleContexts #-} module TermSet2 where import Control.Arrow((***)) import Control.Monad.State import Control.Monad.Reader import qualified Data.IntMap as IntMap import Data.IntMap(IntMap) import Test.QuickCheck hiding (label) import Test.Qu...
jystic/QuickSpec
TermSet2.hs
Haskell
bsd-3-clause
1,852
module Mud.Error ( MudError(..) , humanReadableMudError ) where import GHC.Conc.Signal data MudError = MudErrorNoConfigFound FilePath | MudErrorNotInMudDirectory | MudErrorUnreadableConfig String | MudErrorUnreadableHistory String | MudErrorNoRollbackPlanFound | MudErrorScriptFailure (Either Int Sig...
thoferon/mud
src/Mud/Error.hs
Haskell
bsd-3-clause
1,037
{-# LANGUAGE OverloadedStrings, GADTs, FlexibleInstances #-} module D3JS.Reify where import Data.Text (Text) import qualified Data.Text as T import D3JS.Type instance Reifiable Var where reify t = t instance Reifiable (Var' r) where reify (Var' name) = name instance Reifiable (Chain a b) where reify (Val name)...
nebuta/d3js-haskell
D3JS/Reify.hs
Haskell
bsd-3-clause
2,648
{-# LANGUAGE GeneralizedNewtypeDeriving, CPP, TypeFamilies, FlexibleInstances, FlexibleContexts, DeriveDataTypeable, TypeOperators #-} import Development.Shake import qualified Development.Shake.Core as Core import Control.DeepSeq import Control.Monad.IO.Class import Data.Binary import Data.Binary.Get import Data.Bina...
batterseapower/openshake
tests/deserialization-changes/Shakefile-3.hs
Haskell
bsd-3-clause
991
-------------------------------------------------------------------- -- | -- Module : Text.RSS1.Utils -- Copyright : (c) Galois, Inc. 2008 -- License : BSD3 -- -- Maintainer: Sigbjorn Finne <sof@galois.com> -- Stability : provisional -- Portability: -- --------------------------------------------------------------...
GaloisInc/feed
Text/RSS1/Utils.hs
Haskell
bsd-3-clause
3,511
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="sq-AL"> <title>Browser View | ZAP Extension</title> <maps> <homeID>top</homeID> <mapre...
0xkasun/security-tools
src/org/zaproxy/zap/extension/browserView/resources/help_sq_AL/helpset_sq_AL.hs
Haskell
apache-2.0
974
-- | This module generates Netlist 'Decl's for a circuit graph. module Language.KansasLava.Netlist.Decl where import Language.KansasLava.Types import Language.Netlist.AST import Data.Reify.Graph (Unique) import Language.KansasLava.Netlist.Utils -- Entities that need a _next special *extra* signal. --toAddNextSignal...
andygill/kansas-lava
Language/KansasLava/Netlist/Decl.hs
Haskell
bsd-3-clause
2,443
{-# LANGUAGE CPP, GeneralizedNewtypeDeriving #-} -------------------------------------------------------------------------------- -- | The LLVM Type System. -- module Llvm.Types where #include "HsVersions.h" import GhcPrelude import Data.Char import Data.Int import Numeric import DynFlags import FastString import...
shlevy/ghc
compiler/llvmGen/Llvm/Types.hs
Haskell
bsd-3-clause
35,412
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-} module IHaskell.Display.StaticCanvas (Canvas(..)) where import Data.Text.Lazy.Builder (toLazyText) import Data.Text.Lazy (unpack) import Data.Text (pack, Text) import System.IO.Unsafe import Control.Concurrent.M...
artuuge/IHaskell
ihaskell-display/ihaskell-static-canvas/src/IHaskell/Display/StaticCanvas.hs
Haskell
mit
976
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE UnboxedTuples #-} {-# LANGUAGE UnboxedSums #-} {-# OPTIONS_GHC -O2 #-} module Packed.Bytes.Stream.ST ( ByteStream(..) , empty , unpack , fromBytes ) where import Data.Primitive (Arr...
sdiehl/ghc
testsuite/tests/codeGen/should_run/T15038/src/Packed/Bytes/Stream/ST.hs
Haskell
bsd-3-clause
1,853
{-@ LIQUID "--no-termination" @-} module Foo where data RBTree a = Leaf | Node Color !BlackHeight !(RBTree a) a !(RBTree a) deriving (Show) data Color = B -- ^ Black | R -- ^ Red deriving (Eq,Show) type BlackHeight = Int type RBTreeBDel a = (RBTree a, Bool) ---...
mightymoose/liquidhaskell
benchmarks/llrbtree-0.1.1/Data/Set/RBTree-mini-color.hs
Haskell
bsd-3-clause
7,444
{-# LANGUAGE GeneralizedNewtypeDeriving #-} -- experimental, not expected to work {- our goal: config = do add layout Full set terminal "urxvt" add keys [blah blah blah] -} {- ideas: composability! "only once" features like avoidStruts, ewmhDesktops -} module XMonad.Config.Monad where import XM...
pjones/xmonad-test
vendor/xmonad-contrib/XMonad/Config/Monad.hs
Haskell
bsd-2-clause
1,188
{-| Module : Web.Facebook.Messenger Copyright : (c) Felix Paulusma, 2016 License : MIT Maintainer : felix.paulusma@gmail.com Stability : semi-experimental TODO: Explanation of this entire package (later) -} module Web.Facebook.Messenger ( module Web.Facebook.Messenger.Types ) where import Web.Fa...
Vlix/facebookmessenger
src/Web/Facebook/Messenger.hs
Haskell
mit
343