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 CPP, DeriveDataTypeable, FlexibleInstances, MagicHash, MultiParamTypeClasses, ScopedTypeVariables #-} -- | -- Module : Data.Vector.Storable.Mutable -- Copyright : (c) Roman Leshchinskiy 2009-2010 -- License : BSD-style -- -- Maintainer : Roman Leshchinskiy <rl@cse.unsw.edu.au> -- Stability :...
sergv/vector
Data/Vector/Storable/Mutable.hs
bsd-3-clause
17,219
0
22
4,022
3,868
2,099
1,769
279
5
{-# LANGUAGE ApplicativeDo #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedLists #-} {-# LANGUAGE RecordWildCards #-} {-| This module exports the `tomlToDhall` function for translating a TOML syntax tree from @tomland@ to a Dhall syntax tree. For now, this package does not have type inference so ...
Gabriel439/Haskell-Dhall-Library
dhall-toml/src/Dhall/TomlToDhall.hs
bsd-3-clause
12,634
0
23
3,334
2,947
1,508
1,439
186
15
{-# LANGUAGE TemplateHaskell #-} module Simulation ( -- * Simulation runSim )where import Graphics.Gloss import Graphics.Gloss.Interface.IO.Game import Graphics.Gloss.Data.Vector (mulSV) import System.Random (StdGen, getStdGen) import Control.Monad.Random (Rand, runRand) import Control.Lens import Control.Mo...
SRechenberger/flock
lib/Simulation.hs
bsd-3-clause
2,855
2
14
794
973
523
450
-1
-1
{-# LANGUAGE DeriveGeneric,DuplicateRecordFields,DeriveDataTypeable #-} module Api.Stockfighter.Jailbreak.Types where import Data.Aeson import Data.Data import Data.Typeable import GHC.Generics import qualified Data.ByteString.Base64 as Base64 import qualified Data.ByteString as BS import qualified Data.ByteString.L...
MichaelBurge/stockfighter-jailbreak
src/Api/Stockfighter/Jailbreak/Types.hs
bsd-3-clause
4,538
0
12
904
1,237
711
526
142
0
{-# LANGUAGE MonoLocalBinds, ExistentialQuantification #-} -- | A specialised 'Manager' for 'Compiler's module Compiler.Manager ( -- * Interface to the module Compiler (..), Depmask (..), Bijection (..), -- * Building a manager Manager, mkCompilerManager, -- * Operations step, IndexError (..), Di...
paolino/dependencies-sm
Compiler/Manager.hs
bsd-3-clause
2,439
0
15
564
612
345
267
35
2
{-# LANGUAGE FlexibleContexts , GeneralizedNewtypeDeriving #-} module System.Heap.Heap where import Control.Applicative import Control.Exception import Control.Monad.Error import Control.Monad.Reader import Data.Binary import System.Heap.Error import System.Heap.Pointer import System.IO import qualified System...
sebastiaanvisser/diskheap
src/System/Heap/Heap.hs
bsd-3-clause
1,861
0
17
540
567
290
277
53
2
{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} module Network.SSH.LoadKeys where import Control.Monad ((<=<), unless) import Data.ByteArray.Encoding (Base(Base64), convertFromBase) import Data.ByteString (ByteString) import qualified Data.Byt...
glguy/ssh-hans
src/Network/SSH/LoadKeys.hs
bsd-3-clause
3,651
0
16
933
843
453
390
69
2
module Settings.Packages (packageArgs) where import Expression import Flavour import Oracles.Setting import Oracles.Flag import Packages import Rules.Gmp import Settings -- | Package-specific command-line arguments. packageArgs :: Args packageArgs = do stage <- getStage rtsWays <- getRtsWays p...
sdiehl/ghc
hadrian/src/Settings/Packages.hs
bsd-3-clause
18,226
0
20
5,600
2,857
1,461
1,396
235
3
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE MultiWayIf #-} module Matterhorn.State.Channels ( updateViewed , refreshChannel , refreshChannelsAndUsers , setFocus , refreshChannelById , applyPreferenceChange , leaveChannel , leaveCurrentChannel , getNextUnreadChannel , getNextUnreadUserOrChannel , next...
matterhorn-chat/matterhorn
src/Matterhorn/State/Channels.hs
bsd-3-clause
46,020
0
32
14,706
9,157
4,484
4,673
-1
-1
{-# LANGUAGE OverloadedStrings #-} module Views.Tests (tests) where import Test.Framework (Test, testGroup) import qualified Views.PaginationSplicesTest (tests) import qualified Views.ReplySplicesTest (tests) tests :: Test tests = testGroup "Test.Views" [ Views.ReplySplicesTest.test...
HaskellCNOrg/snap-web
tests/Views/Tests.hs
bsd-3-clause
368
0
7
77
74
46
28
9
1
module AbstractInterpreter.Tools where {- This module reexports functions to check totality and stricter values -} import TypeSystem import Utils.Utils import Utils.ToString import AbstractInterpreter.AbstractSet import AbstractInterpreter.Assignment import AbstractInterpreter.FunctionAnalysis import AbstractInterpr...
pietervdvn/ALGT
src/AbstractInterpreter/Tools.hs
bsd-3-clause
2,756
127
15
485
870
481
389
54
1
-- | The following example declare the top level ports and generates Verilog for a 'GCD' machine. module Main ( main ) where -- Import the TRS modules. import Language.TRS -- | The entry point of any Haskell program. main :: IO () main = do putStrLn "Hello TRS!" putStrLn "Generating a netlist for a sorter machine...
tomahawkins/trs
Examples/Sorter.hs
bsd-3-clause
2,534
0
23
711
1,124
568
556
65
3
-------------------------------------------------------------------- -- | -- Module : Text.PDF.Transformations -- Description : Functions for transforming PDF content. -- Copyright : (c) Dylan McNamee 2011 -- License : BSD3 -- -- Maintainer: Dylan McNamee <dylan@galois.com> -- Stability : provisional -- Port...
dylanmc/Haskell-PDF-Parsing-Library
Text/PDF/Transformations.hs
bsd-3-clause
1,284
0
15
209
233
132
101
14
3
{-# LANGUAGE RebindableSyntax #-} -- Copyright : (C) 2009 Corey O'Connor -- License : BSD-style (see the file LICENSE) #define ONLY_SMALL_CASES 0 import Bind.Marshal.Prelude import Bind.Marshal.Verify import Bind.Marshal.SerAction.Base import Bind.Marshal.SerAction.Static import Bind.Marshal.SerAction.Verify....
coreyoconnor/bind-marshal
test/verify_seraction_static.hs
bsd-3-clause
1,674
7
9
523
786
386
400
-1
-1
{-# LANGUAGE OverloadedStrings #-} import Control.Concurrent import Control.Monad.IO.Class import Data.Maybe import Data.Text (Text) import Network.Consul (createManagedSession,getSessionInfo,initializeConsulClient,withSession,ConsulClient(..),ManagedSession(..)) import Network.Consul.Types import qualified Network.Con...
hellertime/consul-haskell
tests/Main.hs
bsd-3-clause
10,190
0
17
1,641
2,711
1,302
1,409
190
4
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} module Nix.XML (toXML) where import qualified Data.HashMap.Lazy as M import Data.List import Data.Ord import qualified Data.Text as ...
jwiegley/hnix
src/Nix/XML.hs
bsd-3-clause
2,653
0
25
770
959
493
466
60
12
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE CPP #-} -- {-# OPTIONS_GHC -cpp -DPiForallInstalled #-} -------------------------------------------------------------------- -- | -- Copyright : (c) Andreas Reuleaux 2015 -- License : BSD2 -- Maintainer: Andreas Reuleaux <rx@a-rx.info> -- Stability : experimenta...
reuleaux/pire
tests/ParserTests/ErasedApp.hs
bsd-3-clause
2,153
0
19
595
426
239
187
28
1
{-# LANGUAGE ScopedTypeVariables #-} module WeiXin.PublicPlatform.Material ( module WeiXin.PublicPlatform.Material , module WeiXin.PublicPlatform.Class ) where -- {{{1 imports import ClassyPrelude import qualified Control.Exception.Safe as ExcSafe import Network.Wreq import qualified Network.Wreq.Session ...
yoo-e/weixin-mp-sdk
WeiXin/PublicPlatform/Material.hs
mit
22,096
0
18
8,025
3,756
1,965
1,791
-1
-1
{- | Module : ./Isabelle/IsaProve.hs Description : interface to the Isabelle theorem prover Copyright : (c) University of Cambridge, Cambridge, England adaption (c) Till Mossakowski, Uni Bremen 2002-2005 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de St...
spechub/Hets
Isabelle/IsaProve.hs
gpl-2.0
9,662
0
22
2,537
2,921
1,440
1,481
230
7
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoMonomorphismRestriction #-} -- |Namelike definitions module CO4.Names ( Namelike (..), convertName, funName, listName, nilName, consName , tupleTypeName, tupleDataName, maybeName, eitherName, orderingName , natName, natTypeName, i...
abau/co4
src/CO4/Names.hs
gpl-3.0
4,241
1
15
1,022
1,516
751
765
-1
-1
module PatBind2 where main :: Int main = x x :: Int (x:[]) = [1, 2, 3]
roberth/uu-helium
test/runtimeerrors/PatBind2.hs
gpl-3.0
74
0
7
20
43
26
17
5
1
module InfiniteType3 where insert :: (a -> a -> Bool) -> a -> [a] -> [a] insert f a [] = [a] insert f a (x:xs) | f a x = [a,x] ++ xs | True = [x] ++ (insert a xs)
roberth/uu-helium
test/typeerrors/Examples/InfiniteType3.hs
gpl-3.0
183
0
8
62
119
63
56
5
1
{-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Main -- Copyright : (c) 2013-2015 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) -- module Main (main)...
fmapfmapfmap/amazonka
amazonka-ses/test/Main.hs
mpl-2.0
522
0
8
103
76
47
29
9
1
{-# LANGUAGE LambdaCase #-} -- | Event loop module Haskus.System.EventLoop ( L , JobResponse (..) , mainLoop ) where import Control.Concurrent.STM import Haskus.Utils.Flow -- Note [Event loop] -- ~~~~~~~~~~~~~~~~~ -- -- The event loop is loosely based on the EFL's main loop (Enlightenment -- Foundation L...
hsyl20/ViperVM
haskus-system/src/lib/Haskus/System/EventLoop.hs
bsd-3-clause
4,025
0
20
1,428
574
313
261
52
7
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 Typecheck arrow notation -} {-# LANGUAGE RankNTypes #-} module TcArrows ( tcProc ) where import {-# SOURCE #-} TcExpr( tcMonoExpr, tcInferRho, tcSyntaxOp, tcCheckId, tcPolyExpr ) import HsSyn import TcMatches import T...
bitemyapp/ghc
compiler/typecheck/TcArrows.hs
bsd-3-clause
15,827
0
17
5,034
3,390
1,797
1,593
211
2
-- | -- Module : Crypto.PubKey.RSA -- License : BSD-style -- Maintainer : Vincent Hanquez <vincent@snarc.org> -- Stability : experimental -- Portability : Good -- module Crypto.PubKey.RSA ( Error(..) , PublicKey(..) , PrivateKey(..) , Blinder(..) -- * generation function , generateWi...
nomeata/cryptonite
Crypto/PubKey/RSA.hs
bsd-3-clause
3,927
0
16
1,323
623
363
260
57
3
-------------------------------------------------------------------------------- module Network.WebSockets.Tests.Util ( ArbitraryUtf8 (..) , arbitraryUtf8 , arbitraryByteString ) where -------------------------------------------------------------------------------- import Control.Applicative...
nsluss/websockets
tests/haskell/Network/WebSockets/Tests/Util.hs
bsd-3-clause
1,381
0
8
180
192
122
70
18
1
{-# LANGUAGE OverloadedStrings #-} -- | All hardcoded names in the compiler should go in here -- the convention is -- v_foo for values -- tc_foo for type constructors -- dc_foo for data constructors -- s_foo for sort names -- rt_foo for raw names -- class_foo for classes module Name.Names(module Name.Name,module Name....
hvr/jhc
src/Name/Names.hs
mit
3,414
0
15
638
941
508
433
-1
-1
module LocalWhereIn2 where --A definition can be removed if it is not used by other declarations. --Where a definition is removed, it's type signature should also be removed. --In this Example: remove the defintion 'square' sumSquares x y =sq x + sq y sq x= x^pow where pow=2 anotherFun x =sumSqu...
SAdams601/HaRe
old/testing/removeDef/LocalWhereIn2_TokOut.hs
bsd-3-clause
338
0
6
86
59
31
28
5
1
module Record1 where data C = F {f1 :: Int, f3 :: Bool} g = f1 (F 1 True)
SAdams601/HaRe
old/testing/removeField/Record1_TokOut.hs
bsd-3-clause
76
0
8
21
41
24
17
3
1
{-# LANGUAGE PolyKinds #-} {-# LANGUAGE RankNTypes #-} module T12668 where import GHC.Exts data Some r = Some (TYPE r -> TYPE r) doSomething :: forall (r :: RuntimeRep). forall (a :: TYPE r). () => Int -> (a -> Int) -> a -> a doSomething n f = case n of 1 -> error "hello" 3 -> error "hel...
sdiehl/ghc
testsuite/tests/polykinds/T12668.hs
bsd-3-clause
324
0
11
92
119
66
53
-1
-1
-- This file is understood to be in the public domain. module MonadTrans where {- - This provides a way of accessing a monad that is inside - another monad. -} class MonadTrans t where lift :: Monad m => m a -> t m a --liftTrans :: (MonadTrans t) => (a -> t m b) -> (t m a -> t m b) --liftTrans f m = do { a <...
seereason/ghcjs
test/nofib/spectral/cryptarithm2/MonadTrans.hs
mit
332
0
9
88
41
22
19
3
0
{-# LANGUAGE DeriveGeneric #-} module GenBigTypes where import GHC.Generics data BigSum = C0 | C1 | C2 | C3 | C4 | C5 | C6 | C7 | C8 | C9 | C10 | C11 | C12 | C13 | C14 | C15 | C16 | C17 | C18 | C19 | C20 | C21 | C22 | C23 | C24 | C25 | C26 | C27 | C2...
ezyang/ghc
testsuite/tests/perf/compiler/T5642.hs
bsd-3-clause
903
0
5
421
317
211
106
15
0
module A071 where
siddhanathan/ghc
testsuite/tests/driver/A071.hs
bsd-3-clause
18
0
2
3
4
3
1
1
0
sumNatNums :: Integer -> Integer sumNatNums 1 = 1 sumNatNums n = n + sumNatNums (n - 1) sumNatNums' :: Integer -> Integer -> Integer sumNatNums' 1 acc = acc + 1 sumNatNums' n acc = sumNatNums' (n - 1) (acc + n) main = do putStrLn $ show $ sumNatNums 5000000 putStrLn $ show $ sumNatNums' 5000000 0
fredmorcos/attic
snippets/haskell/NatNum.hs
isc
310
0
8
71
131
65
66
8
1
{-# htermination enumFrom :: () -> [()] #-}
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Prelude_enumFrom_2.hs
mit
44
0
2
8
3
2
1
1
0
--Creates a new git repo in the current directory and --adds an empty README.md, barebones .gitignore, and --a copy of the MIT license, then commits them import System.Directory (getCurrentDirectory) import System.Environment(getArgs) import System.FilePath.Posix(splitPath) import System.Process(runCommand,waitForProce...
Hrothen/scripts
src/ginit/ginit.hs
mit
2,633
3
12
557
317
160
157
26
1
{-# LANGUAGE ForeignFunctionInterface #-} {-# LANGUAGE JavaScriptFFI #-} -- | JavaScript marshalling. This module is pretty unsafe. Be careful. module Alder.JavaScript ( JSObj , JSValue(..) , JSArgs(..) , window , (.:) , writeProp , call , apply ) where import C...
ghcjs/ghcjs-sodium
src/Alder/JavaScript.hs
mit
3,677
21
13
1,042
1,240
619
621
93
1
-- http://www.seas.upenn.edu/~cis194/spring13/lectures/11-applicative2.html -- -- Implementing a few functions from the lecture notes -- import Control.Applicative -- This is my version of *> pointRightStar :: Applicative f => f a -> f b -> f b pointRightStar = Control.Applicative.liftA2 (const id) {-| f = Maybe f ...
umairsd/course-haskell-cis194
hw11/wk11.hs
mit
1,602
0
10
364
246
131
115
10
1
module Record.Syntax.Prelude ( module Exports, LazyText, TextBuilder, (∘), (∘∘), zipTraversableWith, zipTraversableWithM, ) where -- base-prelude ------------------------- import BasePrelude as Exports hiding (left, right, isLeft, isRight) -- transformers ------------------------- import Control.Monad...
nikita-volkov/record-syntax
library/Record/Syntax/Prelude.hs
mit
1,813
0
13
312
634
381
253
-1
-1
module Koofr.File where import Data.Aeson.TH import Koofr.Internal data FileList = FileList { fileListFiles :: [File] } deriving (Eq, Show) data File = File { fileName :: String , fileType :: String , fileModified :: Integer , fileSize :: Integer ,...
edofic/koofr-api-hs
src/Koofr/File.hs
mit
585
0
10
175
161
92
69
-1
-1
{-# LANGUAGE GADTs #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE FlexibleContext...
b1g3ar5/Spreadsheet
RefParser.hs
mit
8,982
21
17
2,756
3,004
1,492
1,512
280
2
import Control.Monad import qualified Control.Exception as E import System.IO handler (E.ErrorCall s) = putStrLn $ "*** Exception" incomplete1 0 = [undefined] incomplete1 n = n:(incomplete1 $ n-1) incomplete2 0 = undefined incomplete2 n = n:(incomplete2 $ n-1) main = do hSetBuffering stdout NoBuffering forM_ co...
QuickChick/Luck
luck/examples-template/ghc-counters/0.hs
mit
11,574
0
24
2,193
8,044
4,712
3,332
126
1
module ParserSpec (tests) where import Protolude import Test.Tasty (TestTree, testGroup) import Test.Tasty.HUnit (testCase, (@?=)) import Test.Tasty.QuickCheck as QC import TestUtils (testWithProvider) tests :: TestTree tests = testGroup "Parser" [properties, units] properties :: TestTree properties = testGroup "Pr...
Archimidis/md2html
test/ParserSpec.hs
mit
538
0
12
103
164
95
69
15
1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE TemplateHaskell #-} -- | Various product types. -- module Network.AWS.Wolf.Types.Product where import Data.Aeson.TH import Network.AWS.Wolf.Prelude -- | Conf -- -- SWF and S3 configuration parameters. -- data Conf = Conf { _cTimeout :: Int -- ^ SWF regular ...
mfine/wolf
src/Network/AWS/Wolf/Types/Product.hs
mit
1,352
0
9
326
311
184
127
33
0
module Spec.Comment (spec) where import ClassyPrelude import Test.Hspec import Feature.Comment.Types import Feature.User.Types import Feature.Article.Types import Feature.Auth.Types import qualified Misc.Client as RW import Spec.Common spec :: Spec spec = commentSpec commentSpec :: Spec commentSpec = describe "co...
eckyputrady/haskell-scotty-realworld-example-app
test/Spec/Comment.hs
mit
3,321
0
20
834
926
429
497
72
1
{-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} ----------------------------------------------------------------------------- -- | -- Module : Util -- Copyright : HASLAb team, University of Minho -- License : MIT -- -- Maintainer : Victor Miraldo <victor.cacciari@gmail.com> -...
VictorCMiraldo/mmm
MMM/Util/Util.hs
mit
2,365
0
11
435
514
293
221
-1
-1
-------------------------------------------------------------------------------- {-# LANGUAGE OverloadedStrings #-} import Data.Monoid (mappend) import Hakyll import Text.Pandoc crunchWithCtx ctx = do route $ setExtension "html" compile $ pandocCompiler >>= loadAndApplyTemplate "templates/page.html" ...
ucsd-progsys/131-web
site.hs
mit
3,096
0
14
927
334
171
163
42
1
module Sets.Multiset where import Notes import Sets.Basics.Terms import Sets.Multiset.Macro import Sets.Multiset.Terms multisetS :: Note multisetS = section "Multisets" $ do multisetDefinition multisetNotation exneeded multisetDifferenceDefinition multise...
NorfairKing/the-notes
src/Sets/Multiset.hs
gpl-2.0
1,492
0
11
317
400
230
170
29
1
-- -- Copyright (c) 2012 Citrix Systems, 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 progra...
OpenXT/manager
apptool/Import.hs
gpl-2.0
14,560
0
20
3,322
3,758
1,819
1,939
268
4
-- | standalone aufgabenconfig, -- damit jeder mal tutor spielen kann module Main where import Gateway.CGI import Inter.Evaluate import Inter.Make import Inter.Motd import Inter.Bank import Inter.Store import Inter.Login import Inter.Logged import Inter.Tutor import Inter.Student import qualified Control.Aufgab...
Erdwolf/autotool-bonn
trial/src/Inter/Trial.hs
gpl-2.0
6,054
25
20
1,454
1,792
978
814
-1
-1
module Tweet.Test.Bayesian ( testWordFreq , testRelativeFreq , testSpamProb , testCombinedProbs , testMostInteresting , testSpamScore ) where import qualified Data.Map as Map import qualified Data.List as List import Test.QuickCheck import Test.HUnit import Tweet.Bayesian import Tweet.Types between :: Double -> Doubl...
cbowdon/TweetFilter
Tweet/Test/Bayesian.hs
gpl-3.0
4,259
1
13
1,170
1,337
739
598
81
1
{- Copyright (C) 2015 Michael Dunsmuir This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program i...
mdunsmuir/hat
src/Server.hs
gpl-3.0
2,043
1
15
424
459
211
248
41
2
module Reader ( drg -- reads a grammar from a string -- returns corresponding deterministic automaton , trg -- non- ) where import ExpParse (pline) import FiniteMap import Options import Defaults import Ids import IdStack import Gen import FA import FAtypes import FAdet import Gram2FA im...
jwaldmann/rx
src/Reader.hs
gpl-3.0
567
2
10
133
138
80
58
23
1
{- | Module : Web.Handler Description : Application-specific handler functions. Copyright : (c) 2011 Cedric Staub, 2012 Benedikt Schmidt License : GPL-3 Maintainer : Cedric Staub <cstaub@ethz.ch> Stability : experimental Portability : non-portable -} {-# LANGUAGE OverloadedStrings, QuasiQuote...
kmilner/tamarin-prover
src/Web/Handler.hs
gpl-3.0
45,713
0
29
13,063
9,134
4,625
4,509
694
8
{-# LANGUAGE OverloadedStrings #-} module Slackware.Download ( download , downloadAll , filename ) where import Conduit (ZipSink(..), getZipSink, sinkFile) import Crypto.Hash (Digest, MD5) import Crypto.Hash.Conduit (sinkHash) import Data.Conduit ((.|), runConduitRes) import qualified Data.List.NonEmpt...
Dlackware/dlackware
lib/Slackware/Download.hs
gpl-3.0
1,319
0
15
291
436
241
195
37
1
module Main where fatorial :: Int->Int fatorial x = fatorial' x 1 fatorial' :: Int->Int->Int fatorial' x r | x == 0 = r | x == 1 = r | otherwise = fatorial' (x-1) (r*x) coeficienteBinomial :: Int -> Int -> Int coeficienteBinomial m n = (fatorial m) `div` ( (fatorial n) * ( fatorial (m-n) ) ) main :: IO() m...
llscm0202/BIGDATA2017
ATIVIDADE1/exerciciosFuncoes/ex7.hs
gpl-3.0
365
0
11
85
190
97
93
13
1
{-# LANGUAGE CPP #-} module HipSpec.Sig.Scope where import GHC hiding (Sig) import Control.Applicative import Data.Maybe import DataCon #if __GLASGOW_HASKELL__ >= 708 import ConLike #endif getIdsInScope :: (Id -> Id) -> Ghc [Id] getIdsInScope fix_id = do ns <- getNamesInScope things <- catMaybes <$> mapM...
danr/hipspec
src/HipSpec/Sig/Scope.hs
gpl-3.0
1,150
0
11
238
380
193
187
27
2
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, NoMonomorphismRestriction, ScopedTypeVariables, UndecidableInstances #-} {- | Functions I found useful for doing webapps with HStringTemplate. More usage examples can be found by grep -r \"Text.StringTemplate.Helpers\" in happs-tutorial, on hackage. -} modul...
wavewave/cvmaker
src/Text/StringTemplate/Helpers.hs
gpl-3.0
8,189
0
12
1,736
1,654
875
779
109
2
module Database.Design.Ampersand.Output.PredLogic ( PredLogicShow(..), showLatex, showRtf, mkVar ) where import Data.List import Database.Design.Ampersand.Basics import Database.Design.Ampersand.ADL1 import Database.Design.Ampersand.Classes import Database.Design.Ampersand.Misc import Database.Design...
guoy34/ampersand
src/Database/Design/Ampersand/Output/PredLogic.hs
gpl-3.0
29,871
1
19
11,698
9,274
4,903
4,371
422
62
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-partners/gen/Network/Google/Resource/Partners/Users/Get.hs
mpl-2.0
9,359
0
24
2,383
1,356
779
577
204
1
module HN.Optimizer.FormalArgumentsDeleter (runB) where import Compiler.Hoopl hiding ((<*>)) import Safe.Exact import HN.Intermediate import HN.Optimizer.Node import HN.Optimizer.Pass import HN.Optimizer.ExpressionRewriter import HN.Optimizer.ArgumentValues (ArgFact) import HN.Optimizer.Utils rewriteB :: DefinitionN...
ingvar-lynn/HNC
HN/Optimizer/FormalArgumentsDeleter.hs
lgpl-3.0
1,216
6
14
181
409
216
193
31
1
{-# LANGUAGE TemplateHaskell, ScopedTypeVariables, GeneralizedNewtypeDeriving, FlexibleInstances, MultiParamTypeClasses, UndecidableInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} ------------------------------------------------------ -- | -- Module : Crypto.Noise.Internal.Handshake.State -- Maint...
centromere/cacophony
src/Crypto/Noise/Internal/Handshake/State.hs
unlicense
5,498
0
12
1,726
1,085
617
468
98
1
module Hocker.Flags (mergeConfigAndFlags, parseFlags, usage) where import Data.Char (toLower) import Data.Maybe (fromMaybe) import Data.Monoid (mempty, (<>)) import Data.Yaml import Hocker.Data import Hocker.Validation import ...
knutwalker/hocker
src/lib/Hocker/Flags.hs
apache-2.0
4,479
0
12
1,145
1,397
717
680
93
9
-- | -- Module : Text.Megaparsec.Expr -- Copyright : © 2015 Megaparsec contributors -- © 2007 Paolo Martini -- © 1999–2001 Daan Leijen -- License : BSD3 -- -- Maintainer : Mark Karpov <markkarpov@opmbx.org> -- Stability : experimental -- Portability : non-portable -- --...
omefire/megaparsec
Text/Megaparsec/Expr.hs
bsd-2-clause
5,656
0
11
1,433
1,476
808
668
62
1
-- 7295372 mm = 12000 nn1 = 1 dd1 = 3 nn2 = 1 dd2 = 2 -- count proper fractions in the (range] for the given denominator countFrac n1 d1 n2 d2 d = length $ filter isProper [x1..x2] where isProper x = gcd d x == 1 x1 = (d*n1) `div` d1 + 1 x2 = (d*n2) `div` d2 -- count proper fractions in the (r...
higgsd/euler
hs/73.hs
bsd-2-clause
486
8
11
130
213
103
110
11
1
----------------------------------------------------------------------------- -- | -- Module : Data.Semigroup.Bitraversable -- Copyright : (C) 2011 Edward Kmett -- License : BSD-style (see the file LICENSE) -- -- Maintainer : Edward Kmett <ekmett@gmail.com> -- Stability : provisional -- Portability :...
phaazon/bifunctors
src/Data/Semigroup/Bitraversable.hs
bsd-2-clause
2,088
0
13
413
695
375
320
42
1
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE DeriveGeneric #-} module Distribution.Solver.Types.ResolverPackage ( ResolverPackage(..) , resolverPackageDeps ) where import Distribution.Solver.Types.SolverId import Distribution.Solver.Types.SolverPackage import qualified Distribution.Solver.Types.ComponentDeps...
kolmodin/cabal
cabal-install/Distribution/Solver/Types/ResolverPackage.hs
bsd-3-clause
1,685
0
9
241
399
223
176
28
1
{-# LANGUAGE TupleSections #-} module Main (main) where import Control.Applicative (empty) import Control.Monad (void) import Text.Megaparsec import Text.Megaparsec.String import qualified Text.Megaparsec.Lexer as L lineComment :: Parser () lineComment = L.skipLineComment "#" scn :: Parser () scn = L.space (void sp...
mrkkrp/megaparsec-site
tutorial-code/IndentationSensitiveParsing.hs
bsd-3-clause
1,205
0
15
232
475
254
221
35
1
{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE UndecidableInstances #-} -- | -- Module :...
mainland/nikola
src/Data/Array/Nikola/Backend/CUDA/TH.hs
bsd-3-clause
32,725
0
19
10,998
6,933
3,668
3,265
-1
-1
{-# LANGUAGE DataKinds, GADTs #-} -- | Semantics of 'Command.Cmd' client commands that return server commands. -- A couple of them do not take time, the rest does. -- Here prompts and menus and displayed, but any feedback resulting -- from the commands (e.g., from inventory manipulation) is generated later on, -- for a...
Concomitant/LambdaHack
Game/LambdaHack/Client/UI/HandleHumanGlobalClient.hs
bsd-3-clause
35,602
0
30
10,088
9,121
4,558
4,563
-1
-1
--- Demonstrate handling routes only if previous one import qualified Control.Monad.Trans.State.Strict as ST import qualified Control.Monad.Trans.Except as Exc import Data.List import Data.Maybe import Control.Monad -- State Monad -- How to use a State Monad type Response = Maybe String type Request = String type A...
gdevanla/scotty-from-ground-up
app/Main3.hs
bsd-3-clause
2,495
0
13
494
782
404
378
70
3
{-# LANGUAGE GeneralizedNewtypeDeriving, FlexibleInstances, MultiParamTypeClasses #-} module Development.Shake.Intern( Intern, Id, empty, insert, add, lookup, toList, fromList ) where import Development.Shake.Binary import Development.Shake.Classes import Prelude hiding (lookup) import qualified Data.Hash...
nh2/shake
Development/Shake/Intern.hs
bsd-3-clause
1,278
0
12
267
556
297
259
30
1
{-# LANGUAGE DataKinds #-} -- -- PWR.hs --- PWR peripheral -- -- Copyright (C) 2014, Galois, Inc. -- All Rights Reserved. -- module Ivory.BSP.STM32.Peripheral.PWR ( PWR(..) , pwr , module Ivory.BSP.STM32.Peripheral.PWR.Regs ) where import Ivory.HW import Ivory.BSP.STM32.Peripheral.PWR.Regs import Ivory.BSP.S...
GaloisInc/ivory-tower-stm32
ivory-bsp-stm32/src/Ivory/BSP/STM32/Peripheral/PWR.hs
bsd-3-clause
615
0
9
112
132
86
46
15
1
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, DeriveFunctor, PatternGuards, CPP #-} module Idris.REPL where import Idris.AbsSyntax import Idris.ASTUtils import Idris.Apropos (apropos) import Idris.REPLParser import Idris.ElabDecls import Idris.ElabTerm import Idris.Erasure import Idris.Error imp...
andyarvanitis/Idris-dev
src/Idris/REPL.hs
bsd-3-clause
78,408
0
25
30,337
23,663
11,405
12,258
1,542
60
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE...
narrative/stack
src/Stack/Types/Build.hs
bsd-3-clause
28,819
0
21
9,142
5,575
2,999
2,576
621
8
----------------------------------------------------------------------------- -- | -- Module : Data.SBV.Examples.CodeGeneration.PopulationCount -- Copyright : (c) Levent Erkok -- License : BSD3 -- Maintainer : erkokl@gmail.com -- Stability : experimental -- -- Computing population-counts (number of s...
Copilot-Language/sbv-for-copilot
Data/SBV/Examples/CodeGeneration/PopulationCount.hs
bsd-3-clause
8,735
0
12
1,684
544
377
167
21
2
-- 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/Email/Corpus.hs
bsd-3-clause
1,127
0
9
282
171
103
68
25
1
{-# LANGUAGE TypeFamilies, TypeSynonymInstances, FlexibleInstances, PackageImports, OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module File.Binary.Instances () where import Prelude hiding (take, drop, span) import File.Binary.Classes (Field(..), Binary(..)) import Data.Word (Word8) import Data.By...
YoshikuniJujo/binary-file
src/File/Binary/Instances.hs
bsd-3-clause
2,851
4
13
497
1,116
603
513
-1
-1
module Oden.SourceInfo where type Line = Int type Column = Int data Position = Position { fileName :: FilePath , line :: Line , column :: Column } deriving (Eq, Ord) instance Show Position where show (Position f l c) = f ++ ":" ++ show l ++ ":" ++ s...
oden-lang/oden
src/Oden/SourceInfo.hs
mit
762
0
9
245
209
114
95
20
0
module Tests.Writers.AsciiDoc (tests) where import Test.Framework import Text.Pandoc.Builder import Text.Pandoc import Tests.Helpers import Tests.Arbitrary() asciidoc :: (ToString a, ToPandoc a) => a -> String asciidoc = writeAsciiDoc def{ writerWrapText = False } . toPandoc tests :: [Test] tests = [ testGroup "emph...
alexvong1995/pandoc
tests/Tests/Writers/AsciiDoc.hs
gpl-2.0
2,262
0
16
1,227
471
246
225
47
1
{-| The @notes@ command lists all unique notes (description part after a |) seen in transactions, sorted alphabetically. -} {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE CPP #-} module Hledger.Cli.Commands.Notes ( ...
adept/hledger
hledger/Hledger/Cli/Commands/Notes.hs
gpl-3.0
877
0
11
145
171
97
74
23
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-swf/gen/Network/AWS/SWF/RequestCancelWorkflowExecution.hs
mpl-2.0
5,657
0
9
1,083
512
317
195
61
1
{-# LANGUAGE PArr #-} {-# OPTIONS -fvectorise #-} module Matrix where import Data.Array.Parallel.Prelude import qualified Data.Array.Parallel.Prelude.Int as I import Data.Array.Parallel.Prelude.Double as D import qualified Prelude type MMatrix = [:D.Double:] div = I.div seqSize = 1::Prelude.Int mmMult m n =...
mainland/dph
icebox/examples/matrix/Matrix.hs
bsd-3-clause
1,076
3
7
238
141
86
55
-1
-1
{-# LANGUAGE Haskell2010 #-} {-# LINE 1 "Data/Vector/Storable/Mutable.hs" #-} {-# LANGUAGE CPP, DeriveDataTypeable, FlexibleInstances, MagicHash, MultiParamTypeClasses, ScopedTypeVariables #-} -- | -- Module : Data.Vector.Storable.Mutable -- Copyright : (c)...
phischu/fragnix
tests/packages/scotty/Data.Vector.Storable.Mutable.hs
bsd-3-clause
16,438
0
22
3,882
3,862
2,093
1,769
286
5
{-# LANGUAGE ScopedTypeVariables #-} module Properties.Layout.Tall where import Test.QuickCheck import Instances import Utils import XMonad.StackSet hiding (filter) import XMonad.Core import XMonad.Layout import Graphics.X11.Xlib.Types (Rectangle(..)) import Data.Maybe import Data.List (sort) import Data.Ratio ---...
atupal/xmonad-mirror
xmonad/tests/Properties/Layout/Tall.hs
mit
3,709
0
13
1,096
989
519
470
67
2
module Settings.Program ( programContext ) where import Base import Context import Oracles.Flavour import Packages -- TODO: there is duplication and inconsistency between this and -- Rules.Program.getProgramContexts. There should only be one way to -- get a context/contexts for a given stage and package. programC...
sdiehl/ghc
hadrian/src/Settings/Program.hs
bsd-3-clause
894
0
13
265
167
84
83
17
1
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude, BangPatterns #-} ----------------------------------------------------------------------------- -- | -- Module : GHC.IO.Device -- Copyright : (c) The University of Glasgow, 1994-2008 -- License : see libraries/base/LICENSE -- -- Maintainer : ...
frantisekfarka/ghc-dsi
libraries/base/GHC/IO/Device.hs
bsd-3-clause
6,419
0
12
1,533
701
410
291
62
1
{-# LANGUAGE CPP, MagicHash, BangPatterns #-} import Data.Char import Data.Array import GHC.Exts import System.IO import System.IO.Unsafe import Debug.Trace import Control.Applicative (Applicative(..)) import Control.Monad (liftM, ap) -- parser produced by Happy Version 1.16 data HappyAbsSyn = HappyTerminal Token ...
frantisekfarka/ghc-dsi
testsuite/tests/ghci.debugger/HappyTest.hs
bsd-3-clause
16,590
213
36
2,981
4,867
2,569
2,298
321
12
{-# LANGUAGE OverloadedLists, TypeFamilies #-} import qualified Data.Set as S import GHC.Exts main = do putStrLn (f []) putStrLn (f [1,2]) putStrLn (f [2,0]) putStrLn (f [3,2]) putStrLn (f [2,7]) putStrLn (f [2,2]) putStrLn (f [1..7]) f...
lukexi/ghc-7.8-arm64
testsuite/tests/overloadedlists/should_run/overloadedlistsrun04.hs
bsd-3-clause
621
0
10
206
278
141
137
20
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TemplateHaskell #-} module Resource ( BuildingResources , Store(..) , TileResources , UnitResources , units , buildings , tiles ) where import Control.Lens import Data.HashMap.Strict im...
Unoriginal-War/unoriginal-war
src/Resource.hs
mit
1,004
0
8
192
130
81
49
25
0
module Utils.TesseractUtils ( runTesseract, tesseractCleanUp ) where import System.Directory import System.Process tesseractCmd fname = "tesseract -l eng " ++ fname ++ " output" runTesseract :: String -> IO () runTesseract filename = callCommand $ tesseractCmd filename tesseractCleanUp :: IO...
caneroj1/HaskellDocs
Utils/TesseractUtils.hs
mit
367
0
7
72
87
46
41
11
1
------------------------------------------------------------------------------ -- | Contains definitions for generating 'MediaType's. module Network.HTTP.Media.MediaType.Gen ( -- * Generating MediaTypes anything , genMediaType , genSubStar , genMaybeSubStar , subStarOf , genConcreteMed...
zmthy/http-media
test/Network/HTTP/Media/MediaType/Gen.hs
mit
7,831
0
14
1,477
1,222
667
555
113
3
type Birds = Int type Pole = (Birds, Birds) landLeft :: Birds -> Pole -> Maybe Pole landLeft n (left,right) | abs ((left + n) - right) < 4 = Just (left + n, right) | otherwise = Nothing landRight :: Birds -> Pole -> Maybe Pole landRight n (left,right) | abs...
rglew/lyah
birds.hs
mit
686
2
13
220
222
116
106
13
1
module Hasql.TH ( -- * Statements -- | -- Quasiquoters in this category produce Hasql `Statement`s, -- checking the correctness of SQL at compile-time. -- -- To extract the information about parameters and results of the statement, -- the quoter requires you to explicitly specify the Post...
nikita-volkov/hasql-th
library/Hasql/TH.hs
mit
8,626
0
14
1,791
721
495
226
49
1
{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances #-} module Data.Tape where import Control.Applicative import Data.Indexed import Data.Stream import Control.Comonad data Tape a = Tape { leftsT :: Stream a , headT :: a , rightsT :: Stream a ...
mstksg/cm-dip
src/Data/Tape.hs
mit
3,780
0
12
1,295
1,420
727
693
69
1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeSynonymInstances #-} module IHaskell.Display.Widgets.Bool.CheckBox ( -- * The CheckBox Widget CheckBox, -- * Constructor mkCheckBox) where -- To keep `cabal repl` happy when running f...
beni55/IHaskell
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Bool/CheckBox.hs
mit
1,820
0
13
441
369
202
167
41
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE NamedFieldPuns #-} module Twitch.API where import Streamer.Prelude import Twitch.Types import Twitch.Playlist import Network.HTTP.Simple import Data.Aeson import Data.Char import Data.Either.Combinators import qualified Data.ByteString.Char8 as BS import qualified D...
best-coloc-ever/twitch-cast
streamer/src/Twitch/API.hs
mit
2,376
0
13
458
585
303
282
55
1
{-| Module : Database.Orville.PostgreSQL.Internal.Where Copyright : Flipstone Technology Partners 2016-2018 License : MIT -} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ExistentialQuantification #-} module Database.Orville.PostgreSQL.Internal.Where ( WhereCondition(..) , (.==) , (.<>) , (.>) , (.>=) ...
flipstone/orville
orville-postgresql/src/Database/Orville/PostgreSQL/Internal/Where.hs
mit
7,122
0
13
1,250
1,751
921
830
144
7
{-# LANGUAGE FlexibleInstances #-} -- | An interface for bundling metrics in a way that they cna be iterated over for reporting or looked up for use by code that shares the registry. module Data.Metrics.Registry ( MetricRegistry, Metric(..), Register(..), metrics, newMetricRegistry, module Data.Metrics.Type...
iand675/metrics
src/Data/Metrics/Registry.hs
mit
3,598
0
17
1,012
1,085
525
560
106
1