code
stringlengths
5
1.03M
repo_name
stringlengths
5
90
path
stringlengths
4
158
license
stringclasses
15 values
size
int64
5
1.03M
n_ast_errors
int64
0
53.9k
ast_max_depth
int64
2
4.17k
n_whitespaces
int64
0
365k
n_ast_nodes
int64
3
317k
n_ast_terminals
int64
1
171k
n_ast_nonterminals
int64
1
146k
loc
int64
-1
37.3k
cycloplexity
int64
-1
1.31k
-- Copyright (c) 2014-present, Facebook, Inc. -- All rights reserved. -- -- This source code is distributed under the terms of a BSD license, -- found in the LICENSE file. {-# LANGUAGE CPP, OverloadedStrings #-} module Main where import Test.Framework (defaultMain) import Test.Framework.Providers.HUnit (hUnitTestToTe...
jiayuanmark/Haxl
tests/TestMain.hs
bsd-3-clause
403
0
6
59
57
36
21
7
1
<?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="pt-BR"> <title>ViewState</title> <maps> <homeID>viewstate</homeID> <mapref location="ma...
thc202/zap-extensions
addOns/viewstate/src/main/javahelp/help_pt_BR/helpset_pt_BR.hs
apache-2.0
960
77
66
155
404
205
199
-1
-1
<?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="zh-CN"> <title>Front-End Scanner | ZAP Extension</title> <maps> <homeID>top</homeID> <m...
kingthorin/zap-extensions
addOns/frontendscanner/src/main/javahelp/org/zaproxy/zap/extension/frontendscanner/resources/help_zh_CN/helpset_zh_CN.hs
apache-2.0
978
78
67
159
417
211
206
-1
-1
{-# LANGUAGE TemplateHaskell #-} module T15815A where mkFoo tyQ = [d| foo :: a ~ $(tyQ) => a foo = undefined |]
sdiehl/ghc
testsuite/tests/th/T15815A.hs
bsd-3-clause
123
0
5
33
17
12
5
-1
-1
{-# LANGUAGE GADTs, RankNTypes #-} module Main where import Control.Applicative (Applicative(..)) import Control.Monad (liftM, ap) -- abstract syntax ------------------------------------------------------------- data Ty t where Bool :: Ty Bool Arr :: Ty a -> Ty b -> Ty (a -> b) data Exp g t where Var :: V...
ezyang/ghc
testsuite/tests/gadt/nbe.hs
bsd-3-clause
5,877
0
15
1,811
2,815
1,407
1,408
128
3
{-# LANGUAGE MagicHash, UnboxedTuples #-} module Main where import GHC.Prim (Int#, Double#) main :: IO () main = let f = int2Integer# 0# in putStrLn "" {-# NOINLINE int2Integer# #-} int2Integer# :: Int# -> (# Int#, Double# #) int2Integer# x = (# x, 1.0## #)
wxwxwwxxx/ghc
testsuite/tests/typecheck/should_run/tcrun048.hs
bsd-3-clause
263
0
9
50
78
43
35
8
1
module Oden.CLI.Run where import Oden.Backend import Oden.Backend.Go import Oden.Scanner import Control.Monad.Reader import System.Directory import System.FilePath import System.Process import System.IO.Temp import Oden.CLI im...
AlbinTheander/oden
cli/Oden/CLI/Run.hs
mit
983
0
13
246
266
135
131
24
3
{-# LANGUAGE OverloadedStrings #-} module Data.Control ( Command (..) , Control (..) , control ) where --import Control.Monad.Trans (liftIO) import Data.Aeson import Data.Functor import qualified Network.MPD as MPD data Command = Play | Pause ...
kalhauge/vagnplayer
src/Data/Control.hs
mit
1,139
0
9
330
308
168
140
31
1
type Point = (Int, Int) nextPoint :: Point -> Point -> Point nextPoint (x,y) (x',y') = (x'+ a ,y' +b) where a = x' - x b = y' - y checkPoints = do cs <- map (\l -> (map (\x-> read x :: Int) . words) l) . drop 1 <$> lines <$> getContents let inPoints = map (\[a,b,c,d]-> ((a,b), (c,d))) cs poin...
ChrisCoffey/haskell_sandbox
hackerRank/maths.hs
mit
600
0
20
162
338
182
156
15
1
{-# LANGUAGE OverloadedStrings #-} {- Script for wiping out something entirely - files.txt is prepare by calling window.getShipImgPath on poi-plugin-navy-album exhausting all valid parameters. -} module NoMore ( main ) where import Turtle import Prelude hiding (FilePath) import qualified Data.ByteString...
Javran/misc
naka-no-more/NoMore.hs
mit
846
0
15
149
199
103
96
19
1
{-# LANGUAGE QuasiQuotes, ScopedTypeVariables #-} module Main where import Paths_postgrest (version) import PostgREST.App import PostgREST.Middleware import PostgREST.Error(errResponse) import Control.Monad (unless) import Control.Monad.IO.Class (liftIO) import Data.String.Conversions (cs) import Network.Wai (strict...
framp/postgrest
src/PostgREST/Main.hs
mit
3,339
0
16
804
879
460
419
73
3
module Transformers where import Data.Maybe import Data.List import Core pathContains :: String -> PathMapsT pathContains ss pathMaps = filter (isJust . find (==ss) . subsequences . pathMapDest) pathMaps fork :: [PathMapsT] -> PathMapsT fork ts = (\pathMaps -> concatMap (\t -> t pathMaps) ts) forkMap :: [a...
rexim/mapie
src/Transformers.hs
mit
498
0
11
95
189
103
86
13
1
module Hunch.Constants where maintainerName :: String maintainerName = "Logan Braga" maintainerMail :: String maintainerMail = "<" ++ email ++ ">" where email = address ++ "@" ++ host address = "braga.logan" host = "gmail.com" maintainerInfo :: String maintainerInfo = maintainerName ++ " " ++ main...
loganbraga/hunch
app/Hunch/Constants.hs
mit
616
0
8
107
127
74
53
20
1
{-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE NoMonomorphismRestriction #-} -- FIXME remove -- | Some fields spiced up with jQuery UI. module Yesod.Form.Jquery ( YesodJquery (..) , jqueryDayField , jqueryAutocompl...
piyush-kurur/yesod
yesod-form/Yesod/Form/Jquery.hs
mit
4,891
0
12
1,180
938
505
433
93
3
{-# LANGUAGE PackageImports, BangPatterns, FlexibleContexts, AllowAmbiguousTypes #-} {-# OPTIONS -Wall -fno-warn-missing-signatures -fno-warn-incomplete-patterns #-} module ImageProcessing.ChannelProcessing ( operateRGB , blurRGB , blurGrey , computeChannel , blurChannel ) where import System.I...
eklinkhammer/haskell-vision
src/ImageProcessing/ChannelProcessing.hs
mit
1,285
0
10
240
414
229
185
30
1
{-# LANGUAGE ConstraintKinds, TemplateHaskell #-} module Notes ( NID, Note (..), NStore, runDB, DBState (..), DB, DB', DBT, nid, subs, title, created, lastModified, db, notes, root, freshDB, genNid, newNote, atNid, addSub, shuffleSubs, deleteEverywhere ) where import ClassyPrelude hiding ...
aelve/Jane
Notes.hs
mit
3,963
0
14
1,105
992
542
450
-1
-1
{-# LANGUAGE OverloadedStrings #-} module Handler.Login (loginHandler) where import Snap.Snaplet.Auth (loginUser, currentUser) import Text.Blaze.Html5 import Snap.Blaze (blaze) import Application loginHandler :: AuthHandler () loginHandler = loginUser "username" "password" (Just "remember") onFailure onSuccess ...
epsilonhalbe/rendezvous
src/Handler/Login.hs
mit
538
0
14
103
154
81
73
15
2
module TicTactToeLocalPvP where import Data.Function (on) import Control.Monad.Trans.Class import Control.Monad.Trans.State import TicTacToe import TicTacToeIO main = do (winner, (_, finalBoard)) <- runStateT runUntilWin (X, clearBoard) putStrLn $ announceResult winner putStrLn "The final board s...
Solonarv/TicTacToe
TicTacToeLocalPvP.hs
mit
1,134
0
14
389
266
132
134
22
3
fact 0 = 1 fact n = n * fact(n - 1) main = do print $ fact 10
mino2357/Hello_Haskell
src/haskell014.hs
mit
67
0
8
24
46
22
24
4
1
module FileIO where -- takes a path and a file name and loads the data set as a list of transactions, where transactions are a list of strings importData :: String -> String -> IO [[String]] importData path file = do fileString <- readFile (path ++ "/" ++ file) return (map words $ lines fileString) exportResu...
gaetjen/FunFreakyPatMan
src/FileIO.hs
mit
434
0
11
88
130
65
65
7
1
{-| Implementation of command-line functions. This module holds the common command-line related functions for the binaries, separated into this module since "Ganeti.Utils" is used in many other places and this is more IO oriented. -} {- Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc. This program is free so...
ribag/ganeti-experiments
src/Ganeti/HTools/CLI.hs
gpl-2.0
28,625
276
16
7,301
6,024
3,415
2,609
691
3
{-# LANGUAGE TypeFamilies #-} {- Arrow-based types and classes for synchronous circuits. - Copyright : (C)opyright 2004-2005, 2009-2011 peteg42 at gmail dot com - License : GPL (see COPYING for details) -} module ADHOC.Circuits ( module ADHOC.Basis , ArrowComb(..) , ArrowMux(..) , muxAC ,...
peteg/ADHOC
ADHOC/Circuits.hs
gpl-2.0
5,621
24
23
1,240
1,654
998
656
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} module Reffit.Handlers.HandlePasswordReset where import Control.Applicative import Control.Error import Control.Monad.State import Data.Map.Syntax import Data.Time import qualified Data.Text as ...
imalsogreg/reffit
src/Reffit/Handlers/HandlePasswordReset.hs
gpl-3.0
2,468
0
16
662
712
348
364
57
1
{-# LANGUAGE QuasiQuotes, ForeignFunctionInterface #-} module Graphics.PlotWithGnu where import Data.List import Control.Monad import System.IO import System.Process import System.Directory import System.FilePath import System.Directory import System.Posix.Temp import Data.String.QQ import qualified Data.ByteString.C...
waterret/PlotWithGnu-haskell
src/Graphics/PlotWithGnu.hs
gpl-3.0
4,836
0
13
1,004
1,646
845
801
113
2
module History (History, emptyHist, histBack, histFwd, histGo, findFirstBack ) where import Fields import Types import Data.Maybe import qualified Data.Set as Set data History a = History { fwd :: [a] , back :: [a] } deriving (Eq, Ord, Show) emptyHist :: History a emptyHist = History { fwd = [], back ...
ktvoelker/argon
src/History.hs
gpl-3.0
882
0
13
222
429
233
196
-1
-1
-- | -- Module : Main -- Copyright : (c) Justus Sagemüller 2017 -- License : GPL v3 -- -- Maintainer : (@) jsag $ hvl.no -- Stability : experimental -- Portability : portable -- {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} module LaTeXComparer where import Math.LaTeX.Internal...
leftaroundabout/Symbolic-math-HaTeX
test/PdfSnippets/LaTeXComparer.hs
gpl-3.0
855
0
14
181
185
109
76
17
2
addOneIfOdd n = case odd n of True -> (\x -> x + 1) n False -> n addFive = \x -> \y -> (if (x>y) then y else x) + 5
dkensinger/haskell
haskellbook/lambdas.hs
gpl-3.0
122
0
11
38
80
43
37
4
2
{-# LANGUAGE OverloadedStrings #-} module Main where import Data.Maybe (fromJust) import Prompt (giveEVs) import Cards main = giveEVs p1 p2 card where b1 = (fromJust . parseCards) "6h,7d,9s,Ts" m1 = (fromJust . parseCards) "Jc,Kd,Jd" t1 = (fromJust . parseCards) "3c" b2 = (fromJust . parse...
dtrifuno/holz
src/Benchmark.hs
gpl-3.0
532
0
9
146
169
92
77
15
1
-- | A module for converting between integral types. module MathPrelude.Classes.Integral ( Integral(..) , fromIntegral98 , toIntegral98 , fromIntegral -- * Misc , even , odd ) where ----------------------------------- --- Imports ----------------------------------- import Math...
RossOgilvie/MathPrelude
MathPrelude/Classes/Integral.hs
gpl-3.0
2,999
0
7
524
389
233
156
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-ec2/gen/Network/AWS/EC2/UnmonitorInstances.hs
mpl-2.0
4,346
0
10
859
503
306
197
60
1
{-# LANGUAGE TypeOperators, TypeFamilies, FlexibleContexts , TypeSynonymInstances, MultiParamTypeClasses, Rank2Types , FlexibleInstances, ScopedTypeVariables , ConstraintKinds #-} {-# OPTIONS_GHC -Wall -fno-warn-orphans #-} --------------------------------------------------------------...
conal/shady-graphics
src/Shady/Image.hs
agpl-3.0
8,908
0
12
1,892
2,016
1,117
899
111
1
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} module HmfParserSpec where import Common import HMF ------------------------------------------------------------------------------ import Control.Monad.Free import Control.Monad.State import Test.Hs...
haroldcarr/learn-haskell-coq-ml-etc
haskell/topic/fix-free/2016-01-benjamin-hodgson-parsing-to-free-monads/test/HmfParserSpec.hs
unlicense
2,133
0
15
704
826
474
352
61
2
quicksort :: (Ord a) => [a] -> [a] quicksort [] = [] quicksort (x:xs) = let smaller = [a | a <- xs, a <= x] larger = [a | a <- xs, a > x] in quicksort smaller ++ [x] ++ quicksort larger quicksort' :: (Ord a) => [a] -> [a] quicksort' [] = [] quicksort (x:xs) = let smaller = filter (<= x) xs lar...
mikoim/musor
haskell/Learn You a Haskell for Great Good!/sort.hs
unlicense
394
0
11
110
225
118
107
-1
-1
{- Created : 2014 Oct 07 (Tue) 08:53:35 by Harold Carr. Last Modified : 2014 Oct 19 (Sun) 21:01:05 by Harold Carr. 2012-01-01 http://www.haskellforall.com/2012/01/haskell-for-c-programmers-for-loops.html FOR LOOPS -} module X_2012_01_01_loops where import Control.Applicative import Control....
haroldcarr/learn-haskell-coq-ml-etc
haskell/topic/general/haskellforall/src/X_2012_01_01_loops.hs
unlicense
3,034
0
13
888
1,080
571
509
71
1
module Graham.A092487Spec (main, spec) where import Test.Hspec import Graham.A092487 (a092487) main :: IO () main = hspec spec spec :: Spec spec = describe "A092487" $ it "correctly computes the first 20 elements" $ take 20 (map a092487 [1..]) `shouldBe` expectedValue where expectedValue = [0,4,5,0,5,6,7,...
peterokagey/haskellOEIS
test/Graham/A092487Spec.hs
apache-2.0
352
0
10
59
160
95
65
10
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE TemplateHaskell #-} module Kubernetes.V1.PodCondition where import GHC.Generics import Data.Text import Data.Aeson.TH (deriveJSON, defaul...
minhdoboi/deprecated-openshift-haskell-api
kubernetes/lib/Kubernetes/V1/PodCondition.hs
apache-2.0
1,381
0
18
216
188
112
76
19
0
-- Final Countdown -- from chapter 14 of Learn you a Haskell -- Demonstrates faster performance of DiffList which -- represents a list as nested applications of concatenate -- ex: runhaskell --ghc-arg="-package mtl" haskell/final_countdown.hs import Control.Monad.Writer newtype DiffList a = DiffList { getDiff...
cbare/Etudes
haskell/final_countdown.hs
apache-2.0
1,308
0
11
283
471
236
235
30
1
module External.A009766Spec (main, spec) where import Test.Hspec import External.A009766 (a009766) main :: IO () main = hspec spec spec :: Spec spec = describe "A009766" $ it "correctly computes the first 20 elements" $ map a009766 [0..19] `shouldBe` expectedValue where expectedValue = [1, 1, 1, 1, 2, 2, ...
peterokagey/haskellOEIS
test/External/A009766Spec.hs
apache-2.0
367
0
8
76
154
92
62
10
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE TemplateHaskell #-} module Kubernetes.V1.SELinuxContextStrategyOptions where import GHC.Generics import Data.Text import Kubernetes.V1.SE...
minhdoboi/deprecated-openshift-haskell-api
kubernetes/lib/Kubernetes/V1/SELinuxContextStrategyOptions.hs
apache-2.0
869
0
18
118
160
94
66
16
0
module Calendar where import Data.List import Data.List.Split import Data.Time.Calendar import Data.Time.Calendar.OrdinalDate import Data.Time.Format import Data.Time.Clock import Text.Printf type Week = [Day] type Month = [Week] -- Converts a list into a string by using a formatter function listToString :: [a] -> ...
marmutro/console-calendar
Calendar.hs
bsd-2-clause
2,475
0
14
534
855
454
401
57
1
module Main where import System.ZMQ import Control.Monad (forever) import Data.ByteString.Char8 (unpack, empty) import System.IO (hSetBuffering, stdout, BufferMode(..)) import Control.Concurrent (threadDelay) main :: IO () main = withContext 1 $ \context -> do withSocket context Pull $ \receiver -> do connect...
krattai/noo-ebs
docs/zeroMQ-guide2/examples/Haskell/taskwork2.hs
bsd-2-clause
1,128
0
21
314
386
187
199
29
2
-- Copyright (c) 2016-present, Facebook, Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. {-# LANGUAGE OverloadedStrings #-} module Duckling.AmountOfMoney.BG.Corpus ( corpus ) where import Data.Stri...
facebookincubator/duckling
Duckling/AmountOfMoney/BG/Corpus.hs
bsd-3-clause
3,442
0
10
1,425
542
316
226
90
1
module Zero.Registration.Client ( initCredentialsHkdf , bindRegistration ) where import Control.Monad.IO.Class (liftIO) import qualified Data.Text as T import Data.Text (Text) import Data.ByteString.Char8 (ByteString) import Reflex.Dom.Core import Zero.Sjcl....
et4te/zero
src/Zero/Registration/Client.hs
bsd-3-clause
1,463
0
15
314
454
252
202
-1
-1
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 \section[TcMonoType]{Typechecking user-specified @MonoTypes@} -} {-# LANGUAGE CPP, TupleSections, MultiWayIf, RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies ...
sdiehl/ghc
compiler/typecheck/TcHsType.hs
bsd-3-clause
149,974
638
37
40,778
16,300
9,611
6,689
-1
-1
{-# OPTIONS_HADDOCK hide #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE UnboxedTuples #-} {-# LANGUAGE ScopedTypeVariables #-} #include "inline.hs" -- | -- Module : Streamly.Interna...
harendra-kumar/asyncly
src/Streamly/Internal/Memory/ArrayStream.hs
bsd-3-clause
7,397
0
14
1,525
1,501
832
669
105
1
----------------------------------------------------------------------------- -- | -- Module : XMonad.Prompt.Theme -- Copyright : (C) 2007 Andrea Rossato -- License : BSD3 -- -- Maintainer : [email protected] -- Stability : unstable -- Portability : unportable -- -- A prompt for changing the t...
MasseR/xmonadcontrib
XMonad/Prompt/Theme.hs
bsd-3-clause
1,630
0
9
277
255
150
105
20
1
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE FlexibleContexts #-} module Data.Store.Internal ( Store(..) , StoreIndex , Query(..) , Selection(..) ) where -------------------------------------------------------------------------------- import Control.Applicative import ...
ekmett/data-store
src/Data/Store/Internal.hs
bsd-3-clause
2,592
0
14
648
836
451
385
54
0
{-# LANGUAGE CPP #-} #if __GLASGOW_HASKELL__ >= 701 {-# LANGUAGE Trustworthy #-} #endif ----------------------------------------------------------------------------- -- | -- Module : System.IO.UTF8 -- Copyright : (c) Eric Mertens 2007 -- License : BSD3-style (see LICENSE) -- -- Maintainer: emertens@ga...
ghc/packages-utf8-string
System/IO/UTF8.hs
bsd-3-clause
3,953
0
10
772
919
508
411
66
1
{-# LANGUAGE OverloadedStrings #-} module Golden.IO where import qualified Data.ByteString.Lazy.Char8 as LBS import Data.Default (def) import qualified Data.Time.Calendar as Calendar import Data.Time.Clock (UTCTime (..), secondsToDiffTime) import Hakyll.Convert.Common (DistilledPost (..)) import Hakyll.Convert.IO (sa...
kowey/hakyll-convert
test/golden/Golden/IO.hs
bsd-3-clause
2,860
0
16
766
571
318
253
60
1
module CommandParsing ( parseCommand, ParseFailure(..) ) where import WorldDefinition import Control.Applicative import Data.Char (toLower) data ParseFailure = EmptyCommand | UnknownCommand String | ParseFailure String deriving (Show) parseCommand :: String...
robashton/ghcmud
src/CommandParsing.hs
bsd-3-clause
1,516
0
10
316
463
241
222
39
2
module Light where import Vector data Light = Light Double Double Double deriving (Show) position :: Light -> Vector position (Light x y z) = vector x y z
SaintDubious/HaskellTracer
src/HaskellTracer/Light.hs
bsd-3-clause
182
0
7
56
61
33
28
6
1
-- Copyright (c) 2015, Travis Bemann -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: -- -- o Redistributions of source code must retain the above copyright notice, this -- list of conditio...
tabemann/amphibian
src_old/Network/IRC/Client/Amphibian/ConnectionManagerServer.hs
bsd-3-clause
25,411
209
28
7,050
5,730
2,888
2,842
-1
-1
module Main where import Control.Monad import System.Directory import System.Environment import System.Exit import System.FilePath ((</>)) import System.Posix.User (getUserEntryForName, getEffectiveUserName, UserEntry(..)) import Data.List import CabalIndex ensureIndex :: FilePath -> String -> Bool -> IO () ensureI...
brinchj/CabalSearch
Main.hs
bsd-3-clause
1,599
0
13
452
465
236
229
42
1
{-# LANGUAGE OverloadedStrings #-} -- | module Network.Wai.Middleware.StaticEmbedded (static) where import Crypto.Hash import Data.ByteArray.Encoding import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as BL import Data.Maybe import qualified Data.Text as T import...
adamse/wai-middleware-static-embedded
src/Network/Wai/Middleware/StaticEmbedded.hs
bsd-3-clause
1,448
0
17
354
425
235
190
34
2
module Signal.Wavelet.Repa.LibraryBench where import Data.Array.Repa as R {-# INLINE benchComputeS #-} benchComputeS :: Array D DIM1 Double -> Array U DIM1 Double benchComputeS xs = computeS xs {-# INLINE benchComputeP #-} benchComputeP :: Array D DIM1 Double -> IO (Array U DIM1 Double) benchComputeP xs = computeP...
jstolarek/lattice-structure-hs
bench/Signal/Wavelet/Repa/LibraryBench.hs
bsd-3-clause
3,650
0
9
882
1,445
782
663
79
1
module HGraph.Query where import Control.Applicative import Control.Monad.State import qualified Data.Map as M import Data.Maybe import qualified Data.Set as S import HGraph.Edge import HGraph.Graph import HGraph.Label import H...
gpahal/hgraph
src/HGraph/Query.hs
bsd-3-clause
6,163
0
15
1,513
2,315
1,181
1,134
106
2
---------------------------------------------------------------------------- -- | -- Module : ModuleWithQualifiedReexport -- Copyright : (c) Sergey Vinokurov 2015 -- License : BSD3-style (see LICENSE) -- Maintainer : [email protected] --------------------------------------------------------------------...
sergv/tags-server
test-data/0002export_lists/ModuleWithQualifiedReexport.hs
bsd-3-clause
437
0
5
54
26
20
6
3
0
module Gifter.Logging ( logTime, logTimeWhen ) where import Control.Monad import Control.Monad.IO.Class import System.Locale import Text.Printf import Data.Time.Clock import Data.Time.Format import Data.Time.LocalTime logTime :: (MonadIO m) => String -> m () logTime s = do utcTime <- liftIO getCurrentT...
arjantop/gifter
src/Gifter/Logging.hs
bsd-3-clause
661
0
10
129
214
109
105
20
1
{-# LANGUAGE DeriveFunctor #-} {- | Module : Verifier.SAW.Position Copyright : Galois, Inc. 2012-2015 License : BSD3 Maintainer : [email protected] Stability : experimental Portability : non-portable (language extensions) -} module Verifier.SAW.Position ( Pos(..) , ppPos , incLine , incCol ,...
iblumenfeld/saw-core
src/Verifier/SAW/Position.hs
bsd-3-clause
1,521
0
11
392
446
242
204
46
1
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_HADDOCK show-extensions #-} {-| Module : $Header$ Copyright : (c) 2015 Swinburne Software Innovation Lab License : BSD3 ...
futufeld/eclogues
eclogues-mock/src/Eclogues/State/Monad.hs
bsd-3-clause
4,041
0
13
887
1,185
651
534
-1
-1
{-# OPTIONS_GHC -Wall #-} module Main where import Criterion.Types import Criterion.Main import Control.DeepSeq.Generics import Data.Monoid((<>)) import Data.List (foldl') import System.Random import qualified Data.Foldable as Fold import qualified Data.FingerTree as F import qualified Data.Interval as I import qu...
peddie/fingertrees
bench/intervaltrees.hs
bsd-3-clause
3,835
0
17
1,083
1,501
768
733
84
2
{-# LANGUAGE BangPatterns #-} module SLM.Gobble.GobbleMultiClassM where import qualified Data.Vector.Unboxed.Mutable as VM import qualified Data.Vector.Unboxed as V import qualified Data.Foldable as F import Control.Monad.Primitive import SLM.Gobble.GobbleM import SLM.Gobble.GobbleDataTypes import SLM.Gobble.GobbleA...
timveitch/Gobble
src/SLM/Gobble/GobbleMultiClassM.hs
bsd-3-clause
3,604
0
13
661
1,094
587
507
63
2
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedLists #-} {-# LANGUAGE TemplateHaskell #-} module Language.Epilog.Epilog ( Byte , Epilog , EpilogConfig (..) , EpilogState (..) , Strings , Types , err , get , gets , initialState , mips...
adgalad/Epilog
src/Haskell/Language/Epilog/Epilog.hs
bsd-3-clause
5,020
0
15
1,475
1,291
784
507
131
1
-- | Reads OFX file on standard input. Parses it and pretty prints -- the result to standard output. module Main where import Data.OFX main :: IO () main = interact prettyRenderOfxFile
massysett/ofx
exe/renderOfx.hs
bsd-3-clause
189
0
6
36
29
17
12
4
1
{-| Module : Game.GoreAndAsh.Actor.Collection Description : Handling dynamic collections of actors Copyright : (c) Anton Gushcha, 2015-2016 License : BSD3 Maintainer : [email protected] Stability : experimental Portability : POSIX -} module Game.GoreAndAsh.Actor.Collection( dynCollection , dDynColl...
Teaspot-Studio/gore-and-ash-actor
src/Game/GoreAndAsh/Actor/Collection.hs
bsd-3-clause
4,650
0
19
960
1,391
740
651
-1
-1
module Env ( module Env , module Args ) where import Control.Monad import Control.Exception as E import Control.Exception.Extra import Args import System.Err import Paths_clean_home data Env = Env { appArgs :: Args , pkgList :: PkgList , prgList :: PrgList } type PrgList = [ (String, [ String ]) ] ty...
ivanperez-keera/clean-home
src/Env.hs
bsd-3-clause
1,737
0
15
447
564
286
278
46
2
module Text.Highlighter.Lexers.PostScript (lexer) where import Text.Regex.PCRE.Light import Text.Highlighter.Types lexer :: Lexer lexer = Lexer { lName = "PostScript" , lAliases = ["postscript"] , lExtensions = [".ps", ".eps"] , lMimetypes = ["application/postscript"] , lStart = root' , lFlags...
chemist/highlighter
src/Text/Highlighter/Lexers/PostScript.hs
bsd-3-clause
3,445
0
10
375
610
310
300
38
1
-- This is double using function overloading. double :: Num a => a -> a double x = x+x -- This is quad, using function composition and overloading. Like a boss. quad :: Num a => a -> a quad = double . double -- This is sparta. factorial :: Integer -> Integer factorial n = product [1..n] -- Average with an operator i...
decomputed/haskellLaboratory
programmingInHaskell/chapter02.hs
mit
1,446
2
8
303
320
161
159
18
1
{-# LANGUAGE CPP #-} -- Copyright (c) 2010, Diego Souza -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: -- -- * Redistributions of source code must retain the above copyright notice, -- ...
dgvncsz0f/iyql
src/test/haskell/Test/Yql/Core/LocalFunctions/Tree.hs
gpl-3.0
5,407
0
11
2,142
491
295
196
71
1
module Response (module X) where import Response.About as X import Response.Calendar as X import Response.Draw as X import Response.Graph as X import Response.Grid as X import Response.Image as X import Response.Loading as X import Response.NotFound as X import Response.Post as X import Response.Privacy as X import Re...
hermish/courseography
app/Response.hs
gpl-3.0
367
0
4
54
94
67
27
13
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-ec2/gen/Network/AWS/EC2/AttachNetworkInterface.hs
mpl-2.0
4,825
0
9
1,077
626
378
248
74
1
-- | -- Module : $Header$ -- Copyright : (c) 2013-2014 Galois, Inc. -- License : BSD3 -- Maintainer : [email protected] -- Stability : provisional -- Portability : portable {-# LANGUAGE Safe #-} {-# LANGUAGE PatternGuards #-} module Cryptol.Utils.PP ( PP(..) , pp , pretty , optParens , p...
TomMD/cryptol
src/Cryptol/Utils/PP.hs
bsd-3-clause
2,402
0
12
714
699
376
323
58
4
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TupleSections #-} module Stackage.InstallInfo ( getInstallInfo , bpPackageList ) where import Control.Monad (forM_, unless) import Data.List (foldl') import qualified Data.Map as Map import qualified...
k-bx/stackage
Stackage/InstallInfo.hs
mit
8,479
0
25
2,772
2,046
1,048
998
171
5
{-# LANGUAGE CPP #-} {- Copyright (C) 2010-2016 John MacFarlane <[email protected]> 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 2 of the License, or (at your option) any later versi...
janschulz/pandoc
src/Text/Pandoc/UTF8.hs
gpl-2.0
4,115
0
10
1,043
722
405
317
63
1
{- Copyright 2015 Google Inc. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
Ye-Yong-Chi/codeworld
codeworld-base/src/Foreign/Marshal.hs
apache-2.0
745
0
4
136
23
17
6
4
0
yes = \x -> a x where
mpickering/hlint-refactor
tests/examples/Lambda26.hs
bsd-3-clause
21
1
6
6
19
8
11
1
1
{-# LANGUAGE PatternGuards #-} {-# LANGUAGE FlexibleInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module UnitTests.Distribution.Compat.Graph ( tests , arbitraryGraph ) where import Distribution.Compat.Graph import qualified Prelude import Prelude hiding (null) import Test.Tasty import Test.Tasty.Qui...
sopvop/cabal
Cabal/tests/UnitTests/Distribution/Compat/Graph.hs
bsd-3-clause
3,153
0
18
743
1,027
533
494
62
2
<?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="hr-HR"> <title>OAST Support Add-on</title> <maps> <homeID>oast</homeID> <mapref locatio...
kingthorin/zap-extensions
addOns/oast/src/main/javahelp/org/zaproxy/addon/oast/resources/help_hr_HR/helpset_hr_HR.hs
apache-2.0
965
98
29
157
401
212
189
-1
-1
module Tests.Bundle ( tests ) where import Boilerplater import Utilities import qualified Data.Vector.Fusion.Bundle as S import Test.QuickCheck import Test.Framework import Test.Framework.Providers.QuickCheck2 import Text.Show.Functions () import Data.List (foldl', foldl1', unfoldr, find, findIndex) impo...
dolio/vector
tests/Tests/Bundle.hs
bsd-3-clause
7,455
0
19
2,300
3,280
1,745
1,535
-1
-1
{-# LANGUAGE MagicHash, NoImplicitPrelude, UnboxedTuples, UnliftedFFITypes, Trustworthy #-} module GHC.Debug ( debugLn, debugErrLn ) where import GHC.Prim import GHC.Types import GHC.Tuple () debugLn :: [Char] -> IO () debugLn xs = IO (\s0 -> case mkMBA s0 xs of (# s1, mba #) -> ...
frantisekfarka/ghc-dsi
libraries/ghc-prim/GHC/Debug.hs
bsd-3-clause
1,538
0
14
622
463
235
228
37
3
{-# OPTIONS -XRebindableSyntax #-} -- Haskell98! -- Tests of the do-notation for the parameterized monads -- We demonstrate a variable-type state `monadic' transformer -- and its phantom-type-state relative to enforce the locking protocol -- (a lock can be released only if it is being held, and acquired only -- if it ...
forked-upstream-packages-for-ghcjs/ghc
testsuite/tests/rebindable/DoParamM.hs
bsd-3-clause
8,229
151
20
2,177
2,051
1,143
908
124
3
#!/usr/bin/env stack -- stack --install-ghc runghc --package turtle {-# LANGUAGE OverloadedStrings #-} import Turtle example = do f <- ls "/tmp" -- this actually iterates over all the files liftIO $ print f liftIO $ print "foo" main = sh example
JoshuaGross/haskell-learning-log
Code/turtle/select-ls.hs
mit
277
1
8
72
54
25
29
7
1
----------------------------------------------------------------------------- -- -- Module : Language.PureScript.TypeChecker -- Copyright : (c) Phil Freeman 2013 -- License : MIT -- -- Maintainer : Phil Freeman <[email protected]> -- Stability : experimental -- Portability : -- -- | -- The top-level t...
bergmark/purescript
src/Language/PureScript/TypeChecker.hs
mit
10,630
25
23
1,900
3,524
1,810
1,714
164
6
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE Strict #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE CPP #-} {- | Module : Business.Bookkeeping Copyright : Kadzuya Okamoto 2017 License : MIT Stability : experimental Portability : unknown This module exports core functions and types for boo...
arowM/haskell-bookkeeping
src/Business/Bookkeeping.hs
mit
6,765
0
16
1,535
1,454
834
620
-1
-1
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} module Main ( main ) where import Foreign.C.String import Data.Bits import Control.Concurrent import Control.Exception import qualified Data.Set as S import Foreign.C.Types import Foreign.Marshal.Alloc import Fo...
Noeda/caramia
tests/buffer/Main.hs
mit
10,664
0
22
3,348
3,004
1,482
1,522
252
2
{-# LANGUAGE TemplateHaskell, OverloadedStrings #-} {- A base bundle is used for incremental linking. it contains information about the symbols that have already been linked. These symbols are not included again in the incrementally linked program. The base contains a CompactorState for consistent renaming of ...
forked-upstream-packages-for-ghcjs/ghcjs
ghcjs/src/Gen2/Base.hs
mit
7,027
0
14
1,990
2,160
1,150
1,010
-1
-1
{-# OPTIONS_GHC -F -pgmF htfpp #-} module InternalTests.MacrosTests where import Test.Framework import GraphDB.Util.Prelude import qualified GraphDB.Util.Prelude.TH as TH import qualified GraphDB.Model as G import qualified GraphDB.Macros as G type Catalogue = (UID Artist, UID Genre, UID Song) newtype UID a = UID In...
nikita-volkov/graph-db
executables/InternalTests/MacrosTests.hs
mit
1,894
0
10
321
676
359
317
-1
-1
module Graphics.CG.Draw.Lines (drawPath, drawClosedLines) where import Control.Lens import Graphics.Gloss myHead :: [a] -> [a] myHead [] = [] myHead (x:_) = [x] drawPath :: [Vector] -> Picture drawPath = Color white . Line drawClosedLines :: [Vector] -> Picture drawClosedLines s = Color white . ...
jagajaga/CG-Haskell
Graphics/CG/Draw/Lines.hs
mit
359
0
8
82
140
78
62
11
1
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE LambdaCase #-} module Distill.Expr.TypeCheck ( TCM , Renamer , runTCM , assumeIn , assumesIn , defineIn , definesIn , checkType , inferType , checkEqual , normalize , renumber ...
DNoved1/distill
src/Distill/Expr/TypeCheck.hs
mit
16,761
0
22
6,274
5,773
2,780
2,993
376
29
module Crypto.Cipher.ECDSA.Math where data Point = Point Integer Integer | PointO deriving (Show, Eq) -- |2^2 = x^3 + a*x + b mod P data Curve = Curve Integer Integer Integer --Integer -- ^a --Integer -- ^b --Integer -- ^P deriving (Show) type PrivateKey = Integer type...
fhaust/bitcoin
src/Crypto/Cipher/ECDSA/Math.hs
mit
2,238
0
16
766
1,039
534
505
59
1
module Main where main = putStrLn "Hello World"
HSU-MilitaryLogisticsClub/ho-ver
src/imaging/main.hs
mit
48
0
5
8
12
7
5
2
1
module Test.SqlMarshaller ( sqlMarshallerTests, ) where import qualified Control.Monad.IO.Class as MIO import qualified Data.Bifunctor as Bifunctor import qualified Data.ByteString.Char8 as B8 import qualified Data.Either as Either import qualified Data.Int as Int import qualified Data.Set as Set import qualified ...
flipstone/orville
orville-postgresql-libpq/test/Test/SqlMarshaller.hs
mit
13,412
0
23
2,946
3,018
1,536
1,482
277
3
{-# LANGUAGE DataKinds #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeOperators #-} module Lib ( startApp ) where import Network.Wai import Network.Wai.Handler.Warp import Network.JSONApi.Document (Document) import Servant import Users import qualifi...
toddmohney/json-api
example/src/Lib.hs
mit
804
0
16
161
225
124
101
25
1
module Feature.QuerySpec where import Test.Hspec hiding (pendingWith) import Test.Hspec.Wai import Test.Hspec.Wai.JSON import Network.HTTP.Types import Network.Wai.Test (SResponse(simpleHeaders,simpleStatus,simpleBody)) import qualified Data.ByteString.Lazy as BL (empty) import SpecHelper import Text.Heredoc import N...
Skyfold/postgrest
test/Feature/QuerySpec.hs
mit
41,445
0
22
8,987
6,147
3,495
2,652
-1
-1
{-# LANGUAGE Safe #-} module Control.Concurrent.Transactional.Channel ( module Control.Concurrent.Transactional.Channel.Broadcast, module Control.Concurrent.Transactional.Channel.Round, module Control.Concurrent.Transactional.Channel.Swap ) where import Control.Concurrent.Transactional.Channel.Broadcast i...
YellPika/Hannel
src/Control/Concurrent/Transactional/Channel.hs
mit
426
0
5
35
62
47
15
8
0
-- PrettyJSON.hs module PrettyJSON ( renderJValue ) where import Numeric (showHex) import Data.Char (ord) import Data.Bits (shiftR, (.&.)) import SimpleJSON (JValue(..)) import Prettify (Doc, (<>), char, double, fsep, hcat, punctuate, text, compact, pretty) renderJValue :: JValue -> Doc rend...
sammyd/Learning-Haskell
ch05/PrettyJSON.hs
mit
1,887
0
12
548
743
383
360
49
2
{-# LANGUAGE OverloadedStrings #-} module Network.Bitcoin.Api.Dump where import Data.Aeson.Types (emptyArray) import qualified Data.Bitcoin.Types as BT import qualified Network.Bitcoin.Api.Internal as I import qualified Network.Bitcoin.Api.Types as T getPrivateKey :: T.Client -> ...
solatis/haskell-bitcoin-api
src/Network/Bitcoin/Api/Dump.hs
mit
455
0
9
90
104
64
40
10
1
module Types( Matrix(..), Point(..), IntPoint, GLPoint, Line(..), Viewport(..), mkViewport, translateMatrix, scaleMatrix, rotationMatrix ) where import Graphics.Rendering.OpenGL.Raw.Core31 data Matrix a = Matrix{ w :: Int, h :: Int, mdata :: [[a]] } deriving (Show, Eq) type Point a = (a, a) type ...
5outh/Haskell-Graphics-Projects
Project2/Types.hs
mit
1,063
0
10
233
495
291
204
26
1
{-# LANGUAGE ViewPatterns #-} module Data.Time.Calendar.Month where import Control.Arrow ((&&&)) import Data.Array import Data.Char (toUpper) import Data.Time.Calendar {-- a solution to the problem posted at http://lpaste.net/1501657254015795200 @1HaskellADay solution for 2016-02-02 So, we have a problem. We have ...
geophf/1HaskellADay
exercises/HAD/Data/Time/Calendar/Month.hs
mit
2,855
0
10
550
456
268
188
29
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} module ImagePacker ( PackedImageInfo , hasIntersection , loadFiles , packImages , toPackedImageInfos , writeTexture ) where import qualified Codec.Picture as Picture import qualified Codec.Picture.Typ...
bigsleep/ImagePacker
src/ImagePacker.hs
mit
6,891
1
18
1,759
2,954
1,595
1,359
139
3