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 #-} -- Copyright (C) 2010-2011 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 -- an...
jmillikin/anansi
lib/Anansi/Loom/LaTeX.hs
gpl-3.0
2,452
12
16
517
521
265
256
48
6
-- | This module contains everything concerning the MIDI devices / events module MidiFun where import DisplayInfo import Euterpea.IO.MIDI.MidiIO import Euterpea -- | Returns the first found midi input device getFirstInputID :: IO InputDeviceID getFirstInputID = do (((deviceID,_):_) ,_) <- getAllDevices retur...
flofehrenbacher/music-project
EasyNotes/MidiFun.hs
gpl-3.0
3,255
0
16
669
828
434
394
52
3
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module StepAggregate (VariantAggregate(..), stepAggregator) where import Data.Conduit (ConduitT) import qualified Data.Conduit.Combinators as C import Data.Funct...
merijn/GPU-benchmarks
benchmark-analysis/src/StepAggregate.hs
gpl-3.0
4,323
0
15
1,087
1,074
580
494
93
2
{-# 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-storagegateway/gen/Network/AWS/StorageGateway/ListTagsForResource.hs
mpl-2.0
6,047
0
14
1,355
936
556
380
112
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Workspaces/Tags/Delete.hs
mpl-2.0
5,359
0
16
1,110
706
413
293
107
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-ec2/gen/Network/AWS/EC2/DeleteSubnet.hs
mpl-2.0
3,318
0
9
737
398
243
155
51
1
{-| Module : PlayerBase Description : Модуль с определением типа системы ввода (игрока) License : LGPLv3 -} module PlayerBase where import Kernel( Game , Color , Coord , CoordPair ) -- | Тип абстрактного игрока. Может быть как произвольным интерфейсом для -...
cmc-haskell-2015/checkers
src/PlayerBase.hs
lgpl-3.0
990
0
13
233
89
53
36
9
0
module RulesGen.Parser( parseRules ) where import Data.List(foldl') import qualified Data.Map as Map import RulesGen.Rules parseRules :: String -> Rules parseRules = Rules . foldl' addToRules Map.empty . lines addToRules :: Map.Map NonterminalID Rule -> String -> Map.Map NonterminalID Rule addToRules rs line ...
arotenberg/rulesgen
src/RulesGen/Parser.hs
apache-2.0
1,424
0
11
296
594
315
279
30
2
{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} module Spark.Core.CachingSpec where import Test.Hspec import qualified Data.Text import Spark.Core.Context import Spark.Core.Functions import Spark.Core.Column import Spark.Core.ColumnFunctions import Spark.Core.StructuresInternal(ComputationI...
krapsh/kraps-haskell
test-integration/Spark/Core/CachingSpec.hs
apache-2.0
1,214
0
13
237
334
174
160
31
1
{-# LANGUAGE DoAndIfThenElse #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE PatternGuards #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE TypeFamilies #-} -- | Hindley-Milner type inference...
yliu120/K3
src/Language/K3/Analysis/HMTypes/Inference.hs
apache-2.0
69,573
0
23
19,153
24,988
12,485
12,503
1,196
46
{-# LANGUAGE NamedFieldPuns, RecordWildCards #-} module Convenience where import Graphics.SpriteKit -- Define a texture based on the image data in the given file, while also -- determining its width and height. -- defineTexture :: FilePath -> (Texture, GFloat, GFloat) defineTexture path = (tex, sizeWidth, sizeHei...
gckeller/shades
Shades.hsproj/Convenience.hs
bsd-2-clause
1,456
0
9
234
291
154
137
23
1
-- | Peer proceeses {-# LANGUAGE ScopedTypeVariables, BangPatterns, FlexibleContexts #-} module Process.Peer ( -- * Interface Process.Peer.start -- * Tests , Process.Peer.testSuite ) where import AdaptGhcVersion import Control.Concurrent import Control.Concurrent.STM import Control.DeepSeq impor...
jlouis/combinatorrent
src/Process/Peer.hs
bsd-2-clause
30,257
1
20
9,570
8,423
4,227
4,196
687
17
module Data.CRF.Chain1.Constrained.DAG.Dataset.External ( Sent , SentL , module Data.CRF.Chain1.Constrained.Dataset.External ) where import Prelude hiding (Word) -- import qualified Data.Set as S -- import qualified Data.Map as M -- import qualified Data.DAG as DAG import Data.DAG (DAG) -- import...
kawu/crf-chain1-constrained
src/Data/CRF/Chain1/Constrained/DAG/Dataset/External.hs
bsd-2-clause
691
0
7
133
119
80
39
9
0
-- | -- -- Copyright: -- This file is part of the package addy. It is subject to the license -- terms in the LICENSE file found in the top-level directory of this -- distribution and at: -- -- https://github.com/pjones/byline -- -- No part of this package, including this file, may be copied, -- modified, ...
pjones/byline
src/Byline.hs
bsd-2-clause
5,043
0
14
1,198
626
388
238
-1
-1
{-# LANGUAGE NamedFieldPuns #-} module Jerimum.Tests.Integration.Resource where import Control.Concurrent import Control.Monad import Control.Monad.Trans.Resource import Control.Monad.Writer import qualified Data.ByteString.Char8 as B import Data.Maybe import q...
dgvncsz0f/nws
test/Jerimum/Tests/Integration/Resource.hs
bsd-3-clause
7,064
0
14
1,616
2,000
1,008
992
162
2
{-# LANGUAGE OverloadedStrings #-} -- | Purported Responsible Domain, RFC 4407. module Network.DomainAuth.PRD.PRD ( PRD , initialPRD, pushPRD , decidePRD, decideFrom ) where import Control.Monad import qualified Data.ByteString.Char8 as BS import Data.Char import Data.List (foldl') import Network.DNS (Doma...
kazu-yamamoto/domain-auth
Network/DomainAuth/PRD/PRD.hs
bsd-3-clause
5,915
0
10
1,508
1,047
602
445
83
5
module Numeric.Optimizations where import Numeric.Optimizations.Unconstrained
felipeZ/OptimizationAlgorithms
Numeric/Optimizations.hs
bsd-3-clause
81
0
4
8
12
8
4
2
0
module Day20 (part1,part2,test1, part1Solution,part2Solution,range1,numRestricted,restricted) where import Data.List import Data.Maybe import Data.Monoid import Data.Set (Set) import qualified Data.Set as Set import Text.Trifecta fromSuccess :: Result x -> x...
z0isch/aoc2016
src/Day20.hs
bsd-3-clause
2,209
0
14
501
932
499
433
49
1
-- | RVM regression model module Numeric.BMML.RVMR ( fit , predict ) where import Numeric.LinearAlgebra.Data (Matrix, Vector) import qualified Numeric.LinearAlgebra.HMatrix as H data RVMRModel = RVMRModel { mean :: Vector Double , covariance :: Matrix Double , optbeta :: Double } initAlp...
DbIHbKA/BMML
src/Numeric/BMML/RVMR.hs
bsd-3-clause
2,444
0
16
938
914
484
430
72
3
{-# LANGUAGE LambdaCase #-} module SNEK.CheckSpec ( spec ) where import Control.Lens ((%~)) import Data.Function ((&)) import SNEK.AST (TE(..), VE(..)) import SNEK.Check import SNEK.Symbol (TS(..), VS(..)) import SNEK.Type ((*->*), (~->~), K(..), T(..)) import Test.Hspec import qualified Data.Map as Map spec :: Spec...
rightfold/snek
test/SNEK/CheckSpec.hs
bsd-3-clause
3,183
0
25
947
1,401
680
721
78
10
-- Coltrane, a minimal web framework. -- Sean Welleck | Yuanfeng Peng | 2013 module Coltrane ( coltrane, get, post, put, delete, addroute, addroutes, html, text, json, file, htmlFile, setBody, setStatus, setHeader, addHeader, param, request, throwError, catchError ) where import ColtraneTypes import qu...
wellecks/coltrane
Coltrane.hs
bsd-3-clause
9,085
0
15
2,332
2,703
1,390
1,313
167
5
{-# LANGUAGE CPP #-} -- | Most of client interface. module HaskellCI.Cli where import HaskellCI.Prelude import System.Exit (exitFailure) import System.FilePath.Posix (takeFileName) import System.IO (hPutStrLn, stderr) import qualified Options.Applicative as O import HaskellCI.Config import Ha...
hvr/multi-ghc-travis
src/HaskellCI/Cli.hs
bsd-3-clause
6,269
0
16
1,349
1,554
796
758
113
6
{-# LANGUAGE OverloadedStrings, TypeFamilies #-} module QueryArrow.RPC.Service.Service.UDS where import QueryArrow.DB.DB import Control.Monad.Trans.Resource import Control.Monad.Except import System.Log.Logger import QueryArrow.Control.Monad.Logger.HSLogger () import Control.Concurrent import System.IO (IOMode(..)) i...
xu-hao/QueryArrow
QueryArrow-rpc-socket/src/QueryArrow/RPC/Service/Service/UDS.hs
bsd-3-clause
2,124
0
30
799
475
242
233
44
0
{-# LANGUAGE Safe #-} {-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- | -- Module : System.Environment -- Copyright : (c) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : libraries@haskel...
jstolarek/ghc
libraries/base/System/Environment.hs
bsd-3-clause
13,883
142
17
2,898
2,348
1,284
1,064
138
3
{-# LANGUAGE GADTs #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} -- -- Copyright (c) 2009-2011, ERICSSON AB -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modificatio...
emwap/feldspar-language
src/Feldspar/SimpleVector/Push.hs
bsd-3-clause
7,760
0
21
2,037
2,254
1,160
1,094
111
1
module Graphics.FunGL.Uniforms ( UniformLoc(..) , getUniformLocation -- get slot id for uniform , bindUniform1f -- bind Float , bindUniform1i -- bind Int , bindUniform44f -- bind matrix 4x4 , bindUniform33f -- bind matrix 3x3 , bindUniform22f -- bind matrix 2x1 ) where import Foreign.Ptr import Foreign...
FunPixCode/fungl
src/Graphics/FunGL/Uniforms.hs
bsd-3-clause
1,914
0
11
335
526
274
252
40
2
-- Copyright : (C) 2009 Corey O'Connor -- License : BSD-style (see the file LICENSE) {-# LANGUAGE MagicHash #-} module Bind.Marshal.DesAction.Base where import Bind.Marshal.Prelude import Bind.Marshal.Action.Base import Control.DeepSeq import GHC.Prim import System.IO data DesTag type DesBuffer = Buffer...
coreyoconnor/bind-marshal
src/Bind/Marshal/DesAction/Base.hs
bsd-3-clause
446
0
7
78
82
50
32
-1
-1
{-# LANGUAGE QuasiQuotes, TypeFamilies #-} import File.Binary import File.Binary.Data.BigEndian import System.Environment import Data.Word main = do [f] <- getArgs cnt <- readBinaryFile f print $ readPNG cnt test = readPNG `fmap` readBinaryFile "tmp/out.png" instance RetType Word32 where type Argument Word32 = ...
YoshikuniJujo/binary-file
examples/old/simplePNG.hs
bsd-3-clause
746
0
9
136
196
104
92
20
1
{-# LANGUAGE OverloadedStrings #-} module Network.Sasl.ScramSha1.Fields (readFields) where import qualified Data.ByteString.Char8 as BSC readFields :: BSC.ByteString -> [(BSC.ByteString, BSC.ByteString)] readFields = map sepKV . sepByComma sepKV :: BSC.ByteString -> (BSC.ByteString, BSC.ByteString) sepKV bs = case ...
YoshikuniJujo/sasl
src/Network/Sasl/ScramSha1/Fields.hs
bsd-3-clause
553
0
12
86
225
129
96
13
2
-------------------------------------------------------------------------------- -- Copyright © 2011 National Institute of Aerospace / Galois, Inc. -------------------------------------------------------------------------------- -- | Stream construction. {-# LANGUAGE Safe #-} module Copilot.Language.Operators.Tempor...
niswegmann/copilot-language
src/Copilot/Language/Operators/Temporal.hs
bsd-3-clause
837
0
8
152
210
118
92
16
1
module HVX.DcpTests.OkConvexNondecConvex where import HVX main :: IO () main = do let x = EVar "x" _ = hexp $ hexp x _ = logsumexp $ hexp x return ()
chrisnc/hvx
test/DcpTests/OkConvexNondecConvex.hs
bsd-3-clause
168
0
11
49
71
35
36
8
1
module Tc.Class (Class (..), Inst (..)) where import Language.Haskell.Exts hiding (name) import Tc.Assumption import Utils.Id -- this module defines a data type for -- representing class and instances -- to be used in type inference data Class = Class { name :: Id, parameters :: [Ty...
rodrigogribeiro/mptc
src/Tc/Class.hs
bsd-3-clause
1,883
0
13
716
626
342
284
46
2
{-# LANGUAGE NoImplicitPrelude , UnicodeSyntax , PackageImports , RecordWildCards #-} module Text.Numeral.Render ( -- * Rendering numerals render -- * Representation of numerals , Repr(..) , ScaleRepr , defaultRepr -- * Context of expressions , C...
telser/numerals
src/Text/Numeral/Render.hs
bsd-3-clause
9,121
0
16
3,111
2,283
1,215
1,068
127
11
module Main where import Protolude hiding (evaluate) import Common.ParserT (ParserError) import Evaluator (eval) import Lexer (lex) import Parser (parse) import System.Environment (getArgs) main :: IO () main = getArgs >>= traverse_ evalFile evalFile :: FilePath -> ...
noraesae/monkey-hs
src/Main.hs
bsd-3-clause
711
0
16
203
255
128
127
23
3
module Standard where and' :: [Bool] -> Bool and' [] = True and' (b:bs) | b == True = and' bs | otherwise = False -- and' [True, False] -- False -- and' [True, True] -- True -- their second example, short, but -- I like mine above better because I'm -- trying to cut the recursion short -- if we fail but maybe...
brodyberg/Notes
ProjectRosalind.hsproj/LearnHaskell/lib/HaskellBook/StandardChapter9.hs
mit
3,129
0
11
782
949
513
436
57
2
{- | Module : ./CoCASL/Parse_AS.hs Description : Parser for CoCASL Copyright : (c) Christian Maeder, Uni Bremen 2004 License : GPLv2 or higher, see LICENSE.txt Maintainer : hausmann@informatik.uni-bremen.de Stability : provisional Portability : portable Parser for CoCASL -} module CoCASL.Parse_AS...
spechub/Hets
CoCASL/Parse_AS.hs
gpl-2.0
3,809
0
17
870
1,239
600
639
102
2
{-# LANGUAGE FlexibleContexts #-} -- Handles all `-L` operations {- Copyright 2012, 2013, 2014 Colin Woodbury <colingw@gmail.com> This file is part of Aura. Aura 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...
joehillen/aura
src/Aura/Commands/L.hs
gpl-3.0
2,634
0
15
614
585
311
274
43
1
{-# LANGUAGE OverloadedStrings #-} module Hledger.Web.Test ( hledgerWebTest ) where import Control.Monad.Except (runExceptT) import qualified Data.Text as T import Test.Hspec (hspec) import Yesod.Default.Config import Yesod.Test import Hledger.Web.Application ( makeFoundationWith ) import Hledger.Web.WebOptions ( ...
adept/hledger
hledger-web/Hledger/Web/Test.hs
gpl-3.0
3,895
0
16
966
565
308
257
54
1
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Program : lists.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:47 Warning : this file is machine generated - do not mod...
keera-studios/hsQt
examples/lists.hs
bsd-2-clause
2,849
0
12
562
862
424
438
83
2
{-# OPTIONS -XFlexibleInstances -XOverlappingInstances #-} module Control.Monatron.AutoInstances where import Control.Monatron.MonadT ------------------------------------------------------------------ instance (Monad m, MonadT t) => Monad (t m) where return = treturn fail = lift . fail (>>=) = tbi...
FranklinChen/monadiccp
Control/Monatron/AutoInstances.hs
bsd-3-clause
389
0
7
68
99
57
42
8
0
{-# LANGUAGE OverloadedStrings #-} import qualified Aws import qualified Aws.S3 as S3 import Data.Conduit (($$+-)) import Data.Conduit.Binary (sourceFile) import qualified Data.Text as T import Network.HTTP.Conduit (withManager, responseBody) import System.Environment (getArgs) ...
frms-/aws
Examples/MultipartUpload.hs
bsd-3-clause
982
0
17
218
278
150
128
23
3
{-| DRBD data collector. -} {- Copyright (C) 2012, 2013 Google Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This pr...
vladimir-ipatov/ganeti
src/Ganeti/DataCollectors/Drbd.hs
gpl-2.0
7,585
0
20
1,494
1,507
799
708
137
23
{-# LANGUAGE GADTs #-} module Fun00001 where data Maybe a = Nothing | Just a type Perhaps a = Maybe a
KasperJanssens/intellij-haskforce
tests/gold/parser/Fun00001.hs
apache-2.0
103
0
6
22
28
18
10
4
0
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE TemplateHaskell #-} {-# OPTIONS -fno-warn-unused-do-bind #-} -- | Functions for the GHC package database. module Stack.GhcPkg (findGhcPkgId ,getGlobalDB ,EnvOverrid...
DanielG/stack
src/Stack/GhcPkg.hs
bsd-3-clause
8,792
0
16
2,574
2,277
1,159
1,118
198
3
-- | Benchmarking utilities. For example, functions for generating -- random 'ByteString's. module Util.ByteString where import qualified Data.ByteString as S import qualified Data.ByteString.Char8 as C import Util.String as String -- | Generate a number of fixed length 'ByteString's where the content -- of the str...
pacak/cuddly-bassoon
unordered-containers-0.2.8.0/benchmarks/Util/ByteString.hs
bsd-3-clause
1,066
0
8
217
176
102
74
16
1
{-# OPTIONS_GHC -fwarn-implicit-prelude #-} {-# LANGUAGE NoImplicitPrelude #-} module ShouldCompile where -- !!! should produce no warning
ghc-android/ghc
testsuite/tests/rename/should_compile/rn057.hs
bsd-3-clause
141
0
2
19
7
6
1
3
0
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ConstraintKinds #-} -- | Find all variable aliases. Avoids having to use the Aliases representation -- in other modules. module Futhark.Optimise.MemoryBlockMerging.VariableAliases where import qual...
ihc/futhark
src/Futhark/Optimise/MemoryBlockMerging/VariableAliases.hs
isc
2,837
0
11
564
685
368
317
59
1
{-# LANGUAGE QuasiQuotes, ScopedTypeVariables #-} module Main where import Paths_postgrest (version) import PostgREST.App import PostgREST.Middleware import PostgREST.Error(errResponse) import Control.Monad (unless) import Control.Monad.IO.Class (liftIO) import Data.String.Conversions (cs) import Network.Wai (strict...
johan--/postgrest
src/PostgREST/Main.hs
mit
2,987
0
16
695
797
411
386
65
1
--2 main = do print "Hello" print "World!." --ok
mino2357/Hello_Haskell
src/haskell002.hs
mit
58
0
7
18
20
9
11
3
1
{-# LANGUAGE OverloadedLists #-} {-# LANGUAGE OverloadedStrings #-} -- | Visual to show an image overlaid on a rectangle module Iris.Visuals.Image ( ImageItem (..) , ImageSpec (..) , ImageVerts , readTexture , imageInit , imageFromFile , makeImage , drawImage ...
jdreaver/iris
src/Iris/Visuals/Image.hs
mit
3,951
0
15
1,203
911
484
427
108
2
{-# LANGUAGE TupleSections #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE CPP #-} module Data.Cond ( CondT(..), Cond -- * Executing CondT , runCondT, runCond, applyCo...
jwiegley/find-conduit
Data/Cond.hs
mit
18,630
2
18
4,884
4,700
2,476
2,224
285
4
-- Get the Excel column title! -- http://www.codewars.com/kata/56d082c24f60457198000e77 module Codewars.Kata.GetExcelColumnTitle (getColumnTitle) where import Control.Monad (liftM2) alphabet = map (: "") ['A' .. 'Z'] getColumnTitle :: Int -> Maybe String getColumnTitle n | n <= 0 = Nothing | otherw...
gafiatulin/codewars
src/6 kyu/GetExcelColumnTitle.hs
mit
532
0
10
165
171
91
80
9
1
module Table ( Table, create, name, columnNames ) where data Table = Table String [String] deriving (Eq, Ord, Show) create :: String -> [String] -> Table create name columnNames = Table name columnNames name :: Table -> String name (Table name _) = name columnNames :: Table -> [String] columnNames (Tabl...
rcook/hqdsl
src/lib/Table.hs
mit
352
0
7
72
131
72
59
15
1
module Red.Support.FileSystem where import Control.Monad import Debug.Trace import qualified Data.Map as M import qualified Data.ByteString as B import Red.Binary.Base import Red.Binary.RFL import Red.Binary.VPP import Red.Parse.Base import Red.Parse.RFL import Red.Parse.VPP data VPPData = VPPData { vppsLoade...
LeviSchuck/RedReader
Red/Support/FileSystem.hs
mit
1,681
0
15
420
511
260
251
41
3
{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE DefaultSignatures #-} {-# LANGUAGE Rank2Types #-} {-# OPT...
psibi/persistent
persistent/Database/Persist/Sql/Orphan/PersistStore.hs
mit
14,764
11
33
5,025
3,838
1,937
1,901
295
1
-- Copyright (C) 2013 Jorge Aparicio main :: IO() main = print . foldr1 lcm $ numbers where numbers = [2..20] :: [Int]
japaric/eulermark
problems/0/0/5/005.hs
mit
128
0
7
32
46
25
21
6
1
import Control.Applicative import Sat import System.Environment main :: IO () main = do args <- getArgs case args of [a, b, c, d] -> putStr =<< printDimacs <$> makeCmty (read a) (read b) (read c) (read d) _ -> error "Unknown argument s, must be <vars> <clauses> <cmtys> <q>."
JLiangWaterloo/sat
Haskell/Cmty.hs
mit
314
0
13
87
111
57
54
9
2
{- | Module : Wai.Routes Copyright : (c) Anupam Jain 2013 License : MIT (see the file LICENSE) Maintainer : ajnsit@gmail.com Stability : experimental Portability : non-portable (uses ghc extensions) This package provides typesafe URLs for Wai applications. -} module Wai.Routes ( -- * Declaring...
ajnsit/wai-routes
src/Wai/Routes.hs
mit
5,815
0
5
1,993
401
294
107
95
0
{-# LANGUAGE CPP, OverloadedStrings #-} module PropertySpec (main, spec) where import Test.Hspec import Data.String.Builder import Property import Interpreter (withInterpreter) main :: IO () main = hspec spec isFailure :: PropertyResult -> Bool isFailure (Failure _) = True is...
sol/doctest
test/PropertySpec.hs
mit
5,386
0
22
1,444
1,106
539
567
94
2
{-# LANGUAGE RankNTypes #-} {- Copyright (C) 2012 Kacper Bak, Jimmy Liang <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 Software without restriction, including without limit...
juodaspaulius/clafer-old-customBNFC
src/Language/Clafer/Intermediate/Desugarer.hs
mit
19,359
0
21
4,263
6,633
3,301
3,332
354
33
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedLabels #-} {-# LANGUAGE StrictData #-} module WordEmbedding.HasText.Internal.Type ( -- * API arguments -- $APIParams HasTextArgs(..) , HasTextMethod(..) , HasTextLoss(..) , HasTextResult(..) -- * Internal Parameters , Params(..) , LPa...
Nnwww/hastext
src/WordEmbedding/HasText/Internal/Type.hs
mit
4,488
0
11
1,270
778
505
273
110
0
module Main ( main ) where import Data.Function import qualified System.IO polynome :: Rational -> Rational polynome p = polynome' (1-p) where polynome' t = 0.5 - t + t^13 - t^15 + t^18 - t^20 + t^22 - t^23 anotater :: (a -> b) -> a -> (a,b) anotater f x = (x,f x) anotatel :: (a -> b) -> a -> (b,a) anotatel f x...
xkollar/handy-haskell
other/pt-2012-02/aaa.hs
gpl-3.0
1,764
0
19
415
975
528
447
41
4
{-# LANGUAGE CPP #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -Wall #-} {-# OPTIONS_GHC -fno-warn-unused-do-bind #-} module AsmParser (Instruction(..), Token(..), EntryLabel(..), Val(..), Labels, ...
ninedotnine/bugfree-computing-machine
src/AsmParser.hs
gpl-3.0
13,148
0
16
2,942
3,363
1,790
1,573
245
7
module NodeEditor.Parser where import Data.List import Data.List.Split import NodeEditor.Data treeFromText :: String -> Tree treeFromText text = parseTextToTree text loadFile :: FilePath -> IO Tree loadFile path = do contents <- readFile path return $ treeFromText contents parseTextToTree :: String -> ...
rickardlindberg/node-editor-2
src/NodeEditor/Parser.hs
gpl-3.0
663
0
11
157
184
93
91
19
2
-- file: ch16/ApplicativeParsec.hs module ApplicativeParsec ( module Control.Applicative , module Text.ParserCombinators.Parsec ) where import Control.Applicative import Control.Monad (MonadPlus(..), ap) -- Hide a few names that are provided by Applicative. import Text.ParserCombinators.Parsec hiding...
Jem777/deepthought
src/ApplicativeParsec.hs
gpl-3.0
629
0
7
117
121
77
44
13
0
module Main where import Test.Hspec import Parser import Regex import NFA import DFA import Util main :: IO () main = hspec $ do describe "Util.eq" $ do it "shows x = x" $ do eq "'a'" "'a'" `shouldBe` Nothing eq "('a'|'b')|'b'*" "('a'|'b')|'b'*" `shouldBe` Nothing it "gives the shortest uncomm...
TeofilC/regeq
test/Spec.hs
gpl-3.0
1,050
0
16
222
254
127
127
25
1
-- -*-haskell-*- -- Vision (for the Voice): an XMMS2 client. -- -- Author: Oleg Belozeorov -- Created: 11 Jun. 2010 -- -- Copyright (C) 2010, 2011 Oleg Belozeorov -- -- 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...
upwawet/vision
src/Vision.hs
gpl-3.0
1,300
0
15
287
157
88
69
32
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-script/gen/Network/Google/Resource/Script/Projects/UpdateContent.hs
mpl-2.0
5,560
0
18
1,285
790
463
327
114
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/PlacementStrategies/Patch.hs
mpl-2.0
5,813
0
20
1,376
909
525
384
128
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Topics/Patch.hs
mpl-2.0
6,716
0
20
1,568
953
559
394
134
1
module Widgets.Time where -- TODO make this prettier import Import import Data.Time import System.Locale import Data.List renderTime :: UTCTime -> Widget renderTime time = do now <- liftIO getCurrentTime let render (UTCTime (ModifiedJulianDay 0) 0) = preEscapedToMarkup ("(soon)" :: Text); render t...
chreekat/snowdrift
Widgets/Time.hs
agpl-3.0
526
0
14
116
130
68
62
-1
-1
module Util where import Data.List import System.IO import qualified Data.Set as Set quote :: String -> String quote s = ('\"':quot s) where quot [] = "\"" quot ('\"':xs) = '\\':'\"':quot xs quot (x:xs) = x:quot xs splitWith :: Eq a => a -> [a] -> Maybe ([a],[a]) splitWith a xs = case (span (...
johnjcamilleri/maltese-functional-morphology
lib/Util.hs
lgpl-3.0
1,330
0
16
550
634
320
314
36
3
-- | Main entry point to the application. module Main where import System.Environment (getArgs) import Text.ParserCombinators.Parsec import qualified Navision as N -- | The main entry point. main :: IO () main = do putStrLn "Welcome to FP Haskell Center!" putStrLn "Have a good day!" args <- getArgs p...
ernestasju/nadeko
main-src/Main.hs
unlicense
1,051
0
12
294
337
163
174
28
3
module Palindromes.A006995Spec (main, spec) where import Test.Hspec import Palindromes.A006995 (a006995) main :: IO () main = hspec spec spec :: Spec spec = describe "A006995" $ it "correctly computes the first 20 elements" $ take 20 (map a006995 [1..]) `shouldBe` expectedValue where expectedValue = [0,1,...
peterokagey/haskellOEIS
test/Palindromes/A006995Spec.hs
apache-2.0
371
0
10
59
160
95
65
10
1
module Main(main) where import System.Environment import qualified Data.Map as Map import qualified StringyTools as Bio main = do args <- getArgs let argMap = argsToMap args sifFileName = argMap Map.! "-sif" outFileName = argMap Map.! "-out" putStrLn $ "Reading structure from sif: " ++ sif...
sverchkov/bionet-simulator-haskell
src/Main.hs
apache-2.0
724
0
12
163
268
142
126
20
3
{-# LANGUAGE BangPatterns, OverloadedStrings, RecordWildCards #-} -- | -- Module: Network.Riak.Basic -- Copyright: (c) 2011 MailRank, Inc. -- License: Apache -- Maintainer: Nathan Hunter <nhunter@janrain.com> -- Stability: experimental -- Portability: portable -- -- Basic support for the Riak decentraliz...
janrain/riak-haskell-client
src/Network/Riak/Basic.hs
apache-2.0
5,124
0
15
1,063
1,132
619
513
83
2
{-# LANGUAGE TemplateHaskell #-} module Language.Drasil.Chunk.Unitary (Unitary(..), UnitaryChunk, mkUnitary, unitary, unitary', unit_symb) where import Language.Drasil.Classes.Core (HasUID(uid), HasSymbol(symbol)) import Language.Drasil.Classes (NamedIdea(term), Idea(getA), IsUnit, usymb, Quantity, HasSpace(typ)) ...
JacquesCarette/literate-scientific-software
code/drasil-lang/Language/Drasil/Chunk/Unitary.hs
bsd-2-clause
2,432
0
10
470
688
390
298
37
1
{-# LANGUAGE CPP #-} module MOO.Builtins.Extra (builtins) where import MOO.Builtins.Common # ifdef MOO_WAIF import qualified MOO.Builtins.Extra.WAIF as WAIF # endif builtins :: [Builtin] builtins = [] # ifdef MOO_WAIF ++ WAIF.builtins # endif
verement/etamoo
src/MOO/Builtins/Extra.hs
bsd-3-clause
250
0
6
40
54
37
17
5
1
{-# LANGUAGE RebindableSyntax #-} {-# OPTIONS_GHC -fno-warn-unused-do-bind #-} module Main (main) where import Control.Monad.Code import Control.Monad.ConstantPool import Control.Monad.Function hiding (returnM) import Control.Monad.Indexed (returnM) import Control.Monad.Indexed.Syntax hiding (return) import C...
sonyandy/tnt
Hello.hs
bsd-3-clause
1,167
0
14
274
310
174
136
36
1
----------------------------------------------------------------------------- -- | -- Module : Data.SBV.Examples.Crypto.RC4 -- Copyright : (c) Austin Seipp -- License : BSD3 -- Maintainer : erkokl@gmail.com -- Stability : experimental -- -- An implementation of RC4 (AKA Rivest Cipher 4 or Alleged RC4...
josefs/sbv
Data/SBV/Examples/Crypto/RC4.hs
bsd-3-clause
6,115
0
17
1,100
981
552
429
56
1
module TinyASM.Parser ( parse ) where import Text.ParserCombinators.ReadP import Control.Applicative hiding (many) import TinyASM.Instruction parse :: String -> [Instruction] parse "" = [] parse content = case readP_to_S instructions content of [] -> [] result -> case last result of (_, remains@(_:_)) -> e...
ocus/TinyASM_Haskell
library/TinyASM/Parser.hs
bsd-3-clause
3,443
0
24
665
1,228
608
620
103
3
{-# LANGUAGE BangPatterns #-} module Numeric.Eigenvalue.JacobiMethod ( jacobiP ) where import Control.Arrow (second) import Control.Applicative import Control.Monad import qualified Data.List as DL import Data.Array.Repa as R import Data.Array.Repa.Unsafe as R import qualified Da...
felipeZ/OptimizationAlgorithms
Numeric/Eigenvalue/JacobiMethod.hs
bsd-3-clause
4,475
0
18
1,697
1,704
868
836
83
3
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverlappingInstances #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} ...
AjayRamanathan/plots
src/Plots/Types/Function.hs
bsd-3-clause
8,521
0
13
2,246
735
475
260
-1
-1
{-# OPTIONS_GHC -fno-warn-orphans #-} module Reflex.Gloss.Random ( module Control.Monad.Random , module System.Random , foldGen , foldRandoms , foldRandomRs , foldRand ) where import Control.Monad.Fix import Control.Monad.State import Control.Applicative import Graphics.Gloss import System.Ra...
Saulzar/reflex-gloss-scene
src/Reflex/Gloss/Random.hs
bsd-3-clause
2,473
0
15
532
1,117
604
513
-1
-1
module Main where import Data.Text (Text, pack) import Data.Monoid ((<>)) import qualified Hilt import qualified Hilt.Server as Server import qualified Hilt.Channel as Channel import qualified Hilt.Logger as Logger import qualified Hilt.SocketServer as Websocket showt :: Show a => a -> Text showt t =...
supermario/hilt
app/Main.hs
bsd-3-clause
2,186
0
19
499
359
181
178
31
1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE DeriveDataTypeable #-} module Data.IHO.S57.Reader ( S57Catalog (..), s57readCatalog , S57DataSet (..), dataSetVRIDTable, dataSetFRIDTable , S57Record (..) , s57...
alios/iho-s57
library/Data/IHO/S57/Reader.hs
bsd-3-clause
5,613
0
18
1,714
1,611
849
762
142
8
-- 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 NoRebindableSyntax #-} {-# LANGUAGE OverloadedStrings #-} module Duckling.Tim...
facebookincubator/duckling
Duckling/Time/VI/Rules.hs
bsd-3-clause
26,308
0
21
6,928
7,628
4,157
3,471
809
2
{-# LANGUAGE LambdaCase #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TypeFam...
nejla/auth-service
service/src/PasswordReset.hs
bsd-3-clause
4,226
0
16
1,058
1,039
552
487
108
3
{-# OPTIONS_GHC -F -pgmF htfpp #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE Rank2Types #-} module Horbits.UI.ShowDimTest where import Control.Rematch import Test.Framework import Horbits.Dimensional.Prelude import ...
chwthewke/horbits
testsuite/Horbits/UI/ShowDimTest.hs
bsd-3-clause
1,235
0
14
318
336
181
155
25
1
{-# LANGUAGE RecursiveDo #-} module Main where import Reflex import Reflex.Gloss.Scene import Reflex.Monad.Time import Reflex.Animation import Reflex.Monad import Graphics.Gloss import Widgets foldMerge :: MonadReflex t m => a -> [Event t (a -> a)] -> m (Dynamic t a) foldMerge initial events = foldDyn ($) initi...
Saulzar/scribble
src/Scribble2.hs
bsd-3-clause
1,486
0
12
373
542
273
269
39
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. An additional grant -- of patent rights can be found in the PATENTS file in the same directory. {-# LANGUAGE Over...
rfranek/duckling
Duckling/Ordinal/DE/Corpus.hs
bsd-3-clause
931
0
7
217
150
96
54
24
1
module CREST ( module CREST.Character, module CREST.Market, module CREST.Map, showCrestJson ) where import CREST.Character import CREST.Market import CREST.Map import qualified Data.ByteString.Lazy.Char8 as LBS import Auth import Util import Types showCrestJson :: (Gideon LBS.ByteString) -> IO (...
Frefreak/Gideon
src/CREST.hs
bsd-3-clause
391
0
8
79
110
63
47
16
1
{-# LANGUAGE TemplateHaskell #-} module Main where import Lib $(return []) main :: IO () main = nsLog "foo!"
konn/objcth
app/Main.hs
bsd-3-clause
112
0
8
22
38
20
18
6
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} module Snap.Chat.API.Handlers ( apiHandlers ) where ------------------------------------------------------------------------------ import Control.Exception (SomeException) import Control.Monad import Control.Mo...
snapframework/cufp2011
src/Snap/Chat/API/Handlers.hs
bsd-3-clause
5,157
0
20
1,135
903
499
404
78
1
{-# LANGUAGE JavaScriptFFI, GeneralizedNewtypeDeriving #-} module GHCJS.Three.CylinderGeometry (CylinderGeometry(..), CylinderParam, cpRadiusTop, cpRadiusBot, cpHeight, cpRadiusSegments, cpHeightSegments, cpOpenEnded, cpThetaStart, cpThetaLength, mkCylinderGeometry ) where import Data.Default import G...
manyoo/ghcjs-three
src/GHCJS/Three/CylinderGeometry.hs
bsd-3-clause
1,858
18
9
518
367
217
150
44
2
module Playground.EDSL where import EDSL import Text.PrettyPrint (Doc) import Data.BitCode.LLVM.Pretty -- reexport pretty (to make intero happy :-)) pp :: (Pretty a) => a -> Doc pp = pretty
angerman/data-bitcode-edsl
src/Playground/EDSL.hs
bsd-3-clause
192
0
6
31
50
31
19
6
1
{-| Module : Reactive.DOM.WebApp Description : Types and functions for defining single-page web apps. Copyright : (c) Alexander Vieth, 2016 Licence : BSD3 Maintainer : aovieth@gmail.com Stability : experimental Portability : non-portable (GHC only) -} {-# LANGUAGE GADTs #-} {-# LANGUAGE TypeFamilies #-} ...
avieth/reactive-dom
Reactive/DOM/WebApp.hs
bsd-3-clause
19,525
10
24
4,566
4,907
2,561
2,346
-1
-1
module Main where import Prelude hiding (readFile) -- needed for GHCi, see `.ghci` import Test.Tasty (defaultMain, testGroup) import qualified BurntSushi import Text.Toml.Parser.Spec main :: IO () main = do parserSpec <- tomlParserSpec bsTests <- BurntSush...
cies/htoml
test/Test.hs
bsd-3-clause
497
0
9
150
91
53
38
12
1
module Aws.Swf.Commands.Event where import Debug.Trace --import Data.Maybe (fromJust) import qualified Data.HashMap.Strict as HM import qualified Data.Text as T import Aws.Swf.Commands.JTypes import Data.Aeson.Types (Parser) import Control.Monad (mzero...
RayRacine/aws
Aws/Swf/Commands/Event.hs
bsd-3-clause
40,531
0
25
14,638
5,925
3,228
2,697
762
1
-- | 'Trace' for named logging. {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ScopedTypeVariables #-} module Pos.Util.Trace.Named ( TraceNamed , LogNamed (..) , TrU.LogItem , named , setupLogging , namedTrace , appendName , fromTypeclassNamedTraceWlog -- * rexports , natTra...
input-output-hk/pos-haskell-prototype
util/src/Pos/Util/Trace/Named.hs
mit
7,382
0
15
1,555
1,810
964
846
124
4