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 #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} -- | A wrapper around hoogle. module Stack.Hoogle ( hoogleCmd ) where import Control.Exception import Control.Monad.IO.Class import Control.Monad.Logger import qualified Data....
deech/stack
src/Stack/Hoogle.hs
bsd-3-clause
7,671
9
37
3,535
1,320
662
658
168
10
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} module T16204 where import Data.Kind ----- -- singletons machinery ----- data...
sdiehl/ghc
testsuite/tests/typecheck/should_compile/T16204a.hs
bsd-3-clause
1,346
2
12
382
430
234
196
-1
-1
module RefacSwapArgs(swapArgs) where import RefacUtils swapArgs args = do let fileName = ghead "filename" args row = read (args!!1)::Int col = read (args!!2)::Int modInfo@(_,exps, mod, toks)<-parseSourceFile fileName let pnt =locToPNT fileName (row...
forste/haReFork
refactorer/RefacSwapArgs.hs
bsd-3-clause
1,931
0
18
731
641
320
321
-1
-1
{-# LANGUAGE TypeFamilies #-} module OverA (C, D) where data family C a b :: * type family D a b :: *
urbanslug/ghc
testsuite/tests/indexed-types/should_fail/OverA.hs
bsd-3-clause
104
0
4
25
32
23
9
4
0
module Graphics.Perfract.RecFig where import qualified Data.Vector as Vec import Graphics.Perfract.PolyClip import Graphics.Perfract.RatRot import Graphics.Perfract.Tupelo data RecFig = RecFig -- { rBound :: !(ConvPoly Rational) { rPoly :: !(ConvPoly Rational) , rPrzs :: !(Vec.Vector PosRotZoom) } d...
dancor/perfract
src/Graphics/Perfract/RecFig.hs
mit
562
0
12
124
111
68
43
22
0
module Data.Metrics.Reporter.Librato where import Control.Concurrent import Control.Monad import Control.Monad.Trans import Data.ByteString (ByteString) import Data.HashMap.Strict (toList) import Data.Metrics.Internal import Data.Metrics.Registry (MetricRegistry, metrics) import qualified Data.Metrics.Registry as R im...
graydon/metrics
src/Data/Metrics/Reporter/Librato.hs
mit
1,447
0
16
234
520
267
253
39
3
module LearnParsers where import Text.Trifecta import Control.Applicative stop :: Parser a stop = unexpected "stop" one = char '1' one' = one >> stop oneTwo = char '1' >> char '2' oneTwo' = oneTwo >> stop testParse :: Parser Char -> IO () testParse p = print $ parseString p mempty "123" testParseString :: Par...
NickAger/LearningHaskell
HaskellProgrammingFromFirstPrinciples/Chapter24/LearnParsers/src/LearnParsers.hs
mit
1,460
0
11
325
511
255
256
44
1
{-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE OverloadedStrings #-} module Main (main) where import Lib (app) import Debug.Trace (traceShowId) import qualified Data.Vector as V import Test.Hspec import Data.Text (Text(..)) import Test.Hspec.Wai import qualified Data.HashMap.Strict as HM import qualified Data.HashSet as HS...
thesietch/homOS
homOS-backend/test/Spec.hs
mit
2,408
0
15
395
731
393
338
-1
-1
module World where import Types import Control.Lens import Data.Maybe nextId :: World -> Int nextId = (+ 1) . fromMaybe 0 . maximumOf (to allPhysical . each . idNum) addMob :: Mob a => World -> a -> World addMob w m = w & worldLens <>~ [newM] where newId = nextId w newM = m & physical . idNum .~ newId...
edwardwas/tanks15
src/World.hs
mit
434
0
10
105
184
97
87
-1
-1
{-# LANGUAGE TupleSections #-} module Data.Time.TimeSeries where import Data.Map (Map) import qualified Data.Map as Map import Data.Set (Set) import qualified Data.Set as Set import Data.Time {-- We represent days as a mapping from Day -> whatever. Given that, what is the last entry? What is 'yesterday's' entry, r...
geophf/1HaskellADay
exercises/HAD/Data/Time/TimeSeries.hs
mit
1,008
0
12
252
311
163
148
22
1
module Workspace where import qualified Data.ByteString as B import qualified Data.ByteString.Char8 as BC import Data.List import System.Posix.Files import System.FilePath.Posix import System.Directory import TelescopeParser import Storage import Utility data TagOp = Intersect | Union | Normal defaultView :: IO () d...
wangell/towhead
Workspace.hs
mit
2,803
0
22
592
969
486
483
74
3
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE RecordWildCards #-} module Graphics.Ninja.GL.Framebuffer where import Control.Applicative import Control.Monad import Control.Monad.IO.Class import ...
fatho/ninja
src/Graphics/Ninja/GL/Framebuffer.hs
mit
2,538
0
12
498
489
271
218
45
1
{-# LANGUAGE Safe #-} module SMTLib2.Compat1 where import qualified SMTLib1.AST as V1 import qualified SMTLib1.PP as V1 import qualified SMTLib2.AST as V2 import qualified SMTLib2.Core as V2 import Control.Applicative(Applicative(..), (<$>)) import Data.Traversable(traverse) import Text.PrettyPrint data Trans a = ...
yav/smtLib
src/SMTLib2/Compat1.hs
mit
5,553
0
20
1,951
2,226
1,085
1,141
133
18
{-# LANGUAGE TypeFamilies, QuasiQuotes, TemplateHaskell, MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings, RecordWildCards #-} module Main where {- Simple demonstration of using blaze-html to generate html -} import Wai.Routes import Network.Wai.Application.Static import Data.Text (Text) import qualified Dat...
ajnsit/wai-routes
examples/blaze-html/src/Main.hs
mit
1,992
0
12
369
504
270
234
45
1
{-# LANGUAGE FlexibleContexts #-} module Text.Greek.Parse.Utility where import Prelude hiding (getLine) import Control.Lens import Text.Greek.Source.FileReference import Text.Parsec.Prim import Text.Parsec.Combinator import qualified Text.Parsec.Pos as P type Parser s t = ParsecT s () Identity t nestParser :: (Stre...
scott-fleischman/greek-grammar
haskell/greek-grammar/src/Text/Greek/Parse/Utility.hs
mit
2,260
0
16
554
1,117
565
552
-1
-1
{-# LANGUAGE OverloadedStrings #-} import Control.Applicative import Control.Exception import Control.Monad (void, when) import Data.ByteString (ByteString) import Data.Foldable (for_, forM_) import Data.List (stripPrefix) import Data.Monoid (mconcat, mempty) import Data.String (fromString) import Pipes import Pipes.By...
ocharles/musicbrainz-database
src/Main.hs
gpl-2.0
9,907
0
26
3,623
2,127
1,088
1,039
168
3
-- C->Haskell Compiler: traversals of C structure tree -- -- Author : Manuel M. T. Chakravarty -- Created: 16 October 99 -- -- Copyright (c) [1999..2001] Manuel M. T. Chakravarty -- -- This file is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as publ...
jrockway/c2hs
src/C2HS/C/Trav.hs
gpl-2.0
32,411
0
17
9,591
6,218
3,353
2,865
414
7
{-# LANGUAGE OverloadedLists #-} {-# LANGUAGE QuasiQuotes #-} module Nirum.Targets.Python.CodeGenSpec ( makeDummySource , makeDummySource' , pythonVersionSpecs , spec ) where import Control.Monad import Data.Either import Data.Maybe import Data.SemVer hiding (Identifier, metadata) import Test.Hspe...
spoqa/nirum
test/Nirum/Targets/Python/CodeGenSpec.hs
gpl-3.0
15,725
0
24
5,665
3,891
2,092
1,799
299
6
module Wrapper ( RenderState (..), Matrix, cube, sphere, rotateAboutPoint, colorOfObject, renderState, renderList, spin, extendMatrix, writePPM, genState, toJoint, -- writePPM, -- writeFrame ) where --import Import import System.IO import Foreign import Foreign.C import Foreign.C.String import Foreign.M...
WFT/LazyArmature
src/Wrapper.hs
gpl-3.0
3,435
72
15
705
1,388
721
667
-1
-1
{-# LANGUAGE DeriveFunctor #-} module Chamber.Data.Formula where import Data.Foldable hiding (any, all, foldr) import Data.Monoid -------------------------------------------------------------------------------- -- The `Formula' type contains several common operations on formulae as data -- constructors to assist in...
sjindel/Chamber
Chamber/Data/Formula.hs
gpl-3.0
1,344
0
14
384
529
270
259
28
1
{-# LANGUAGE FlexibleContexts #-} module Solver.TransitionInvariant (checkTransitionInvariantSat ,checkTransitionInvariantWithSimpleCutSat ,tInvariantConstraints ,finalInvariantConstraints ,nonnegativityConstraints ,transitionVectorConstraints ,formulaAndRefinementConstraints ,checkSimp...
cryptica/slapnet
src/Solver/TransitionInvariant.hs
gpl-3.0
3,651
0
17
874
959
481
478
78
1
import Development.Hake import Development.Hake.FunSetRaw target = "hello" main = hake [ dflt [ target ] , rule "" ".c" $ \t (s:_) -> [ [ "cc", "-o", t, s ] ] , task "clean" [ [ "rm", "-f", target ] ] ]
YoshikuniJujo/hake_haskell
web_page/samples/use_f_option/myHakefile.hs
gpl-3.0
213
0
10
52
95
55
40
7
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-logging/gen/Network/Google/Resource/Logging/Locations/Buckets/Delete.hs
mpl-2.0
5,314
0
15
1,104
708
418
290
101
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-adexchangebuyer2/gen/Network/Google/Resource/AdExchangeBuyer2/Accounts/Clients/Users/List.hs
mpl-2.0
6,995
0
21
1,614
992
575
417
143
1
{-# LANGUAGE MultiWayIf #-} func = do foo bar $ if | cond1 -> loooooooooooooooooooooooooooooong expr1 | cond2 -> loooooooooooooooooooooooooooooong expr2
lspitzner/brittany
data/Test231.hs
agpl-3.0
165
0
11
33
41
18
23
6
2
{-| Module : Codec.Picture.Png.Streaming.Util Copyright : (c) Bradley Hardy 2016 License: LGPL3 Maintainer: bradleyhardy@live.com Stability: experimental Portability: non-portable This is a set of assorted utility functions for @streaming@ and @streaming-bytestring@ which are used in various places in this library, bu...
bch29/streaming-png
src/Codec/Picture/Png/Streaming/Util.hs
lgpl-3.0
5,089
0
18
1,304
1,275
668
607
79
2
import System.IO isWinner :: String -> String -> Bool isWinner playerOne playerTwo | playerOne == "papel" && playerTwo == "pedra" = True | playerOne == "pedra" && playerTwo == "tesoura" = True | playerOne == "tesoura" && playerTwo == "papel" = True | otherwise = False printWinner :: String -> String -> Strin...
aajjbb/contest-files
URI/JB6Team.hs
apache-2.0
1,118
0
10
303
356
166
190
29
2
-- Copyright 2015 Peter Harpending -- -- Licensed under the Apache License, Version 2.0 (the "License"); you may not -- use this file except in compliance with the License. You may obtain a copy -- of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed ...
pharpend/irc-data
src/Data/IRC.hs
apache-2.0
1,752
0
5
308
101
82
19
9
0
{-# LANGUAGE DeriveFunctor #-} module Data.Named ( Named (..) , mapWords , Ne (..) , Child , mapWords' , names , mkNamed ) where import Prelude hiding (words) import qualified Data.Text as T import qualified Data.Vector as V import Data.Named.DAG hiding (children) import qualified Data.Named.DAG as D -- | Structure...
kawu/named
Data/Named.hs
bsd-2-clause
2,007
0
13
572
781
430
351
53
3
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE NoImplicitPrelude #-} {-# OPTIONS -fno-warn-unused-do-bind -fno-warn-type-defaults #-} -- | A social graph. module Ircbrowse.View.Social where import Ircbrowse.View import Ircbrowse.View.Template import Data.Aeson import Data.Aeson.Encode import Data.Text (Text) impor...
plow-technologies/ircbrowse
src/Ircbrowse/View/Social.hs
bsd-3-clause
1,470
0
31
432
432
233
199
35
1
{-# LANGUAGE ImplicitParams, FlexibleContexts, TupleSections #-} module Frontend.StatementValidate(validateStat, validateStat') where import Control.Monad.Error import Data.Maybe import Data.List import TSLUtil import Util hiding (name, trace) import Pos import Frontend.Expr import ...
termite2/tsl
Frontend/StatementValidate.hs
bsd-3-clause
13,796
0
22
5,086
3,956
1,896
2,060
229
41
-- |Free Company details and rankings module Data.Krile.Sharlayan.FreeCompany (FreeCompany(..), fetchFC, parseFCPage) where import Data.List.Split import Data.Time.Clock import Network.Protocol.HTTP.Parser import Text.HTML.TagSoup -- |Data type for storing FC details data FreeCompany = FreeCompany { fid ...
callummance/libsharlayan
src/Data/Krile/Sharlayan/FreeCompany.hs
bsd-3-clause
3,055
0
12
792
876
484
392
54
1
{-# LANGUAGE CPP, RankNTypes, ScopedTypeVariables #-} {- | Module : GHC.Vis.View.Graph Copyright : (c) Dennis Felsing License : 3-Clause BSD-style Maintainer : dennis@felsin9.de -} module GHC.Vis.View.Graph ( export, redraw, click, move, updateObjects ) where #if __GLASGOW_HASKE...
FranklinChen/ghc-vis
src/GHC/Vis/View/Graph.hs
bsd-3-clause
8,230
0
20
2,049
2,761
1,455
1,306
180
9
-- 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. module Duckling.Quantity.ZH.Tests ( tests ) where import Data.String import Prelude import Test.Tasty import ...
facebookincubator/duckling
tests/Duckling/Quantity/ZH/Tests.hs
bsd-3-clause
507
0
9
78
79
50
29
11
1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveDataTypeable #-} module Dalvik.SSA.ClassHierarchy ( ClassHierarchy, classHierarchy, superclass, allSuperclasses, definition, superclassDef, subclasses, allSubclasses, implementations, allImplementations, interfaces...
travitch/dalvik
src/Dalvik/SSA/ClassHierarchy.hs
bsd-3-clause
10,925
0
15
2,511
2,676
1,394
1,282
185
5
{-# LANGUAGE NoMonomorphismRestriction #-} module Crypto.OpenPGP.Conduit (keyGenSource) where import Control.Monad.IO.Class import System.FilePath import System.Directory import System.Process import System.IO import System.Posix.Temp import qualified Codec.Binary.UTF8.String as UTF8 import qualified Data.Binary as B ...
alios/lcars
Crypto/OpenPGP/Conduit.hs
bsd-3-clause
3,652
1
20
1,007
1,025
542
483
-1
-1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE Patter...
harendra-kumar/asyncly
src/Streamly/Streams/StreamD.hs
bsd-3-clause
149,555
0
25
50,840
44,061
22,015
22,046
2,820
57
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TemplateHaskell #-} module Main where import Text.PrettyTemplate import qualified Data.Map as M import Data.Aeson import Data.Aeson.TH import qualified Data.Char import qualified Data.Text.IO as T import Control.Exception import qualified T...
awto/pretty-template
examples/First.hs
bsd-3-clause
4,043
0
11
2,085
514
310
204
64
1
{-# LANGUAGE DeriveDataTypeable #-} ----------------------------------------------------------------------------- -- | -- Module : Language.CFamily.Data.Ident -- Copyright : (c) [1995..1999] Manuel M. T. Chakravarty -- (c) 2008 Benedikt Huber -- License : BSD-style -- Maintainer : benedik...
micknelso/language-c
src/Language/CFamily/Data/Ident.hs
bsd-3-clause
5,021
0
15
1,138
976
546
430
61
1
module Python ( scrapePythonURL , makePythonStats , makePythonStatsCSV ) where import Control.Monad import Csv import Data.ByteString (ByteString) import qualified Data.ByteString.Char8 as BS import qualified Data.ByteString.Lazy.Char8 as BL import Data.C...
matonix/BTScraper
src/Python.hs
bsd-3-clause
2,968
0
11
636
826
456
370
-1
-1
{-# LANGUAGE FlexibleContexts #-} module PeerTrader.StrategyManagement where import Control.Monad (liftM) import Data.Maybe (listToMaybe) import Database.Groundhog import Database.Groundhog.Core import ...
WraithM/peertrader-backend
src/PeerTrader/StrategyManagement.hs
bsd-3-clause
2,194
0
13
640
577
289
288
46
4
{-# OPTIONS_GHC -Wall #-} module Design.Weight( weightSummary , trueZeroFuelWeight_lb , manufacturersEmptyWeight_lb ) where import Design.Config import Aero.Drag.WettedArea( grossFuseWettedArea ) import Atmosphere.Convenience(pressure_lb_per_ft2_from_altitud...
ghorn/conceptual-design
Design/Weight.hs
bsd-3-clause
11,489
0
16
3,193
2,641
1,339
1,302
154
3
module Anamorphism where import Data.List mehSum :: Num a => [a] -> a mehSum xs = go 0 xs where go :: Num a => a -> [a] -> a go n [] = n go n (x:xs) = go (n+x) xs niceSum :: Num a => [a] -> a niceSum = foldl' (+) 0 mehProduct :: Num a => [a] -> a mehProduct xs = go 1 xs where go :: Num a => a -...
chengzh2008/hpffp
src/ch12-SignalingAdversity/anamorphism.hs
bsd-3-clause
1,417
0
10
420
813
433
380
44
2
module Simple ( NamedTerm(..) , UnnamedTerm(..) , Command(..) , parseCommands , EvalStrategy(..) , fullBetaEval , evalCommands ) where import Simple.Data import Simple.Parse import Simple.Eval
tomtitchener/TypesAndProgrammingLanguages
src/simple.hs
bsd-3-clause
212
0
5
43
58
39
19
11
0
-- !!! Testing the printing of infix constructors data Music = Note | Music :+: Music | Scale Music deriving Show m = Scale (Note :+: Note)
FranklinChen/Hugs
tests/rts/infix.hs
bsd-3-clause
165
2
8
52
47
22
25
5
1
module Utils.Version where version :: ([Int], String) version = ([0,2,5], "IAA")
pietervdvn/ALGT
src/Utils/Version.hs
bsd-3-clause
82
4
6
12
44
28
16
3
1
{-# LANGUAGE ViewPatterns #-} {-| Module : Math.LinProg.LPSolve Description : Binding for solving LPs with lp_solve library. Copyright : (c) Justin Bedő, 2014 License : BSD Maintainer : cu@cua0.org Stability : experimental This module allows finding the solution to an LP using the lp_solve library. The L...
TomLippincott/LinProg
Math/LinProg/LPSolve.hs
bsd-3-clause
4,365
0
22
1,388
1,647
835
812
102
3
---------------------------------------------------- -- Processes and some function for handling them -- -- -- -- Finished refactoring: 17-sep-2010 -- ---------------------------------------------------- module Processes where import Expressions import Au...
utwente-fmt/scoop
src/Processes.hs
bsd-3-clause
11,873
0
16
2,496
3,372
1,790
1,582
137
2
{-# LANGUAGE CPP #-} module X86.Regs ( -- squeese functions for the graph allocator virtualRegSqueeze, realRegSqueeze, -- immediates Imm(..), strImmLit, litToImm, -- addressing modes AddrMode(..), addrOffset, -- registers ...
ezyang/ghc
compiler/nativeGen/X86/Regs.hs
bsd-3-clause
12,861
0
17
3,636
2,956
1,621
1,335
266
9
{-# LANGUAGE QuasiQuotes #-} module RawData where import Data.Either import Test.QuickCheck import Test.Tasty.HUnit import Text.RawString.QQ usersInfoData :: String usersInfoData = [r| { "username": "foo@bar.com", "created_at": "2014-03-27 09:42:20.62599", "public_i...
circuithub/mandrill
test/RawData.hs
mit
6,045
0
4
2,502
114
83
31
17
1
module App where import AppConfig import Control.Monad.Reader type App a = ReaderT AppConfig IO a
gust/feature-creature
legacy/exe-search-service/App.hs
mit
100
0
5
17
27
17
10
4
0
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TupleSections #-} -- | -- This module contains functions related to the Protobuf Descriptor. module Data.Katydid.Parser.Protobuf.Descriptor ( decodeFileDescriptorSet , mkDescMap , DescMap , MessageIdx , FieldIdx , lookupMessageIdx , lookupFieldMessageTypeI...
katydid/haslapse
src/Data/Katydid/Parser/Protobuf/Descriptor.hs
bsd-3-clause
12,366
0
21
3,244
2,631
1,440
1,191
218
5
module Main where import Distribution.Simple import Distribution.Simple.Setup import Distribution.Simple.LocalBuildInfo import Distribution.PackageDescription (PackageDescription) import System.FilePath import System.Info import Data.List main = defaultMainWithHooks $ simpleUserHooks { postInst = postInstHook (pos...
bitemyapp/ghc-vis
Setup.hs
bsd-3-clause
1,343
0
14
216
293
150
143
23
2
{-# LANGUAGE NoMonomorphismRestriction #-} module Tests.Sample (runPriorProg) where import Prelude hiding (Real) import Language.Hakaru.Syntax import Language.Hakaru.Sample import qualified System.Random.MWC as MWC import qualified Data.Number.LogFloat as LF testPriorProp' :: (Integrate repr, Mochastic repr, Lambda ...
suhailshergill/hakaru
Tests/Sample.hs
bsd-3-clause
1,286
0
28
494
489
268
221
27
1
{-# LANGUAGE OverloadedStrings #-} module Monad ( testGitMonadLocal ) where import Control.Applicative import Control.Exception import Control.Monad import Data.Git.Monad import Data.Git.Types (GitTime(..)) import System.Exit import qualified System.Hourglass as T testBranch :: RefName testBranch = "test/no...
NicolasDP/hit
Tests/Monad.hs
bsd-3-clause
1,717
0
14
462
482
240
242
50
3
module Language.Haskell.GhcMod.List (listModules, listMods) where import Control.Applicative import Control.Monad (void) import Data.List import GHC import Language.Haskell.GhcMod.GHCApi import Language.Haskell.GhcMod.Types import Packages import UniqFM ----------------------------------------------------------------...
vikraman/ghc-mod
Language/Haskell/GhcMod/List.hs
bsd-3-clause
1,058
6
11
202
289
153
136
24
1
module API where -- just a dummy for the build system
abuiles/turbinado-blog
tmp/dependencies/hs-plugins-1.3.1/testsuite/hier/hier2/api/API.hs
bsd-3-clause
56
0
2
13
5
4
1
1
0
{-# LANGUAGE CPP #-} module TcCanonical( canonicalize, unifyDerived, StopOrContinue(..), stopWith, continueWith ) where #include "HsVersions.h" import TcRnTypes import TcType import Type import Kind import TcFlatten import TcSMonad import TcEvidence import Class import TyCon import TypeRep import C...
acowley/ghc
compiler/typecheck/TcCanonical.hs
bsd-3-clause
68,349
72
19
18,713
7,655
4,113
3,542
-1
-1
----------------------------------------------------------------------------- -- | -- Module : Distribution.Text -- Copyright : Duncan Coutts 2007 -- -- Maintainer : cabal-devel@haskell.org -- Portability : portable -- -- This defines a 'Text' class which is a bit like the 'Read' and 'Show' -- classes. The ...
jwiegley/ghc-release
libraries/Cabal/cabal/Distribution/Text.hs
gpl-3.0
2,330
0
17
606
566
303
263
41
2
{-# LANGUAGE TypeInType #-} module BadTelescope where import Data.Kind data SameKind :: k -> k -> * data X a k (b :: k) (c :: SameKind a b)
olsner/ghc
testsuite/tests/dependent/should_fail/BadTelescope.hs
bsd-3-clause
144
0
6
33
48
31
17
-1
-1
{-# LANGUAGE DataKinds, KindSignatures, GADTs, TypeFamilies #-} {-# OPTIONS_GHC -fwarn-incomplete-patterns -fwarn-overlapping-patterns #-} module T8970 where data K = Foo | Bar data D1 :: K -> * where F1 :: D1 Foo B1 :: D1 Bar class C (a :: K -> *) where data D2 a :: K -> * foo :: a k -> D2 a...
ezyang/ghc
testsuite/tests/pmcheck/should_compile/T8970.hs
bsd-3-clause
477
0
9
158
152
82
70
17
0
module PetParser where import Control.Applicative import Control.Monad import Data.Char import Data.Time.Calendar import Data.Time.Calendar.MonthDay import Expense import Parser type Line = Int type Col = Int type Pos = (Line, Col) type PetParser...
fredmorcos/attic
projects/pet/archive/pet_haskell_petparser/PetParser.hs
isc
3,687
0
16
916
1,212
640
572
81
3
module Model where import ClassyPrelude.Yesod import Database.Persist.Quasi import Text.Markdown import Yesod.Text.Markdown() ------------------------------------------------------------------------------- share [mkPersist sqlSettings, mkMigrate "migrateAll"] $(persistFile...
rzetterberg/alven
src/lib/Model.hs
mit
2,023
0
8
447
342
196
146
-1
-1
module ToyRobot.RobotSpec (main, spec) where import ToyRobot.Robot import ToyRobot.Table import ToyRobot.Heading import ToyRobot.Point import Test.Hspec main :: IO() main = hspec spec spec :: Spec spec = do let table = Table (Point 0.0 0.0) (Point 4.0 4.0) let unplaced_robot = Robot (Point 0.0 0.0) (Heading 0.0)...
lokulin/toy-robot-haskell
test/ToyRobot/RobotSpec.hs
mit
1,317
0
20
317
415
196
219
32
1
module Cook.Provider.PkgManager ( Provider (..) , updatePackages , upgradePackages , clearPackagesCache , requirePackages , isPackageInstalled , installPackages , requirePackagesGeneric , nullProvider ) where import Control.Lens import Control.Monad (filterM) import Data.List.N...
jimenezrick/cook.hs
src/Cook/Provider/PkgManager.hs
mit
1,415
0
14
350
393
207
186
-1
-1
{-# LANGUAGE PatternSynonyms #-} -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module JSDOM.Generated.SourceBufferList (item, item_, getLength, addsourcebuffer, removesourcebuffer, SourceBufferList(..), gTyp...
ghcjs/jsaddle-dom
src/JSDOM/Generated/SourceBufferList.hs
mit
2,493
0
12
291
543
328
215
35
1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE FlexibleInstances #-} module Test.Data.Raft.Log where import qualified Data.Sequence as Seq import Test.Tasty.QuickCheck import Data.Raft.Entry import Data.Raft.Index import Data.Raft.Log import Data.RaftPrelude...
AndrewRademacher/zotac
test/Test/Data/Raft/Log.hs
mit
3,135
0
14
668
1,028
495
533
80
2
-- | -- Module : Data.Graphen -- Copyright : (c) 2015 Fritz Grimpen -- License : BSD3-style -- -- Maintainer : Fritz Grimpen <fritz@grimpen.net> -- Stability : experimental module Data.Graphen ( -- * Edges Edge(..) , (~~>) , (<~~) , (<~>) , (%) , isDir , isUndir , isSource , isDestination...
fritz0705/Graphen
Data/Graphen.hs
mit
18,735
0
15
4,803
4,767
2,552
2,215
-1
-1
-- Copyright © 2013 Julian Blake Kongslie <jblake@jblake.org> -- Licensed under the MIT license. {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# OPTIONS_GHC -Wall -Werror #-} module Language.GBAsm.Lexer where import ...
jblake/gbasm
src/Language/GBAsm/Lexer.hs
mit
6,948
0
16
3,034
2,162
1,089
1,073
131
13
-- | This package isn't really meant to be used as a library. It's typically -- used as a GHC preprocessor, like so: -- -- > {-# OPTIONS_GHC -F -pgmF autoexporter #-} -- -- For more information, please see the README on GitHub: -- <https://github.com/tfausak/autoexporter#readme>. module Autoexporter ( autoexporter ...
tfausak/autoexporter
source/library/Autoexporter.hs
mit
5,727
0
14
974
905
498
407
77
4
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE LiberalTypeSynonyms #-} ...
Jinxit/firestone
src/Firestone/Utils.hs
mit
870
0
10
203
229
119
110
24
2
{-# LANGUAGE FlexibleContexts #-} module Main where import Data.List.Split import Text.Megaparsec import Text.Megaparsec.Prim import Control.Monad import System.Exit import System.IO import Options.Applicative hiding (some) import qualified Options.Applicative as A -- Main: main :: IO () main = join $ execParser o...
sordina/prettybraces
src/Main.hs
mit
3,000
0
12
709
1,198
627
571
74
2
{-# htermination pred :: (Ratio Int) -> (Ratio Int) #-}
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Prelude_pred_6.hs
mit
56
0
2
10
3
2
1
1
0
module Consts ( dt ) where dt :: Double dt = 0.1
lesguillemets/fishpackin
src/Consts.hs
mit
78
0
4
41
19
12
7
4
1
-- Bench program written by Sebastian Fischer <sebf@informatik.uni-kiel.de> -- prints the speed of value-supply compared to GHC's UniqSupply when -- generating a list of fresh identifiers. import Data.Supply import Unique import UniqSupply import System ( getArgs ) import System.CPUTime ( getCPUTime, cp...
yav/value-supply
tests/Bench.hs
mit
1,408
0
16
354
451
228
223
32
1
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Main where import Control.DeepSeq (NFData, deepseq) import Control.Exception import Control.Monad (replicateM, void) import qualified Data.ByteString as BS import Data.Time.Clock.POSIX import Data.Foldable (for_)...
flipstone/kioku
benchmarks/Main.hs
mit
5,050
0
21
1,388
1,523
774
749
135
2
import Text.I18n import Text.I18n.Po hiding (putStrLn) import Text.Blaze.I18n import Text.Blaze.Renderer.Pretty import qualified Blaze.Html5 as H import System.Environment main :: IO () main = do -- get locale args <- getArgs env <- getEnv "LANG" let locale = Locale $ head (args ++ [takeWhile ('_' /=) env,...
mcmaniac/blaze-i18n
examples/i18n-html.hs
mit
695
0
16
160
251
130
121
21
2
-- ------------------------------------------------------------------------------------- -- Author: Sourabh S Joshi (cbrghostrider); Copyright - All rights reserved. -- For email, run on linux (perl v5.8.5): -- perl -e 'print pack "H*","736f75726162682e732e6a6f73686940676d61696c2e636f6d0...
cbrghostrider/Hacking
HackerRank/Algorithms/Warmup/extraLongFactorial.hs
mit
468
0
10
73
39
23
16
1
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables, FlexibleContexts #-} {- | Shims are non-Haskell dependencies, organized in the shims repository. Most of the GHCJS RTS is located there too (except the generated parts in "Gen2.Rts" and "Gen2.RtsApply"). example shim yaml: version: js: - ...
ghcjs/ghcjs
src/Gen2/Shim.hs
mit
8,989
0
19
2,716
2,503
1,296
1,207
-1
-1
{- | Module : $Header$ - Description : Implementation of logic instances - Copyright : (c) Daniel Hausmann & Georgel Calin & Lutz Schroeder, DFKI Lab Bremen, - Rob Myers & Dirk Pattinson, Department of Computing, ICL - License : GPLv2 or higher, see LICENSE.txt - Maintainer : hausman...
nevrenato/Hets_Fork
GMP/versioning/gmp-coloss-0.0.3/GMP/Logics.hs
gpl-2.0
23,400
44
21
5,615
7,358
3,943
3,415
-1
-1
{-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} -- | A 'Connection' encapsulates the communication with the synthesis server. -- This module provides functions for opening and closing connections, as well -- as communication and synchronisation p...
kaoskorobase/hsc3-server
Sound/SC3/Server/Connection.hs
gpl-2.0
2,625
0
13
518
737
389
348
51
1
{-# OPTIONS_GHC -fno-warn-orphans -fno-warn-overlapping-patterns #-} {-# LANGUAGE CPP #-} module Darcs.Patch.Prim.V3.Commute ( CommuteMonad(..) ) where import Data.List ( intersect ) import qualified Data.ByteString as BS (length) import Darcs.Patch.Witnesses.Ordered ( (:>)(..) ) import Darcs.Patch.Witnesses...
DavidAlphaFox/darcs
src/Darcs/Patch/Prim/V3/Commute.hs
gpl-2.0
2,912
0
17
628
980
509
471
-1
-1
{-# LANGUAGE ScopedTypeVariables, FlexibleContexts, RankNTypes, TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses #-} module Carnap.Languages.PurePropositional.Util (dropOuterParens, showClean, isValid, isEquivTo, toSchema, getIndicies, getValuations, isBooleanBinary, isBooleanUnary, isBoolean, HasLitera...
opentower/carnap
Carnap/src/Carnap/Languages/PurePropositional/Util.hs
gpl-3.0
6,574
0
16
1,446
2,192
1,138
1,054
101
13
module Display where import Control.Arrow ((***)) import Control.Monad import FRP.Yampa.VectorSpace import Graphics.UI.SDL as SDL import qualified Graphics.UI.SDL.Primitives as SDLP import qualified Graphics.UI.SDL.TTF as TTF import Text....
keera-studios/pang-a-lambda
Experiments/collisions/Display.hs
gpl-3.0
3,811
0
19
913
1,150
590
560
76
2
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 HsImpExp: Abstract syntax: imports, exports, interfaces -} {-# LANGUAGE DeriveDataTypeable #-} module Language.Haskell.Syntax.HsImpExp ( LIE , LImportDecl , ImportDecl(..) ...
shayan-najd/HsParser
Language/Haskell/Syntax/HsImpExp.hs
gpl-3.0
3,797
0
13
1,220
411
264
147
40
0
-- | This module contains our representation of an HTML document. Our -- simplistic version of HTML only knows anchors, horizontal rules, tables and paragraphs, -- but this is enough to display a BibTeX database. module Common.HtmlTypes where import Common.BibTypes -- | an HTML document has a head and a bo...
toothbrush/cco-bibtex2html
Common/HtmlTypes.hs
gpl-3.0
3,850
0
9
1,789
497
291
206
42
4
{-# LANGUAGE OverloadedLists #-} module Kalkulu.Builtin.Plus(plus) where import Kalkulu.Builtin import qualified Kalkulu.BuiltinSymbol as B import qualified Data.Vector as V import Kalkulu.VectorPattern plus :: BuiltinDefinition plus = defaultBuiltin { attributes = [Flat, Listable, NumericFunction, OneIdentity, ...
vizietto/kalkulu
src/Kalkulu/Builtin/Plus.hs
gpl-3.0
1,569
0
13
412
595
325
270
35
4
------------------------------------------------------------------ -- | -- Module : Gom.CodeGen.Mappings -- Copyright : (c) Paul Brauner 2009 -- (c) Emilie Balland 2009 -- (c) INRIA 2009 -- Licence : GPL (see COPYING) -- -- Maintainer : paul.brauner@inria.fr -- Stability : prov...
polux/hgom
src/Gom/CodeGen/Mappings.hs
gpl-3.0
5,823
0
16
1,839
1,296
654
642
81
3
import Control.Applicative (Const (..)) import Data.Functor.Identity (Identity (..)) -- import Data.Functor.Const -- import Control.Monad.Identity -- Ex Show the isomorphism between the standard definition of Maybe and this desugaring: -- type Maybe' a = Either (Const () a) (Identity a) -- Hint: Define two mappings ...
sujeet4github/MyLangUtils
CategoryTheory_BartoszMilewsky/PI_08_Functoriality/Ex_2.hs
gpl-3.0
1,710
0
14
460
330
169
161
15
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.Mirror.Types -- Copyright : (c) 2015-2016 Brendan Hay ...
rueshyna/gogol
gogol-mirror/gen/Network/Google/Mirror/Types.hs
mpl-2.0
4,422
0
7
1,277
570
389
181
164
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Messages/BatchDelete.hs
mpl-2.0
5,475
0
20
1,301
791
461
330
117
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Placements/Insert.hs
mpl-2.0
3,228
0
14
739
406
242
164
63
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-iap/gen/Network/Google/Resource/IAP/UpdateIapSettings.hs
mpl-2.0
5,574
0
17
1,302
859
500
359
123
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-factchecktools/gen/Network/Google/Resource/FactCheckTools/Pages/Create.hs
mpl-2.0
4,723
0
16
1,126
703
410
293
105
1
{- ORMOLU_DISABLE -} -- Implicit CAD. Copyright (C) 2011, Christopher Olah (chris@colah.ca) -- Copyright (C) 2014, 2015, 2016 Julia Longtin (julial@turinglace.com) -- Released under the GNU AGPLV3+, see LICENSE -- Make string litearls more polymorphic, so we can use them with Builder. {-# LANGUAGE OverloadedStrings #-...
colah/ImplicitCAD
Graphics/Implicit/Export/TriangleMeshFormats.hs
agpl-3.0
6,457
2
19
1,998
1,873
1,061
812
93
1
module Kata where getPerimeter :: Int -> Int -> Int getPerimeter x y = sum [x, x, y, y]
ice1000/OI-codes
codewars/101-200/perimeter-of-a-rectangle.hs
agpl-3.0
89
0
6
20
42
24
18
3
1
{-# LANGUAGE OverloadedStrings #-} -- | Module for using LDAP as an authentication service -- -- This code was written for yesod-auth-ldap, but maybe it can be used in any -- given Haskell web framwork? -- For now, the only usage examples will be Yesod specific. So you can find -- them in the yesod-auth-ldap repo modu...
mlitchard/authenticate-ldap
Web/Authenticate/LDAP.hs
bsd-2-clause
2,722
0
21
1,020
444
230
214
46
4
{-# OPTIONS_GHC -F -pgmF htfpp #-} module Main where import Test.Framework import {-@ HTF_TESTS @-} Network.NSFW.Firewall.Rule.Tests main :: IO () main = htfMain htf_importedTests
m-renaud/NSFW
testsuite/unittest/TestSuite.hs
bsd-2-clause
183
0
6
27
37
23
14
6
1
-------------------------------------------------------------------------------- {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-do-bind #-} module LoremMarkdownum.Web.Views ( index , markdownHtml ) where -------------------------------------------------------------------------------- ...
jaspervdj/lorem-markdownum
src/LoremMarkdownum/Web/Views.hs
bsd-3-clause
9,042
0
29
3,398
1,525
692
833
170
2
module Types where import Distribution.Cab import System.Console.GetOpt ---------------------------------------------------------------- type Arg = String ---------------------------------------------------------------- data Switch = SwNoharm | SwRecursive | SwAll | SwInfo ...
kazu-yamamoto/cab
src/Types.hs
bsd-3-clause
1,920
0
9
719
332
213
119
62
0