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#-} {-| Module : ETA.Utils.JAR Description : Small utility functions for creating Jars from class files. Copyright : (c) Christopher Wells 2016 (c) Rahul Muttineni 2016-2017 License : MIT This module provides utility functions for creating Jar archives from JVM cla...
alexander-at-github/eta
compiler/ETA/Utils/JAR.hs
bsd-3-clause
10,355
0
22
2,176
1,559
879
680
-1
-1
{- Codec for de/encoding form data shipped in URL query strings or in POST request bodies. (application/x-www-form-urlencoded) (cf. RFC 3986.) -} module Web.Codec.URLEncoder ( encodeString , decodeString , isUTF8Encoded , utf8Encode ) where import qualified Codec.Binary.UTF8.Str...
sof/twitter
Web/Codec/URLEncoder.hs
bsd-3-clause
2,544
4
17
752
947
479
468
67
7
module Printer ( nl , join , style , bold , inYellow , inGreen , inRed , line , line80 , dline , dline80 , padLeft , padRight , padLeftS , padRightS , toRow , toRowF , toPanel ) where import Data.List (intercalate) nl :: String -> String nl str = str ++ "\n" join :: [String] -> String join = intercalate "\n" style ...
LFDM/hstats
src/lib/Printer.hs
bsd-3-clause
2,196
0
10
481
978
522
456
72
1
module Main (main) where import Data.Binary.Get import Data.Binary.Put import qualified Data.ByteString.Lazy as BL import Codec.Tracker.IT main :: IO () main = do file <- BL.getContents let it0 = runGet getModule file it1 = runGet getModule $ runPut $ putModule it0 i...
riottracker/modfile
examples/testIT.hs
bsd-3-clause
426
0
12
126
114
62
52
13
2
{-# LANGUAGE DeriveGeneric, FlexibleInstances, OverloadedStrings, ScopedTypeVariables #-} module Main where import qualified Language.Lua.Annotated as A import qualified Language.Lua.Annotated.Lexer as L import qualified Language.Lua.Annotated.Simplify as S import qualified Language.Lua.Parse...
osa1/language-lua
tests/Main.hs
bsd-3-clause
16,916
0
26
4,758
3,638
1,830
1,808
330
5
{-# LANGUAGE OverloadedStrings #-} module Crypto.Pkcs12.BmpStringSpec where import Crypto.Pkcs12.BmpString ( BmpString(..), encode, decode ) import qualified Data.ByteString as B import qualified Data.ByteString.Base16 as H import Data.Either.Compat import Test.Hspec import Test....
tkawachi/pkcs12-hs
test/Crypto/Pkcs12/BmpStringSpec.hs
bsd-3-clause
1,759
0
20
457
441
222
219
38
1
module PartII (partII) where import Euterpea import Changes import Elements -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Part II -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- fMinorScale :: [PitchClass] fMinorScale = [F, G, Af, Bf, C, Df, Ef,...
mzero/PlainChanges2
src/PartII.hs
bsd-3-clause
3,026
0
14
745
1,384
753
631
69
1
{-# LINE 1 "System.Console.GetOpt.hs" #-} {-# LANGUAGE Safe #-} ----------------------------------------------------------------------------- -- | -- Module : System.Console.GetOpt -- Copyright : (c) Sven Panne 2002-2005 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : l...
phischu/fragnix
builtins/base/System.Console.GetOpt.hs
bsd-3-clause
16,494
0
12
4,725
3,010
1,632
1,378
134
10
module Cases.IfaceWriterTest where import Data.List import qualified Data.Map as Map import Language.Haskell.Exts hiding (name) import Tc.Assumption import Tc.Class import Tc.Kc.KcEnv import Iface.IfaceWriter import Utils.Id import qualified Utils.Env as Env testifacewriter1 = do writeInterface name...
rodrigogribeiro/mptc
test/Cases/IfaceWriterTest.hs
bsd-3-clause
2,181
0
13
446
806
433
373
47
1
{- Dev: representation of a device Part of Mackerel: a strawman device definition DSL for Barrelfish Copyright (c) 2007, 2008, ETH Zurich. All rights reserved. This file is distributed under the terms in the attached LICENSE file. If you do not find this file, copies can be found by writing to: ...
kishoredbn/barrelfish
tools/mackerel/Dev.hs
mit
1,761
0
14
537
323
191
132
28
1
module Beta where import Data.List sum' [] = 0 sum' (x:xs) = x + sum' xs add 0 a = a add a b = add (pred a) (succ b) add' a 0 = a add' a b | b > 0 = add' (succ a) (pred b) | otherwise = add' (pred a) (succ b) drop' _ [] = [] drop' 0 xs = xs drop' n (x:xs) = drop' (pred n) xs drop2 _ [] = [] drop2 0 xs = xs d...
squest/Zenx-trainer-training
haskell/beta.hs
epl-1.0
2,023
0
13
648
1,086
541
545
60
2
{- Copyright (C) 2006-2010 John MacFarlane <jgm@berkeley.edu> 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 program is ...
sol/pandoc
src/Text/Pandoc/Parsing.hs
gpl-2.0
33,058
0
21
9,993
7,663
3,957
3,706
624
10
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- Derived from AWS service descriptions, licensed under Apache 2.0. -- | -- Module : Network.AWS.CloudWatch.Types.Product ...
fmapfmapfmap/amazonka
amazonka-cloudwatch/gen/Network/AWS/CloudWatch/Types/Product.hs
mpl-2.0
25,482
0
28
5,693
4,743
2,759
1,984
441
1
-------------------------------------------------------------------- -- | -- Module : Text.RSS.Export -- Copyright : (c) Galois, Inc. 2008 -- License : BSD3 -- -- Maintainer: Sigbjorn Finne <sof@galois.com> -- Stability : provisional -- Description: Convert from RSS to XML -- --------------------------------------...
GaloisInc/feed
Text/RSS/Export.hs
bsd-3-clause
5,501
12
29
1,353
2,019
1,030
989
132
2
{-# LANGUAGE DeriveDataTypeable, MultiParamTypeClasses, FlexibleInstances, TypeSynonymInstances #-} ----------------------------------------------------------------------------- -- | -- Module : XMonad.Layout.Fullscreen -- Copyright : (c) 2010 Audun Skaugen -- License : BSD-style (see xmonad/LICENSE) -- -...
eb-gh-cr/XMonadContrib1
XMonad/Layout/Fullscreen.hs
bsd-3-clause
8,783
0
17
1,751
2,008
1,040
968
137
1
{-# LANGUAGE FlexibleInstances #-} -- | -- This module contains the Json Parser. module Data.Katydid.Parser.Json ( decodeJSON , JsonTree ) where import Text.JSON ( decode , Result(..) ...
katydid/haslapse
src/Data/Katydid/Parser/Json.hs
bsd-3-clause
1,905
0
11
665
591
319
272
38
2
{-# language ScopedTypeVariables #-} -- | module to continue the physics simulation of the scene in a background thread. module Game.BackgroundScene where import Data.Initial import Data.IORef import Control.Monad.State.Strict import Control.Concurrent import Clocked import Utils import Base import Game.Scene ...
geocurnoff/nikki
src/Game/BackgroundScene.hs
lgpl-3.0
2,806
0
19
758
649
310
339
56
5
{-| Discovery of incidents by the maintenance daemon. This module implements the querying of all monitoring daemons for the value of the node-status data collector. Any new incident gets registered. -} {- Copyright (C) 2015 Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or...
leshchevds/ganeti
src/Ganeti/MaintD/CollectIncidents.hs
bsd-2-clause
5,195
0
22
1,427
923
481
442
78
4
module Curry where f :: Int -> Int -> Int f x y = x + y g :: (Int, Int) -> Int g (x,y) = x + y main = do print $ curry g 3 4 print $ uncurry f (3,4)
beni55/fay
tests/curry.hs
bsd-3-clause
156
0
9
50
101
54
47
8
1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Distribution.Solver.Types.Settings ( ReorderGoals(..) , IndependentGoals(..) , AvoidReinstalls(..) , ShadowPkgs(..) , StrongFlags(..) , EnableBackjumping(..) , CountConflicts(..) ) where import Distributio...
thomie/cabal
cabal-install/Distribution/Solver/Types/Settings.hs
bsd-3-clause
1,237
0
6
180
332
193
139
33
0
{-# LANGUAGE ScopedTypeVariables #-} module CV.DFT where import CV.Bindings.Types import CV.Bindings.Core import CV.Bindings.ImgProc import CV.Image import CV.ImageMath as IM import CV.ImageMathOp import System.IO.Unsafe import Foreign.Ptr dft :: Image GrayScale d -> Image Complex D32 dft i = unsafePerformIO $ do n...
BeautifulDestinations/CV
CV/DFT.hs
bsd-3-clause
1,950
0
19
438
757
376
381
52
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ScopedTypeVariables #-} -- --------------------------------------------------------------------------- -- | -- Module : Data.Vector.Algorithms.Common -- Copyright : (c) 2008-2011 Dan Doel -- Maintainer : Dan Doel -- Stability : Experimental -- Portability : Port...
abakst/liquidhaskell
benchmarks/vector-algorithms-0.5.4.2/Data/Vector/Algorithms/Common.hs
bsd-3-clause
6,421
0
14
1,813
588
340
248
32
1
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE CPP, NoImplicitPrelude, BangPatterns, MagicHash #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | -- Module : GHC.Enum -- Copyright : (c) The University of Glasgow, 1992-2002 -- License : see libra...
alexander-at-github/eta
libraries/base/GHC/Enum.hs
bsd-3-clause
28,127
0
15
7,845
7,566
4,057
3,509
435
2
module Binary (tests) where import Control.Applicative import Data.Binary.Put import Data.Binary.Get import Linear import qualified Data.ByteString.Lazy as BS import Test.HUnit originalVecs :: (V3 Float, V2 Char) originalVecs = (V3 1 2 3, V2 'a' 'b') bytes :: BS.ByteString bytes = runPut $ do putLinear $ fst original...
isomorphism/linear
tests/Binary.hs
bsd-3-clause
592
0
12
119
193
106
87
16
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="id-ID"> <title>Mulai Cepat | Eksistensi ZAP</title> <maps> <homeID>top</homeID> <mapref...
thc202/zap-extensions
addOns/quickstart/src/main/javahelp/org/zaproxy/zap/extension/quickstart/resources/help_id_ID/helpset_id_ID.hs
apache-2.0
974
78
66
159
413
209
204
-1
-1
{-# OPTIONS -fno-warn-orphans #-} {-# LANGUAGE TemplateHaskell, DeriveDataTypeable, RankNTypes, NoMonomorphismRestriction #-} module Lamdu.Data.Expression.Utils ( makeApply , makePi, makeLambda, makeLam , pureApply , pureHole , pureSet , pureRecord , pureLam , pureGetField , pureLiteralInteger , pur...
schell/lamdu
Lamdu/Data/Expression/Utils.hs
gpl-3.0
17,945
0
20
3,963
6,113
3,125
2,988
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE PolyKinds #-} {-# OPTIONS_GHC -Werror=typed-holes #-} main :: IO () main = undefined data Proxy k = Proxy test1 = _ :: Proxy '[ 'True ] test2 = _ :: Proxy '[ '[ 1 ] ] test3 = _ :: Proxy '[ '( "Symbol", 1 ) ]
sdiehl/ghc
testsuite/tests/printer/T14343.hs
bsd-3-clause
251
0
9
56
90
52
38
9
1
-- | Use persistent-mongodb the same way you would use other persistent -- libraries and refer to the general persistent documentation. -- There are some new MongoDB specific filters under the filters section. -- These help extend your query into a nested document. -- -- However, at some point you will find the normal ...
psibi/persistent
persistent-mongoDB/Database/Persist/MongoDB.hs
mit
61,293
0
21
14,728
15,439
8,055
7,384
-1
-1
-- | -- Module : System.Hapistrano.Commands -- Copyright : Β© 2015-Present Stack Builders -- License : MIT -- -- Maintainer : Cristhian Motoche <cmotoche@stackbuilders.com> -- Stability : experimental -- Portability : portable -- -- Collection of type safe shell commands that can be fed into -- 'Syst...
stackbuilders/hapistrano
src/System/Hapistrano/Commands/Internal.hs
mit
9,754
0
13
2,330
2,522
1,332
1,190
223
2
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Repl ( Repl , get , put , runRepl , liftIO ) where import Control.Applicative (Applicative) import Control.Monad.State (StateT, MonadIO, liftIO, runStateT) import Control.Monad.State.Class (MonadState, get, put) newtype Repl s a = ...
kosmoskatten/traffic-analysis
src/Repl.hs
mit
506
0
8
112
161
95
66
15
1
module Util ( sealRandom ) where import Control.Auto import Control.Auto.Effects import Control.Monad.Random import Control.Monad.Trans.State import Data.Serialize import Prelude hiding ((.), id) sealRandom :: (Monad m, RandomGen g, Serialize g) => Auto (RandT g m) a b -> g ...
mstksg/jlebot2
src/Util.hs
mit
393
0
9
103
127
73
54
13
1
{-# LANGUAGE OverloadedStrings #-} module Database.Toxic.Query.Parser where import Database.Toxic.Types as Toxic import Database.Toxic.Query.AST import Control.Applicative ((<$>), (*>), (<*), (<*>)) import Control.Monad import Data.List (nub) import Data.Monoid import qualified Data.Text as T import qualified Data.V...
MichaelBurge/ToxicSludgeDB
src/Database/Toxic/Query/Parser.hs
mit
7,669
0
19
1,616
2,227
1,113
1,114
228
3
module BinaryTree where import Prelude data Tree a = Empty | Node (a) (Tree a) (Tree a) deriving (Show) add :: Ord a => Tree a -> a -> Tree a add tree n = case tree of Empty -> Node n Empty Empty Node node l r | node > n -> Node node (add l n) r | node < n -> Node node l (add r n)...
NickolayStorm/usatu-learning
Functional programming/lab6/BinaryTree.hs
mit
1,263
112
24
424
687
352
335
33
2
{-# OPTIONS_GHC -fno-warn-unused-do-bind #-} module SFOT.Asm.Parser where import SFOT.Asm.AST import Text.ParserCombinators.Parsec hiding (Parser, token, label, labels) import Prelude hiding (and) import Data.Word import Data.Char (toLower) import Data.List (find) import Control.Monad import Data.Maybe type Parse...
Munksgaard/SFOT
Asm/Parser.hs
mit
13,754
0
15
3,859
5,078
2,463
2,615
471
15
{-# LANGUAGE NoMonomorphismRestriction #-} module Plugins.Gallery.Gallery.Manual35 where import Diagrams.Prelude spike :: Trail R2 spike = fromOffsets . map r2 $ [(1,3), (1,-3)] burst = mconcat . take 13 . iterate (rotateBy (-1/13)) $ spike example = strokeT burst # fc yellow # lw 0.1 # lc orange
andrey013/pluginstest
Plugins/Gallery/Gallery/Manual35.hs
mit
312
0
12
61
125
67
58
7
1
{-# LANGUAGE ViewPatterns #-} import qualified Data.Sequence as S import Data.Sequence ((<|), (><), Seq) import Data.Sequence (ViewL((:<), EmptyL), viewl) import Data.Foldable (foldl', toList) import Utils (zipMap) import Data.List.Ordered (nub, sort) newtype SeqWithIndex = SWI { getSWI :: (Seq Int, Int, Int, Int) } ...
arekfu/project_euler
p0088/p0088.hs
mit
2,498
0
15
832
824
461
363
38
5
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} module Game.Halma.TelegramBot.View.I18n ( HalmaLocale (..) , NotYourTurnInfo (..) , CantUndoReason (..) , AIMove (..) , enHalmaLocale , deHalmaLocale , LocaleId (..) , allLocaleIds , localeById ) where import Game.Halma.Board (HalmaDir...
timjb/halma
halma-telegram-bot/src/Game/Halma/TelegramBot/View/I18n.hs
mit
13,187
0
29
3,674
2,858
1,557
1,301
315
23
{-# LANGUAGE RecordWildCards #-} -- | Reading/writing bundles of embedded files and other data from/to -- executables. -- -- A bundle has three parts: the static header, which identifies -- a string of bytes as a bundle using a particular version of the format -- and gives the size of the dynamic header; the dy...
valderman/data-bundle
Data/Embed/File.hs
mit
10,981
0
25
2,716
2,139
1,101
1,038
146
7
-- -*- mode: haskell; -*- module Wiggly ( headMay, takeMay, sortOn, nChooseK, chunkList, comboCount, weird, firstThat , nckValues ) where import Data.Maybe import Data.Ord (comparing) import Data.List (sort, sortB...
wiggly/functional-pokering
src/Wiggly.hs
mit
3,444
0
14
1,009
1,594
848
746
84
2
{-# OPTIONS_HADDOCK hide, prune #-} module Handler.Mooc.BrowseProposals ( getBrowseProposalsR , getBrowseProposalsForExpertsR , fetchLastSubmissions , mkSubmissionsWidget , noProposalParams , ProposalParams(..) , ProposalSortParam (..) ) where import Application.Grading (designRatingToVisual) import Da...
mb21/qua-kit
apps/hs/qua-server/src/Handler/Mooc/BrowseProposals.hs
mit
18,397
0
21
6,951
2,750
1,510
1,240
-1
-1
module RecursiveContents (getRecursiveContents) where import Control.Monad (forM) import System.Directory (doesDirectoryExist, getDirectoryContents) import System.FilePath ((</>), splitFileName, splitPath, joinPath) import Data.List (isInfixOf, foldl', nub) import ListTransformations (dropLastUntil) getRecursiveCon...
cirquit/Personal-Repository
Haskell/RWH/FileSystem/RecursiveContents.hs
mit
1,574
0
15
479
468
246
222
29
2
import Data.Char type Bit = Int bin2int :: [Bit] -> Int bin2int = foldr (\x y -> x + 2 * y) 0 int2bin :: Int -> [Bit] int2bin 0 = [] int2bin n = n `mod` 2 : int2bin (n `div` 2) make8 :: [Bit] -> [Bit] make8 bits = take 8 (bits ++ repeat 0) -- step 1: add function to include the parity bit parity :: [Bit] -> Bit pa...
fabioyamate/programming-in-haskell
ch07/ex08-09.hs
mit
1,402
0
10
308
527
285
242
36
1
main = putStr "Hellow,"
MyXOF/Popush
tmp/1412873118610/test.hs
gpl-2.0
23
0
5
3
9
4
5
1
1
module SimpleRepl (repl) where repl :: (String -> String) -> IO () repl f = interact (eachLine f) eachLine :: (String -> String) -> (String -> String) eachLine f = unlines . map f . lines
robertclancy/tapl
arith/simplerepl.hs
gpl-2.0
190
0
7
38
89
47
42
5
1
-- DivideVenceras.hs -- Divide y vencerΓ‘s. -- JosΓ© A. Alonso JimΓ©nez https://jaalonso.github.com -- ===================================================================== module Tema_23.DivideVenceras (divideVenceras) where -- (divideVenceras ind resuelve divide combina pbInicial) resuelve el -- problema pbInicial med...
jaalonso/I1M-Cod-Temas
src/Tema_23/DivideVenceras.hs
gpl-2.0
1,005
0
12
252
153
84
69
11
1
{-| A module which implements the calculation of apparent rates in a pepa model. -} module Language.Pepa.ApparentRates ( summedPepaRate ) where {- Standard Library Modules Imported -} {- Non-Standard Library Modules Imported -} {- Local Library Modules Imported -} import Language.Pepa.Syntax ( Pars...
allanderek/ipclib
Language/Pepa/ApparentRates.hs
gpl-2.0
1,541
0
11
487
349
181
168
29
1
module Prime where import System.Random import Control.Monad import System.IO.Unsafe -- β”Œ(Β° o Β°)β”˜ DANCE! β””(Β° o Β°)┐ import Math.NumberTheory.Moduli findPrime :: Integer -> Int -> Integer findPrime b k = head (dropWhile (\x -> not (millerRabin x k)) (keyMaker 10000000000000000 b)) millerRabin :: Integer -> Int -> Boo...
h3nnn4n/rsa-haskell
Prime.hs
gpl-3.0
1,852
0
14
456
803
422
381
38
1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE OverloadedStrings #-} module Main (tests, main) where import Prelude hiding (FilePath) import qualified Control.Monad.State as State import Control.Monad.Identity (runIdentity) import Data.ByteString (ByteString) import qualified Data.ByteSt...
jmillikin/anansi
tests/Tests.hs
gpl-3.0
12,999
278
20
2,669
3,308
1,692
1,616
286
2
module LinkUp where import Control.Monad import Data.List import qualified Data.Vector as V import System.Random type Pattern = Int data Block = Empty | Pattern Pattern type Size = (Int, Int) instance Show Block where show Empty = " " show (Pattern p) = show p type Board = V....
KenetJervet/mapensee
haskell/problems/LinkUp.hs
gpl-3.0
899
0
14
214
322
168
154
26
2
{-# LANGUAGE NoImplicitPrelude, DeriveFunctor, FlexibleInstances, GeneralizedNewtypeDeriving, MultiParamTypeClasses, BangPatterns, RecordWildCards, TypeFamilies #-} module Lamdu.Infer.Internal.Monad ( Results(..), subst, constraints, emptyResults , Context(..), ctxResults, ctxState, initialContext , InferSt...
da-x/Algorithm-W-Step-By-Step
Lamdu/Infer/Internal/Monad.hs
gpl-3.0
11,112
0
14
2,261
2,890
1,562
1,328
-1
-1
{-| Module : Types Description : Photobooth Core Types Copyright : (c) Chris Tetreault, 2014 License : GPL-3 Stability : experimental -} module DMP.Photobooth.Core.Types where import DMP.Photobooth.Module.Types import Control.Monad.State import Control.Concurrent.STM import Control.Monad.Trans.Maybe {-| An atomic, ...
christetreault/dmp-photo-booth-prime
DMP/Photobooth/Core/Types.hs
gpl-3.0
1,186
0
11
256
156
99
57
19
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-language/gen/Network/Google/Resource/Language/Documents/AnalyzeSentiment.hs
mpl-2.0
4,961
0
16
1,110
706
412
294
105
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
dysinger/amazonka
amazonka-datapipeline/gen/Network/AWS/DataPipeline/AddTags.hs
mpl-2.0
2,975
0
10
726
410
248
162
53
1
module Git.Command.Notes (run) where run :: [String] -> IO () run args = return ()
wereHamster/yag
Git/Command/Notes.hs
unlicense
83
0
7
15
42
23
19
3
1
{-# LANGUAGE CPP #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE TypeOperators #-} module Pos.Util.Jsend ( -- * JSend data types and functions ResponseStatus(..) , HasDiagnostic(..) , noDiagnosticKey -- * Generic parsing and rendering helpers. , jsendErrorGenericToJSON , jsendErrorGen...
input-output-hk/cardano-sl
lib/src/Pos/Util/Jsend.hs
apache-2.0
4,941
0
16
1,186
1,240
677
563
-1
-1
-- -- Copyright 2017 Andrew Dawson -- -- 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 t...
aopp-pred/fp-truncate
test/Truncate/Test/Truncatable/Convert.hs
apache-2.0
4,979
0
9
1,253
932
496
436
72
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TupleSections #-} module BarthPar.Scrape.Read where import Control.Applicative import Control.Arrow ((&&&)) import Control.Error import Control.Lens hiding ((|>)) i...
erochest/barth-scrape
src/BarthPar/Scrape/Read.hs
apache-2.0
5,994
0
18
2,328
1,815
945
870
-1
-1
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QTextDocument.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:20 Warning : this file is machine generated - do...
uduki/hsQt
Qtc/Gui/QTextDocument.hs
bsd-2-clause
36,081
0
15
5,700
11,502
5,824
5,678
-1
-1
{-# LANGUAGE RecordWildCards #-} ----------------------------------------------------------------------------- -- | -- Module : Text.Hoodle.Migrate.FromXournal -- Copyright : (c) 2011-2013 Ian-Woo Kim -- -- License : BSD3 -- Maintainer : Ian-Woo Kim <ianwookim@gmail.com> -- Stability : experimental -- P...
wavewave/hoodle-parser
src/Text/Hoodle/Migrate/FromXournal.hs
bsd-2-clause
1,759
0
9
396
407
220
187
28
1
module Append where import qualified Prelude data List a = Nil | Cons a (List a) append :: (List a1) -> (List a1) -> List a1 append xs ys = case xs of { Nil -> ys; Cons h t -> Cons h (append t ys)}
dalaing/bfpg-2013-03
coq/extraction/append.hs
bsd-3-clause
214
0
10
62
104
56
48
10
2
{-# LANGUAGE LambdaCase, RecordWildCards #-} {-# LANGUAGE RankNTypes #-} {-| (re-exports) @ :m +Commands.Mixins.DNS13OSX9 @ -} module Commands.Mixins.DNS13OSX9 ( module Commands.Mixins.DNS13OSX9 , module Commands.Mixins.DNS13OSX9.Types , module Commands.Mixins.DNS13OSX9.Derived , module Commands.Mixins.DNS13OSX9....
sboosali/commands-frontend-DragonNaturallySpeaking
sources/Commands/Mixins/DNS13OSX9.hs
bsd-3-clause
2,948
0
12
397
452
278
174
37
1
-- -- BaseTypes.hs -- Copyright (C) 2017 jragonfyre <jragonfyre@jragonfyre> -- -- Distributed under terms of the MIT license. -- module Game.BaseTypes where -- ( -- ) where import qualified Data.HashMap.Lazy as M import qualified Data.Yaml as Y import Data.Yaml (FromJSON (..), (.:), (.!=), (.:?), (.=), ToJSON (..))...
jragonfyre/TRPG
src/Game/BaseTypes.hs
bsd-3-clause
3,489
0
14
714
948
509
439
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} {-# OPTIONS_GHC -fno-warn-missing-fields -fno-cse #-} module Action.CmdLine(CmdLine(..), getCmdLine) where import System.Console.CmdArgs import System.Directory import System.FilePath import Data.Version import Paths_hoogle(version) data CmdLine = Search {color :: May...
BartAdv/hoogle
src/Action/CmdLine.hs
bsd-3-clause
2,637
0
15
717
693
380
313
68
2
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 -} {-# LANGUAGE CPP, DeriveDataTypeable #-} -- | -- #name_types# -- GHC uses several kinds of name internally: -- -- * 'OccName.OccName': see "OccName#name_types" -- -- * 'RdrName.RdrName' is the type of names that come di...
nushio3/ghc
compiler/basicTypes/RdrName.hs
bsd-3-clause
43,942
0
16
12,037
8,173
4,349
3,824
515
5
{-# OPTIONS_GHC -fno-warn-orphans #-} {-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE GADTs #-} -- This module is full of orphans, unfortunately module GHCi.TH.Binary () where import Data.Binary import qualified Data.ByteString as B ...
shlevy/ghc
libraries/ghci/GHCi/TH/Binary.hs
bsd-3-clause
2,621
0
10
374
714
348
366
75
0
----------------------------------------------------------------------------- -- | -- Module : Data.SBV.Core.Symbolic -- Copyright : (c) Levent Erkok -- License : BSD3 -- Maintainer : erkokl@gmail.com -- Stability : experimental -- -- Symbolic values --------------------------------------------------...
josefs/sbv
Data/SBV/Core/Symbolic.hs
bsd-3-clause
64,844
0
34
22,141
14,154
7,558
6,596
926
8
{-# LANGUAGE TemplateHaskell, GeneralizedNewtypeDeriving, DeriveDataTypeable, TypeFamilies #-} module Happstack.Auth.Internal.Data.Sessions where import Data.Data import Data.SafeCopy import qualified Data.Map as M import Happstack.Auth.Internal.Data.SessionKey data Sessions a = Sessions ...
mcmaniac/happstack-auth
src/Happstack/Auth/Internal/Data/Sessions.hs
bsd-3-clause
431
0
10
73
95
57
38
10
0
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-} module Compiler.Hoopl.Stream where import Control.Monad import Test.QuickCheck type Stream s a = s -> Maybe (Pair s a) data Pair s a = Pair a (Stream s a) instance Show (s -> Maybe (Pair s a)) where show _ = "<function>" instance (Arbitrary a, Arbitrary s...
ezyang/hoopl
src/Compiler/Hoopl/Stream.hs
bsd-3-clause
1,765
0
13
492
853
445
408
42
2
module Data.Expression.Inverse where import Prelude (Eq, Show, error, otherwise, show, undefined, ($), (++), (==)) import Domains.Applicable import Domains.Exponentiative import Domains.Field import Domains.Trigonometric import Data.Expression {-# A...
pmilne/algebra
src/Data/Expression/Inverse.hs
bsd-3-clause
1,919
0
16
647
844
427
417
45
14
{-# LANGUAGE GADTs #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE KindSignatures #-} {-# LA...
GaloisInc/saw-script
src/SAWScript/HeapsterBuiltins.hs
bsd-3-clause
59,605
0
25
16,574
12,783
6,309
6,474
-1
-1
{-# LANGUAGE OverloadedStrings, RecordWildCards, MultiParamTypeClasses, FunctionalDependencies, TypeSynonymInstances, FlexibleInstances, TemplateHaskell #-} module Main where -- Generic useful stuff. import Control.Applicative import Control.Monad import Data.Foldable (for_) import ...
aelve/harold
src/Main.hs
bsd-3-clause
12,517
0
23
3,256
3,010
1,562
1,448
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TupleSections #-} -- | This module define simple backends using the file-system. The interfaces -- for those backends are defined in `Rescoyl.Types`. module Rescoyl.Simple where import Control.Applicative ((<$>)) import Control.Exception (bracket_) import Control.Monad.T...
noteed/rescoyl
Rescoyl/Simple.hs
bsd-3-clause
11,588
0
26
2,446
3,417
1,706
1,711
245
6
-------------------------------------------------------------------------------- -- | -- Module : Main -- Note : Hello, World! -- -- A dummy Haskell module, for playing. -- -------------------------------------------------------------------------------- -- main :: IO () main = putStrLn "Hello, World!" ...
capn-freako/Haskell_Misc
hello_world.hs
bsd-3-clause
433
0
7
82
94
52
42
7
1
{-# LANGUAGE DeriveGeneric, DeriveAnyClass #-} module Slack.Response where import GHC.Generics import Data.Aeson import Data.Aeson.Types import Data.Text options = defaultOptions { fieldLabelModifier = camelTo2 '_' , constructorTagModifier = camelTo2 '_' } data ResponseType = Eph...
xldenis/bookclub
src/Slack/Response.hs
bsd-3-clause
759
0
8
154
180
101
79
22
1
{-# LANGUAGE ScopedTypeVariables #-} module Control.Pipe.Binary ( -- ** Handle and File IO fileReader, handleReader, fileWriter, handleWriter, -- ** Chunked Byte Stream Manipulation take, takeWhile, dropWhile, lines, bytes, ) where import Control.Monad import Control.Monad.IO.Class import Cont...
pcapriotti/pipes-extra
Control/Pipe/Binary.hs
bsd-3-clause
3,556
0
16
850
1,055
534
521
86
3
{-# LANGUAGE RecursiveDo, FlexibleContexts, RankNTypes, NamedFieldPuns, RecordWildCards #-} module Distribution.Server.Features.Html ( HtmlFeature(..), initHtmlFeature ) where import Distribution.Server.Framework import qualified Distribution.Server.Framework.ResponseContentTypes as Resource import Distribut...
chrisdotcode/hackage-server
Distribution/Server/Features/Html.hs
bsd-3-clause
84,344
0
33
27,223
16,948
8,902
8,046
-1
-1
{-# LANGUAGE OverloadedStrings #-} module Main where import qualified Criterion.Main as C import GHC.Int import Control.DeepSeq import Data.List (foldl') import qualified Y.String as S benchCons :: String -> String -> C.Benchmark benchCons text name = C.bench name $ C.nf go "" where go start = foldr S.cons s...
ethercrow/y
bench/BenchString.hs
bsd-3-clause
2,214
0
12
476
703
367
336
63
1
{-# LANGUAGE DeriveDataTypeable, DeriveFunctor, FlexibleInstances, GADTs, OverloadedStrings, RankNTypes, RecordWildCards, DefaultSignatures #-} -- | -- Module : Network.Wreq.Internal.Types -- Copyright : (c) 2014 Bryan O'Sullivan -- -- License : BSD-style -- Maintainer : bos@serpentine.com -- Stability...
bos/wreq
Network/Wreq/Internal/Types.hs
bsd-3-clause
10,972
1
14
2,500
1,510
927
583
130
4
{-# LANGUAGE OverloadedStrings #-} module Main where import WordVectors.Utils (countWords) main :: IO () main = do counts <- countWords "/projects/programming-collective-intelligence/test/Data/FeedData.xml" putStrLn $ show counts
vprokopchuk256/programming-collective-intelligence
app/Main.hs
bsd-3-clause
281
0
8
76
50
26
24
7
1
{-| Module : Network.Kademlia.Tree Description : Implementation of the Node Storage Tree Network.Kademlia.Tree implements the Node Storage Tree used to store and look up the known nodes. This module is designed to be used as a qualified import. -} module Network.Kademlia.Tree ( NodeTree , create , i...
froozen/kademlia
src/Network/Kademlia/Tree.hs
bsd-3-clause
10,088
0
16
3,339
2,975
1,553
1,422
137
5
{-# LANGUAGE RankNTypes #-} module LiftMe.Database.DB ( DB , connection , withDB ) where import Data.Text (Text) import qualified Data.Text as T import qualified Database.HDBC as HDBC import qualified Database.HDBC.PostgreSQL as PG data DB = DB { m_con :: PG.Connection } -- | Get PostgreSQL connection ...
nilscc/weightlifting.cc
src-hs/LiftMe/Database/DB.hs
bsd-3-clause
741
0
9
129
152
92
60
18
1
-- Copyright (c) 2016-present, Facebook, Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. {-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-} module Duckling.Ordinal.NL.Rules ( rules ) where im...
facebookincubator/duckling
Duckling/Ordinal/NL/Rules.hs
bsd-3-clause
1,942
0
17
366
500
309
191
58
2
module M where data Bool = True | False (&&) :: Bool -> Bool -> Bool class C a where c:: a -> a -> Bool class D a where d:: a -> a -> Bool instance C Bool where c = (&&) instance D Bool where d = (&&) instance (C a, D a) => C [a] where c [] [] = True c (a:x) (b:y) = let cab = c a b ...
rodrigogribeiro/mptc
test/TesteCarlos.hs
bsd-3-clause
480
0
10
184
245
132
113
18
1
-- -- HTTP client for use with io-streams -- -- Copyright Β© 2012-2013 Operational Dynamics Consulting, Pty Ltd -- -- The code in this file, and the program it is a part of, is made -- available to you by its authors as open source software: you can -- redistribute it and/or modify it under a BSD licence. -- {-# LANGUA...
afcowie/pipes-http
tests/JsonSnippet.hs
bsd-3-clause
2,397
0
11
560
478
272
206
53
1
{-# LANGUAGE DuplicateRecordFields #-} module AST.Expression where import AST.V0_16 import qualified AST.Pattern as Pattern import qualified AST.Variable as Var import qualified Reporting.Annotation as A ---- GENERAL AST ---- data UnaryOperator = Negative deriving (Eq, Show) data LetDeclaration = LetDef...
rgrempel/frelm.org
vendor/elm-format/parser/src/AST/Expression.hs
mit
2,154
0
17
554
612
348
264
59
0
{-# LANGUAGE Safe #-} -- | Read/Write a CNF file only with ghc standard libraries module SAT.Mios.Util.DIMACS ( -- * Input fromFile , clauseListFromFile , fromMinisatOutput , clauseListFromMinisatOutput -- * Output , toFile , toDIMACSString , ...
shnarazk/mios
src/SAT/Mios/Util/DIMACS.hs
gpl-3.0
803
0
5
202
116
79
37
20
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-storagegateway/gen/Network/AWS/StorageGateway/DescribeGatewayInformation.hs
mpl-2.0
7,048
0
22
1,440
900
533
367
98
1
{-| Definition of the data collectors used by MonD. -} {- Copyright (C) 2014 Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyri...
apyrgio/ganeti
src/Ganeti/DataCollectors.hs
bsd-2-clause
3,479
0
12
586
489
270
219
46
1
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 \section[TcMovectle]{Typechecking a whole module} https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/TypeChecker -} {-# LANGUAGE CPP #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NondecreasingIndentation #-} module...
mcschroeder/ghc
compiler/typecheck/TcRnDriver.hs
bsd-3-clause
105,639
21
29
35,459
18,253
9,513
8,740
-1
-1
{-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- -- (c) The University of Glasgow 2006 -- -- The purpose of this module is to transform an HsExpr into a CoreExpr which -- when evaluated, returns a (Meta.Q Meta.Exp) computation analogous to the -- input HsExpr. We do...
christiaanb/ghc
compiler/deSugar/DsMeta.hs
bsd-3-clause
120,720
2,211
26
32,636
25,865
15,130
10,735
2,023
16
{-# LANGUAGE OverloadedStrings #-} module Trombone.Tests.Bootstrap ( runTests ) where import Trombone.Db.Template import Trombone.RoutePattern runTests :: IO () runTests = print [ routePatternTest1 , routePatternTest2 , routePatternTest3 , routePatternTest4 ...
johanneshilden/trombone
Trombone/Tests/Bootstrap.hs
bsd-3-clause
1,641
0
9
429
276
157
119
26
1
module Instruction ( RegUsage(..), noUsage, NatCmm, NatCmmDecl, NatBasicBlock, Instruction(..) ) where import Reg import BlockId import OldCmm import Platform -- | Holds a list of source and destination registers used by a -- particular instruction. -- -- Mach...
mcmaniac/ghc
compiler/nativeGen/Instruction.hs
bsd-3-clause
4,938
0
10
1,945
392
247
145
72
1
module Genetic.Central ( evolve , Pool, popul , startup, handle , connect ) where -- $Id$ import Autolib.Util.Sort import Autolib.Util.Uniq import Autolib.Util.Perm import Autolib.Util.Zufall import Autolib.Util.Perm import Autolib.ToDoc import Control.Monad import Autolib.FiniteMap import Autolib.Set -- impor...
Erdwolf/autotool-bonn
src/Genetic/Central.hs
gpl-2.0
3,976
51
19
1,355
1,568
813
755
126
3
-- | This is a new set of XML combinators for Xtract, not standard, -- but based on the standard set in "Text.Xml.Haxml.Combinators". -- The main difference is that the Content Filter type becomes a -- Double Filter. A Double Filter always takes the whole document -- as an extra argument, so you can start to t...
Ian-Stewart-Binks/courseography
dependencies/HaXml-1.25.3/src/Text/XML/HaXml/Xtract/Combinators.hs
gpl-3.0
3,829
0
12
924
1,324
710
614
54
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-rds/gen/Network/AWS/RDS/AddSourceIdentifierToSubscription.hs
mpl-2.0
5,319
0
9
968
495
305
190
63
1
----------------------------------------------------------------------------- -- -- Code generation for coverage -- -- (c) Galois Connections, Inc. 2006 -- ----------------------------------------------------------------------------- module StgCmmHpc ( initHpc, mkTickBox ) where import StgCmmMonad import MkGraph imp...
mcmaniac/ghc
compiler/codeGen/StgCmmHpc.hs
bsd-3-clause
1,199
0
13
376
252
138
114
26
1
module Main where import BasePrelude hiding (assert, isRight, isLeft) import MTLPrelude import Control.Monad.Trans.Either import Data.Either.Combinators import Test.Hspec import Test.QuickCheck import Test.QuickCheck.Instances import Data.Time import qualified Data.Text import qualified Data.Text.Lazy import qualified...
mikeplus64/hasql-postgres
hspec/Main.hs
mit
11,799
7
48
3,908
3,677
1,847
1,830
-1
-1
{- | Module : $Header$ Description : Central GUI for Hets, with display of development graph Copyright : (c) Jorina Freya Gerken, Till Mossakowski, Uni Bremen 2002-2006 License : GPLv2 or higher, see LICENSE.txt Maintainer : till@informatik.uni-bremen.de Stability : provisional Portability : non-p...
keithodulaigh/Hets
GUI/GraphDisplay.hs
gpl-2.0
2,497
0
20
481
420
209
211
39
3
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE UndecidableInstances #-} {-# OPTI...
TOSPIO/yi
src/library/Yi/Keymap/Emacs/Utils.hs
gpl-2.0
15,734
0
21
4,272
3,433
1,803
1,630
270
5
{-# OPTIONS_GHC -w -fno-warn-redundant-constraints #-} {-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleContexts, FlexibleInstances, OverlappingInstances, UndecidableInstances, KindSignatures #-} -- Cut down from a larger core-lint error module Q where import...
sdiehl/ghc
testsuite/tests/typecheck/should_compile/T4969.hs
bsd-3-clause
2,717
0
14
667
834
442
392
-1
-1