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
{-# OPTIONS -cpp #-} -------------------------------------------------------------------------- -- | -- Module : Harpy.Call -- Copyright : (c) 2006-2015 Martin Grabmueller and Dirk Kleeblatt -- License : BSD3 -- -- Maintainer : martin@grabmueller.de -- Stability : provisional -- Portability : non-...
mgrabmueller/harpy
Harpy/Call.hs
bsd-3-clause
1,060
0
7
193
60
43
17
-1
-1
import Test.Tasty import Test.Tasty.HUnit import Geom2D.CubicBezier import Control.Monad import Text.Parsec import Text.Parsec.String import Text.Parsec.Error num :: Parser Double num = liftM (read.concat) $ sequence [ option "" $ string "-" , many1 digit , option "" $ string "." , option "0" $ many digit] ...
kuribas/cubicbezier
tests/test.hs
bsd-3-clause
7,275
0
16
1,602
2,229
1,070
1,159
212
2
{-# LANGUAGE CPP, ScopedTypeVariables #-} module TcErrors( reportUnsolved, reportAllUnsolved, warnDefaulting, solverDepthErrorTcS ) where #include "HsVersions.h" import TcRnTypes import TcRnMonad import TcMType import TcType import TypeRep import Type import Kind ( isKind ) import Unify ...
christiaanb/ghc
compiler/typecheck/TcErrors.hs
bsd-3-clause
71,951
1
21
22,078
14,982
7,621
7,361
-1
-1
-- | -- Module : BackEnd.Verbatim -- Copyright : (c) Radek Micek 2010 -- License : BSD3 -- Stability : experimental -- -- Contains quasi-quoter. -- module BackEnd.Verbatim where import Language.Haskell.TH import Language.Haskell.TH.Quote verbatim :: QuasiQuoter verbatim = QuasiQuoter stringE (litP . stringL)
radekm/crep
BackEnd/Verbatim.hs
bsd-3-clause
317
0
7
50
49
33
16
5
1
module TaglessFinal.View where import TaglessFinal.Syntax import TaglessFinal.Term import Text.Printf ( printf ) import Control.Monad.State import TaglessFinal.VarState newtype View a = View { unView :: State VarState String } instance Goal View where term x = View (return $ show x) unify x y = View $ do x ...
kajigor/uKanren_transformations
src/TaglessFinal/View.hs
bsd-3-clause
1,191
0
14
354
497
234
263
40
1
module Main where import Control.Applicative import Control.Monad (liftM) import qualified Data.ByteString.Char8 as C8 import Network import System.IO import Options import qualified Crypto.Random as CR import qualified Network.TLS as TLS import qualified Network.TLS.Extra as TLSX data ProgOptions = ProgOptions {...
kcharter/spdy-base
examples/tls-client.hs
bsd-3-clause
1,602
0
17
357
429
215
214
45
1
-- | This allows you to generate CSV from a number of data types. The -- conversion functions work in the context of a Data.Text.Lazy.Builder. module Text.Bakers12.Csv ( CSVRow , ToCSV(..) , toCSVE , escape ) where import Text.Bakers12.Csv.Enumerators import Text.Bakers12.Csv....
erochest/bakers12
lib/Text/Bakers12/Csv.hs
bsd-3-clause
388
0
6
98
60
42
18
8
0
module System.IO.Streams.Realtime.Demo where import Data.Monoid import Data.Time import Data.Time.Clock import qualified System.IO.Streams as Streams import System.IO.Streams.Realtime demo :: IO () demo = do inS <- Streams.fromList [1..100::Int] t0 <- getCurrentTime tS <- Streams.fromList [addUTCTime x t0 | x...
imalsogreg/realtime-streams
src/System/IO/Streams/Realtime/Demo.hs
bsd-3-clause
594
0
12
103
190
101
89
14
1
{-# LANGUAGE TypeOperators , KindSignatures , DataKinds , TypeFamilies , GADTs , FlexibleInstances , NoImplicitPrelude , ScopedTypeVariables , FlexibleContexts , Rank2Types #-} {-# OPTIONS_GHC -Wall -fwarn-tab...
zaxtax/hakaru
haskell/Language/Hakaru/Syntax/Prelude.hs
bsd-3-clause
53,358
2
20
14,353
19,650
10,149
9,501
1,137
8
{-# LANGUAGE MultiParamTypeClasses #-} module RazorsLambda.PP where import Text.PrettyPrint.Annotated.Leijen data OutputAnnotation = AnnConst | AnnVar | AnnType | AnnKeyword deriving Show class PP a where pp :: a -> Doc OutputAnnotation
acfoltzer/RazorsLambda
src/RazorsLambda/PP.hs
bsd-3-clause
252
0
8
46
54
32
22
11
0
-- !!! Defining local value with same name as imported class member. -- was: Imported member fun clashes with local var definition module M where import Ix(Ix(..)) index x = x
FranklinChen/Hugs
tests/static/mod34.hs
bsd-3-clause
176
0
6
31
26
17
9
3
1
module Pristine.File ( File(..) , gitFiles , makeReadme , pathToFile ) where import Control.Applicative ((<$>)) import Control.Exception (IOException, try) import Data.Char (toLower) import Data.List ((\\)) import Data.Maybe (fromMaybe) import Prelude hiding (lookup) import Data.Aeson ((.=), ToJSO...
chrisdotcode/pristine
Pristine/File.hs
bsd-3-clause
7,509
0
31
1,912
2,668
1,606
1,062
161
2
{- Copyright (c) 2016, Kévin Le Bon All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the ...
Docteur-Lalla/HsSHAUN
src/Shaun/IO.hs
bsd-3-clause
2,834
3
21
652
332
167
165
27
4
-- |Parsing and rendering routines for relay cells. {-# LANGUAGE DeriveDataTypeable #-} module Tor.DataFormat.RelayCell( RelayCell(..), putRelayCell, getRelayCell , parseRelayCell, renderRelayCell , ExtendSpec(..), putExtendSpec, getExtendSpec , Rel...
GaloisInc/haskell-tor
src/Tor/DataFormat/RelayCell.hs
bsd-3-clause
21,889
0
20
7,334
5,239
2,642
2,597
445
28
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Main where import Graphics.Gloss import Graphics.Gloss.Interface.Pure.Game import Graphics.Gloss.Interface.Pure.Display import Control.Applicative import System.Random data Game = Ready Coord StdGen | Running Env | Over Coord StdGen -- Env {{{ newtype X = X...
kylcarte/games
src/Games/Snake.hs
bsd-3-clause
6,349
0
13
1,579
3,010
1,596
1,414
185
10
module Main where import Test.DocTest main :: IO () main = doctest ["-isrc", "src/Text/Printf/Safe/QQ.hs"]
konn/safe-printf
test/doctests.hs
bsd-3-clause
109
0
6
16
33
19
14
4
1
{-# LANGUAGE ScopedTypeVariables, RecordWildCards, NamedFieldPuns, ViewPatterns #-} module Main (main) where import Math.TikzGenerator import qualified Math.SVGGenerator as S import qualified Math.PSTricksGenerator as P import Control.Monad (void, replicateM, liftM, liftM2, liftM3, zipWithM, zipWithM_) import Text.R...
ocramz/CurveProject
src/Main.hs
bsd-3-clause
12,689
2
21
3,669
4,178
2,161
2,017
232
3
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-swf/gen/Network/AWS/SWF/RespondActivityTaskFailed.hs
mpl-2.0
5,630
0
9
1,053
515
318
197
60
1
{-# LANGUAGE PatternGuards #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE FlexibleContexts #-} -- | A non-standard zeroless-binary deamortized cache-oblivious Set module Data.Vector.Set where import Data.Bits import qualified Data.Vector.Set.Fusion as Fusion import Data.Vec...
ekmett/structures
src/Data/Vector/Set.hs
bsd-2-clause
2,682
0
12
730
1,203
605
598
85
7
-- Copyright (c) 2014 Eric McCorkle. All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions -- are met: -- -- 1. Redistributions of source code must retain the above copyright -- notice, this list of conditi...
saltlang/compiler-toolbox
src/Data/Symbol.hs
bsd-3-clause
3,618
0
10
733
522
297
225
37
1
{-# LANGUAGE CPP, RankNTypes, GADTs, ScopedTypeVariables, FlexibleContexts #-} #if __GLASGOW_HASKELL__ >= 701 {-# LANGUAGE Safe #-} #endif module Compiler.Hoopl.Show ( showGraph, showFactBase ) where import Compiler.Hoopl.Collections import Compiler.Hoopl.Block import Compiler.Hoopl.Graph import Compiler.Hoopl.L...
DavidAlphaFox/ghc
libraries/hoopl/src/Compiler/Hoopl/Show.hs
bsd-3-clause
1,541
0
11
427
550
281
269
30
10
#if __GLASGOW_HASKELL__ < 802 {-# OPTIONS_GHC -Wno-redundant-constraints #-} #endif module System.Console.Haskeline.Backend.Terminfo( Draw(), runTerminfoDraw ) where import System.Console.Terminfo import Co...
judah/haskeline
System/Console/Haskeline/Backend/Terminfo.hs
bsd-3-clause
13,210
0
17
3,997
3,537
1,840
1,697
-1
-1
{-# LANGUAGE Haskell2010 #-} {-# LINE 1 "Web/Scotty/Route.hs" #-} {-# LANGUAGE CPP, FlexibleContexts, FlexibleInstances, OverloadedStrings, RankNTypes, ScopedTypeVariables #-} module Web.Scotty.Route ...
phischu/fragnix
tests/packages/scotty/Web.Scotty.Route.hs
bsd-3-clause
9,967
0
21
2,883
2,504
1,317
1,187
-1
-1
{-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- | -- Module : Main -- Copyright : (c) David Himmelstrup 2005 -- License : BSD-like -- -- Maintainer : lemmih@gmail.com -- Stability : provisional -- Portability : portable -- -- Entry point to the ...
x-y-z/cabal
cabal-install/Main.hs
bsd-3-clause
55,514
26
24
15,357
9,904
5,224
4,680
897
13
-- WARNING: This file is security sensitive as it uses unsafeWrite which does -- not check bounds. Any changes should be made with care and we would love to -- get informed about them, just cc us in any PR targetting this file: @eskimor @jprider63 -- We would be happy to review the changes! -- The security check at th...
sol/aeson
pure/Data/Aeson/Parser/UnescapePure.hs
bsd-3-clause
9,181
8
30
2,715
3,105
1,631
1,474
202
29
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 2000 FunDeps - functional dependencies It's better to read it as: "if we know these, then we're going to know these" -} {-# LANGUAGE CPP #-} module FunDeps ( FunDepEqn(..), pprEquation, improveFromInstEnv, improve...
fmthoma/ghc
compiler/typecheck/FunDeps.hs
bsd-3-clause
22,291
0
21
7,412
2,711
1,464
1,247
-1
-1
{-# LANGUAGE DeriveDataTypeable, TypeFamilies, TemplateHaskell, FlexibleInstances, FlexibleContexts, MultiParamTypeClasses, TypeOperators, TypeSynonymInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Distribution.Server.Users.State where import Distribution.Server.Framework.Instances...
agrafix/hackage-server
Distribution/Server/Users/State.hs
bsd-3-clause
6,517
0
14
1,309
1,558
820
738
129
2
main = take 0 x
mpickering/hlint-refactor
tests/examples/Default78.hs
bsd-3-clause
15
0
5
4
11
5
6
1
1
module Check.Test.Subdir (subdir) where subdir :: String subdir = "subdir"
yuga/ghc-mod
test/data/check-test-subdir/src/Check/Test/Subdir.hs
bsd-3-clause
76
0
4
11
22
14
8
3
1
{-@ LIQUID "--no-termination" @-} module Ex () where -- Testing "existential-types" {-@ foldN :: forall a <p :: x0:Int -> x1:a -> Prop>. (i:Int -> a<p i> -> a<p (i+1)>) -> n:{v: Int | v >= 0} -> a <p 0> -> a <p n> @-} foldN :: (Int -> a -> a) -> Int -> ...
mightymoose/liquidhaskell
tests/pos/foldN.hs
bsd-3-clause
425
0
10
175
102
53
49
5
1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE Rank2Types #-} module T7594 where import...
ryantm/ghc
testsuite/tests/polykinds/T7594.hs
bsd-3-clause
986
0
9
235
263
150
113
-1
-1
module Calc where import Data.Char import Data.String data Operator = Plus | Minus | Div | Times deriving (Show, Eq) opToChar :: Operator -> Char opToChar Plus = '+' opToChar Minus = '-' opToChar Div = '/' opToChar Times = '*' operator :: Char -> Operator operator c | c == '+' = Plus | c == '-' = Minus | c == '/' =...
omittones/haskell-test
src/Calc.hs
mit
1,875
0
12
432
829
421
408
-1
-1
-- | Get the default values arguments. {-# LANGUAGE CPP #-} {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE UnicodeSyntax #-} module Apia.Defaults ( defaultOptions , getDefaults ) where import Apia.Prelude import Apia.Common ( Lang (SMT2, TPTP) ) import A...
asr/apia
src/Apia/Defaults.hs
mit
12,111
0
16
3,468
2,973
1,612
1,361
302
4
module ProjectEuler.Problem6 ( problem ) where import ProjectEuler.Types problem :: Problem problem = pureProblem 6 Solved result result :: Int result = sq (sum xs) - sum (map sq xs) where xs = [1..100] sq :: Int -> Int sq x = x * x
Javran/Project-Euler
src/ProjectEuler/Problem6.hs
mit
255
0
8
67
100
54
46
10
1
module MapAccumR where -- This test demonstrates a bug in lifting where clauses. -- we need to topo sort them even if they are not mutually recursive. data List a = Nil | Cons a (List a) mapAccumR :: (acc -> x -> (acc, y)) -- Function of elt of input list -- and accumulato...
antalsz/hs-to-coq
examples/tests/MapAccumR.hs
mit
781
0
9
336
166
94
72
10
1
----------------------------------------;------------------------------------- -- -- Module : PhysicalQuantities.Decomposition.Quantity.Derived -- Copyright : -- License : MIT -- -- Maintainer : - -- Stability : -- Portability : -- -- | -- {-# LANGUAGE TemplateHaskell, UndecidableInstances #-} -- {-# ...
fehu/PhysicalQuantities
src/PhyQ/Quantity/Derived.hs
mit
791
0
10
107
110
67
43
-1
-1
{- | Module : $Header$ Description : This applicaton domain. Copyright : (c) seb! License : MIT Maintainer : sebi|at|sebi.one.pl Stability : experimental Portability : portable -} module Data.Domain (Domain, invokeCommand, getDefaultDomain) where import Data.Domain.Command (Command(Exit...
a4099181/LearningHaskell
src/Data/Domain.hs
mit
979
0
12
185
216
123
93
16
1
----------------------------------------------------------------------------- -- | -- Module : Main -- Copyright : (c) 2016 Călin Ardelean -- License : MIT -- -- Maintainer : Călin Ardelean <mmn80cpu@gmail.com> -- Stability : experimental -- Portability : portable -- -- Bibtex console utility. -----------...
mmn80/bibline
src/Console.hs
mit
3,052
0
22
1,043
649
313
336
80
3
{-# LANGUAGE GADTs, FlexibleContexts #-} module HChip.Util where import Control.Exception import Data.Array.IArray import Data.Array.MArray import Data.Bits import Data.Int import Data.Word import System.Clock {-# INLINE lowNibble #-} lowNibble :: (Integral a, Num a, Bits a) => a -> Word8 lowNibble x = fromIntegral ...
chpatrick/hchip
HChip/Util.hs
mit
1,185
0
11
251
509
274
235
35
1
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.RTCDataChannel (js_send, send, js_sendView, sendView, js_sendBlob, sendBlob, js_sendString, sendString, js_close, close, js_getLabel, getLabel, js_getOrdered, getOrdered, js_getMaxRetransmit...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/JSFFI/Generated/RTCDataChannel.hs
mit
9,036
106
11
1,309
1,836
997
839
132
1
module BTree where import Data.List data BTree a = Empty | Branch a (BTree a) (BTree a) deriving Show leaf :: a -> BTree a leaf a = Branch a Empty Empty balBTree :: Int -> BTree Char balBTree 0 = Empty balBTree 1 = insertBalanced Empty (leaf 'x') balBTree n = balBTree' (le...
toddmohney/NinetyNineProbs
src/BTree.hs
mit
2,754
0
12
798
1,218
595
623
67
1
module Program(Command(Inv,Swap,Push,Pop,NE,NZ),Program,exec) where data Command = Inv | Swap | Push | Pop | NE [Command] | NZ [Command] type Program = [Command] type Config = (Program,[Bool],[Bool],Bool) instance Show Command where show Inv = "!" show Swap = "_" show Push = "v" show Pop = "^" show (NE p)...
MarcusVoelker/Smilefuck
Program.hs
mit
1,103
0
11
196
843
495
348
29
1
-------------------------------------------------------------------------------- {-# LANGUAGE OverloadedStrings, TupleSections #-} import Data.Monoid import qualified Data.Set as S import Hakyll import Text.Pandoc.Options import System.FilePath (takeBaseName, takeDirectory, joinP...
holdenlee/philosophocle
site.hs
mit
8,746
0
22
2,374
1,648
815
833
168
1
{-| Module : Main Description : Entry point for parsebnf Copyright : (c) Chop-lang, 2015 License : MIT Maintainer : carterhinsley@gmail.com -} module Main where main :: IO () main = do putStrLn "Hello world!"
chop-lang/chop
src/Main.hs
mit
227
0
7
53
26
14
12
4
1
{-# LANGUAGE NamedFieldPuns , TupleSections #-} module ProjectEuler.CommandLine.CmdReport ( cmdReport ) where import Control.Exception import Control.Monad import Numeric.Sum import System.Exit import Text.Printf import System.Console.Terminfo import Data.List import Data.Ord import qualified Data.IntMap....
Javran/Project-Euler
src/ProjectEuler/CommandLine/CmdReport.hs
mit
3,848
9
19
1,171
977
517
460
98
8
module Groups.Type where import Data.Array import qualified Data.Set as Set data Group a = Group { gsize :: Int, gelems :: [a], gindex :: a -> Int, -- IMPORTANT INVARIANT: `gelems` must always be a sorted list in which the -- first element is the identity, and `gindex` must always return an --...
jwodder/groups
haskell/Groups/Type.hs
mit
1,389
4
10
390
596
329
267
37
1
{-# LANGUAGE CPP #-} -- ------------------------------------------------------------ module Holumbus.Index.CompactIndex ( Document , Documents , SmallDocuments , Inverted , emptyInverted , removeDocIdsInverted , CompactInverted , emptyCompactInverted , inverted2compactInverted ...
ichistmeinname/holumbus
src/Holumbus/Index/CompactIndex.hs
mit
10,800
0
16
3,620
1,873
1,000
873
152
2
module Pizza where areaGivenDiameter :: Double -> Double areaGivenDiameter size = pi * (size / 2) ^ 2 type Pizza = (Double, Double) costPerInch :: Pizza -> Double costPerInch (size, cost) = cost / areaGivenDiameter size comparePizzas :: Pizza -> Pizza -> Pizza comparePizzas p1 p2 = if costP1 < costP2 ...
raventid/coursera_learning
haskell/will_kurt/21_pizza.hs
mit
1,153
0
11
349
331
165
166
32
2
{-# LANGUAGE CPP #-} module GHCJS.DOM.DOMTokenList ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.DOMTokenList #else module Graphics.UI.Gtk.WebKit.DOM.DOMTokenList #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !d...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/DOMTokenList.hs
mit
445
0
5
39
33
26
7
4
0
module Lists ( last ,butLast ,elementAt ,length ,reverse ,isPalindrome ,flatten ,NestedList(Elem, List) ,compress ,pack ,rle ,RunLength(Single, Multiple) ,rle2 ,decodeModified ,dupli ,repli ,dropEvery ,split ,slice ,rotate ,removeAt ) where import Prelude hiding (last, len...
alisdair/H99P
src/Lists.hs
mit
2,432
0
11
652
1,412
764
648
94
2
newtype Price = Price Int deriving (Eq, Show, Ord) priceToInt (Price i) = i newtype Quantity = Quantity Int deriving (Eq, Show, Ord) quantityToInt (Quantity i) = i newtype InstructionId = InstructionId Int deriving (Eq, Show, Ord) instructionIdToInt (InstructionId i) = i data Order = Order InstructionId...
mikeb01/scratch
hs/course/types.hs
cc0-1.0
624
0
7
125
162
88
74
12
1
import XMonad import XMonad.Hooks.DynamicLog import XMonad.Hooks.ManageDocks import XMonad.Hooks.ManageHelpers import XMonad.Util.Run import XMonad.Util.EZConfig myLayout = avoidStruts $ smartBorders tiled ||| smartBorders (Mirror tiled) ||| noBorders Full where tiled = Tall nmaster delta tiled_ratio nmast...
AndrewHynes/dotfiles
xmonad.hs
gpl-2.0
759
9
9
210
170
99
71
-1
-1
import Data.List import Data.Maybe import qualified Data.Map.Strict as M import System.Environment import qualified Text.Printf as T data Edge = Edge { to :: Int, weight :: Int } deriving Show data Path = Path { nodes :: [Int], score :: Int } deriving Show type Road = M.Map Int [Edge] type Cache = M.Map Int Int parse...
candide-guevara/programming_challenges
haskell_learning/shortest_path.hs
gpl-2.0
3,863
0
18
1,044
1,699
891
808
93
3
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TemplateHaskell #-} import Criterion.Main import Prelude hiding ((.), id) import Control.Arrow import Control.Category import Data.Data (Data, Typeable) import qualified Data.Text.Lazy as TL im...
ricardopenyamari/ir2haskell
clir-parser-haskell-master/lib/sexp-grammar/bench/Main.hs
gpl-2.0
3,627
0
21
1,041
913
494
419
77
1
{-# LANGUAGE OverloadedStrings #-} module Roxy.Types where import Conduit import qualified Data.ByteString.Char8 as BS import qualified Data.Map as MP type Headers = MP.Map BS.ByteString BS.ByteString type RequestLine = MP.Map BS.ByteString BS.ByteString type ByteString = B...
czakian/Roxy
src/Roxy/Types.hs
gpl-3.0
389
0
6
87
82
50
32
9
0
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} module Main where import Network.Curl (withCurlDo) import System.Environment (getArgs) import System.Exit (exitFailure) import System.Directory (doesFileExist) import System.IO (stderr, hPutStrLn, hPrint) import Control.Monad (unless) import Data.Text...
Zigazou/deadlink
src/Main.hs
gpl-3.0
2,986
0
13
701
822
419
403
65
2
{-| Module : LexerToken License : GPL Maintainer : helium@cs.uu.nl Stability : experimental Portability : portable -} module Helium.Parser.LexerToken where import Text.ParserCombinators.Parsec.Pos(SourcePos) import qualified Helium.Utils.Texts as Texts type Token = (SourcePos,L...
Helium4Haskell/helium
src/Helium/Parser/LexerToken.hs
gpl-3.0
3,533
0
12
1,558
786
395
391
72
16
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE RankNTypes #-} module Amoeba.Middleware.FRP.Debug where import Control.Wire import Control.Wire.Unsafe.Event (Event(..)) import Control.Monad.IO.Class (liftIO, MonadIO(..)) printEventVal :: Show a => MonadIO m => forall s e. Wire s e m (Event a) (Event a) printEventVal = mkG...
graninas/The-Amoeba-World
src/Amoeba/Middleware/FRP/Debug.hs
gpl-3.0
433
0
12
73
164
93
71
10
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Permissions/Update.hs
mpl-2.0
3,850
0
15
848
462
276
186
74
1
{-# OPTIONS_GHC -Wall #-} module Main ( main ) where import qualified Data.Monoid as Mo import Test.Framework ( Test, ColorMode(..), RunnerOptions'(..), TestOptions'(..) , defaultMainWithOpts ) import ConditionalTests ( conditionalTests ) import QuadratureTests ( quadratureTests ) import VectorizeTests...
ghorn/dynobud
dynobud/tests/NewUnitTests.hs
lgpl-3.0
1,139
0
9
206
271
165
106
40
1
{- Ray.hs - Ray type - - Timothy A. Chagnon - CS 636 - Spring 2009 -} module Ray where import Math data Ray = Ray !Vec3f !Vec3f deriving Show type Intersection = RealT -- Transform the ray to object space transformR :: Mat4f -> Ray -> Ray transformR m (Ray o d) = (Ray (point3f (m `mvMul` (point4f o))) ...
tchagnon/cs636-raytracer
a1/Ray.hs
apache-2.0
380
0
14
93
118
66
52
13
1
module QR.FindingAnAppointment where getStartTime :: [[(String, String)]] -> Int -> Maybe String getStartTime schedules duration = undefined convertToIntTime :: String -> Int convertToIntTime x = let (ys, (z:zs)) = span (/= ':') x hour = read ys::Int min = read zs::Int in hour * 60 + min convertTim...
lihlcnkr/codejam
src/QR/FindingAnAppointment.hs
apache-2.0
461
0
11
87
173
96
77
11
1
module Braxton.A282164 (a282164) where import Braxton.A282165 (a282165) import Helpers.Primes (primePowers) import HelperSequences.A003059 (a003059) import HelperSequences.A000196 (a000196) import HelperSequences.A061017 (a061017) -- Comment: Consider all length (n + 1) sub-sequences of A061017 with square products. --...
peterokagey/haskellOEIS
src/Braxton/A282164.hs
apache-2.0
2,360
0
14
462
466
268
198
25
2
{-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {-| Unittests for ganeti-htools. -} {- Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following condit...
ganeti-github-testing/ganeti-test-1
test/hs/Test/Ganeti/HTools/Instance.hs
bsd-2-clause
8,430
0
15
1,848
1,956
1,026
930
152
2
{-# LANGUAGE ImpredicativeTypes #-} module SBVTest5 where import Control.Lens import Control.Monad import Data.Default import Data.SBV type T = (Int8, Int8) app :: Monad f => [(Lens' s a, f a)] -> s -> f s app ls s0 = foldM go s0 ls where go :: Functor f => s -> (Lens' s a, f a) -> f s go s (l, a) = (l %%~ cons...
notae/haskell-exercise
cp/SBVTest5.hs
bsd-3-clause
1,168
0
11
325
203
112
91
13
1
module State.UrlSelect ( -- * URL selection mode startUrlSelect , stopUrlSelect , openSelectedURL ) where import Prelude () import Prelude.MH import Brick.Widgets.List ( list, listMoveTo, listSelectedElement ) import qualified Data.Vector as V import Lens.Micro.Pl...
aisamanra/matterhorn
src/State/UrlSelect.hs
bsd-3-clause
1,316
0
17
351
395
207
188
-1
-1
module Sirea.Time ( T , tmDay,tmNanos , mkTime,timeFromDays , getTime , DT , dtToNanos,nanosToDt , addTime,subtractTime,diffTime , fromUTC ) where import Data.Int (Int32,Int64) import Data.Ratio ((%),numerator,denominator) import qualified Data.Time.Clock as CW import qualifi...
dmbarbour/Sirea
src/Sirea/Time.hs
bsd-3-clause
5,780
0
19
1,556
2,016
1,100
916
118
4
{-# language CPP #-} -- | = Name -- -- VK_NV_acquire_winrt_display - device extension -- -- == VK_NV_acquire_winrt_display -- -- [__Name String__] -- @VK_NV_acquire_winrt_display@ -- -- [__Extension Type__] -- Device extension -- -- [__Registered Extension Number__] -- 346 -- -- [__Revision__] -- 1 -- -...
expipiplus1/vulkan
src/Vulkan/Extensions/VK_NV_acquire_winrt_display.hs
bsd-3-clause
17,262
0
17
3,086
1,390
905
485
-1
-1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE TemplateHaskell #-} module Network.BitTorrent.Client ( -- * Options Options (..) -- * Client session , Client -- ** Sessi...
DavidAlphaFox/bittorrent
src/Network/BitTorrent/Client.hs
bsd-3-clause
5,639
1
13
1,346
1,237
687
550
-1
-1
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} module Distribution.Solver.Modular.Validate (validateTree) where -- Validation of the tree. -- -- The task here is to make sure all constraints hold. After validation, any -- assignment returned by exploration of the tree should be a co...
sopvop/cabal
cabal-install/Distribution/Solver/Modular/Validate.hs
bsd-3-clause
13,895
0
20
3,966
2,656
1,376
1,280
157
14
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Main where import Control.Exception (handle, SomeException) import Control.Monad.Reader import qualified Data.ByteString.Lazy as BSL import Data.Exif (parseExif) import System.Directory (doesDirectoryExist, doesFileExist, getDirectoryContents) import System.Environme...
duboisf/hexif
src/Main.hs
bsd-3-clause
4,159
0
22
1,017
1,256
655
601
97
4
{-# LANGUAGE OverloadedStrings #-} import Control.Applicative import System.IO import System.Environment import Text.XML.Pipe import Network import Network.XMPiPe.Core.C2S.Client import Network.PeyoTLS.ReadFile import qualified Data.ByteString.Char8 as BSC import XmppTls main :: IO () main = do me : ps : you : _ <...
YoshikuniJujo/forest
subprojects/xml-push/testXmppTls.hs
bsd-3-clause
982
6
11
152
360
192
168
28
1
-- 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 GADTs #-} {-# LANGUAGE OverloadedStrings #-} module Duckling.TimeGrain.HE.Rules ( rules ) where i...
facebookincubator/duckling
Duckling/TimeGrain/HE/Rules.hs
bsd-3-clause
1,198
0
11
258
271
172
99
25
1
{-# LANGUAGE OverloadedStrings, PatternGuards, DataKinds, KindSignatures, GADTs, FlexibleContexts, TypeOperators #-} module Main where import qualified Language.Hakaru.Syntax.AST as T import Language.Hakaru.Syntax.AST...
zaxtax/hakaru
commands/Summary.hs
bsd-3-clause
4,435
0
18
1,562
947
508
439
116
4
module ZipListMonoid where import Control.Applicative import Data.Monoid import Test.QuickCheck import Test.QuickCheck.Checkers import Test.QuickCheck.Classes instance Monoid a => Monoid (ZipList a) where -- `pure` of the Applicative ZipList instance mempty = pure mempty -- mempty of a -- `liftA2` of the Applic...
peterbecich/haskell-programming-first-principles
src/ZipListMonoid.hs
bsd-3-clause
734
0
10
138
197
106
91
16
1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE PatternGuards #-} ----------------------------------------------------------------------------- -- | -- Module : Text.CSL.Output.Pandoc -- Copyright : (c) Andrea Rossato -- License : ...
jgm/pandoc-citeproc
src/Text/CSL/Output/Pandoc.hs
bsd-3-clause
6,868
0
23
2,061
2,287
1,200
1,087
126
14
{-# LANGUAGE QuasiQuotes #-} module Utils.Plot where import System.Process import System.Directory import Data.String.Interpolate plotDot :: String -> String -> IO () plotDot name exp = do system "rm -rf .bdd"; createDirectory ".bdd"; writeFile ".bdd/bdd.dot" $ exp; system ("dot -Tpdf .bdd/bdd.dot -o ...
vzaccaria/bddtool
src/Utils/Plot.hs
bsd-3-clause
1,498
0
11
202
231
119
112
25
1
{-# OPTIONS -fno-implicit-prelude #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Tuple -- Copyright : (c) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : libraries@haskell.org -- Stab...
OS2World/DEV-UTIL-HUGS
libraries/Data/Tuple.hs
bsd-3-clause
851
0
4
162
45
37
8
7
0
{-# LANGUAGE TupleSections #-} module Text.OrgMode.Elements.Keyword where import Control.Applicative ((<$>)) import Data.Maybe import Data.List import Data.Text (Text) import qualified Data.Text as T import Text.Parsec import Text.Parsec.Text import ...
cvb/hs-orgmode
Text/OrgMode/Elements/Keyword.hs
bsd-3-clause
1,825
0
15
466
691
353
338
50
2
module Interpreter where import Evaluate import Statement import Expression import Prompt import System.IO import qualified Data.Map as Map import Control.Monad.State import Control.Monad.Except import Data.Maybe import Data.List -- I'll be calling this [(Statement, Env)] list the 'life stack', as it's a -- stack w...
shawa/delorean
src/Interpreter.hs
bsd-3-clause
4,398
0
18
1,216
1,287
640
647
89
9
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE NoMonomorphismRestriction #-} module Tests.Twitch.Internal where import Control.Monad ( forM_ ) import Test.Hspec import Twitch.Internal ( modHeadRule, runDep ) import Twitch.Rule ( Rule (pattern) ) tests :: Spec tests = do describe "modHeadRule" $ it "should thread st...
menelaos/twitch
tests/Tests/Twitch/Internal.hs
mit
587
0
15
107
152
85
67
13
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>AdvFuzzer Add-On</title> <maps> <homeID>top</homeID> <mapref location="...
veggiespam/zap-extensions
addOns/fuzz/src/main/javahelp/org/zaproxy/zap/extension/fuzz/resources/help_zh_CN/helpset_zh_CN.hs
apache-2.0
962
79
67
157
413
209
204
-1
-1
{-# LANGUAGE RankNTypes, TypeOperators, ScopedTypeVariables, TypeFamilies, FlexibleContexts, DataKinds #-} {-# OPTIONS -Wall -fno-warn-name-shadowing #-} module Examples.Seismic where import Prelude hiding (Real) import Language.Hakaru.Syntax import Language.Hakaru.Expect import Language.Hakaru.Sample --import Languag...
bitemyapp/hakaru
Examples/Seismic.hs
bsd-3-clause
17,313
3
63
4,736
6,651
3,587
3,064
381
3
module Blockchain.PeerUrls where import Network -- Working 0, 1, 2, 67, 119 ipAddresses::[(String, PortNumber)] ipAddresses = [ ("127.0.0.1", 30303), ("poc-9.ethdev.com", 30303), ("poc-8.ethdev.com", 30303), ("api.blockapps.net", 30303), ("stablenet.blockapps.net", 30303), ("gav.ethdev.com...
jamshidh/ethereum-vm
src/Blockchain/PeerUrls.hs
bsd-3-clause
4,815
0
6
961
1,424
949
475
160
1
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} module Check.State where import qualified Control.Monad.State as P import qualified Koan.State as K import Hedgehog import Hedgehog.Extra import qualified Hedgehog.Gen as Gen import qualified Hedgehog.Range ...
Kheldar/hw-koans
test/Check/State.hs
bsd-3-clause
1,826
0
15
360
745
380
365
44
1
-- | State monad for the linear register allocator. -- Here we keep all the state that the register allocator keeps track -- of as it walks the instructions in a basic block. module RegAlloc.Linear.State ( RA_State(..), RegM, runR, spillR, loadR, getFreeRegs...
lukexi/ghc-7.8-arm64
compiler/nativeGen/RegAlloc/Linear/State.hs
bsd-3-clause
4,283
0
13
1,204
1,253
696
557
-1
-1
{-# LANGUAGE Unsafe #-} {-# LANGUAGE CPP, NoImplicitPrelude, MagicHash #-} ----------------------------------------------------------------------------- -- | -- Module : Unsafe.Coerce -- Copyright : Malcolm Wallace 2006 -- License : BSD-style (see the LICENSE file in the distribution) -- -- Maintainer :...
ssaavedra/liquidhaskell
benchmarks/base-4.5.1.0/Unsafe/Coerce.hs
bsd-3-clause
1,578
0
5
256
88
67
21
3
0
{-# LANGUAGE TemplateHaskell, QuasiQuotes, OverloadedStrings #-} module EmbeddedTestEntries where import WaiAppStatic.Storage.Embedded import qualified Data.Text as T import qualified Data.Text.Lazy as TL import qualified Data.Text.Lazy.Encoding as TL import qualified Data.ByteString.Lazy as BL body :: Int -> Char -...
jberryman/wai
wai-app-static/test/EmbeddedTestEntries.hs
mit
1,429
0
11
459
260
151
109
29
1
-- ----------------------------------------------------------------------------- -- -- (c) The University of Glasgow, 2005-2007 -- -- Running statements interactively -- -- ----------------------------------------------------------------------------- module InteractiveEvalTypes ( Resume(..), History(..), ExecR...
ezyang/ghc
compiler/main/InteractiveEvalTypes.hs
bsd-3-clause
2,845
0
12
971
418
270
148
56
1
module CommitComments where import qualified Github.Repos.Commits as Github import Data.List import Data.Maybe (maybe) main = do possibleComments <- Github.commitCommentsFor "thoughtbot" "paperclip" "41f685f6e01396936bb8cd98e7cca517e2c7d96b" case possibleComments of (Left error) -> putStrLn $ "Error: " ++ ...
deckool/my-hs-github
samples/Repos/Commits/CommitComments.hs
bsd-3-clause
865
0
14
136
253
131
122
18
2
{- Copyright (c) 2014 Joachim Breitner A data structure for undirected graphs of variables (or in plain terms: Sets of unordered pairs of numbers) This is very specifically tailored for the use in CallArity. In particular it stores the graph as a union of complete and complete bipartite graph, which would be very e...
urbanslug/ghc
compiler/utils/UnVarGraph.hs
bsd-3-clause
4,517
0
12
946
1,085
582
503
75
5
{-# LANGUAGE StaticPointers #-} module StaticPointersFail03 where import GHC.StaticPtr import Data.Typeable f1 :: (Typeable a, Typeable m, Monad m) => a -> m a f1 = deRefStaticPtr (static return)
urbanslug/ghc
testsuite/tests/typecheck/should_fail/TcStaticPointersFail03.hs
bsd-3-clause
203
0
7
36
62
34
28
6
1
import State import Simulation import Display import Data.IORef import Constants import Graphics.Rendering.OpenGL import Graphics.UI.GLUT main :: IO () main = do (progname,_) <- getArgsAndInitialize initialDisplayMode $= [WithDepthBuffer, DoubleBuffered, Multisampling] createWindow "Hello World" multi...
pauldoo/scratch
NBody/Main.hs
isc
918
0
13
194
301
145
156
31
1
{-# LANGUAGE PackageImports, BangPatterns, FlexibleContexts, AllowAmbiguousTypes #-} {-# OPTIONS -Wall -fno-warn-missing-signatures -fno-warn-incomplete-patterns #-} module RobotVision.Correspondense.Ransac ( test ) where import Numeric.Ransac (ransac) import RobotVision.FeatureDetection.Feature import Data.Ve...
eklinkhammer/haskell-vision
src/Correspondense/Ransac.hs
mit
1,763
0
8
382
108
74
34
9
1
-- file: ch04/IntParse.hs import Data.Char (digitToInt) loop :: Int -> String -> Int loop acc [] = acc loop acc (x:xs) = let acc' = acc * 10 + digitToInt x in loop acc' xs asInt :: String -> Int asInt xs = loop 0 xs
supermitch/learn-haskell
real-world-haskell/ch04/IntParse.hs
mit
238
0
10
68
103
52
51
7
1
module Graphics.D3D11Binding.Shader ( module Graphics.D3D11Binding.Shader.Compile , module Graphics.D3D11Binding.Shader.D3D11VertexShader , module Graphics.D3D11Binding.Shader.D3D11PixelShader , module Graphics.D3D11Binding.Shader.Flags ) where import Graphics.D3D11Binding.Shader.Compile import Graphics.D3D11Bin...
jwvg0425/d3d11binding
src/Graphics/D3D11Binding/Shader.hs
mit
445
0
5
31
69
50
19
9
0
{-# LANGUAGE MultiParamTypeClasses , FlexibleInstances , ImplicitParams #-} module U.Exec.Mutable.Impl ( ) where import Control.Monad (mzero) import Utils import U.Objects as O import U.Defs as D import U.Exec (GravitationalConstant ) import U.Exec.Mutable as E -- -- -- -- -- -- -...
fehu/hgt
space-independent/src/U/Exec/Mutable/Impl.hs
mit
2,706
0
18
1,208
680
369
311
-1
-1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE TemplateHaskell #-} -- | Function body code generation. module Orchid.Codegen.Body ( ...
gromakovsky/Orchid
src/Orchid/Codegen/Body.hs
mit
26,979
0
19
8,197
6,396
3,376
3,020
-1
-1
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE DefaultSignatures #-} {-# LANGUAGE Rank2Types #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Database.Persist.Sql.Orphan.Persis...
andrewthad/persistent
persistent/Database/Persist/Sql/Orphan/PersistStore.hs
mit
12,329
52
26
4,532
3,190
1,628
1,562
258
2
{-# LANGUAGE FlexibleContexts #-} -- | Fuzzy string search in Haskell. -- Uses 'TextualMonoid' to be able to run on different types of strings. module Text.Fuzzy where import Prelude hiding (filter) import qualified Prelude as P import Data.Char (toLower) import Data.List (sortOn) import Data.Maybe (isJust, mapMaybe...
joom/fuzzy
src/Text/Fuzzy.hs
mit
4,078
0
20
1,107
823
476
347
63
5