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
import qualified Data.Set as Set import Data.List import Primes import Utils fourDigitPrimes = filter (\n -> n>999 && n<9999) $ take 2000 primeTable primePermutations n = Set.toList $ Set.fromList [ perm | perm <- generateDigitPermutations n, isPrime perm ] diffs l = [ (n2-n1, n1, n2, n3) | i <- [0..n1], j <- [(i+1)...
arekfu/project_euler
p0049/p0049.hs
mit
746
6
11
187
365
192
173
15
1
import Control.Monad readNumbers :: String -> [Int] readNumbers = map read . words partition :: (Ord a) => [a] -> [a] partition [] = [] partition (p:xs) = [l | l <- xs, l < p] ++ [p] ++ [g | g <- xs, g > p] main :: IO () main = do n <- readLn :: IO Int list <- getLine let input = readNumbers list le...
mgrebenets/hackerrank
alg/arr-n-srt/quicksort-1-partition.hs
mit
382
1
11
102
212
106
106
13
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE OverloadedStrings #-} module Tests where import Control.Monad (void) import Control.Monad.IO.Class import SimpleStore import Simple...
plow-technologies/distributed-simple-cell
tests/Tests.hs
mit
2,411
0
13
395
697
358
339
58
2
module Main where import Format.RGB565 (toHex, toNHex, toRGB565, toRGB565Hex) import Format.Converter (pictureToRaw, toMaybeFormat, Format()) import Test.Hspec import System.Directory (getCurrentDirectory, doesDirectoryExist, creat...
cirquit/UTFTConverter
tests/Tests.hs
mit
7,459
0
26
2,531
2,107
1,038
1,069
146
2
module Colors where import Graphics.UI.GLUT type ColorBG = Color4 GLfloat type ColorFG = Color3 GLfloat blackBG :: ColorBG blackBG = Color4 0 0 0 1 white :: ColorFG white = Color3 0.9 0.9 0.9 blue :: ColorFG blue = Color3 0 0 0.9 red :: ColorFG red = Color3 0.9 0 0 green :: ColorFG green = Color3 0 0.9...
mrlovre/LMTetrys
src/Colors.hs
gpl-2.0
456
0
5
108
166
90
76
20
1
{-# LANGUAGE RecordWildCards #-} module Output.InfiniteLoop where import Sprockell.System prog:: [Instruction] prog = [Const 0 RegA ,Store RegA (Addr 0) -- b ,Compute Add PC Zero RegA ,Push RegA -- push line 7 as start of while ,Const 1 RegA ...
Ertruby/PPFinalProject
src/Examples/InfiniteLoop.hs
gpl-2.0
1,103
0
8
482
233
127
106
23
1
{-# LANGUAGE RankNTypes #-} {- | Module : $Header$ Description : Central datastructures for development graphs Copyright : (c) Till Mossakowski, Uni Bremen 2002-2006 License : GPLv2 or higher, see LICENSE.txt Maintainer : till@informatik.uni-bremen.de Stability : provisional Portability : non-porta...
nevrenato/Hets_Fork
Static/DevGraph.hs
gpl-2.0
51,334
30
31
12,220
13,980
7,398
6,582
1,052
9
-- GenI surface realiser -- Copyright (C) 2005 Carlos Areces and Eric Kow -- -- 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 ...
kowey/GenI
src/NLP/GenI/Builder.hs
gpl-2.0
17,790
0
15
4,570
3,053
1,710
1,343
204
3
module Prime where import GDCN.Trusted.Data.Binary import Data.ByteString.Lazy (ByteString) -- run :: [ByteString] -> (ByteString, String) run (h:_) = let num = decode h :: Integer -- Reads input of task result = num + 100 in (encode result, show result)
GDCN/GDCN
GDCN_proj/dGDCN/jobs/TrivialJob/code/Increment.hs
gpl-3.0
288
0
9
73
95
55
40
7
1
instance Monad (Cont r) where ka >>= kab = Cont (\hb -> runCont ka (\a -> runCont (kab a) hb)) return a = Cont (\ha -> ha a)
hmemcpy/milewski-ctfp-pdf
src/content/3.5/code/haskell/snippet29.hs
gpl-3.0
128
0
14
31
83
41
42
3
0
{- | mtlstats Copyright (C) 1984, 1985, 2019, 2020, 2021 Rhéal Lamothe <rheal.lamothe@gmail.com> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) ...
mtlstats/mtlstats
src/Mtlstats/Control/CreateGoalie.hs
gpl-3.0
3,473
0
20
843
743
389
354
-1
-1
{- This file is part of PhoneDirectory. Copyright (C) 2009 Michael Steele PhoneDirectory 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 lat...
mikesteele81/Phone-Directory
src/Main.hs
gpl-3.0
946
0
11
194
82
45
37
8
2
{-# LANGUAGE OverloadedStrings #-} module Parse where import qualified Lexer as L import AST import Text.Parsec hiding (State) import Data.Text hiding (break) import Control.Monad.State hiding (void,sequence) import Data.Functor.Identity(Identity) import Control.Applicative hiding ((<|>),many) import Prelude hidin...
joelwilliamson/modern-compilers-exercises
Parse.hs
gpl-3.0
6,139
0
18
1,413
2,763
1,406
1,357
108
1
{-# LANGUAGE OverloadedStrings #-} -- | Generic Key Exchange facilities. Performs the key exchange module Ssh.KeyExchange( doKex , startRekey ) where import Data.Binary import Data.Binary.Get import Data.Binary.Put import Control.Monad import qualified Control.Monad.State as MS import Data.Bits import Dat...
bcoppens/HaskellSshClient
src/Ssh/KeyExchange.hs
gpl-3.0
7,796
0
15
1,637
1,476
777
699
91
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-compute/gen/Network/Google/Resource/Compute/Routers/List.hs
mpl-2.0
7,153
0
20
1,599
831
495
336
115
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/TakeTurn.hs
mpl-2.0
4,403
0
16
1,022
568
333
235
88
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-cloudidentity/gen/Network/Google/Resource/CloudIdentity/Groups/Memberships/Lookup.hs
mpl-2.0
6,661
0
18
1,448
879
516
363
128
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-youtube/gen/Network/Google/Resource/YouTube/ChannelSections/Update.hs
mpl-2.0
6,585
0
19
1,490
897
526
371
128
1
import Import hiding (runDB, runSDB) import Control.Exception.Lifted (throw, Exception) import Control.Monad.Logger import Control.Monad.Reader import Control.Monad.Trans.Resource import Control.Monad.Writer import qualified Data.Text as T import Data.Typeabl...
akegalj/snowdrift
app/SnowdriftProcessPayments.hs
agpl-3.0
4,930
4
18
1,596
1,358
670
688
-1
-1
module Network.Haskoin.Wallet.Client (clientMain) where import System.FilePath ((</>)) import System.Directory (createDirectoryIfMissing) import System.Posix.Directory (changeWorkingDirectory) import System.Posix.Files ( setFileMode , setFileCreationMask , unionFileModes , ownerModes , groupModes ...
plaprade/haskoin
haskoin-wallet/src/Network/Haskoin/Wallet/Client.hs
unlicense
10,802
0
16
3,897
3,012
1,566
1,446
-1
-1
module Main where import Control.Monad (unless, forever) import Pipes import Pipes.Concurrent import System.IO (isEOF) import Control.Exception (try, throwIO) import qualified GHC.IO.Exception as G stdinLn :: Producer String IO () stdinLn = do eof <- lift isEOF unless eof $ do str <- lift getLine ...
CompSciCabal/SMRTYPRTY
experiments/inaimathi/PipeEx.hs
unlicense
1,387
0
15
459
521
263
258
43
2
{-# LANGUAGE LambdaCase #-} {- | Module : Neovim.User.Input Description : Utility functions to retrieve user input Copyright : (c) Sebastian Witte License : Apache-2.0 Maintainer : woozletoff@gmail.com Stability : experimental Portability : GHC -} module Neovim.User.Input where import Neovim...
neovimhaskell/nvim-hs-contrib
library/Neovim/User/Input.hs
apache-2.0
1,670
0
15
404
321
164
157
29
1
-- | Re-export the most important functions from Context.* module System.Console.Hawk.Context ( module System.Console.Hawk.Context.Base , module System.Console.Hawk.Context.Paths ) where import System.Console.Hawk.Context.Base import System.Console.Hawk.Context.Paths
gelisam/hawk
src/System/Console/Hawk/Context.hs
apache-2.0
275
0
5
30
45
34
11
5
0
-- -- Copyright (c) 2013, Carl Joachim Svenn -- 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 copyright notice...
karamellpelle/MEnv
source/MEnv/GLFW.hs
bsd-2-clause
2,664
0
13
672
248
153
95
35
1
{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_HADDOCK ...
jml/graphql-api
src/GraphQL/Internal/Value.hs
bsd-3-clause
12,907
0
14
2,337
3,360
1,758
1,602
219
6
-- Copyright 2020 Google LLC -- -- Use of this source code is governed by a BSD-style -- license that can be found in the LICENSE file or at -- https://developers.google.com/open-source/licenses/bsd module Dex.Foreign.API where import Foreign.Ptr import Foreign.C import Dex.Foreign.Context import Dex.Foreign.Seriali...
google-research/dex-lang
src/Dex/Foreign/API.hs
bsd-3-clause
2,182
0
11
429
509
264
245
22
0
module Main where --import Circle (saveCircleIO, findCircleIO) --import Square (saveSquareIO, findSquareIO, findPointsByDiagonal) --import Dots (saveDotsIO , findDotsIO, findDotsBmpIO) import Lines (findLinesIO) import Cells (findCellsIO) main = do --findLinesIO "lines/2_000_o.bmp" findCellsIO "cells/3_030_o...
zelinskiy/ImRec
src/Main.hs
bsd-3-clause
344
0
7
46
41
24
17
6
1
-- | -- Module : Data.Counts -- Copyright : (c) 2012 Jan Snajder -- License : BSD-3 (see the LICENSE file) -- -- Maintainer : Jan Snajder <jan.snajder@fer.hr> -- Stability : experimental -- Portability : portable -- -- A simple data structure for counting values (similar to Data.Multiset). -- ------...
jsnajder/counts
src/Data/Counts.hs
bsd-3-clause
4,366
0
12
1,109
2,037
1,082
955
120
3
-- Copyright © 2012 Frank S. Thomas <frank@timepit.eu> -- All rights reserved. -- -- Use of this source code is governed by a BSD-style license that -- can be found in the LICENSE file. -- | Ohloh API Reference: <http://meta.ohloh.net/referencekudo/> module Web.Ohloh.Kudo ( Kudo(..), xpKudo ) where import Text.XM...
fthomas/ohloh-hs
Web/Ohloh/Kudo.hs
bsd-3-clause
1,667
0
11
378
381
212
169
35
1
{- (c) The AQUA Project, Glasgow University, 1993-1998 \section[SimplMonad]{The simplifier Monad} -} {-# LANGUAGE CPP #-} module ETA.SimplCore.SimplEnv ( InId, InBind, InExpr, InAlt, InArg, InType, InBndr, InVar, OutId, OutTyVar, OutBind, OutExpr, OutAlt, OutArg, OutType, OutBndr, OutVar, InC...
alexander-at-github/eta
compiler/ETA/SimplCore/SimplEnv.hs
bsd-3-clause
29,999
0
15
8,052
4,747
2,630
2,117
325
4
module ParseAux where import AbstractSyntax import Lexer import Data.List happyError :: [Token'] -> a happyError ts = error ("Parse error in " ++ case ts of [] -> " at EOF\n" _ -> "before\n" ++ showList (take 20 (dropWhile (==Newline) ts)) [...
FranklinChen/Ebnf2ps
src/ParseAux.hs
bsd-3-clause
8,805
0
18
2,310
3,563
1,803
1,760
201
17
-- ----------------------------------------------------------------------------- -- Copyright 2002, Simon Marlow. -- Copyright 2006, Bjorn Bringert. -- Copyright 2009, Henning Thielemann. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted prov...
xpika/mohws
src/Network/MoHWS/Server.hs
bsd-3-clause
22,018
0
24
5,829
5,462
2,800
2,662
379
7
import qualified Network.Kafka.Specs as S main = S.main
tcrayford/hafka
Network/Kafka/Main.hs
bsd-3-clause
57
0
5
9
17
11
6
2
1
module Win32SystemInfo where import StdDIS import Win32Types import GDITypes ---------------------------------------------------------------- -- Environment Strings ---------------------------------------------------------------- -- %fun ExpandEnvironmentStrings :: String -> IO String ----------------------------...
OS2World/DEV-UTIL-HUGS
libraries/win32/Win32SystemInfo.hs
bsd-3-clause
22,309
173
12
2,976
4,653
2,556
2,097
-1
-1
{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances #-} -- | Vector spaces. module Math.Algebra.Vector where import qualified Math.Algebra.Module as Mod import qualified Math.Algebra.Field as F class (F.Field a, Mod.Module a b) => Vector a b -- | Fields are vector spaces over themselves. instance ...
michiexile/hplex
pershom/src/Math/Algebra/Vector.hs
bsd-3-clause
346
0
7
54
79
48
31
-1
-1
-- Copyright (c) 2014, Dmitry Zuikov -- All rights reserved. -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: -- * Redistributions of source code must retain the above copyright notice, this -- list of conditions and...
voidlizard/emufat
src/readpiece.hs
bsd-3-clause
4,075
0
15
968
1,286
662
624
59
8
{-# LANGUAGE QuasiQuotes #-} import LiquidHaskell {-@ LIQUID "--idirs=../neg "@-} import Class5 instance Foo ()
spinda/liquidhaskell
tests/gsoc15/unknown/pos/Class2.hs
bsd-3-clause
118
0
6
21
18
10
8
4
0
-- | -- Module : Simulation.Aivika.Experiment.Chart.Types -- Copyright : Copyright (c) 2012-2017, David Sorokin <david.sorokin@gmail.com> -- License : BSD3 -- Maintainer : David Sorokin <david.sorokin@gmail.com> -- Stability : experimental -- Tested with: GHC 8.0.1 -- -- The module defines a type class for re...
dsorokin/aivika-experiment-chart
Simulation/Aivika/Experiment/Chart/Types.hs
bsd-3-clause
1,117
0
13
200
153
90
63
9
0
module Noobing.Experimenting.Test ( sortTest ) where import Data.List sortTest :: (Ord a) => [a] -> [a] sortTest l = sort $ l
markmq/Noobing
src/Noobing/Experimenting/Test.hs
bsd-3-clause
130
0
7
26
53
31
22
5
1
{-# LANGUAGE CPP #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE DefaultSignatures #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# L...
hvr/lens
src/Control/Lens/At.hs
bsd-3-clause
13,959
0
17
3,426
4,928
2,638
2,290
303
1
{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} module NHorn.NaturalHorn ( Rule(..), Proof(..), proof, refl, sym, select, strict, leib, proofAx, ) where import ...
esengie/algebraic-checker
src/NHorn/NaturalHorn.hs
bsd-3-clause
6,469
6
18
2,091
2,457
1,214
1,243
125
1
{-# LANGUAGE TypeOperators, DataKinds, ScopedTypeVariables, TypeFamilies, FlexibleContexts, FlexibleInstances, UndecidableInstances #-} module FRP.Basket.Signals where import Prelude hiding ((.), const) import Control.Applicative import Control.Category import Control.Arrow import Data.Mon...
jhstanton/Basket
src/FRP/Basket/Signals.hs
bsd-3-clause
4,192
0
15
1,508
1,886
996
890
70
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -- ...
fmapfmapfmap/amazonka
amazonka-redshift/gen/Network/AWS/Redshift/CreateClusterSecurityGroup.hs
mpl-2.0
6,041
0
13
1,183
736
444
292
94
1
import Distribution.Simple import Distribution.PackageDescription import Distribution.Version import Distribution.Simple.LocalBuildInfo import Distribution.Simple.Program import Distribution.Verbosity import Data.Char (isSpace) import Data.List (dropWhile,span) import Control.Monad main = defaultMainWithHooks simpl...
ryantm/hdbc-mysql
Setup.hs
lgpl-2.1
1,715
0
16
382
493
260
233
39
2
module Db where data Db = -- A cabal sandbox db, with optional path to sandbox configuration file Sandbox -- The global ghc package database | Global -- The user package database, as defined by cabal | User -- A direct database path | Dir FilePath instance (Show Db...
jfeltz/dash-haskell
src/Db.hs
lgpl-3.0
1,140
3
9
367
199
148
51
30
0
-- | -- Module : Text.Megaparsec.Combinator -- Copyright : © 2015 Megaparsec contributors -- © 2007 Paolo Martini -- © 1999–2001 Daan Leijen -- License : BSD3 -- -- Maintainer : Mark Karpov <markkarpov@opmbx.org> -- Stability : experimental -- Portability : portable -- ...
tulcod/megaparsec
Text/Megaparsec/Combinator.hs
bsd-2-clause
7,948
0
14
1,924
1,793
939
854
90
2
{-# LANGUAGE ForeignFunctionInterface #-} {-# OPTIONS_GHC -fno-warn-auto-orphans #-} {-# OPTIONS_GHC -fno-warn-orphans #-} -- | Importing this module will activate RULES that use the FFI for vector ops. module SubHask.Algebra.Vector.FFI ( distance_l2_m128 , distance_l2_m128_SVector_Dynamic , distance_l2_m1...
Drezil/subhask
src/SubHask/Algebra/Vector/FFI.hs
bsd-3-clause
3,253
0
13
510
716
381
335
-1
-1
{-# LANGUAGE Haskell98 #-} {-# LINE 1 "src/Data/Binary/Get/Internal.hs" #-} {-# LANGUAGE CPP, RankNTypes, MagicHash, BangPatterns, TypeFamilies #-} -- CPP C style pre-precessing, the #if defined lines -- RankNTypes forall r. statement -- MagicHash the (# unboxing ...
phischu/fragnix
tests/packages/scotty/Data.Binary.Get.Internal.hs
bsd-3-clause
14,913
0
24
4,117
4,084
2,084
2,000
274
8
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ViewPatterns #-} module Tinc.CacheSpec (spec) where import Helper import MockedEnv import MockedProcess import Test.Mockery.Action import Control.Monad.IO.Class import Control...
sol/tinc
test/Tinc/CacheSpec.hs
mit
10,384
0
30
2,561
2,428
1,226
1,202
168
1
{-# LANGUAGE CPP #-} #if !defined(TESTING) && __GLASGOW_HASKELL__ >= 703 {-# LANGUAGE Safe #-} #endif ----------------------------------------------------------------------------- -- | -- Module : Data.Map.Strict -- Copyright : (c) Daan Leijen 2002 -- (c) Andriy Palamarchuk 2008 -- License :...
jwiegley/ghc-release
libraries/containers/Data/Map/Strict.hs
gpl-3.0
45,252
0
17
11,355
8,278
4,519
3,759
-1
-1
{-| Module : Idris.IdrisDoc Description : Generation of HTML documentation for Idris code License : BSD3 Maintainer : The Idris Community. -} {-# LANGUAGE OverloadedStrings, PatternGuards #-} {-# OPTIONS_GHC -fwarn-incomplete-patterns #-} module Idris.IdrisDoc (generateDocs) where import Idris.AbsSyntax imp...
kojiromike/Idris-dev
src/Idris/IdrisDoc.hs
bsd-3-clause
30,283
0
23
9,608
8,710
4,432
4,278
521
19
----------------------------------------------------------------------------- -- | -- Module : GHC.GHCi.Helpers -- Copyright : (c) The GHC Developers -- License : see libraries/base/LICENSE -- -- Maintainer : cvs-ghc@haskell.org -- Stability : internal -- Portability : non-portable (GHC Extensions) ...
sdiehl/ghc
libraries/base/GHC/GHCi/Helpers.hs
bsd-3-clause
914
0
8
149
158
85
73
17
1
{-# LANGUAGE RelaxedPolyRec, FlexibleInstances, TypeSynonymInstances, FlexibleContexts #-} -- RelaxedPolyRec needed for inlinesBetween on GHC < 7 {- Copyright (C) 2014 Alexander Sulfrian <alexander.sulfrian@fu-berlin.de> This program is free software; you can redistribute it and/or modify it under the terms of the G...
janschulz/pandoc
src/Text/Pandoc/Readers/TWiki.hs
gpl-2.0
18,596
0
15
4,466
5,772
2,899
2,873
385
6
module AddOneParameter.D2 where {-add parameter 'f' to function 'sq' . This refactoring affects module 'D2', 'C2' and 'A2'. It aims to test the creating of default parameter name.-} sumSquares (x:xs) = (sq sq_f) x + sumSquares xs sumSquares [] = 0 sq f x = x ^ pow sq_f = undefined pow =2
RefactoringTools/HaRe
test/testdata/AddOneParameter/D2.expected.hs
bsd-3-clause
301
0
8
65
72
38
34
6
1
----------------------------------------------------------------------------- -- -- Module : IDE.Pane.ClassHierarchy -- Copyright : (c) Juergen Nicklisch-Franken, Hamish Mackenzie -- License : GNU-GPL -- -- Maintainer : <maintainer at leksah.org> -- Stability : provisional -- Portability : portable...
ChrisLane/leksah
src/IDE/Pane/ClassHierarchy.hs
gpl-2.0
38,980
0
15
14,866
2,323
1,209
1,114
-1
-1
-- To run, package aivika-experiment-cairo must be installed. import Simulation.Aivika.Experiment import Simulation.Aivika.Experiment.Chart import Simulation.Aivika.Experiment.Chart.Backend.Cairo import Graphics.Rendering.Chart.Backend.Cairo import Model import Experiment main = runExperimentParallel experiment ge...
dsorokin/aivika-experiment-chart
examples/TruckHaulingSituation/MainUsingCairo.hs
bsd-3-clause
392
0
9
34
66
41
25
7
1
module Lam1 where data Expr = Var Int Int | Add Expr Expr f = (\(Var x y) -> x + y)
mpickering/HaRe
old/testing/removeField/Lam1.hs
bsd-3-clause
98
0
8
36
47
27
20
4
1
{-# LANGUAGE UnicodeSyntax #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstance...
forked-upstream-packages-for-ghcjs/ghc
testsuite/tests/typecheck/should_compile/T5490.hs
bsd-3-clause
9,340
0
24
2,409
3,578
1,821
1,757
-1
-1
{-# LANGUAGE ScopedTypeVariables #-} module Data.OpenCL.Kernel ( CLKernel() , ArgIndex , createKernel , enqueueRangeKernel , setKernelArgStorable , setKernelArgBuffer , setKernelArgPtr ) where import Control.Concurrent.MVar import Control.Monad import Control.Monad.Catch import Control.Monad.IO.Class ...
Noeda/opencl-bindings
src/Data/OpenCL/Kernel.hs
isc
4,231
0
20
1,438
997
498
499
113
1
module Main where import Prelude hiding (Left, Right) import System.IO import Data.Char (chr) import Control.Concurrent (threadDelay) import Text.Printf (printf) import Data.List (intercalate) import Control.Monad (join, when) import Data.Function (fix) import Data.Maybe (catMaybes) import System.Random import System...
rybak/powers
Main.hs
mit
2,890
0
18
785
973
495
478
83
3
module Game.Level.Reader ( read ) where import Prelude hiding (read) import Data.List import Game.Types import Game.Level.Parser levelPath :: FilePath levelPath = "res/lvls/" read :: Int -> IO GameLevel read lvl = fmap (parseLevel . transform) $ readFile (levelPath ++ (show lvl) ++ ".txt") transform :: S...
flomerz/SchaffschNie
src/Game/Level/Reader.hs
mit
485
0
13
97
179
98
81
13
1
fib = 0 : 1 : zipWith (+) fibs (tail fibs)
MartinThoma/LaTeX-examples
documents/Programmierparadigmen/scripts/haskell/fibonacci-zip.hs
mit
43
0
8
11
29
15
14
1
1
module Euler.Problem018Test (suite) where import Test.Tasty (testGroup, TestTree) import Test.Tasty.HUnit import Euler.Problem018 suite :: TestTree suite = testGroup "Problem018" [ testCase "four-row triangle" test4 , testCase "transform a one-row triangle" testTransformSingle , testCase "tra...
whittle/euler
test/Euler/Problem018Test.hs
mit
1,122
0
8
210
377
226
151
23
1
module Tamien.GM (module X) where import Tamien.GM.Compiler as X import Tamien.GM.Eval as X import Tamien.GM.State as X import Tamien.Core as X
cpettitt/tamien
Tamien/GM.hs
mit
145
0
4
22
43
31
12
5
0
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} -- Copyright (C) 2011 John Millikin <jmillikin@gmail.com> -- -- See license.txt for details module Main ( tests , main ) where import Control.Monad.IO.Class (liftIO) import qualified Data.ByteString import Data.ByteStr...
fujimura/knob
test/KnobTests.hs
mit
7,229
0
14
1,839
2,160
1,020
1,140
179
1
{-# LANGUAGE GeneralizedNewtypeDeriving, DeriveFunctor, TypeSynonymInstances, FlexibleInstances #-} module Codex.QuickCheck.C.Types ( module Foreign.C, module Foreign.C.Types, module Foreign.Ptr, module Foreign.Marshal.Array, runC, withCheckedArray, ...
pbv/codex-quickcheck
src/Codex/QuickCheck/C/Types.hs
mit
3,879
0
16
876
1,221
655
566
112
1
module Main where import Bench main :: IO () main = runBench
banacorn/Graphentheoretische-Paralleler-Algorithmus
src/Main.hs
mit
63
0
6
14
22
13
9
4
1
qcksrt :: (Ord a) => [a] -> [a] qcksrt [] = [] qcksrt (a:al) = let smOrEq = [x | x <- al, x <= a] larger = [x | x <- al, x > a] in qcksrt smOrEq ++ [a] ++ qcksrt larger -- Mergesort -- split in half -- m = length of input list / 2 -- recursive sorts -- sort a[1..m] i.e., Left list, call ...
zeusdeux/sorts-and-more
haskell/sorts.hs
mit
2,586
0
11
701
1,134
600
534
56
2
{-# OPTIONS_HADDOCK show-extensions #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE Safe #-} {-| Module : MPD.Core.Wire.Parser Copyright : (c) Joachim Fasting, 2015 License : MIT Maintainer : joachifm@fastmail.fm Stability : unstable Portability : unportable -} module MPD.Core.Wire.Par...
joachifm/nanompd
src/MPD/Core/Wire/Parser.hs
mit
1,249
0
13
270
346
196
150
23
1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- --...
fgaray/shakespeare
Text/Shakespeare/I18N.hs
mit
14,506
0
17
4,134
4,094
2,149
1,945
283
8
{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} -- Copyright (C) 2012 John Millikin <jmillikin@gmail.com> -- -- See license.txt for details module OptionsTests.OptionTypes ( suite_OptionTypes ) where import Data.Int import qualified Data.Map as Map import qualified...
jmillikin/haskell-options
tests/OptionsTests/OptionTypes.hs
mit
10,846
103
16
1,913
3,944
1,904
2,040
253
1
module Helper ( module Test.Hspec.Meta , module Test.Hspec.Compat , module Test.QuickCheck , module System.IO.Silently , sleep , timeout , defaultParams , noOpProgressCallback , captureLines , normalizeSummary , ignoreExitCode , ignoreUserInterrupt , throwException , shouldUseArgs , removeLocations ) where import...
beni55/hspec
hspec-core/test/Helper.hs
mit
2,602
0
17
529
813
449
364
65
1
module Options ( Options (..) , Port , withOptions , parseOptions , defaultOptions -- exported to silence warnings , Arg (..) ) where import Data.Maybe import Data.List import Text.Read import System.Console.GetOpt import System.Environment import System.I...
sol/reserve
src/Options.hs
mit
3,440
0
17
792
1,056
555
501
67
5
-- | Example for test purposes - copied from http://www.haskell.org/haskellwiki/OpenGLTutorial1. -- For all rights see there - I just do some tests. module Cube where import qualified Graphics.Rendering.OpenGL.GL.VertexSpec as VSpec import qualified Graphics.Rendering.OpenGL.GL.BeginEnd as GLBegEnd cube :: (VSpec.V...
tnrangwi/grill
test/experimental/opengl/Cube.hs
mit
1,685
0
13
491
716
360
356
32
1
module CFDI.Types.PaymentsVersion where import CFDI.Chainable import CFDI.Types.Type newtype PaymentsVersion = PaymentsVersion Float deriving (Eq, Show) instance Chainable PaymentsVersion where chain (PaymentsVersion v) = chain v instance Type PaymentsVersion where parseExpr "1.0" = Right $ PaymentsVersion 1.0 ...
yusent/cfdis
src/CFDI/Types/PaymentsVersion.hs
mit
383
0
8
65
108
57
51
10
0
module Napero where import System.Process import Control.Concurrent import System.Random say x = do readProcessWithExitCode "say" [x] [] return () p = putStrLn i = getLine w delay = threadDelay $ delay * 1000000 s xs = sequence xs m a = mapM_ a rnd n = randomIO >>= return . (+1) . (`mod` n) int :: String -> Int i...
raimohanska/Napero
Napero.hs
mit
340
0
8
70
148
78
70
15
1
module Tests.Old (tests) where import Test.Framework (testGroup, Test ) import Test.Framework.Providers.HUnit import Test.HUnit ( assertBool ) import System.Environment.Executable (getExecutablePath) import System.IO ( openTempFile, stderr ) import System.Process ( runProcess, waitForProcess ) import System.FilePath (...
fibsifan/pandoc
tests/Tests/Old.hs
gpl-2.0
12,376
0
20
3,584
3,096
1,687
1,409
231
5
{-- -- Natume -- an implementation of Kana-Kanji conversion in Haskell -- Copyright (C) 2006-2012 Takayuki Usui -- -- 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 th...
takayuki/natume
ScmToken.hs
gpl-2.0
6,402
0
16
2,100
2,047
1,061
986
163
3
{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE BangPatterns #-} {-# ...
leksah/ltk
src/Graphics/UI/Frame/ViewFrame.hs
gpl-2.0
65,621
2
38
20,960
16,752
8,288
8,464
1,175
14
{-# LANGUAGE RecordWildCards, LambdaCase #-} module Typedrat.Views (landing, postView, previewMarkdownView, postEditorView, addPostView, addCommentView) where import Data.HVect import qualified Data.Text as T import Data.Text.Encoding import Network.HTTP.Types.Status import Opaleye import Web.Slug import Web.Spock.Act...
typedrat/typedrat-site
app/Typedrat/Views.hs
gpl-3.0
3,201
0
19
787
1,037
521
516
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} {- | Module : Diffr.Util Description : Utility functions and configuration options Since : 0.1 Authors : William Martin, Jakub Kozlowski License : This file is part of diffr-h. diffr-h is free software: you can redistribute it and/or modify it under th...
diffr/diffr-h
src/Diffr/Util.hs
gpl-3.0
3,426
0
12
981
442
250
192
50
1
module EvalNode ( eval ) where import Types import LLVMRepresentation import CodeBuilders eval :: Primitive a => NodeBuilder (Node a) -> a eval = read . run . compile
GaroBrik/haskell-compiler
test/EvalNode.hs
gpl-3.0
173
0
9
35
56
31
25
7
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-jobs/gen/Network/Google/Resource/Jobs/Projects/Tenants/Jobs/SearchForAlert.hs
mpl-2.0
6,793
0
17
1,424
797
471
326
121
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-dynamodb/gen/Network/AWS/DynamoDB/PutItem.hs
mpl-2.0
26,178
0
14
4,837
1,615
1,087
528
137
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/Organizations/Locations/Buckets/Get.hs
mpl-2.0
5,524
0
15
1,126
711
419
292
106
1
-- Implicit CAD. Copyright (C) 2012, Christopher Olah (chris@colah.ca) -- Copyright (C) 2016, Julia Longtin (julial@turinglace.com) -- Released under the GNU AGPLV3+, see LICENSE module Graphics.Implicit.Export.Render.HandlePolylines (cleanLoopsFromSegs, reducePolyline) where import Prelude(Bool(True, False), Maybe(J...
krakrjak/ImplicitCAD
Graphics/Implicit/Export/Render/HandlePolylines.hs
agpl-3.0
4,382
3
17
970
1,045
590
455
37
4
module Main where import System.Environment (getArgs) main :: IO () main = do args <- getArgs css <- mapM readFile args mapM_ putStr css
tyoko-dev/coreutils-haskell
src/Cat.hs
agpl-3.0
158
0
8
45
56
28
28
6
1
-- | * The CoALP top-level module. module CoALP ( module CoALP.Term , module CoALP.Clause , module CoALP.Subst , module CoALP.Derivation , module CoALP.Tree , module CoALP.Resolution ) where import CoALP.Term import CoALP.Clause import CoALP.Subst import CoALP.Derivation import CoALP.Tree import CoA...
vkomenda/CoALP
lib/CoALP.hs
lgpl-3.0
334
0
5
61
73
47
26
14
0
-- Copyright 2013 Matthew Spellings -- 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 to in wr...
klarh/hasdy
src/Data/Array/Accelerate/HasdyContrib.hs
apache-2.0
1,589
0
13
318
365
194
171
15
1
module Emulator.CPU.Instructions.ARM.Parser where import Emulator.CPU hiding (SoftwareInterrupt) import Emulator.CPU.Instructions.ARM import Emulator.CPU.Instructions.Types import Emulator.Types import Utilities.Parser.TemplateHaskell import Utilities.Show import Data.Bits import Data.Maybe parseARM :: MWord -> Eith...
intolerable/GroupProject
src/Emulator/CPU/Instructions/ARM/Parser.hs
bsd-2-clause
7,897
0
14
1,802
2,375
1,219
1,156
-1
-1
{-# LANGUAGE DeriveFunctor, DeriveFoldable, DeriveTraversable, KindSignatures, NoMonomorphismRestriction, TupleSections, OverloadedStrings #-} {-# OPTIONS_GHC -Wall #-} module Core where import Bound import Bound.Name import Control.Monad import Control.Monad.Trans.Class import Data.Bifunctor import Prelu...
christiaanb/DepCore
src/Core.hs
bsd-2-clause
3,738
0
15
939
1,909
998
911
139
16
{-# LANGUAGE RecursiveDo #-} module Main where import LOGL.Application import Foreign.Ptr import Graphics.UI.GLFW as GLFW import Graphics.Rendering.OpenGL.GL as GL hiding (normalize) import Graphics.GLUtil import System.FilePath import Graphics.Rendering.OpenGL.GL.Shaders.ProgramObjects import Linear.Matrix import Lin...
atwupack/LearnOpenGL
app/1_Getting-started/7_Camera/Camera-mouse.hs
bsd-3-clause
6,830
0
18
1,842
2,193
1,130
1,063
146
5
module Validations.Adapters ( module Validations.Adapters.Digestive ) where import Validations.Adapters.Digestive
mavenraven/validations
src/Validations/Adapters.hs
bsd-3-clause
119
0
5
14
21
14
7
3
0
{-# LANGUAGE LambdaCase #-} module Data.Aeson.Validation.Internal.Field ( Field , flatten ) where import Data.Aeson.Validation.Internal.Pair import Data.Aeson.Validation.Internal.Prelude import Data.Aeson.Validation.Internal.Types import qualified Data.HashMap.Strict as HashMap import qualified Data.List.NonEm...
mitchellwrosen/json-validation
src/internal/Data/Aeson/Validation/Internal/Field.hs
bsd-3-clause
2,556
0
22
884
803
429
374
66
5
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PackageImports #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE UnicodeSyntax #-} {-| [@ISO639-1@] pt [@ISO639-2@] por [@ISO639-3@] por [@Native name@] Português [@English name@] Portu...
telser/numerals
src-test/Text/Numeral/Language/POR/TestData.hs
bsd-3-clause
8,890
0
12
2,452
2,460
1,610
850
258
1
module Math.Probably.Student where import Math.Probably.FoldingStats import qualified Data.Vector.Storable as V --http://www.haskell.org/haskellwiki/Gamma_and_Beta_function --cof :: [Double] cof = [76.18009172947146,-86.50532032941677,24.01409824083091, -1.231739572450155,0.001208650973866179,-0.00000539523938...
glutamate/probably-base
Math/Probably/Student.hs
bsd-3-clause
1,639
0
16
396
854
450
404
29
1
{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -Wall #-} {-# LANGUAGE ScopedTypeVariables #-} module Net where import qualified Data.ByteString.Lazy as ByteString import Network.HTTP.Client( HttpException( .. ) ) import Network.Wreq import Control.Lens import Control.Exception downLoad :: FilePath -> String -> I...
mike-k-houghton/Builder
src/Net.hs
bsd-3-clause
1,330
0
15
625
262
132
130
27
5
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} ...
mstksg/tensor-ops
src/Data/Nested.hs
bsd-3-clause
17,301
1
23
5,837
6,710
3,456
3,254
503
2
{-# LANGUAGE ConstraintKinds, TypeFamilies, TypeOperators, DataKinds, PolyKinds , FlexibleInstances, UndecidableInstances, ScopedTypeVariables, GADTs #-} module Units.Convert where import Prelude hiding (Int) import Data.Singletons import GHC.Exts (Constraint) import Units import Units.Internal.Types class IsoDim...
haasn/units
src/Units/Convert.hs
bsd-3-clause
1,495
0
12
365
655
351
304
-1
-1
module ABFA.Rand where import System.Random randomList :: (Random a) => (a,a) -> Int -> StdGen -> [a] randomList bnds n = do take n . randomRs bnds randomN :: Int -> Int -> IO Int randomN min max = do getStdRandom $ randomR (min, max) buildList2 :: ([a], [a]) -> [(a, a)] buildList2 ([], []) = [] buildList2 ...
coghex/abridgefaraway
src/ABFA/Rand.hs
bsd-3-clause
1,017
0
9
256
404
222
182
26
1