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 DeriveDataTypeable #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} module Data.IHO.S57.VRID where import Control.Lens import Data.Data (Data) import Data.IHO.S57.Typ...
alios/iho-s57
library/Data/IHO/S57/VRID.hs
bsd-3-clause
7,969
38
19
2,600
2,053
1,087
966
222
5
module Data.ByteString.ShellEscape.EscapeVector where import Data.ByteString.Char8 (ByteString) import qualified Data.ByteString.Char8 as ByteString import Data.Vector (Vector) import qualified Data.Vector as Vector import qualified Data.Vector.Mutable as Vector (new, write) import qualified Data.ByteString.ShellEs...
solidsnack/shell-escape
Data/ByteString/ShellEscape/EscapeVector.hs
bsd-3-clause
1,339
0
12
374
461
252
209
23
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} module Network.Craze.Internal where import Control.Exception (SomeException) import Control.Monad (...
etcinit/craze
src/Network/Craze/Internal.hs
bsd-3-clause
5,920
0
26
1,744
1,879
956
923
160
5
module Sprite.Target where import Graphics.Rendering.OpenGL import Sprite.Class import Sprite.Colors data Target = Target (Vector3 Float) instance Sprite Target where pos (Target v) = v draw (Target v) = do preservingMatrix $ do translate v scale 0.1 0.1 (0.1::Float) renderPrimitive Quads...
flazz/tooHS
src/Sprite/Target.hs
bsd-3-clause
745
0
18
207
320
161
159
21
0
module Tubes.Bot where import Control.Concurrent (threadDelay, forkIO) import Control.Concurrent.STM (TVar, atomically, readTVar, writeTVar, modifyTVar) import Control.Monad (forever, void) import Tubes.Model type Bot = PlayerId -> Universe -> Maybe CompleteAction newLineBot :: Bot newLineBot _botId u = case map st...
fizruk/tubes
src/Tubes/Bot.hs
bsd-3-clause
1,286
0
18
280
472
236
236
30
3
module Compat where import GhcPlugins import DriverPhases ( Phase(..) , phaseInputExt, eqPhase, isHaskellSrcFilename ) import PipelineMonad ( PipelineOutput(..) ) import SysTools ( newTempName ) import qualified Binary as B import System.FilePath --------------------------------------------------...
ezyang/ghc-shake
Compat.hs
bsd-3-clause
4,769
0
12
1,559
954
491
463
86
8
{-# LANGUAGE CPP #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE...
byteally/webapi
webapi-reflex-dom/src/Reflex/Dom/Contrib/MonadRouted.hs
bsd-3-clause
15,233
0
17
3,431
3,890
2,043
1,847
264
2
module GhcNameVersion ( GhcNameVersion (..) ) where import GhcPrelude -- | Settings for what GHC this is. data GhcNameVersion = GhcNameVersion { ghcNameVersion_programName :: String , ghcNameVersion_projectVersion :: String }
sdiehl/ghc
compiler/main/GhcNameVersion.hs
bsd-3-clause
241
0
8
45
38
25
13
6
0
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ConstraintKinds #-} module RPG.Core ( Tag (..) , hasCollision , isFloor , propKey , box , interaction , Has , Eff , Prop , ask , def , lift , liftIO , ...
isovector/rpg-gen
src/RPG/Core.hs
bsd-3-clause
1,419
0
13
430
395
236
159
52
0
module Main where import System.Environment (getArgs) main :: IO () main = do args <- getArgs let width = if (length args == 0) then 80 else (read $ args !! 0) let dataSource = if (length args <= 1) then getContents else readFile (args !! 1) map (take width) . lines <$> dataSource >>= mapM_ putStrLn
ahgilbert/trunc
src/Main.hs
bsd-3-clause
312
2
9
68
131
71
60
8
3
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.Raw.EXT.TextureInteger -- Copyright : (c) Sven Panne 2015 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : portable ...
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/EXT/TextureInteger.hs
bsd-3-clause
1,897
0
4
241
202
142
60
56
0
module Utils.CmdArgParser (Arguments (..), Arg (..), getArguments) where -- this module defines a command line -- argument parser import Control.Applicative hiding (many) import Control.Monad.Identity import Data.List import System.Environment (getArgs) import S...
rodrigogribeiro/mptc
src/Utils/CmdArgParser.hs
bsd-3-clause
3,993
0
13
1,323
1,065
572
493
90
4
-- | Bit-shift style argument re-arrangement module Data.Function.Slip where slipr :: (a -> b -> c -> d) -> b -> c -> a -> d slipr f b c a = f a b c (<~>>) = slipr infixl 8 <~>> slipl :: (a -> b -> c -> d) -> c -> a -> b -> d slipl f c a b = f a b c (<<~>) = slipl infixl 8 <<~> slipr4 :: (a -> b -> c -> d ->...
athanclark/composition-extra
src/Data/Function/Slip.hs
bsd-3-clause
818
0
11
270
494
264
230
25
1
-- TODO repl test file path methods. {-# LANGUAGE OverloadedStrings #-} module Pipe.FileSystem where import Control.Monad import Control.Monad.M import qualified Data.List as L import Data.String.Util import qualified Data.Text as T import Database.SQLite.Simple import ...
jfeltz/dash-haskell
src/Pipe/FileSystem.hs
lgpl-3.0
8,182
3
22
2,032
2,067
1,036
1,031
167
3
module Lang.LamIf.Syntax where import FP newtype RawName = RawName { getRawName :: String } deriving (Eq, Ord) type SRawName = Stamped BdrNum RawName data GenName = GenName { genNameMark :: Maybe Int , genNameRawName :: RawName } deriving (Eq, Ord) newtype LocNum = LocNum Int deriving (Eq, Ord, PartialOrder...
FranklinChen/maam
src/Lang/LamIf/Syntax.hs
bsd-3-clause
1,098
0
9
246
414
232
182
-1
-1
{-# OPTIONS_GHC -cpp #-} ----------------------------------------------------------------------------- -- | -- Module : Distribution.Simple.Configure -- Copyright : Isaac Jones 2003-2005 -- -- Maintainer : Isaac Jones <ijones@syntaxpolice.org> -- Stability : alpha -- Portability : portable -- -- Explana...
FranklinChen/hugs98-plus-Sep2006
packages/Cabal/Distribution/Simple/Configure.hs
bsd-3-clause
18,936
133
27
4,962
4,300
2,236
2,064
305
5
{-# LANGUAGE CPP, RankNTypes, MagicHash, BangPatterns #-} #if __GLASGOW_HASKELL__ >= 701 {-# LANGUAGE Trustworthy #-} #endif #if defined(__GLASGOW_HASKELL__) && !defined(__HADDOCK__) #include "MachDeps.h" #endif ----------------------------------------------------------------------------- -- | -- Module : Data.B...
basvandijk/binary
src/Data/Binary/Get.hs
bsd-3-clause
19,348
0
21
4,173
3,372
1,932
1,440
230
5
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ImpredicativeTypes #-} {-# LANGUAGE RankNTypes #-} -- | LibClang is a Haskell binding to the libclang library, a compiler -- front-end for C-family languages. It allows you to produce and walk -- an AST, get a list of diagnostic warnings a...
chetant/LibClang
src/Clang.hs
bsd-3-clause
6,046
0
13
1,046
990
577
413
97
1
{-# LANGUAGE CPP #-} module UtilsSpec (main, spec) where import Test.Hspec import TestUtils import qualified GHC as GHC import qualified HscTypes as GHC import Control.Exception import Control.Monad.State import Data.List import qualified GhcMod.Types as GM (mpModule) import Language....
RefactoringTools/HaRe
test/UtilsSpec.hs
bsd-3-clause
25,850
0
21
6,579
4,055
1,978
2,077
-1
-1
{-# LANGUAGE BangPatterns #-} foo = case v of !True -> x
bitemyapp/apply-refact
tests/examples/Structure17.hs
bsd-3-clause
57
1
8
12
21
9
12
2
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="hr-HR"> <title>Sequence Scanner | ZAP Extension</title> <maps> <homeID>top</homeID> <ma...
kingthorin/zap-extensions
addOns/sequence/src/main/javahelp/org/zaproxy/zap/extension/sequence/resources/help_hr_HR/helpset_hr_HR.hs
apache-2.0
977
87
29
159
396
212
184
-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="el-GR"> <title>TreeTools</title> <maps> <homeID>treetools</homeID> <mapref location="ma...
thc202/zap-extensions
addOns/treetools/src/main/javahelp/help_el_GR/helpset_el_GR.hs
apache-2.0
960
89
29
155
386
208
178
-1
-1
{-# LANGUAGE BangPatterns, RankNTypes, MagicHash, UnboxedTuples #-} module T5359a (linesT) where import GHC.Base import GHC.Word import GHC.ST (ST(..), runST) nullT :: Text -> Bool nullT (Text _ _ len) = len <= 0 {-# INLINE [1] nullT #-} spanT :: (Char -> Bool) -> Text -> (Text, Text) spanT p t@(Text arr off len) =...
frantisekfarka/ghc-dsi
testsuite/tests/simplCore/should_compile/T5359a.hs
bsd-3-clause
2,494
0
13
702
978
505
473
68
2
{-# LANGUAGE CPP, MagicHash #-} {-# OPTIONS_GHC -optc-DNON_POSIX_SOURCE #-} -- -- (c) The University of Glasgow 2002-2006 -- -- | ByteCodeItbls: Generate infotables for interpreter-made bytecodes module ByteCodeItbls ( ItblEnv, ItblPtr(..), itblCode, mkITbls, peekItbl , StgInfoTable(..) ...
urbanslug/ghc
compiler/ghci/ByteCodeItbls.hs
bsd-3-clause
14,828
0
19
5,270
3,490
1,838
1,652
265
7
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} ...
shlevy/ghc
testsuite/tests/indexed-types/should_compile/T9316.hs
bsd-3-clause
2,804
5
13
503
610
340
270
54
1
{-# LANGUAGE TypeOperators #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE PatternGuards #-} {-# LANGUAGE ViewPatterns #-} {- Copyright (C) 2015 Martin Linnemann <theCodingMarlin@googlemail.com> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License ...
gbataille/pandoc
src/Text/Pandoc/Readers/Odt/Generic/Utils.hs
gpl-2.0
6,112
2
14
1,504
1,362
786
576
70
1
module Level1 where l1 = undefined :: ()
ezyang/ghc
testsuite/tests/ghci/prog015/Level1.hs
bsd-3-clause
42
0
5
9
14
9
5
2
1
data Foo = Foo {x :: Int, str :: String} deriving (Eq, Read, Show, Ord) -- instance Eq Foo where -- (==) (Foo x1 s1) (Foo x2 s2) = (x1 == x2) && (s1 == s2)
fredmorcos/attic
snippets/haskell/classes.hs
isc
164
1
8
44
41
25
16
2
0
{-# OPTIONS_HADDOCK hide, prune #-} module Handler.Mooc.ExpertReview ( postWriteExpertReviewR , writeExpertReview , viewExpertReviews ) where import Control.Monad.Trans.Except import Import import Import.Util import Application.Grading import Application.Edx postWriteExpertReviewR :: ScenarioId -> Handler Va...
mb21/qua-kit
apps/hs/qua-server/src/Handler/Mooc/ExpertReview.hs
mit
5,415
0
18
1,815
673
337
336
-1
-1
module Homework.Week09Spec ( main, spec ) where import Test.Hspec import Homework.Week09.Assignment main :: IO () main = hspec spec spec :: Spec spec = do describe "week 9" $ do it "needs some tests!" $ do pending
jxv/cis-194-winter-2016
test/Homework/Week09Spec.hs
mit
233
0
12
56
76
40
36
12
1
{-# LANGUAGE PackageImports #-} import "haskell-src-exts" Language.Haskell.Exts main = undefined
Pnom/haskell-ast-pretty
Test/examples/PackageImport.hs
mit
98
1
5
11
18
9
9
3
1
main = print . length $ concatMap say [1..999] ++ "onethousand" say :: Int -> String say n = putAnd (hundreds h) (two [o, t]) where (o:t:h:_) = reverse (show n) ++ repeat '0' putAnd "" b = b putAnd a "" = a putAnd a b = a ++ "and" ++ b two "00" = "" two [o,'0'] = ones o two "01" = "ten" two "11" = "eleven" two "2...
nickspinale/euler
complete/017.hs
mit
922
2
8
209
487
223
264
40
1
{-# LANGUAGE BangPatterns, DataKinds, DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module Hadoop.Protos.ClientNamenodeProtocolProtos.MetaSaveResponseProto (MetaSaveResponseProto(..)) where import Prelude ((+), (/)) import qualified Prelude as Prelude' imp...
alexbiehl/hoop
hadoop-protos/src/Hadoop/Protos/ClientNamenodeProtocolProtos/MetaSaveResponseProto.hs
mit
2,861
1
16
531
554
291
263
53
0
module Light.Geometry.VectorTest (tests) where import Test.Framework (Test) import Test.Framework.Providers.QuickCheck2 (testProperty) import qualified Test.QuickCheck as QC import Light.Geometry.Vector instance QC.Arbitrary Vector where arbitrary = QC.vector 3 >>= \ [a, b, c] -> return $ Vector a b c prop_Vector...
jtdubs/Light
testsuite/Light/Geometry/VectorTest.hs
mit
2,551
0
15
594
657
347
310
42
1
{-# LANGUAGE MultiParamTypeClasses , OverloadedStrings #-} module Data.API.LinkedIn.Profile ( ProfileQuery(..) , ProfileResult(..) , CurrentShare(..) , ShareVisibility(..) , ShareSource(..) , ShareAuthor(..) , SiteStandardProfileRequest(..) ) where imp...
whittle/linkedin-api
Data/API/LinkedIn/Profile.hs
mit
16,419
0
31
5,033
3,309
1,774
1,535
285
1
{-# LANGUAGE NoMonomorphismRestriction, FlexibleContexts, TypeFamilies #-} module Main where import Diagrams.Prelude import Diagrams.Backend.SVG.CmdLine sierpinski shape color alignment 1 = shape 1 # fc color sierpinski shape color alignment n = s === (s ||| s) # alig...
jeffreyrosenbluth/NYC-meetup
meetup/SierpinskiGeneral.hs
mit
461
0
9
117
125
66
59
13
1
module ProjectEuler.Problem96 ( problem ) where import Control.Monad import Data.List.Split import Data.Char import qualified Math.SetCover.Exact as ESC import qualified Data.Text as T {- the decision to stick with Set instead of more efficient bit vector, is to make sure that we work with some interface that...
Javran/Project-Euler
src/ProjectEuler/Problem96.hs
mit
2,191
0
17
497
804
438
366
59
2
import Data.Char main = do putStrLn "What's your first name?" firstName <- getLine putStrLn "What's your last name?" lastName <- getLine bigFirstName = map toUpper firstName bigLastName = map toUpper lastName putStrLn $ "hey " ++ bigFirstName ++ " " ++ bigLastName ++ ", ho...
arnabgho/RLearnHaskell
tests/Test.hs
mit
334
2
11
96
84
37
47
-1
-1
{-# OPTIONS_GHC -fno-warn-missing-signatures #-} module Cenary.Lexer where -------------------------------------------------------------------------------- import qualified Text.Parsec.Token as Tok -------------------------------------------------------------------------------- import Cenary.Lexer.Language ...
yigitozkavci/ivy
src/Cenary/Lexer.hs
mit
993
0
6
166
202
108
94
21
1
{-# LANGUAGE FlexibleInstances, OverloadedStrings #-} module Data.BlockChain.Block.Transactions where import Control.Arrow ((&&&), (>>>)) import Control.Monad ((>=>)) import Crypto.Hash import Data.Aeson import qualified Data.ByteString.Char8 as B import qualified Data.ByteString.Lazy.Char8 as BL import Data.Maybe (f...
geophf/1HaskellADay
exercises/HAD/Data/BlockChain/Block/Transactions.hs
mit
3,466
0
27
833
730
419
311
-1
-1
{-# LANGUAGE FlexibleContexts, OverloadedStrings #-} -- | Module : Network.MPD.Commands.Parse -- Copyright : (c) Ben Sinclair 2005-2009, Joachim Fasting 2010 -- License : MIT (see LICENSE) -- Maintainer : Joachim Fasting <joachifm@fastmail.fm> -- Stability : alpha -- -- Parsers for MPD data types. module ...
matthewleon/libmpd-haskell
src/Network/MPD/Commands/Parse.hs
mit
5,693
0
15
1,974
1,596
849
747
91
25
{-# LANGUAGE OverloadedStrings #-} -- This is the complete and final code of nomeata's bot (nomeataintercept2 in -- the game). Feel free to use it for your own bot. If you are successful with -- it, let me know. Or give it a name that ends with "2n". Or both. -- -- 2013 Joachim Breitner <mail@joachim-breitner.de> imp...
nomeata/haskell-spacegoo
nomeatas_bot.hs
mit
4,564
0
17
1,422
1,086
554
532
62
1
import System.Environment import Data.List main = do args <- getArgs progName <- getProgName putStrLn "The arguments are:" mapM putStrLn args putStrLn "The program name is:" putStrLn progName {- $ ./arg_test first second w0t "multi word arg" -}
yhoshino11/learning_haskell
ch9/arg_test.hs
mit
259
0
7
51
57
25
32
9
1
module Station where import Import hiding (set) import qualified Data.ByteString as BS import qualified Data.HashMap.Strict as HM import qualified Data.Set as SET import qualified Data.Text ...
seagreen/station
src/Station.hs
mit
8,906
0
19
2,932
2,269
1,162
1,107
-1
-1
{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE UnicodeSyntax #-} -- | -- Module: Tests.MonoidConfig -- Description: Test cases for monoidal configuration types -- C...
alephcloud/hs-configuration-tools
test/Tests/MonoidConfig.hs
mit
10,367
0
17
1,965
2,994
1,570
1,424
-1
-1
module Tests.Readers.Docx (tests) where import Text.Pandoc.Options import Text.Pandoc.Readers.Native import Text.Pandoc.Definition import Tests.Helpers import Test.Framework import Test.HUnit (assertBool) import Test.Framework.Providers.HUnit import qualified Data.ByteString.Lazy as B import Text.Pandoc.Readers.Docx i...
sapek/pandoc
tests/Tests/Readers/Docx.hs
gpl-2.0
9,052
0
16
2,906
1,423
737
686
223
3
module Fibonacci where fibs :: [Integer] fibs = 0 : 1 : zipWith (+) fibs (tail fibs)
NorfairKing/project-euler
lib/haskell/Fibonacci.hs
gpl-2.0
86
0
8
18
40
23
17
3
1
{-# LANGUAGE NoMonomorphismRestriction #-} module Network.BitTorrent.Shepherd.Utils ( if' , maybeToEither , liftMaybe , (.*) , (.**) ) where import Control.Monad import Prelude as P -- UTILS if' c a b = if c then a else b maybeToEither :: a -> Maybe b -> Either a b maybeToEither errorValue = maybe (Left...
danoctavian/shepherd
src/Network/BitTorrent/Shepherd/Utils.hs
gpl-2.0
578
0
10
140
272
159
113
18
2
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- -- Module : IDE.Metainfo.Provider -- Copyright : (c) Juergen Nicklisch-Franken, Hamish Mackenzie -- License : GNU-GPL --...
jaccokrijnen/leksah
src/IDE/Metainfo/Provider.hs
gpl-2.0
42,113
0
32
14,692
9,787
5,002
4,785
741
8
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-} module Robots3.Inverse where -- $Id$ import Robots3.Data import Robots3.Config import Robots3.Move import Robots3.Nice import Robots3.Final import Robots3.Examples import Robots3.Quiz import Robots3.Generator import Autolib.Reporter import Autolib.ToDoc im...
Erdwolf/autotool-bonn
src/Robots3/Inverse.hs
gpl-2.0
1,489
11
19
355
479
262
217
49
1
{-# LANGUAGE OverloadedLists #-} module Kalkulu.Builtin.Function (functionBuiltins) where import Control.Monad import qualified Data.Vector as V import Kalkulu.Builtin import qualified Kalkulu.Pattern as Pattern import qualified Kalkulu.BuiltinSymbol as B functionBuiltins :: [(B.BuiltinSymbol, BuiltinDefinition)] f...
vizietto/kalkulu
src/Kalkulu/Builtin/Function.hs
gpl-3.0
3,325
0
12
657
1,158
616
542
81
8
{- My solution to http://codekata.com/kata/kata02-karate-chop/ - Kata #02 from - codekata.com - Author: Donovan Finch - Goal: a binary search of a sorted integer list. - -} chop :: Int -> [Int] -> Int
finchd/kata.hs
karatechop.hs
gpl-3.0
208
0
7
41
21
11
10
1
0
module HLinear.Matrix ( Matrix(..) , IsMatrix(..) , IsMatrixFactorization(..) , MatrixInvertible , (!) , (!?) , fromVectors , fromVectors' , fromLists , fromLists' , fromColumns , fromColumns' , fromVectorsSafe , fromVectorsSafe' , fromListsSafe , fromListsSafe' , fromColumnsSaf...
martinra/hlinear
src/HLinear/Matrix.hs
gpl-3.0
1,044
0
6
225
233
158
75
55
0
{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} ---------------------------------------------------------------------- -- | -- Module : Text.Doc.Writer.Epub -- Copyright : 2015-2017 Mathias Schenner, -- 2015-2016 Language Science Press. -- License : GPL-3 -- -- Maintainer : mschen...
synsem/texhs
src/Text/Doc/Writer/Epub.hs
gpl-3.0
17,448
0
20
3,328
4,028
2,183
1,845
309
2
------------------------------------------------------------------------------ -- -- LANGLANGDATA.HS -- -- Copyright © 2009-2010, Rehno Lindeque. All rights reserved. -- ------------------------------------------------------------------------------ module LangLang.Data where {- DOCU...
rehno-lindeque/poet
src/haskell/LangLang/Data.hs
gpl-3.0
1,425
0
7
568
127
84
43
19
0
module Experiment.Process where import Prelude import System.Directory import System.Environment (</>) :: String -> String -> String d </> f = d ++ "/" ++ f main :: IO() main = do [d] <- getArgs fs <- fmap (filter ((== "time") . take 4)) $ getDirectoryContents d avgs <- mapM (\ f ...
shayan-najd/QFeldspar
Experiment/Process.hs
gpl-3.0
748
0
19
362
225
115
110
18
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/PretargetingConfig/List.hs
mpl-2.0
3,198
0
12
679
318
194
124
52
1
{-# OPTIONS_GHC -fno-warn-type-defaults #-} {-# LANGUAGE RecordWildCards #-} import Data.Foldable (for_) import Test.Hspec (Spec, describe, it, shouldBe) import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith) -- base >= 4.8 re-exports Control.Applicative.(<$>). import Control.Applicative -- Th...
daewon/til
exercism/haskell/sum-of-multiples/test/Tests.hs
mpl-2.0
2,622
0
11
1,200
596
369
227
58
1
{-# LANGUAGE Arrows, FlexibleContexts #-} module BoTox.Bots.RollBot where import BoTox.Types import BoTox.Utils import BoTox.Utils.DiceParser import Control.Auto hiding (many) import Control.Auto.Effects import Control.Monad import Control.Monad.IO.Class import Data.Function (on) import Data.List import Prelude hidin...
gordon-quad/botox
src/BoTox/Bots/RollBot.hs
agpl-3.0
2,179
8
21
478
846
432
414
48
4
import Control.Concurrent(forkIO,threadDelay) import Data.ByteString(ByteString,pack) import Data.Char(ord) import Data.Time(UTCTime,addUTCTime,getCurrentTime) import Data.Word(Word32) import Network(PortNumber,Socket,sClose,withSocketsDo) import System.Environment(getArgs) import Cache( Cache(get,set,add,replace,...
qpliu/lecache
hs/server.hs
lgpl-3.0
5,223
3
13
1,454
1,477
748
729
109
12
module Handler.Home where import Import -- This is a handler function for the GET request method on the HomeR -- resource pattern. All of your resource patterns are defined in -- config/routes -- -- The majority of the code you will write in Yesod lives in these handler -- functions. You can spread them across multip...
jml/haverer-api
Handler/Home.hs
apache-2.0
565
0
12
123
66
35
31
9
1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE StaticPointers #-} module MapIOSpec where import Spark import Data.List (sort) import Control.Monad import Control.Distributed.Process import Control.Distributed.Static hiding (initRemoteTable) import Control.Distributed.Process.Closure import Control.Distributed.Pr...
yogeshsajanikar/hspark
test/MapIOSpec.hs
apache-2.0
1,915
0
20
484
557
286
271
51
1
module Positron.Util ( toByteString , for ) where import Positron.Import -- data types import qualified Data.ByteString.Builder as B import qualified Data.ByteString.Lazy as LB (toStrict) toByteString :: Builder -> ByteString toByteString = LB.toStrict . B.toLazyByteString for :: Functor f => f a -> (a...
xtendo-org/positron
library/Positron/Util.hs
apache-2.0
350
0
9
69
106
62
44
10
1
{-# LANGUAGE OverloadedStrings #-} module ScoreSpec (spec) where import Prelude hiding (minimum) import Test.Hspec import Score (Input(..), Choice(..), minimum, score) spec :: Spec spec = do describe "minimum" $ do it "is a safe version of Prelude.minimum that does not choke on empty inputs" $ minimum (...
supki/wybor
test/ScoreSpec.hs
bsd-2-clause
1,191
0
17
297
355
185
170
26
1
{-# LANGUAGE CPP, NoImplicitPrelude, DeriveDataTypeable #-} #if __GLASGOW_HASKELL__ >= 704 {-# LANGUAGE Trustworthy #-} #endif {-# OPTIONS_HADDOCK hide #-} -------------------------------------------------------------------------------- -- | -- Module : System.USB.IO.StandardDeviceRequests -- Copyright : (c...
alex1818/usb
System/USB/IO/StandardDeviceRequests.hs
bsd-3-clause
11,557
2
12
3,162
1,606
963
643
167
2
{-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE...
achirkin/easytensor
dimensions/src/Numeric/Tuple/Lazy.hs
bsd-3-clause
7,745
3
13
2,507
2,286
1,275
1,011
-1
-1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} module Toy.Lang.Data where import Control.Lens (makePrisms) import Control.Monad.Error.Class (MonadError (..)) import Control.Monad.Reader (MonadReader) import Control.Monad.State (MonadSt...
Martoon-00/toy-compiler
src/Toy/Lang/Data.hs
bsd-3-clause
4,243
0
12
1,195
1,168
654
514
-1
-1
module FR.Region (towns, roads, mountains) where import FR.Poi import FR.Points import FR.Terrain mountains :: [Terrain] mountains = [ (Terrain Mountain [ np (FP 98 238), np (FP 126 239) , np (FP 124 260), np (FP 131 267) ,...
Codas/HWorldGen
src/FR/Region.hs
bsd-3-clause
7,000
0
11
3,771
2,804
1,462
1,342
132
1
-- | -- Module : Math.Probable -- Copyright : (c) 2014 Alp Mestanogullari -- License : BSD3 -- Maintainer : alpmestan@gmail.com -- Stability : experimental -- Portability : GHC -- -- Easy, composable and efficient random number generation, -- with support for distributions over a finite set -- and...
alpmestan/probable
src/Math/Probable.hs
bsd-3-clause
608
0
5
141
47
36
11
6
0
module Main where import Control.Monad.Except import Lexer import Parser import TypeCheck import Eval import TAC import AST main = do a <- readFile "samples/fib.txt" let c = either (const []) id $ scanner a print $ program c getAST = do a <- readFile "samples/factorial.txt" let c = either (const [...
VyacheslavHashov/parus
app/Main.hs
bsd-3-clause
491
0
14
118
198
98
100
19
1
{-# LANGUAGE Rank2Types #-} {-# LANGUAGE TypeFamilies #-} module B.Oracle ( Oracle(..) ) where import B.Question data Oracle m = Oracle { get :: (Question q, m ~ AnswerMonad q) => q -> m (Maybe (Answer q)) , put :: (Question q, m ~ AnswerMonad q) => q -> Answer q -> m () , recheck :: (Question q, m ~ Answ...
strager/b
B/Oracle.hs
bsd-3-clause
527
0
15
158
221
117
104
16
0
-- {-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE ExplicitForAll #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeFamilyDependencies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE UndecidableInstances #-} module LSI...
gdeest/lsi-systems
src/LSI/Grid.hs
bsd-3-clause
1,712
0
14
387
699
376
323
38
1
----------------------------------------------------------------------------- -- | -- Module : Control.Exception -- Copyright : (c) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : libraries@haskell.org -- Stability : experimental -- Port...
alekar/hugs
packages/base/Control/Exception.hs
bsd-3-clause
18,885
262
15
3,735
2,249
1,311
938
137
3
{-# LANGUAGE CPP #-} #if !defined(TESTING) && __GLASGOW_HASKELL__ >= 703 {-# LANGUAGE Safe #-} #endif ----------------------------------------------------------------------------- -- | -- Module : Data.Map.Lazy -- Copyright : (c) Daan Leijen 2002 -- (c) Andriy Palamarchuk 2008 -- License : ...
ekmett/containers
Data/Map/Lazy.hs
bsd-3-clause
4,815
0
5
1,309
455
333
122
107
0
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TupleSections #-} module Lib ( withLdap, Username(..), ProjectId(..), attrMatch, pluckAttr, getMemberUid, getSshPublicKey, listUsers, listUserData, Ldap, Host(..), PortNumber, Dn(..), ...
futuresystems/ldapget
src/Lib.hs
bsd-3-clause
2,015
0
12
509
637
357
280
54
1
{-# LANGUAGE LambdaCase, ScopedTypeVariables #-} -- | Matrix datatype and operations. -- -- Every provided example has been tested. -- Run @cabal test@ for further tests. module Data.Matrix ( -- * Matrix type Matrix , prettyMatrix , nrows , ncols , forceMatrix -- * Builders , matrix , rowVector ...
kenta2/matrix
Data/Matrix.hs
bsd-3-clause
50,551
1
22
14,959
14,850
7,950
6,900
-1
-1
module MBE.Store ( store ) where import Data.List import MDB.PHashMap import qualified Data.ByteString as B import qualified Data.ByteString.Char8 as C import qualified Data.Word as W punctuation :: B.ByteString punctuation = C.pack ",.;!? " noPunctuation :: W.Word8 -> Bool noPunctuation = flip B.notElem pun...
c-14/hmctg
src/MBE/Store.hs
bsd-3-clause
1,087
0
12
222
440
236
204
27
1
{-# LANGUAGE TemplateHaskell #-} -- | -- Lenses for several data types of the 'Distribution.Version' module. -- All lenses are named after their field names with a 'L' appended. module CabalLenses.Version where import Distribution.Version import Control.Lens versionBranchL :: Iso' Version [Int] versionBranchL = is...
dan-t/cabal-lenses
lib/CabalLenses/Version.hs
bsd-3-clause
1,199
0
9
232
270
141
129
24
2
{-# OPTIONS_GHC -XBangPatterns #-} ----------------------------------------------------------------------------- -- Module : Math.Statistics -- Copyright : (c) 2008 Marshall Beddoe -- License : BSD3 -- -- Maintainer : mbeddoe@<nospam>gmail.com -- Stability : experimental -- Portability : portable -- -- D...
lingxiao/CIS700
src/Statistics.hs
bsd-3-clause
6,939
0
16
1,850
2,450
1,302
1,148
-1
-1
module TPMUtil where import TPM import Data.ByteString.Lazy hiding (putStrLn) import Data.Word import Data.Binary import Codec.Crypto.RSA hiding (sign, verify) tpm :: TPMSocket tpm = tpm_socket "/var/run/tpm/tpmd_socket:0" ownerPass :: String ownerPass = "adam" srkPass :: String srkPass = "" aikPass :: String ai...
armoredsoftware/protocol
tpm/mainline/protoMonad/TPMUtil.hs
bsd-3-clause
3,333
0
11
691
820
406
414
80
1
{-# LANGUAGE OverloadedStrings #-} module Analyzer where import Control.Comonad.Cofree import Control.Lens hiding (children) import Data.Data.Lens import Data.List (sort, group, nub) import Data.Maybe import Data.Monoid import qualified Data.Text as T import Types extractNamespaceAndRequires :: AST -> Maybe (Namesp...
ethercrow/unused-defns
Analyzer.hs
bsd-3-clause
2,674
0
19
863
969
518
451
70
7
module Common ( module Test.QuickCheck , module Test.HUnit , module Arbitrary , module Text.Printf , module Test.Framework , module Test.Framework.TH , module Test.Framework.Providers.QuickCheck2 , module Test.Framework.Providers.HUnit , assertQuickCheck ) where import Text.Printf import Test.Quick...
frenetic-lang/netcore-1.0
testsuite/Common.hs
bsd-3-clause
718
0
11
112
179
108
71
24
2
{-| -} module Integrate where -- interval-coefficient polynomials: import Numeric.AERN.Poly.IntPoly (IntPoly, IntPolySizeLimits(..), IntPolyEffort(..), defaultIntPolySizeLimits) import Numeric.AERN.Poly.IntPoly.Interval () --import Numeric.AERN.Poly.IntPoly.Plot () -- intervals generic in the type of its endpoi...
michalkonecny/aern
aern-poly-plot-gtk/demos/Integrate.hs
bsd-3-clause
4,018
0
12
1,044
650
391
259
59
2
module Doukaku.HukashigiTest (tests) where import Distribution.TestSuite import Doukaku.TestHelper import qualified Doukaku.Hukashigi as Hukashigi tests :: IO [Test] tests = createTests $ newDoukakuTest { tsvPath = "test/Doukaku/hukashigi.tsv" , solve = Hukashigi.solve }
hiratara/doukaku-past-questions-advent-2013
test/Doukaku/HukashigiTest.hs
bsd-3-clause
280
0
8
39
65
40
25
8
1
{-# OPTIONS_GHC -fdefer-typed-holes #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeOperators #-} module Api where import Backend import Control.Lens hidin...
nejla/auth-service
service/src/Api.hs
bsd-3-clause
15,654
0
26
4,816
3,393
1,697
1,696
-1
-1
---------------------------------------------------------------- -- Модуль приложения -- Графический интерфейс (UI) -- Виджет ГИП ---------------------------------------------------------------- module WebUI.Widgets.UIWidget ( UI (..) , AdaptableUI , UIColor (..) , UIPosition (..) , UIImage (..) ...
iqsf/HFitUI
src/WebUI/Widgets/UIWidget.hs
bsd-3-clause
78,005
0
19
17,707
18,173
9,588
8,585
1,090
5
module Download ( checkForNewDownloads , doDownload , starredDownloadLink ) where import Control.Monad (forM_, unless) import Control.Monad.IO.Class (liftIO) import Control.Monad.Reader (asks) import qualified Data.List as L import ...
jamesdabbs/zorya
src/Download.hs
bsd-3-clause
2,818
0
14
714
856
456
400
-1
-1
{-# LANGUAGE MultiParamTypeClasses, FlexibleContexts, TypeFamilies #-} {-# LANGUAGE ConstraintKinds #-} {-# OPTIONS -Wall #-} module RegisterMachine.Models.CMA8 ( Lang(..), prog, mach, trans ) where import Basic.Types import Basic.MemoryImpl (ListMem, fillMem, Address(..), SingleLoc) import Basic.Features import ...
davidzhulijun/TAM
RegisterMachine/Models/CMA8.hs
bsd-3-clause
1,512
0
10
252
499
265
234
27
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TemplateHaskell #-} {-| Module : Stack.Sig.Sign Description : Signing Packages Copyright : (c) FPComplete.com, 2015 License : BSD3 Maintainer : Tim Dysinger <tim@fpcomplete.com> Stability...
narrative/stack
src/Stack/Sig/Sign.hs
bsd-3-clause
5,626
0
24
1,720
1,380
711
669
111
5
{-# LANGUAGE OverloadedStrings #-} module Matching.Server.Views where import Control.Concurrent import Data.ByteString.Lazy (ByteString) import Data.String.Conv import Data.Text (Text) import Matching import Text.Blaze.Html.Renderer.Utf8 import Text.Blaze.Html5 as H import Text.Blaze.Html5.Attributes as A landingPag...
lorcanmcdonald/regexicon
src/Matching/Server/Views.hs
mit
1,917
0
19
451
589
289
300
54
4
{- | Module : $Header$ Description : compute the normal forms of all nodes in development graphs Copyright : (c) Christian Maeder, DFKI GmbH 2009 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : provisional Portability : non-portable(Logic) compute norm...
nevrenato/HetsAlloy
Proofs/NormalForm.hs
gpl-2.0
9,638
52
20
3,462
2,392
1,286
1,106
180
9
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -- ...
olorin/amazonka
amazonka-opsworks/gen/Network/AWS/OpsWorks/AssignVolume.hs
mpl-2.0
4,075
0
12
861
492
298
194
68
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-cognito-identity/gen/Network/AWS/CognitoIdentity/UnlinkDeveloperIdentity.hs
mpl-2.0
5,137
0
9
1,089
563
342
221
74
1
module Handler.Privacy where import Import import Widgets.Doc getPrivacyR :: Handler Html getPrivacyR = defaultLayout $ do snowdriftTitle "Privacy Policy" renderDoc "Privacy Policy"
chreekat/snowdrift
Handler/Privacy.hs
agpl-3.0
193
0
8
33
43
22
21
7
1
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} module Ambiata.Cli.Incoming ( processDir , scanIncoming , hashOfFile , processFile , hashFileOf , cleanUpArchived , cleanUpHashfiles , prepareDir , vis...
ambiata/tatooine-cli
src/Ambiata/Cli/Incoming.hs
apache-2.0
8,974
0
15
2,202
2,445
1,226
1,219
176
5
module Main (main) where import Language.Haskell.HLint (hlint) import System.Exit (exitFailure, exitSuccess) arguments :: [String] arguments = [ "lib" , "src" , "test" ] main :: IO () main = do hints <- hlint arguments if null hints then exitSuccess else exitFailure
thsutton/aeson-diff
test/hlint-check.hs
bsd-2-clause
313
0
8
87
94
54
40
14
2
{-# LANGUAGE Rank2Types, ImpredicativeTypes #-} -- | Program entry point & coordination of compilation process module Main where -- Note: for the time being I converted most of this to explicit exports -- to get a better overview what is where /jens import Language.Java.Paragon.Syntax (CompilationUnit) import Language...
bvdelft/parac2
src/Language/Java/Paragon.hs
bsd-3-clause
10,461
0
16
2,763
2,047
1,109
938
150
5
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} -- | Prettyprinting STG elements in various formats. module Stg.Language.Prettyprint ( PrettyStgi(..), StgiAnn(..), StateAnn(..), AstAnn(..), renderRich, renderPlain, ) where ...
quchen/stg
src/Stg/Language/Prettyprint.hs
bsd-3-clause
2,755
0
13
799
516
293
223
57
10
import Development.Shake main :: IO () main = shake $ do "a" *> \x -> do need ["b"] "b" *> \x -> do need ["a"] -- Because we "want" the two files simultaneously, they will each get -- built on a different thread. This causes the current (simpleminded) cycle -- detector to not detec...
beni55/openshake
tests/cyclic-harder/Shakefile.hs
bsd-3-clause
351
0
13
101
82
42
40
8
1
-- {-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE ImplicitParams, RankNTypes #-} -- This program failed to typecheck in an early version of -- GHC with impredicative polymorphism, but it was fixed by -- doing pre-subsumption in the subsumption check. -- Trac bug #821 module ShouldCompile where type...
rahulmutt/ghcvm
tests/suite/typecheck/compile/tc208.hs
bsd-3-clause
381
0
6
66
39
27
12
5
1