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
{-# LANGUAGE OverloadedStrings #-} import Control.Monad.IO.Class (MonadIO) import Network.HTTP.Types (status200) import Network.HTTP.Types.Header (hContentType) import Network.Wai (responseLBS) import Network.Wai.Handler...
creichert/wai-middleware-hmac
Example.hs
bsd-3-clause
987
0
11
334
187
105
82
16
1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE RecordWildCards #-} -- | The cache provides an API to monitor values in an application. The values -- can exist only in memory, and/or be written to disk, and can be forwarded to a -- metric gathering tool. -- It is a layer above Data.Whisper.Store. module Curved.Cache where ...
noteed/curved
Curved/Cache.hs
bsd-3-clause
4,347
0
19
976
1,035
560
475
72
2
{-# LANGUAGE TemplateHaskell #-} module ResultScene ( resultScene ) where import GameEngine.Scene import GameEngine.Sprite import GameEngine.Sprite.Label import GameEngine.Sprite.Colored import Control.Lens import Control.Monad (when) import Control.Monad.State import Control.Monad.Except import Data.Color.Names...
lotz84/SnakeGameHaskell
src/ResultScene.hs
bsd-3-clause
2,446
0
16
1,039
558
288
270
-1
-1
module PFDS.Sec8.Ex3 where import Prelude hiding (head, tail) data RotationState a = Idle | Reversing Int [a] [a] [a] [a] | Appending Int [a] [a] | Done [a] deriving (Show) data Queue a = Q Int [a] (RotationState a) [a] deriving (Show) exec :: RotationState a -> RotationState a exec (Re...
matonix/pfds
src/PFDS/Sec8/Ex3.hs
bsd-3-clause
1,777
0
10
479
1,051
540
511
48
2
module Main where import System.Environment import Lib main :: IO () main = do arg:_ <- getArgs let encodeResult = urlencode arg case encodeResult of Left err -> putStrLn "ERROR" >> putStrLn err Right encoded -> putStrLn encoded
majecty/urlencode
app/Main.hs
bsd-3-clause
246
0
11
55
88
42
46
10
2
{-# LANGUAGE CPP #-} {-# LANGUAGE DefaultSignatures #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE...
bermanjosh/bloodhound
tests/V1/tests.hs
bsd-3-clause
90,310
0
31
23,588
23,692
11,662
12,030
-1
-1
-- -- -- ----------------- -- Exercise 5.21. ----------------- -- -- -- module E'5'21 where import Prelude hiding ( elem ) matches :: Integer -> [Integer] -> [Integer] matches n xs = [ x | x <- xs , n == x ] {- GHCi> matches 1 [ 0 , 1 , 0 , 1 ] -} -- [ 1 , 1 ] elem :: Integer -> [Integer] -> Bool elem n...
pascal-knodel/haskell-craft
_/links/E'5'21.hs
mit
554
0
10
172
132
78
54
9
1
{- | Module : ./Common/DocUtils.hs Description : Pretty class for pretty printing with instances plus utilities Copyright : (c) jianchun wang and Uni Bremen 2006 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : provisional Portability : portable 'Pretty...
spechub/Hets
Common/DocUtils.hs
gpl-2.0
7,365
0
18
1,726
2,707
1,430
1,277
149
4
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-s3/gen/Network/AWS/S3/CreateMultipartUpload.hs
mpl-2.0
18,043
0
23
4,273
2,565
1,503
1,062
243
1
{-# LANGUAGE CPP #-} module FP.TH where import FP.Core import Language.Haskell.TH import Language.Haskell.TH.Syntax infixl 9 #@ infixl 8 #@| infixr 1 ==> class THApp e where (#@) :: e -> e -> e class THTup e where tup :: [e] -> e instance THApp Exp where (#@) = AppE instance THTup Exp where tup = TupE instance TH...
FranklinChen/maam
src/FP/TH.hs
bsd-3-clause
2,885
1
11
659
1,320
735
585
-1
-1
{-# LANGUAGE CPP #-} {- | Get terminal window height and width without ncurses dependency Based on answer by Andreas Hammar at <http://stackoverflow.com/a/12807521/972985> -} module System.Console.Terminal.Size ( Window(..) , size #if !defined(mingw32_HOST_OS) , fdSize , hSize #endif ) where import System.C...
biegunka/terminal-size
src/System/Console/Terminal/Size.hs
bsd-3-clause
1,614
0
11
255
185
118
67
16
1
module Darcs(run) where import Control.Monad import Data.Char import Data.List import System.Directory import System.Exit import System.FilePath import Util import Arguments import Control.Exception as E import Control.Concurrent import Data.Maybe --------------------------------------------------------------------...
saep/neil
src/Darcs.hs
bsd-3-clause
7,704
0
22
2,310
2,539
1,234
1,305
-1
-1
{-# LANGUAGE Haskell98 #-} {-# LINE 1 "Network/Wai/Handler/Warp/HTTP2/EncodeFrame.hs" #-} {-# LANGUAGE OverloadedStrings #-} module Network.Wai.Handler.Warp.HTTP2.EncodeFrame where import Data.ByteString (ByteString) import Network.HTTP2 ---------------------------------------------------------------- goawayFrame :...
phischu/fragnix
tests/packages/scotty/Network.Wai.Handler.Warp.HTTP2.EncodeFrame.hs
bsd-3-clause
1,161
0
7
186
271
141
130
23
1
------------------------------------------------------------------------------- -- | -- Module : Spaces.Action -- Copyright : (c) Sentenai 2017 -- License : BSD3 -- Maintainer: sam@sentenai.com -- Stability : experimental -- Portability: non-portable -- -- typeclass for a discrete action space, as well as hel...
stites/reinforce
reinforce/src/Reinforce/Spaces/Action.hs
bsd-3-clause
2,526
0
11
469
442
258
184
-1
-1
{-# LANGUAGE MagicHash #-} ----------------------------------------------------------------------------- -- -- GHCi Interactive debugging commands -- -- Pepe Iborra (supported by Google SoC) 2006 -- -- ToDo: lots of violation of layering here. This module should -- decide whether it is above the GHC API (import GHC ...
christiaanb/ghc
compiler/ghci/Debugger.hs
bsd-3-clause
9,325
0
20
2,975
2,287
1,169
1,118
172
8
-- |Basic PID control. module Ros.Util.PID where import Data.IORef (newIORef, readIORef, writeIORef) import Data.Time.Clock (getCurrentTime, diffUTCTime) -- |A simple PID transfer function that assumes a unit sampling -- interval. The first three parameters are the gains, the fourth -- parameter is the desired setpoin...
bitemyapp/roshask
src/Ros/Util/PID.hs
bsd-3-clause
5,034
0
23
1,634
1,312
668
644
90
3
module MyWordsOfficial where myWords :: String -> [String] myWords [] = [] myWords (' ':xs) = myWords xs myWords xs = takeWhile (/= ' ') xs:myWords (dropWhile (/= ' ') xs)
Lyapunov/haskell-programming-from-first-principles
chapter_9/my_words_official.hs
mit
181
0
9
40
82
44
38
7
1
---------------------------------------------------------------- -- -- | aartifact -- http://www.aartifact.org/ -- -- @src\/ContextOntology.hs@ -- -- Concrete syntax of the propositions that constitute the -- built-in ontology. -- ---------------------------------------------------------------- -- module Contex...
aartifact/aartifact-verifier
src/ContextRaw.hs
mit
483
0
5
58
50
36
14
9
1
{-# LANGUAGE RankNTypes #-} module LearnParsers where import Text.Trifecta stop :: Parser a stop = unexpected "stop" one = char '1' one' = one >> stop -- read two characters, '1', and '2' oneTwo = char '1' >> char '2' -- read two characters, '1' and '2', then die oneTwo' = oneTwo >> stop testParse :: Parser Char ...
diminishedprime/.org
reading-list/haskell_programming_from_first_principles/ch24-s03/app/LearnParsers.hs
mit
1,588
0
7
316
320
158
162
32
1
{-# LANGUAGE FlexibleInstances #-} module Memory where import Data.Bits (Bits, (.|.), (.&.), shiftR, shiftL, complement, bit, testBit) import Data.Default (Default(..)) import Data.Sequence (Seq, update, index, fromList) import Data.Sequence as S import Data.Word (Word8, Word16) import ROM (ROM(..)) import Base nmi...
rkoeninger/GameCom
src/lib/Memory.hs
mit
15,050
0
13
4,034
4,297
2,283
2,014
298
2
module Control.Monad.Variables.File(file) where import Control.Monad.Variables import Control.Monad.IO.Class import qualified Data.ByteString as BS file :: (MonadIO m) => FilePath -> Variable m BS.ByteString file path = Variable { readVar = liftIO (BS.readFile path), writeVar = liftIO . BS.writ...
prophile/variables
Control/Monad/Variables/File.hs
mit
334
0
10
65
101
59
42
7
1
-- Copyright (c) Microsoft. All rights reserved. -- Licensed under the MIT license. See LICENSE file in the project root for full license information. {-# LANGUAGE QuasiQuotes, OverloadedStrings, RecordWildCards #-} module Bond.Template.Cpp.Types_cpp (types_cpp) where import Data.Monoid import Prelude import Data.Te...
innovimax/bond
compiler/Bond/Template/Cpp/Types_cpp.hs
mit
2,498
0
11
563
212
131
81
16
4
{-# LANGUAGE FunctionalDependencies, GADTs, FlexibleContexts #-} module Database.Persist.RateLimit where import Data.Time.Clock import Prelude import Yesod class RateLimit action entity | action -> entity where -- | Number of actions allowed in the defined period. Period is easured in seconds. rateLimit :: a...
jprider63/persistent-ratelimit
src/Database/Persist/RateLimit.hs
mit
3,971
0
13
883
885
435
450
-1
-1
main = do return () return "HAHAHA" line <- getLine return "AHAHAH" return 4 putStrLn line
fabriceleal/learn-you-a-haskell
09/return_is_not_wat_u_think.hs
mit
121
0
8
46
45
17
28
7
1
module Data.Semiring.TH where import Control.Monad import Language.Haskell.TH typeNames :: Int -> Q [Name] typeNames = traverse (pure . mkName) . map pure . flip take ['a'..] varNames :: Int -> Q [Name] varNames n = (traverse newName . map pure . reverse . take n . reverse . take 26) ['a' ..] repN :: In...
oisdk/semiring-num
src/Data/Semiring/TH.hs
mit
2,516
0
15
736
1,260
606
654
68
1
-- | Misc utilities for xmonad configuration module Misc where import Control.Monad.Catch import Data.Monoid import Data.List (isPrefixOf) import System.Random (randomRIO) import XMonad.Actions.PhysicalScreens import XMonad.Actions.Warp import qualified Data.Vector.Generic as V import qualified XMonad.StackSet as W i...
mgsloan/compconfig
env/src/Misc.hs
mit
2,732
0
19
566
1,066
551
515
69
2
module LexerSpec where import Test.Hspec import Data.Either import Data.Complex import Control.Exception (evaluate) import qualified Lexer as L import qualified Text.ParserCombinators.Parsec as PC import qualified Text.ParserCombinators.Parsec.Error as PCError instance Eq PC.ParseError where (==) x y = show...
waterlink/hgo
LexerSpec.hs
mit
5,074
0
18
1,056
1,897
925
972
95
1
module FeatureModel.Parsers.SPLOT.SkelSPLOT where -- Haskell module generated by the BNF converter import FeatureModel.Parsers.SPLOT.AbsSPLOT import FeatureModel.Parsers.SPLOT.ErrM type Result = Err String failure :: Show a => a -> Result failure x = Bad $ "Undefined case: " ++ show x transIdent :: Ident -> Result ...
hephaestus-pl/hephaestus
alexandre/feature-modeling/src/FeatureModel/Parsers/SPLOT/SkelSPLOT.hs
mit
1,597
0
8
306
481
236
245
41
2
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable #-} {- Copyright (C) 2012-2014 Kacper Bak, Jimmy Liang, Luke Michael Brown <http://gsd.uwaterloo.ca> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Sof...
juodaspaulius/clafer-old-customBNFC
src/Language/Clafer/Intermediate/Intclafer.hs
mit
13,060
0
15
3,501
3,196
1,696
1,500
199
1
{-# LANGUAGE TemplateHaskell, TypeSynonymInstances, FlexibleInstances, OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {-| Unittests for ganeti-htools. -} {- Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc. This program is free software; you can redistribute it and/or modify it under the terms ...
badp/ganeti
test/hs/Test/Ganeti/Objects.hs
gpl-2.0
22,095
0
23
5,010
4,229
2,154
2,075
386
2
{-# LANGUAGE NoImplicitPrelude #-} module Compiler.ST (unsafeInterleaveST, runST) where import Compiler.Base -- for seq, IO = IOActionX, LazyIO, IOAndPass, MFIX, IOReturn import Data.Tuple -- for snd unsafeInterleaveST x = LazyIO x runST (IOAction f) = snd (f 0) runST (LazyIO f) = runST f...
bredelings/BAli-Phy
haskell/Compiler/ST.hs
gpl-2.0
635
0
11
144
217
109
108
12
1
{-# LANGUAGE DeriveGeneric, DeriveAnyClass, DataKinds #-} module Demotest where import Data.Demote import GHC.Generics import GHC.TypeLits data MyType str nat = MyType { templateSources :: [ ( str, nat ) ] } deriving (Generic, Demotable, Show) type Lol = 'MyType '[ '( "foo", 42 ) ]
chpatrick/demote
Demotest.hs
gpl-2.0
288
0
10
50
85
52
33
8
0
-- Match -- Copyright (C) 2015 Jonathan Lamothe -- <jonathan@jlamothe.net> -- This program is free software: you can redistribute it and/or -- modify it under the terms of the GNU General Public License as -- published by the Free Software Foundation, either version 3 of the -- License, or (at your option) any later ...
jlamothe/match
Tests/JSON/Common.hs
gpl-3.0
1,334
0
9
276
255
152
103
16
1
module Helium.Utils.QualifiedTypes where import Helium.Syntax.UHA_Syntax import Helium.Syntax.UHA_Utils import Data.Maybe() import Helium.ModuleSystem.ImportEnvironment import Top.Types import qualified Data.Map as M --------------------------------------------------------- -- Convert UHA types to qualified -- Gets...
Helium4Haskell/helium
src/Helium/Utils/QualifiedTypes.hs
gpl-3.0
4,459
0
13
711
1,145
593
552
64
2
module FormalLanguage.CFG.Test where import FormalLanguage.CFG [formalLanguage| Verbose Grammar: Global N: X T: c -- NOTE that each tape with a 'c' uses its own type! S: [X,X] [X,X] -> done <<< [e,e] [X,X] -> align <<< [X,X] [c,c] [X,X] -> indel <<< [X,X] [-,c] [X,X] -> delin <<< [X,X] [c,-] // Out...
choener/FormalGrammars
FormalLanguage/CFG/Test.hs
gpl-3.0
370
0
4
82
19
13
6
-1
-1
import Data.Array import Data.List (unlines) import Text.Parsec.String (Parser) import Text.ParserCombinators.Parsec type Screen = Array (Int, Int) Bool type Update = (Screen -> Screen) blank :: Screen w = 50 h = 6 blank = listArray ((0, 0), (h-1, w-1)) $ repeat False rs = [0..h-1] cs = [0..w-1] main = do result ...
ayron/AoC
2016/Day 8/solution.hs
gpl-3.0
2,324
0
14
588
998
498
500
81
2
module Carbon.Website.Crud( crudCreate , crudRead , crudUpdate , crudDelete , respOk , respCreated , respNotModified , respBadRequest , respUnauthorized , respForbidden , respNotFound , respInternalServerError )where {-| Inspired by http://devo.ps/blog/2013/03/22/designing-a-restful-api-that-doesn-t-suck.html |-} i...
runjak/carbon-adf
Carbon/Website/Crud.hs
gpl-3.0
1,443
0
8
290
306
164
142
28
1
import Control.Monad --main = do -- c <- getChar -- if c /= ' ' -- then do -- putChar c -- main -- else return () -- when (c /= ' ') $ do -- putChar c -- main -------------------------------- main = do -- a <- getLine -- b <- getLine -- c <- getLin...
lamontu/learning_haskell
sequence.hs
gpl-3.0
403
0
9
151
51
33
18
4
1
{-# LANGUAGE OverloadedStrings #-} module Network.OAuth2.Token where import qualified Data.ByteString.Char8 as C8 import qualified Data.ByteString.Lazy as BL import qualified Data.ByteString as BS import Data.Aeson import Data.Aeson.Types import Control.Applicative ((<$>),(<*>)) import Control.Monad (mzero, void)...
limaner2002/OAuth2
src/Network/OAuth2/Token.hs
gpl-3.0
4,687
0
16
1,593
1,204
616
588
108
1
{- NICTA t3as NER Web UI Copyright 2014 NICTA This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in t...
NICTA/nicta-ner
ner-web-ui/app/DevelMain.hs
gpl-3.0
2,329
0
15
551
324
165
159
34
2
{-# LANGUAGE OverloadedStrings, PatternGuards #-} -- | Helpers to retrieve meta-data and statistics from a file/upload. module Util.Extras ( Extras (..), getFileExtras, getUploadStats , getIcon, getMiniature, getCard, getDisplayable , getAudioSources, getArchive , getUploadInfo, getUploadsInfo, getUpl...
RaphaelJ/getwebb.org
Util/Extras.hs
gpl-3.0
8,618
0
16
2,198
2,212
1,182
1,030
139
5
{-# LANGUAGE TemplateHaskell #-} -- Copyright (C) 2010-2012 John Millikin <jmillikin@gmail.com> -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation, either version 3 of the License, or -- any ...
tmishima/haskell-dbus
tests/DBusTests/Address.hs
gpl-3.0
6,568
86
18
1,214
2,120
1,093
1,027
-1
-1
-- Without using the standard library. Only pattern matching. myButLast :: [a] -> a myButLast [] = error "Empty list" myButLast [x] = error "Need at least two elements" myButLast [x, y] = x myButLast (x : xs) = myButLast xs -- Using standard library about lists. myButLast2 :: [a] -> a myButLast2 xs = head (tail rever...
dannywillems/99-problems
haskell/p02.hs
gpl-3.0
379
0
7
81
113
59
54
8
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.Prediction.Types.Sum -- Copyright : (c) 2015-2016 Bren...
brendanhay/gogol
gogol-prediction/gen/Network/Google/Prediction/Types/Sum.hs
mpl-2.0
619
0
5
111
35
29
6
8
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
dysinger/amazonka
amazonka-ec2/gen/Network/AWS/EC2/ImportInstance.hs
mpl-2.0
5,145
0
10
1,158
696
419
277
79
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/RemarketingLists/List.hs
mpl-2.0
9,067
0
26
2,339
1,413
809
604
197
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-compute/gen/Network/Google/Resource/Compute/RegionDiskTypes/Get.hs
mpl-2.0
3,850
0
16
901
468
280
188
77
1
func = f where {-# INLINE CONLIKE [1] f #-} f = id
lspitzner/brittany
data/Test41.hs
agpl-3.0
56
0
6
18
14
8
6
3
1
module StringUtilTest where import Test.Hspec.Expectations import Test.Tasty import Test.Tasty.HUnit import StringUtil test_all :: [TestTree] test_all = [ {- testCase "toCamel-1" (toCamel "abc" @?= "Abc") , testCase "toCamel-2" (toCamel "abc_efg" @?= "AbcEfg") -} testCase "fromCamel-1...
databrary/databrary
test/StringUtilTest.hs
agpl-3.0
435
0
9
97
76
45
31
12
1
import Data.Foldable (foldl') score :: (Ord a, Num a) => a -> a -> (a, a) score a b | a > b = (1, 0) | a < b = (0, 1) | otherwise = (0, 0) scoreN = zipWith score scores = ((foldl' add (0,0)) .) . scoreN where add (a, b) (x, y) = (a + x, b + y) loadScores = (map read) . words showScores (a, b) = unw...
itsbruce/hackerrank
alg/warmup/compareTriplets.hs
unlicense
470
0
9
132
267
141
126
15
1
{-# LANGUAGE TemplateHaskell #-} module Camera ( Camera -- Lenses , cameraCoordinate , cameraPinned , cameraViewport , cameraWindowSize -- Functions -- , cameraAuto -- , cameraCenter , cameraMove -- , cameraTogglePinned , defaultCamera ) where import Control.Lens im...
nitrix/lspace
legacy/Camera.hs
unlicense
2,965
0
9
756
261
153
108
-1
-1
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE Rank2Types #-} -- -- This is the main interface. APIs should be quite self-e...
da-x/cpio-conduit
src/Data/CPIO.hs
apache-2.0
5,489
0
16
1,514
1,580
795
785
167
5
{-|Snappy Shuffle an implementation of a shuffling algorithm. Code is taken from Haskell wiki -} module Config.Snappy.Shuffle where {-|TODO implement -} shuffle :: [a] -> IO ([a]) shuffle xs = return (xs)
ppenzin/snappy
src/Config/Snappy/Shuffle.hs
bsd-2-clause
214
0
8
41
44
26
18
3
1
{-| Module : Binary.Neko.Module Description : Emit and parse Binary.Neko bytecode Copyright : (c) Petr Penzin, 2015 License : BSD2 Maintainer : penzin.dev@gmail.com Stability : experimental Portability : cross-platform Primitives to emit and parse Binary.Neko bytecode, including instruction definitions. ...
ppenzin/neko-lib-hs
src/lib/Binary/Neko/Module.hs
bsd-2-clause
4,497
0
18
1,021
976
539
437
66
4
{-# OPTIONS_GHC -Wall #-} module Transform.Check (mistakes) where import qualified Control.Arrow as Arrow import qualified Data.List as List import qualified Data.Maybe as Maybe import qualified Data.Set as Set import qualified SourceSyntax.Expression as E import qualified SourceSyntax.Declaration as D import qualifi...
deadfoxygrandpa/Elm
compiler/Transform/Check.hs
bsd-3-clause
5,591
0
20
1,806
1,775
915
860
109
6
{-# LANGUAGE PatternSynonyms #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.ATI.DrawBuffers -- Copyright : (c) Sven Panne 2019 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability ...
haskell-opengl/OpenGLRaw
src/Graphics/GL/ATI/DrawBuffers.hs
bsd-3-clause
1,214
0
5
165
137
91
46
25
0
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PackageImports #-} module Netsuite.Restlet ( restletExecute, chunkableRestletExecute, makeRequest, RestletResponse ) where import qualified Data.ByteString.Char8 as BS8 import Control.Applicative import Control.Exception import Data.Char import quali...
anchor/haskell-netsuite
lib/Netsuite/Restlet.hs
bsd-3-clause
5,085
0
18
1,470
1,122
585
537
96
6
-- | Bindings to <http://react-bootstrap.github.io/ React-Bootstrap>. To use this -- binding, include the browser-global version of @react-bootstrap.js@ so that @window.ReactBootstrap@ -- is defined. You can then use 'bootstrap_' inside your rendering functions. -- -- Note: I initially wrote these bindings when I was...
liqula/react-flux
src/React/Flux/Addons/Bootstrap.hs
bsd-3-clause
2,188
4
9
480
141
90
51
12
1
module Parser ( -- * parsers variable , abstraction , application , expression -- * evaluator , eval ) where import Control.Monad import Text.ParserCombinators.Parsec import Text.Printf import LambdaCalculus -- Parsing name :: Parser String name = many1 (letter <|> digit <|> char '_') -- | Simple va...
weiningl/SFTypes
Parser.hs
bsd-3-clause
1,687
0
10
452
674
330
344
57
3
{-# LANGUAGE OverloadedStrings #-} -- | This module deals with HTML5 named entities. This file was generated -- from and is meant to stay in sync with -- <https://html.spec.whatwg.org/multipage/entities.json>. -- -- Terminology ote: an /entity name/ is an entity stripped of its leading -- ampersand and trailing semico...
Jubobs/CommonMark-WIP
src/CommonMark/Util/Entities.hs
bsd-3-clause
55,894
0
7
12,906
19,218
12,809
6,409
2,135
1
{-# LANGUAGE GADTs #-} {-# LANGUAGE CPP #-} module Main ( main ) where -------------------------------------------------------------------------------- import Control.DeepSeq (NFData(..)) import Control.Exception.Base (evaluate) import Control.Monad.Trans (liftIO) -----------------------...
Palmik/data-store
benchmarks/src/01HS.hs
bsd-3-clause
4,315
0
16
1,115
1,275
671
604
60
2
module CartelCommon where import qualified Cartel as A versionInts :: [Int] versionInts = [0,1,0,0] version :: A.Version version = A.Version versionInts base :: A.Package base = A.closedOpen "base" [4,5,0,0] [4,8] ghcOptions :: [String] ghcOptions = ["-Wall"] text :: A.Package text = A.closedOpen "text" [1,2,0,0]...
massysett/turnpike
CartelCommon.hs
bsd-3-clause
1,115
0
7
192
367
223
144
34
1
-- | -- Module: Control.Wire.Trans.Switch -- Copyright: (c) 2012 Ertugrul Soeylemez -- License: BSD3 -- Maintainer: Ertugrul Soeylemez <es@ertes.de> -- -- Switching combinators. Notice that these combinators restart time -- when switching. module Control.Wire.Trans.Switch ( -- * Simple switching and...
MaxDaten/netwire
Control/Wire/Trans/Switch.hs
bsd-3-clause
2,635
0
18
762
621
337
284
47
2
{-# OPTIONS_GHC -Wall #-} module AST.Pattern where import AST.V0_16 import qualified AST.Variable as Var import qualified Reporting.Annotation as A type Pattern = A.Located Pattern' data Pattern' = Anything | UnitPattern Comments | Literal Literal | Var Var.Ref | Data String [(Comments, Pat...
fredcy/elm-format
parser/src/AST/Pattern.hs
bsd-3-clause
647
0
8
139
185
111
74
21
0
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE ScopedTypeVariables #-} module Types where import qualified LexCAL as C import qualified ParCAL as C import qualified SkelCAL as C import qualified PrintCAL as C import qualified AbsCAL as C import qualified AbsRIPL as R -- import AstMappings import Data.Int import Data.Wor...
robstewart57/ripl
src/Types.hs
bsd-3-clause
4,704
0
14
1,153
1,009
596
413
117
3
module SocketTable where import Control.Monad import Control.Applicative import Control.Concurrent.MVar import Network.Socket (Socket, getPeerName, fdSocket, sClose) import Data.Hashable import qualified Control.Exception as E import qualified Data.HashTable.IO as H import Data.Hourglass import System.Hourglass type ...
vincenthz/socksmaster
Src/SocketTable.hs
bsd-3-clause
4,334
0
20
1,206
1,469
758
711
97
2
-- | This is an implementation of bidirectional multimaps. module Control.Distributed.Process.Internal.BiMultiMap ( BiMultiMap , empty , singleton , size , insert , lookupBy1st , lookupBy2nd , delete , deleteAllBy1st , deleteAllBy2nd , partitionWithKeyBy1st , partitionWithKeyBy2nd , flip ) w...
haskell-distributed/distributed-process
src/Control/Distributed/Process/Internal/BiMultiMap.hs
bsd-3-clause
5,273
0
16
1,418
1,621
861
760
83
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} module Haskell.Ide.Engine.Console where import Control.Concurrent.STM.TChan import Control.Monad.IO.Class import Control.Monad.STM import Data.Aeson import Data.Attoparsec.Text import qualified Dat...
JPMoresmau/haskell-ide-engine
src/Haskell/Ide/Engine/Console.hs
bsd-3-clause
4,810
1
32
1,254
1,297
669
628
102
7
-- #hide -------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.GL.PrimitiveMode -- Copyright : (c) Sven Panne 2003 -- License : BSD-style (see the file libraries/OpenGL/LICENSE) -- -- Maintainer : sven_panne@yahoo.com -- Stability ...
OS2World/DEV-UTIL-HUGS
libraries/Graphics/Rendering/OpenGL/GL/PrimitiveMode.hs
bsd-3-clause
3,963
0
9
860
381
222
159
40
10
module LargeSig where largeSig_0 :: (Functor f, Show a) => Int -> p a (b -> c) -> a -> f (Int, c) largeSig_0 = undefined largeSig_1 :: (Functor f, Eq b) => Double -> p (a -> b) c a -> f (Int, c) largeSig_1 = undefined
cdxr/haskell-interface
test/modules/LargeSig.hs
bsd-3-clause
261
0
10
91
118
64
54
15
1
module Word ( getRandoWord ) where import System.Random (randomRIO) type WordList = [String] minWordLength :: Int minWordLength = 6 maxWordLength :: Int maxWordLength = 9 allWords :: IO WordList allWords = do dict <- readFile "data/dict.txt" return (lines dict) gameLength :: String -> Bool game...
NewMountain/hangmanSimple
src/Word.hs
bsd-3-clause
752
0
10
181
244
126
118
28
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE TemplateHaskell #-} module Servant.Servant.Types where import Control.Monad (mzero) import Data.Aeson import Data.SafeCopy import Data.Text (Text, pack, unpack) import Data.T...
jkarni/servant-servant
src/Servant/Servant/Types.hs
bsd-3-clause
1,696
0
10
321
510
283
227
45
1
module RaskellDownloadSpec (main, spec) where import Test.Hspec import RaskellDownload.Internal import RaskellDownload.PathApis import System.Directory main :: IO () main = hspec spec spec = do helpers dataTypes gitdownload gitdownload :: Spec gitdownload = do let path = ".tmp/Raskell/Test...
jonathankochems/raskell-git-download
test/RaskellDownloadSpec.hs
bsd-3-clause
5,317
0
16
1,787
817
424
393
81
1
module Text.HTML.TagSoup.Parser( parseTags, parseTagsOptions, ParseOptions(..), parseOptions, parseOptionsFast ) where import Text.HTML.TagSoup.Type import Text.HTML.TagSoup.Options import Text.StringLike import qualified Text.HTML.TagSoup.Generated as Gen -- | Parse a string to a list of tags, using an...
nfjinjing/yuuko
src/Text/HTML/TagSoup/Parser.hs
bsd-3-clause
986
0
9
143
132
82
50
11
1
module Main where import System.Environment import CodeGen main :: IO () main = do args <- getArgs case args of [] -> gene x:xs -> codeGenIO x >>= putStrLn ----
esengie/fpl-exploration-tool
app/Main.hs
bsd-3-clause
179
0
11
48
67
35
32
9
2
{-# LANGUAGE RankNTypes #-} {-# LANGUAGE OverloadedStrings, TupleSections, ScopedTypeVariables #-} -- | Haskell indenter. module HIndent (-- * Formatting functions. reformat ,prettyPrint ,parseMode -- * Style ,Style(..) ,styles ,chrisDone ,johanTibell ,fundamental ,gibiansky -- * Testing ,t...
adamse/hindent
src/HIndent.hs
bsd-3-clause
3,874
0
18
1,109
875
486
389
89
3
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverlappingInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} import Control.Concurrent import ...
anchor/servant-ekg
test/test.hs
bsd-3-clause
2,140
0
14
581
400
215
185
43
3
module Database.Persist.Redis.Parser ( redisToPerisistValues , toValue ) where import Control.Arrow((***)) import Control.Monad (liftM, liftM3) import Control.Exception (throw) import Data.Binary (Binary(..), encode, getWord8, Get) import qualified Data.Binary as Q import qualified Data.ByteString as B imp...
yesodweb/persistent
persistent-redis/Database/Persist/Redis/Parser.hs
mit
5,746
0
21
1,608
1,756
908
848
120
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE CPP #-} -- | -- Module : Site -- Copyright : (C) 2015 Braden Walters -- License : MIT (see LICENSE file) -- Maintainer : (C) Braden Walters <vc@braden-walters.info> -- Stability : experimental -- -- This module is where all the routes and handlers are defined for your --...
meoblast001/quotum-snap
src/Site.hs
mit
5,720
0
23
1,143
1,395
717
678
-1
-1
-- | <http://strava.github.io/api/v3/follow/> module Strive.Actions.Friends ( getCurrentFriends , getFriends , getCurrentFollowers , getFollowers , getCommonFriends ) where import Network.HTTP.Types (toQuery) import Strive.Aliases (AthleteId, Result) import Strive.Client (Client) import Strive.Internal.HTT...
liskin/strive
library/Strive/Actions/Friends.hs
mit
2,054
0
11
293
443
239
204
34
1
-- | -- Module: Math.NumberTheory.Primes.Sieve.Misc -- Copyright: (c) 2011 Daniel Fischer -- Licence: MIT -- Maintainer: Daniel Fischer <daniel.is.fischer@googlemail.com> -- Stability: Provisional -- Portability: Non-portable (GHC extensions) -- {-# LANGUAGE CPP, BangPatterns, ScopedTypeVariables, MonoLoc...
shlevy/arithmoi
Math/NumberTheory/Primes/Sieve/Misc.hs
mit
15,501
0
25
5,696
4,958
2,511
2,447
275
13
{-# LANGUAGE DeriveFunctor #-} -- | Time series data -- -- Intended for qualified import module InputSelection.Evaluation.TimeSeries ( -- * Slot numbers SlotNr(..) , OverallSlotNr , PolicyNr , PolicySlotNr -- * Time series , TimeSeries(..) , toList , fromList , empty , insert , range ...
input-output-hk/pos-haskell-prototype
wallet/test/unit/InputSelection/Evaluation/TimeSeries.hs
mit
4,458
0
13
1,038
904
516
388
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- Derived from AWS service descriptions, licensed under Apache 2.0. -- | -- Module : Network.AWS.CloudSearch.Types.Sum -- ...
olorin/amazonka
amazonka-cloudsearch/gen/Network/AWS/CloudSearch/Types/Sum.hs
mpl-2.0
10,498
0
12
2,920
2,029
1,032
997
286
0
<?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="it-IT"> <title>Support for the Open API Specification | ZAP Extension</title> <maps> <homeI...
veggiespam/zap-extensions
addOns/openapi/src/main/javahelp/org/zaproxy/zap/extension/openapi/resources/help_it_IT/helpset_it_IT.hs
apache-2.0
1,000
80
66
164
423
214
209
-1
-1
{-# LANGUAGE MagicHash, NoImplicitPrelude, BangPatterns, UnliftedFFITypes #-} ----------------------------------------------------------------------------- -- | -- Module : GHC.CString -- Copyright : (c) The University of Glasgow 2011 -- License : see libraries/ghc-prim/LICENSE -- -- Maintainer : cvs-gh...
alexander-at-github/eta
libraries/ghc-prim/GHC/CString.hs
bsd-3-clause
5,493
6
24
1,436
1,240
652
588
-1
-1
main :: IO () main = do putStrLn "Test suite not yet implemented"
zudov/purescript-inspection
test/Spec.hs
bsd-3-clause
69
0
7
16
22
10
12
3
1
{-# LANGUAGE OverloadedStrings, TypeFamilies #-} {-# LANGUAGE DeriveFunctor, DeriveDataTypeable, GeneralizedNewtypeDeriving #-} module Bot.Types ( Action , ActionM , Options(..) , BashCopyOutput(..) , ActionException(..) , Project(..) , Application(..) , Configuration(..) , Command(..) , Arg(..) ...
andregr/bot
lib/Bot/Types.hs
bsd-3-clause
4,050
0
12
794
931
529
402
87
1
import System.Environment(getArgs) main = putStrLn "%%% TEST SETUP.HS INVOKED %%%" >> getArgs >>= mapM_ putStrLn
plumlife/cabal
cabal-install/tests/PackageTests/BuildCompilerFlags/BuildTypeSimple/Setup.hs
bsd-3-clause
113
0
7
15
30
15
15
2
1
{-# LANGUAGE FlexibleContexts, FunctionalDependencies, RankNTypes, TupleSections #-} -- | The client-server communication monads. module Game.LambdaHack.Client.ProtocolClient ( MonadClientReadResponse(..), MonadClientWriteRequest(..) ) where import Game.LambdaHack.Client.MonadClient class MonadClient...
Concomitant/LambdaHack
Game/LambdaHack/Client/ProtocolClient.hs
bsd-3-clause
505
0
9
82
103
59
44
-1
-1
import Test.HUnit (Assertion, (@=?), runTestTT, Test(..), Counts(..)) import System.Exit (ExitCode(..), exitWith) import Phone (areaCode, number, prettyPrint) exitProperly :: IO Counts -> IO () exitProperly m = do counts <- m exitWith $ if failures counts /= 0 || errors counts /= 0 then ExitFailure 1 else ExitSucc...
pminten/xhaskell
phone-number/phone-number_test.hs
mit
1,823
0
12
374
470
241
229
46
2
undefined = undefined class Foo a forceFoo :: Foo a => a -> a forceFoo x = undefined testInherit x = forceFoo x lam = \x -> forceFoo x
bitemyapp/tandoori
input/class-cascade-simple.hs
bsd-3-clause
143
0
6
37
61
30
31
-1
-1
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} -- | Generate HPC (Haskell Program Coverage) reports module Stack.Build.Coverage ( generateHpcReport , generateHpcMar...
kairuku/stack
src/Stack/Build/Coverage.hs
bsd-3-clause
7,976
0
25
2,718
1,499
791
708
134
4
-------------------------------------------------------------------------------- -- | Module exporting convenient pandoc bindings module Hakyll.Web.Pandoc ( -- * The basic building blocks readPandoc , readPandocWith , writePandoc , writePandocWith , renderPandoc , renderPandocWith -...
oldmanmike/hakyll
src/Hakyll/Web/Pandoc.hs
bsd-3-clause
6,706
0
14
1,489
891
480
411
90
12
{-# OPTIONS -fglasgow-exts #-} -- !!! Typechecking of functional dependencies -- Showed up (another) bug in the newtype-squashing machinery module ShouldCompile where class Split2 a b | a -> b, b -> a where combine2 :: (b,b) -> a class Split4 a b | a -> b, b -> a where combine4 :: (b,b) -> a newtype Word1...
hvr/jhc
regress/tests/1_typecheck/2_pass/ghc/tc131.hs
mit
635
0
10
146
192
112
80
-1
-1
module GhcSort () where {-@ type OList a = [a]<{\fld v -> (v >= fld)}> @-} {-@ assert sort3 :: (Ord a) => [a] -> OList a @-} sort3 :: (Ord a) => [a] -> [a] sort3 ls = qsort ls where d = (length ls) qsort:: (Ord a) => [a] -> [a] {-@ qsort:: (Ord a) => xs:[a] -> OList a / [(len xs), 0] @-} qsort [] = [] qso...
mightymoose/liquidhaskell
tests/pos/RecQSort0.hs
bsd-3-clause
941
0
10
269
359
192
167
17
2
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE Trustworthy #-} {-# LANGUAGE DefaultSignatures #-} ----------------------------------------------------------------------------- -- | -- Module : Distribution.Compat.Binary.Class -- Copyright : Lennart Kolmodin -- License : BSD3-style (see LICENSE) -- -- Maintai...
tolysz/prepare-ghcjs
spec-lts8/cabal/Cabal/Distribution/Compat/Binary/Class.hs
bsd-3-clause
17,335
0
26
5,205
4,801
2,580
2,221
264
2
{-# Language BangPatterns #-} {-# Language MagicHash #-} {-# Language TemplateHaskell #-} {-# Language RankNTypes #-} module Small where import Control.Monad import Control.Monad.Trans.Class import Control.Monad.Trans.State import Control.Applicative import Data.Monoid import GHC.Exts --------------------------------...
glguy/advent2016
asmprog-final/Small.hs
isc
2,001
0
12
423
564
307
257
46
5
module Boids where ------------------------------------------------------------------------------ import Linear.V2 import Linear.Vector ------------------------------------------------------------------------------ type Vector = V2 Float type Point = V2 Float type Radius = Float type Speed = Float data Boid = Bo...
cs383-final/cs383-finalproject
src/Boids.hs
mit
4,634
0
12
1,041
707
403
304
60
1
-- Copyright 2013 Thomas Szczarkowski {-# LANGUAGE FlexibleInstances #-} module Bytes where import qualified Data.ByteString as ByteString import qualified Data.ByteString.Lazy as ByteString.Lazy import qualified Data.ByteString.Char8 as Char8 import qualified Data.ByteString.Base64 as ByteString.Base64 import Data....
tom-szczarkowski/matasano-crypto-puzzles-solutions
set4/Bytes.hs
mit
1,721
0
11
338
468
265
203
39
0
module SymbolTable where import qualified Data.Map as Map import Data.Int import Data.List (find, genericLength) import Control.Lens import Debug.Trace (trace) import AST type MiniJavaTable = Map.Map Identifier ClassSymbols type MethodTable = Map...
cirquit/hjc
src/SymbolTable.hs
mit
4,733
0
13
1,057
1,241
689
552
101
2