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
module FunArity where main x y = 0 main x = 1
roberth/uu-helium
test/staticerrors/FunArity.hs
gpl-3.0
51
0
5
17
22
12
10
-1
-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-opsworks/gen/Network/AWS/OpsWorks/SetLoadBasedAutoScaling.hs
mpl-2.0
5,808
0
12
1,136
660
400
260
87
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-cloudtrail/gen/Network/AWS/CloudTrail/GetTrailStatus.hs
mpl-2.0
9,254
0
20
1,893
1,282
756
526
141
1
{-# LANGUAGE TypeOperators #-} module TypeOperator where -- - @"+" defines/binding SumTypeOp data a + b = Sum a b -- - @"+" ref SumTypeOp mkSum :: a -> b -> a + b mkSum x y = Sum x y
google/haskell-indexer
kythe-verification/testdata/basic/TypeOperators.hs
apache-2.0
186
0
7
44
53
30
23
5
1
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} ----------------------------------------...
PipocaQuemada/ermine
src/Ermine/Interpreter.hs
bsd-2-clause
15,554
0
19
3,448
6,651
3,302
3,349
-1
-1
module Data.STM.Bag ( Impl, module Data.STM.Bag.Class ) where import Data.STM.Bag.Class import Data.STM.Bag.Internal.PTLB -- | The default implementation type Impl = PTLB
Alllex/stm-data-collection
src/Data/STM/Bag.hs
bsd-3-clause
182
0
5
32
42
30
12
6
0
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveFunctor #-} ----------------------------------------------------------------------------- -- | -- Module : Distribution.Client.PackageIndex -- Copyright : (c) David Himmelstrup 2005, -- Bjorn Bringert 2007, -- Duncan Coutts 2008 -- -...
seereason/cabal
cabal-install/Distribution/Client/PackageIndex.hs
bsd-3-clause
10,633
0
13
2,364
2,241
1,221
1,020
153
4
-- | Regression tests for specific bugs. -- {-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-} module Tests.Regressions ( tests ) where {- import Control.Exception (SomeException, handle) import System.IO import Test.HUnit (assertBool, assertEqual, assertFailure) import qualified Data.ByteString as B...
ghcjs/ghcjs-base
test/Tests/Regressions.hs
mit
3,214
0
6
615
56
38
18
8
1
module GoToSymbolFunction_ReferenceLeftMostFunctionWithoutTypeSig where test 1 = a test 2 = b test 3 = c t<caret>est 4 = d
charleso/intellij-haskforce
tests/gold/codeInsight/GoToSymbolFunction_ReferenceLeftMostFunctionWithoutTypeSig.hs
apache-2.0
123
1
6
19
46
23
23
-1
-1
{-| External data loader. This module holds the external data loading, and thus is the only one depending (via the specialized Text\/Rapi\/Luxi modules) on the actual libraries implementing the low-level protocols. -} {- Copyright (C) 2009, 2010, 2011, 2012 Google Inc. All rights reserved. Redistribution and use i...
leshchevds/ganeti
src/Ganeti/HTools/ExtLoader.hs
bsd-2-clause
5,938
0
16
1,414
1,182
622
560
98
5
<?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="fil-PH"> <title>Selenium add-on</title> <maps> <homeID>top</homeID> <mapref location="...
ccgreen13/zap-extensions
src/org/zaproxy/zap/extension/selenium/resources/help_fil_PH/helpset_fil_PH.hs
apache-2.0
962
79
67
157
413
209
204
-1
-1
-- Operations on the global state of the vectorisation monad. module Vectorise.Monad.Global ( readGEnv, setGEnv, updGEnv, -- * Configuration isVectAvoidanceAggressive, -- * Vars defGlobalVar, undefGlobalVar, -- * Vectorisation declarations lookupVectDecl, -- * Scalars globalParallelVars, glob...
snoyberg/ghc
compiler/vectorise/Vectorise/Monad/Global.hs
bsd-3-clause
7,644
0
14
1,718
1,545
816
729
113
3
{-# LANGUAGE TypeFamilies #-} module T10836 where type family Foo a = r | r -> a where Foo Int = Int Foo Bool = Int type family Bar a = r | r -> a where Bar Int = Int Bar Bool = Int
acowley/ghc
testsuite/tests/typecheck/should_fail/T10836.hs
bsd-3-clause
202
0
6
65
67
42
25
8
0
{-# LANGUAGE RankNTypes, MonoLocalBinds #-} module T13804 where f periph = let sr :: forall a. [a] -> [a] sr = if periph then reverse else id sr2 = sr -- The question: is sr2 generalised? -- It should be, because sr has a type sig -- even tho...
sdiehl/ghc
testsuite/tests/typecheck/should_compile/T13804.hs
bsd-3-clause
390
0
11
158
75
44
31
6
2
import Control.Concurrent import Control.Exception import System.Mem ( performGC ) import System.Mem.Weak ( addFinalizer ) data P = P (MVar Bool) -- Bug reported by Manuel Chakravarty, namely that we weren't checking -- for runnable finalizers before declaring that the program is -- deadlocked. main = do -- gcThrea...
hferreiro/replay
testsuite/tests/concurrent/should_run/conc031.hs
bsd-3-clause
734
0
14
191
173
85
88
19
1
-- !!! Importing unknown name module M where import Prelude(f)
urbanslug/ghc
testsuite/tests/module/mod80.hs
bsd-3-clause
64
0
5
11
13
9
4
2
0
/* Copyright (C) 2007 Free Software Foundation Contributed by Ollie Wild <aaw@google.com> */ static unsigned offset[] = {__COUNTER__, __COUNTER__, __COUNTER__}; #define counter __COUNTER__
SanDisk-Open-Source/SSD_Dashboard
uefi/gcc/gcc-4.6.3/gcc/testsuite/gcc.dg/pch/counter-1.hs
gpl-2.0
193
5
7
27
60
34
26
-1
-1
module KNXd.Client.Internal.Serialize where import Data.ByteString (ByteString) import Data.HList import Data.Serialize import Data.Word import KNXd.Client.Internal.Types -- |Some types need nonstandard serialization, -- so it's easier to just serialize in a special class. class ConvertWire a where putWire :: Putt...
KaneTW/knxd-native-client
src/KNXd/Client/Internal/Serialize.hs
mit
1,944
0
11
393
535
279
256
-1
-1
module P11 where import P10(encode) data Item a = Single a | Multiple Int a deriving(Show) -- | Modified run-length encoding -- >>> encodeModified "aaaabccaadeeee" -- [Multiple 4 'a',Single 'b',Multiple 2 'c',Multiple 2 'a',Single 'd',Multiple 4 'e'] encodeModified :: Eq a => [a] -> [Item a] encodeModified = fmap to...
briancavalier/h99
p11.hs
mit
404
0
8
79
114
64
50
7
2
{-# LANGUAGE OverloadedStrings #-} module CoinApi.Types.Quote where import CoinApi.Types.Internal import CoinApi.Types.Trade import Data.Aeson.Types data Quote = Quote { symbol_id :: !Text , time_exchange :: !UTCTime , time_coinapi :: !UTCTime , ask_price...
coinapi/coinapi-sdk
data-api/haskell-rest/CoinApi/Types/Quote.hs
mit
1,892
0
23
1,044
336
177
159
46
0
-- Remove duplicates from list -- https://www.codewars.com/kata/57a5b0dfcf1fa526bb000118 module RemoveDuplicates where import Data.List (nub) distinct :: [Int] -> [Int] distinct = nub
gafiatulin/codewars
src/8 kyu/RemoveDuplicates.hs
mit
187
0
6
24
36
23
13
4
1
module Ecma.Prims where import Data.Int import Data.Word import Data.Binary.IEEE754 (doubleToWord) nan :: Double nan = read "NaN" infinity :: Double infinity = read "Infinity" -- 8.6.1 class Value a where --value :: (Typeable b) => a -> b value :: a -> a class Writable a where w...
phylake/avm3
ecma/prims.hs
mit
1,954
0
10
474
466
248
218
-1
-1
{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} -- | CmdItem is a tool to build command lines. module Data.CmdItem where import Control.Applicative ((<$>)) import Data.Either (either, partitionEither...
geraud/cmd-item
src/Data/CmdItem.hs
mit
2,040
0
14
551
514
284
230
38
2
module NinetyNine.Parser (module X) where import NinetyNine.Parser.Char as X import NinetyNine.Parser.Combinator as X import NinetyNine.Parser.Prim as X import NinetyNine.Parser.Token as X import NinetyNine.Parser.Example.Expr as X
airt/Haskell-99
src/NinetyNine/Parser.hs
mit
233
0
4
26
53
39
14
6
0
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE DeriveGeneric #-} module Models.ComicList (ComicList(..)) where import BasicPrelude import Data.Aeson (FromJSON(..), ToJSON(..)) import GHC.Generics (Generic) import Models.ComicSummary (ComicSummary) data ComicList = ComicList { available :: Int , items :: [Comi...
nicolashery/example-marvel-haskell
Models/ComicList.hs
mit
414
0
9
58
110
67
43
13
0
module Language.UHC.JScript.Assorted where import Language.UHC.JScript.ECMA.String import Language.UHC.JScript.Types import Language.UHC.JScript.Primitives alert :: String -> IO () alert = _alert . toJS foreign import js "alert(%*)" _alert :: JSString -> IO ()
kjgorman/melchior
Language/UHC/JScript/Assorted.hs
mit
266
1
7
35
67
42
25
8
1
module Settings.Packages.Cabal where import GHC import Expression cabalPackageArgs :: Args cabalPackageArgs = package cabal ? -- Cabal is a rather large library and quite slow to compile. Moreover, we -- build it for stage0 only so we can link ghc-pkg against it, so there is -- little reason to spend the ...
izgzhen/hadrian
src/Settings/Packages/Cabal.hs
mit
380
0
8
80
47
27
20
6
1
module Language.Brainfuck.Py2Bf.Bfprim ( Bfprim (..) , isBfprimNonIO , isBfWhile , BfState , runPrim , runPrimIO ) where import Data.Word (Word8) import Data.Functor ((<$>)) import Codec.Binary.UTF8.String (decode, encode) data Bfprim = BfIncr | BfDecr | BfNext | BfPr...
itchyny/py2bf.hs
Language/Brainfuck/Py2Bf/Bfprim.hs
mit
4,210
0
38
1,219
2,231
1,248
983
94
2
module Control.Flower.Functor ( module Control.Flower.Functor.Lazy, module Control.Flower.Functor.Strict ) where import Control.Flower.Functor.Lazy import Control.Flower.Functor.Strict
expede/flower
src/Control/Flower/Functor.hs
mit
190
0
5
18
39
28
11
5
0
module Chattp.Relay.Config where import System.Environment (getEnv, lookupEnv) import qualified Data.ByteString.Lazy.Char8 as BS data Family = Inet | Unix deriving (Show,Eq) data RelayConfig = RelayConfig { publishHost :: String, publishPort :: Int, publishBasePath :: String, publishChanIdParam :: S...
Spheniscida/cHaTTP
mesg-relay/Chattp/Relay/Config.hs
mit
2,842
0
16
700
530
299
231
58
4
{-# LANGUAGE TemplateHaskell #-} module Parser where import Control.Monad import Control.Monad.State import Control.Lens import Data.List import Data.Map as M hiding (map) type RuleName = String type RulePair = (RuleName, Pattern) type RuleMap = M.Map RuleName Pattern data RepTime = RTInt Integer -- n-times ...
shouya/gximemo
GxiMemo/Parser.hs
mit
5,934
0
21
1,771
2,288
1,130
1,158
177
18
module Hitly.Map ( appMap, mkMap, atomicIO, newLink, getLink, getAndTickCounter ) where import BasePrelude hiding (insert, lookup, delete) import Control.Monad.IO.Class import STMContainers.Map import Hitly.Types appMap :: STM AppMap appMap = new mkMap :: MonadIO m => m AppMap mkMap = liftIO $ atomi...
buckie/hitly
src/Hitly/Map.hs
mit
1,044
0
17
281
384
195
189
31
2
{-# LANGUAGE ImpredicativeTypes #-} {-# LANGUAGE ImpredicativeTypes #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE...
alexstachnik/High-Level-C
src/Language/HLC/HighLevelC/PrimFunctions.hs
gpl-2.0
1,811
0
12
302
409
229
180
43
1
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable #-} module Haskell.Data where import Autolib.ToDoc import Autolib.Reader import Autolib.Size import Data.Typeable import Test.QuickCheck ( Args (..)) import System.Random ( StdGen ) import qualified Language.Haskell.Exts.Parser as Pa import qualified Language.Haskel...
marcellussiegburg/autotool
collection/src/Haskell/Data.hs
gpl-2.0
1,859
0
9
500
360
214
146
37
1
module DarkPlaces.Demo ( getDemoMessage, getDemoMessages, iterDemoMessages, demoFileMessages, demoFilePackets ) where import Control.Applicative import qualified Data.ByteString.Lazy as BL import qualified Data.ByteString as B import Data.Binary.Get import DarkPlaces.Types import DarkPlaces.Binary i...
bacher09/darkplaces-demo
src/DarkPlaces/Demo.hs
gpl-2.0
1,818
0
15
406
638
335
303
45
5
module TS.Page.YoYo where import TS.Logic import TS.Utils import TS.App import Yesod --Improve Elm loading method. Find a way to embed the code. Link the the .elm here rather than the .js yoyoPage :: WidgetT TS IO() yoyoPage = sendFile "text/html" "Resources/yoyo.html"
Sheerfreeze/thoughtspread
TS/Page/YoYo.hs
gpl-2.0
272
0
6
43
50
29
21
7
1
module Data.Chemistry.Parser ( xyzParser , xyzTrajParser , moldenParser , nwBasisParser , gmsBasisParser , numericalMatrixParser ) where import Control.Applicative import Data.Attoparsec.Text.Lazy import Data.Chemistry.Types import Data.Chemistry.Wavefunction import Dat...
sheepforce/Haskell_Data.Chemistry
src/modules/Data/Chemistry/Parser.hs
gpl-3.0
19,530
0
25
7,880
3,525
1,756
1,769
-1
-1
module Model.Light where import Model.Object import Model.Types data PointLight = PointLight { plPosition :: Translation , plStrength :: GLfloat , plColor :: ColorRGB , plrelativeTo :: Maybe Object }
halvorgb/AO2D
src/Model/Light.hs
gpl-3.0
295
0
9
124
52
32
20
8
0
{-# LANGUAGE TemplateHaskell #-} module Tic.LocationSelectionResult where import ClassyPrelude import Control.Lens (makePrisms) import Tic.GeoCoord data LocationSelectionResult a = LocationClicked (GeoCoord a) | LocationTimedOut ...
pmiddend/tic
lib/Tic/LocationSelectionResult.hs
gpl-3.0
380
0
8
122
63
36
27
9
0
module Main where import Test.Tasty (TestTree, testGroup, defaultMain) import Test.Tasty.HUnit (testCase, assertBool, (@?=)) import Control.Monad(when) import Data.Functor.Foldable (Fix(..), Recursive(..), Corecursive(..)) import Data.Maybe(fromMaybe) import Data.Monoid ((<>)) import MLSB parsesM' :: (Monad m, Eq x...
grwlf/ml-df
test/Main.hs
gpl-3.0
5,721
0
21
1,494
2,575
1,269
1,306
115
3
import System.IO import System.Directory import Data.List import System.Environment import Data.Time import Data.Maybe import Utils type Note = String getNotefilePath :: IO (String) getNotefilePath = getEnv "NOTE_FILE" main :: IO () main = do args <- getArgs runWith args where runWith :: [String] -> IO...
apvanzanten/learningMeAHaskell
note.hs
gpl-3.0
3,294
0
16
676
1,187
590
597
88
3
module DL3048 (tests) where import Helpers import Test.Hspec tests :: SpecWith () tests = do let ?rulesConfig = mempty describe "DL3048 - Invalid Label Key Rule" $ do it "not ok with reserved namespace" $ do ruleCatches "DL3048" "LABEL com.docker.label=\"foo\"" ruleCatches "DL3048" "LABEL io.dock...
lukasmartinelli/hadolint
test/DL3048.hs
gpl-3.0
1,786
0
13
320
277
113
164
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-run/gen/Network/Google/Resource/Run/Namespaces/Services/ReplaceService.hs
mpl-2.0
6,448
0
19
1,434
873
511
362
126
1
{-# LANGUAGE TypeFamilies, OverloadedStrings #-} module Model.Token.Types ( Token(..) , AccountToken(..) , LoginToken(..) , Session(..) , Upload(..) , makeUpload ) where import qualified Data.ByteString as BS import Data.Int (Int64) import Has (Has(..)) import Model.Kind import Model.Time import Model.I...
databrary/databrary
src/Model/Token/Types.hs
agpl-3.0
2,135
0
10
392
608
344
264
-1
-1
{-# OPTIONS_GHC -Wall -} {- - Module to parse .emod files - - - Copyright 2013 -- name removed for blind review, all rights reserved! Please push a git request to receive author's name! -- - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the Lice...
DatePaper616/code
EParser.hs
apache-2.0
13,249
53
17
3,377
4,468
2,308
2,160
-1
-1
-- | Schedule program for execution. At the moment it schedule for -- exact number of threads module DNA.Compiler.Scheduler where import Control.Monad import Data.Graph.Inductive.Graph import qualified Data.IntMap as IntMap import Data.IntMap ((!)) import DNA.AST import DNA.Actor import DNA.Compiler.Type...
SKA-ScienceDataProcessor/RC
MS1/dna/DNA/Compiler/Scheduler.hs
apache-2.0
2,911
0
17
764
869
464
405
54
3
{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TemplateHaskell #-} ---------------------------------------------------------------------------- -- | -- Module : Web.Skroutz.Model.Base.SkuReview -- Copyright : (c) 2016 Remous-Aris Kout...
ariskou/skroutz-haskell-api
src/Web/Skroutz/Model/Base/SkuReview.hs
apache-2.0
1,492
0
8
410
179
115
64
22
0
----------------------------------------------------------------------------- -- -- Module : Graphics.UI.Hieroglyph.Cache -- Copyright : -- License : BSD3 -- -- Maintainer : J.R. Heard -- Stability : -- Portability : -- -- | -- ---------------------------------------------------------------------------...
JeffHeard/Hieroglyph
Graphics/UI/Hieroglyph/Cache.hs
bsd-2-clause
3,561
0
14
767
1,568
816
752
35
1
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QGradient.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:16 Warning : this file is machine generated - do not...
keera-studios/hsQt
Qtc/Gui/QGradient.hs
bsd-2-clause
3,662
0
12
608
1,057
552
505
-1
-1
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QUdpSocket_h.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:31 Warning : this file is machine generated - do ...
uduki/hsQt
Qtc/Network/QUdpSocket_h.hs
bsd-2-clause
38,699
0
18
8,838
12,713
6,089
6,624
-1
-1
module Data.Drasil.Concepts.PhysicalProperties where import Language.Drasil import Utils.Drasil import Data.Drasil.Concepts.Documentation (material_, property) import Data.Drasil.Concepts.Math (centre) physicalcon :: [ConceptChunk] physicalcon = [gaseous, liquid, solid, ctrOfMass, density, specWeight, mass, len, d...
JacquesCarette/literate-scientific-software
code/drasil-data/Data/Drasil/Concepts/PhysicalProperties.hs
bsd-2-clause
1,681
0
7
425
339
197
142
24
1
{-# LANGUAGE OverloadedStrings #-} module Network.WebSockets.Protocol.Hybi10.Internal ( Hybi10_ (..) , encodeFrameHybi10 ) where import Control.Applicative (pure, (<$>)) import Data.Bits ((.&.), (.|.)) import Data.Maybe (maybeToList) import Data.Monoid (mempty, mappend, mconcat) import Data.Attoparsec (an...
0xfaded/websockets
src/Network/WebSockets/Protocol/Hybi10/Internal.hs
bsd-3-clause
5,497
0
14
1,403
1,668
886
782
127
10
module Hchain.Client (start) where import qualified Control.Distributed.Backend.P2P as P2P import Control.Distributed.Process as DP import Control.Distributed.Process.Node as DPN import Data.Binary import Data.Typeable import ...
jesuspc/hchain
src/hchain/Client.hs
bsd-3-clause
1,163
0
15
325
274
153
121
18
1
-- | A module that implements a dictionary/hash table module Text.Regex.Deriv.Dictionary where import qualified Data.IntMap as IM import Data.Char import Prelude hiding (all, words) class Key a where hash :: a -> [Int] instance Key Int where hash i = [i] instance Key Char where hash c = [(ord c)] in...
awalterschulze/xhaskell-regex-deriv
Text/Regex/Deriv/Dictionary.hs
bsd-3-clause
4,562
0
19
1,269
1,860
952
908
108
2
module Publish where import Control.Monad.Error.Class (throwError) import qualified Data.Maybe as Maybe import qualified Bump import qualified Catalog import qualified CommandLine.Helpers as Cmd import qualified Docs import qualified Elm.Docs as Docs import qualified Elm.Package.Description as Desc import qualified E...
laszlopandy/elm-package
src/Publish.hs
bsd-3-clause
3,146
0
13
828
705
360
345
77
3
module Algebra.Structures.PID ( module Algebra.Structures.UFD , PID(..) ) where import Algebra.Structures.UFD class UFD a => PID a
Alex128/abstract-math
src/Algebra/Structures/PID.hs
bsd-3-clause
148
0
6
34
43
26
17
-1
-1
{- Find things that are unsafe <TEST> {-# NOINLINE entries #-}; entries = unsafePerformIO newIO entries = unsafePerformIO Multimap.newIO -- {-# NOINLINE entries #-} ; entries = unsafePerformIO Multimap.newIO entries = unsafePerformIO $ f y where foo = 1 -- {-# NOINLINE entries #-} ; entries = unsafePerformIO $ f ...
ndmitchell/hlint
src/Hint/Unsafe.hs
bsd-3-clause
3,600
0
24
727
817
441
376
45
1
module Hhhhoard.Creds ( userEmail , userPassword) where userEmail :: String; userEmail = "example@gmail.com" userPassword :: String; userPassword = "password"
yan/hhhhoard
Hhhhoard/Creds.hs
bsd-3-clause
168
0
4
28
36
23
13
5
1
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.Raw.EXT.DebugLabel -- Copyright : (c) Sven Panne 2015 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : portable -- -...
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/EXT/DebugLabel.hs
bsd-3-clause
923
0
4
112
73
56
17
13
0
-- The Timber compiler <timber-lang.org> -- -- Copyright 2008-2009 Johan Nordlander <nordland@csee.ltu.se> -- 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 sour...
UBMLtonGroup/timberc
src/Lexer.hs
bsd-3-clause
18,665
50
27
6,972
5,642
2,901
2,741
282
50
{-# LANGUAGE CPP, TypeFamilies, FlexibleInstances, MultiParamTypeClasses, FlexibleContexts, UndecidableInstances #-} ----------------------------------------------------------------------------- -- | -- Module : Control.Monad.Array.Class -- Copyright : (C) 2011 Edward Kmett -- License : BSD-style (see the...
ekmett/monadic-arrays
Control/Monad/Array/Class.hs
bsd-3-clause
7,851
0
12
2,183
2,643
1,353
1,290
145
0
{-# LANGUAGE CPP #-} module Language.Sh.Glob ( expandGlob, matchPattern, removePrefix, removeSuffix ) where import Control.Monad.Trans ( MonadIO, liftIO ) import Control.Monad.State ( runState, put ) import Data.Char ( ord, chr ) import Data.List ( isPrefixOf, partition ) import Data.Maybe ( ...
MgaMPKAy/language-sh
Language/Sh/Glob.hs
bsd-3-clause
8,582
0
17
3,513
2,262
1,163
1,099
113
14
-- {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeOperators #-} -- we are deriving Monoid instance for Config type -- {-# OPTIONS_GHC -fno-warn-missing-methods #-} module System.EtCetera.Redis.V2_8 ...
paluh/et-cetera
src/System/EtCetera/Redis/V2_8.hs
bsd-3-clause
17,130
0
75
3,650
4,747
2,542
2,205
367
20
{-# OPTIONS_GHC -fno-warn-name-shadowing #-} {-# LANGUAGE PatternGuards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TupleSections #-} module DFAMin (minimizeDFA) where import AbsSyn import Data.Map (Map) import qualified Data.Map as Map import Data.IntSet (IntSet) import qualified Data.IntSet ...
simonmar/alex
src/DFAMin.hs
bsd-3-clause
8,226
0
19
2,757
1,724
946
778
109
7
module Main where eight = 1 + ( 2 * 2 ) + 3
YoshikuniJujo/toyhaskell_haskell
examples/eight.hs
bsd-3-clause
45
0
8
15
24
14
10
2
1
{-# language CPP #-} -- | = Name -- -- VK_GOOGLE_surfaceless_query - instance extension -- -- == VK_GOOGLE_surfaceless_query -- -- [__Name String__] -- @VK_GOOGLE_surfaceless_query@ -- -- [__Extension Type__] -- Instance extension -- -- [__Registered Extension Number__] -- 434 -- -- [__Revision__] -- 1 ...
expipiplus1/vulkan
src/Vulkan/Extensions/VK_GOOGLE_surfaceless_query.hs
bsd-3-clause
3,978
0
8
695
205
159
46
-1
-1
module Language.Asdf.Lexer ( symbol , parens , brackets , natural , naturalOrFloat , rational , stringLiteral , operator ...
sw17ch/Asdf
src/Language/Asdf/Lexer.hs
bsd-3-clause
2,688
0
8
1,010
670
373
297
57
1
module Main where fibs = 0 : 1 : zipWith (+) fibs (tail fibs) fib 0 = 0 fib 1 = 1 fib n = fib (n-1) + fib (n-2) f :: Int -> Int f x = if fib 100 > 10 then f (x + 1) else 0 main :: IO () main = if fib 10 == fibs !! 10 then putStrLn "Yay!" else putStrLn "Boo!"
yav/sequent-core
examples/Example.hs
bsd-3-clause
264
0
8
74
162
84
78
9
2
module NestedIO where import Data.Time.Calendar import Data.Time.Clock import System.Random huehue :: IO (Either (IO Int) (IO ())) huehue = do t <- getCurrentTime let (_, _, dayOfMonth) = toGregorian (utctDay t) case even dayOfMonth of True -> return $ Left randomIO False -> return $ Right (putStrLn "no...
chengzh2008/hpffp
src/ch29-IO/nestedIO.hs
bsd-3-clause
385
0
13
78
134
69
65
11
2
{-| Module : $Header$ Description : Adapter for communicating with Slack via its real time messaging API Copyright : (c) Justus Adam, 2016 License : BSD3 Maintainer : dev@justus.science Stability : experimental Portability : POSIX See http://marvin.readthedocs.io/en/latest/adapters.html#real-time-messagi...
JustusAdam/marvin
src/Marvin/Adapter/Slack/RTM.hs
bsd-3-clause
5,717
0
26
1,995
1,207
621
586
-1
-1
{-#LANGUAGE ScopedTypeVariables, NoImplicitPrelude#-} module Base ( -- Classes Eq (..), Ord (..), Bounded (..), Num (..), Real (..), Integral (..), Fractional (..), Floating (..), RealFrac (..), RealFloat (..), Enum (..), Funct...
rodrigogribeiro/mptc
src/Libs/Base.hs
bsd-3-clause
50,296
5
17
19,171
18,159
9,786
8,373
-1
-1
main = 1e
roberth/uu-helium
test/parser/ExponentBad.hs
gpl-3.0
10
0
5
3
9
4
5
-1
-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-cloudsearch/gen/Network/AWS/CloudSearch/DeleteAnalysisScheme.hs
mpl-2.0
5,263
0
14
978
625
378
247
83
1
-- | -- Scalpel is a web scraping library inspired by libraries like parsec and -- Perl's <http://search.cpan.org/~miyagawa/Web-Scraper-0.38/ Web::Scraper>. -- Scalpel builds on top of "Text.HTML.TagSoup" to provide a declarative and -- monadic interface. -- -- There are two general mechanisms provided by this library ...
sulami/scalpel
src/Text/HTML/Scalpel.hs
apache-2.0
5,333
0
5
1,111
262
219
43
-1
-1
module L01.Validation.Tests where import Test.Framework import Test.Framework.Providers.QuickCheck2 (testProperty) import L01.Validation import Test.QuickCheck import Test.QuickCheck.Function instance Arbitrary a => Arbitrary (Validation a) where arbitrary = fmap (either Error Value) arbitrary main :: IO ()...
juretta/course
test/src/L01/Validation/Tests.hs
bsd-3-clause
1,117
0
8
243
340
172
168
46
1
{-# LANGUAGE Haskell2010, CPP, Rank2Types, DeriveDataTypeable, StandaloneDeriving #-} {-# LINE 1 "lib/Data/Time/Clock/UTC.hs" #-} {-# OPTIONS -fno-warn-unused-imports #-} {-# LANGUAGE Trustworthy #-} -- #hide module Data.Time.Clock.UTC ( -- * UTC -- | UTC is time...
phischu/fragnix
tests/packages/scotty/Data.Time.Clock.UTC.hs
bsd-3-clause
4,906
0
9
953
991
517
474
66
0
{-# OPTIONS_HADDOCK hide #-} {-# LANGUAGE CPP, UndecidableInstances, ParallelListComp #-} -- Undeciable instances only need for derived Show instance #include "fusion-phases.h" -- | Parallel array types and the PR class that works on the generic -- representation of array data. module Data.Array.Parallel.PArray.PDat...
mainland/dph
dph-lifted-vseg/Data/Array/Parallel/PArray/PData/Base.hs
bsd-3-clause
10,584
1
12
2,652
1,232
704
528
-1
-1
{-# LANGUAGE Haskell98 #-} {-# LINE 1 "Control/Applicative/Lift.hs" #-} {-# LANGUAGE CPP #-} {-# LANGUAGE Safe #-} {-# LANGUAGE AutoDeriveTypeable #-} ----------------------------------------------------------------------------- -- | -- Module : Control.Applicative.Li...
phischu/fragnix
tests/packages/scotty/Control.Applicative.Lift.hs
bsd-3-clause
5,157
0
9
1,188
1,542
810
732
94
1
-- Thanks to Bryan O'Sullivan for this test case. -- hexpat will spawn zillions of threads (which is seen as huge virtual memory -- usage in top). This is now fixed in 0.19.1. import Control.Concurrent import Control.Monad import qualified Data.ByteString as B import Text.XML.Expat.Tree import System.Environment mai...
the-real-blackh/hexpat
test/hexpat-leak/Parse.hs
bsd-3-clause
727
0
22
173
194
93
101
19
2
{-# LANGUAGE FlexibleInstances, UndecidableInstances, GADTs #-} module Bind(Fresh(..),Freshen(..),Swap(..),Name,Perm ,Bind,bind ,swapM, swapsM, swapsMf ,M,runM ,unsafeUnBind,reset,name1,name2,name3,name4,name5,name2Int,integer2Name) where import Control.Monad.Fix(MonadFix(.....
cartazio/omega
src/Bind.hs
bsd-3-clause
4,137
0
12
1,093
2,203
1,152
1,051
109
1
{- main = 1; {-# ANN module ("HLint: ignore Use camelCase" :: String) #-} main = 1; {-# ANN module (1 + (2)) #-} -} module Comment00006 where
charleso/intellij-haskforce
tests/gold/parser/Comment00006.hs
apache-2.0
143
0
2
29
5
4
1
1
0
module Docs.AST where import qualified Data.Map as Map import qualified Elm.Compiler.Type as Type import qualified Reporting.Annotation as A -- FULL DOCUMENTATION data Docs t = Docs { comment :: String , aliases :: Map.Map String (A.Located Alias) , types :: Map.Map String (A.Located Union) , value...
JoeyEremondi/elm-summer-opt
src/Docs/AST.hs
bsd-3-clause
850
0
13
207
271
162
109
23
0
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1993-1998 -} {-# LANGUAGE CPP #-} module IfaceSyn ( module IfaceType, IfaceDecl(..), IfaceFamTyConFlav(..), IfaceClassOp(..), IfaceAT(..), IfaceConDecl(..), IfaceConDecls(..), IfaceEqSpec, IfaceExpr(...
wxwxwwxxx/ghc
compiler/iface/IfaceSyn.hs
bsd-3-clause
71,979
78
28
24,013
17,782
8,854
8,928
1,374
12
module A4 where import B4 import C4 import D4 main :: (Tree Int) -> Bool main t = isSameOrNot (sumSquares (fringe t)) ((sumSquares (B4.myFringe t)) + (sumSquares (C4.myFringe t)))
kmate/HaRe
old/testing/renaming/A4_AstOut.hs
bsd-3-clause
197
4
12
46
92
49
43
9
1
module SPARC.AddrMode ( AddrMode(..), addrOffset ) where import GhcPrelude import SPARC.Imm import SPARC.Base import Reg -- addressing modes ------------------------------------------------------------ -- | Represents a memory address in an instruction. -- Being a RISC machine, the SPARC addr...
ezyang/ghc
compiler/nativeGen/SPARC/AddrMode.hs
bsd-3-clause
1,120
0
15
324
289
146
143
25
4
{-# OPTIONS -fwarn-incomplete-patterns #-} -- Test for incomplete-pattern warnings -- None should cause a warning module ShouldCompile where -- These ones gave bogus warnings in 6.2 data D = D1 { f1 :: Int } | D2 -- Use pattern matching in the argument f :: D -> D f d1@(D1 {f1 = n}) = d1 { f1 = f1 d1 + n } -- War...
urbanslug/ghc
testsuite/tests/deSugar/should_compile/ds059.hs
bsd-3-clause
778
0
10
227
220
124
96
14
2
{-# LANGUAGE OverloadedStrings #-} module Cirrus.Deploy (runDeploy) where import Cirrus.Encode (encode) import Control.Exception.Lens (catching_) import Control.Lens ((&), (?~), (.~)) import Control.Monad (void) import Data.ByteString.Lazy (toStrict) import Data.Text.Encoding (decodeUtf8) import Data.Text (Text) impo...
ags/cirrus
src/Cirrus/Deploy.hs
mit
1,101
0
12
167
388
211
177
27
1
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Protop.Logic.Builder ( M , evalM' , evalM , popM , lftM , objM , morM , prfM , lamSM , sgmSM , varM , lamM , appM , sgmM ) where import qualified Control.Monad.Identity a...
brunjlar/protop
src/Protop/Logic/Builder.hs
mit
1,983
0
16
642
882
435
447
71
2
module LasmConverter where import Control.Monad.State import Data.Map hiding (map, foldr) import Prelude hiding (lookup) import Debug.Trace import AbsLasm import AbsJavalette --Environment monad data LEnv = Env Integer Integer Integer [Context] Context type EnvState = State LEnv data Pointer = Val Integer | Ref Int...
davidsundelius/JLC
src/LasmConverter.hs
mit
21,425
0
26
10,071
7,497
3,710
3,787
403
24
-- | A data type representing the game map at a particular frame, and functions that operate on it. module Hlt.GameMap where import qualified Data.Either as Either import qualified Data.Maybe as Maybe import qualified Data.Map as Map import Hlt.Entity -- | A GameMap contains the current frame of a Halite game. data G...
HaliteChallenge/Halite-II
airesources/Haskell/Hlt/GameMap.hs
mit
1,567
0
10
395
424
228
196
-1
-1
{- Problem 19 You are given the following information, but you may prefer to do some research for yourself. 1 Jan 1900 was a Monday. Thirty days has September, April, June and November. All the rest have thirty-one, Saving February alone, Which has twenty-eight, rain or shine. And on lea...
RossMeikleham/Project-Euler-Haskell
19.hs
mit
1,266
0
13
372
341
200
141
11
3
{-# LANGUAGE ScopedTypeVariables #-} module Main where import Sound.PortAudio.Base import Sound.PortAudio import qualified Sound.File.Sndfile as SF import qualified Sound.File.Sndfile.Buffer as BSF import qualified Sound.File.Sndfile.Buffer.Vector as VSF import Data.List (transpose) import qualified Data.Vector as ...
sw17ch/portaudio
examples/Example3.hs
mit
6,545
5
27
2,043
1,892
975
917
-1
-1
import Samba import System.Process (createProcess, shell) import Control.Monad (when) main = do putStrLn $ unlines [ "################################################################" , "Instructions: " , "" , "Firstly, ensure your smb.conf have this section:" , "[homes]" , " comment = Hom...
felipexpert/sambaHaskell
defineSambaUser.hs
mit
1,353
0
14
320
222
118
104
37
1
module Main where import Barcode import System.Environment import qualified Data.Vector as V import qualified Data.List as DL main :: IO () main = do -- get input arg [inFile, maxSnps'] <- getArgs >>= return . take 2 let maxSnps = read maxSnps' :: Int samples <- parseBarcode inFile let samples' = uniq...
ndaniels/strain-assay-minimization
Main.hs
mit
788
0
12
153
170
92
78
12
1
------------- --LIBRARIES-- ------------- import Graphics.UI.WXCore import GUI_Player import GUI_Cpu ----------- --METHODS-- ----------- main :: IO() main = do putStrLn "Enter game mode (player or cpu): " gameMode <- getLine case gameMode of "player" -> run createPlayerWindow "cpu" -> run c...
BrunoAltadill/Bloxorz_2D
code/Main.hs
mit
372
0
10
79
78
41
37
11
3
#!/usr/bin/env runhaskell {-# LANGUAGE FlexibleInstances #-} import Control.Monad.Reader hiding (when) import Data.Decimal import qualified Data.List as L hiding (and) import DSL import FinancialArithmetic import Models import Graphics.EasyPlot ------------------------------------------------------------------...
AlexanderAA/haskell-contract-valuation
Examples.hs
mit
2,230
0
16
752
505
254
251
30
1
-- -- This code was created by Jeff Molofee '99 (ported to Haskell GHC 2005) -- module Main where import qualified Graphics.UI.GLFW as GLFW -- everything from here starts with gl or GL import Graphics.Rendering.OpenGL.Raw import Graphics.Rendering.GLU.Raw ( gluPerspective ) import Data.Bits ( (.|.) ) import System.Ex...
spetz911/progames
nehe-tuts-master/lesson04.hs
mit
3,972
0
11
950
973
474
499
86
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE InstanceSigs #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} module Network.Network ( Network(..) ) where import Network.Layer import Numeric.LinearAlgebra import System.Random -- | A network is c...
mckeankylej/hwRecog
Network/Network.hs
mit
490
0
10
122
95
55
40
13
0
module Data.IntSet.Data where import qualified Data.IntSet as I isetTo :: Int -> I.IntSet isetTo n = I.fromList [1..n] iset1 :: I.IntSet iset1 = isetTo 10 iset2 :: I.IntSet iset2 = isetTo 20 iset3 :: I.IntSet iset3 = isetTo 30 iset4 :: I.IntSet iset4 = isetTo 40 iset5 :: I.IntSet iset5 = isetTo 50
athanclark/sets
bench/Data/IntSet/Data.hs
mit
307
0
6
61
119
66
53
14
1
import Criterion.Main import Control.DeepSeq import qualified Data.Maybe as B import qualified MapMaybe as F main = do rnf ints `seq` return () defaultMain [ bgroup "simple" [ bench "base" $ nf (B.mapMaybe half) ints , bench "fold" $ nf (F.mapMaybe half) ints ] , bgroup "after map" ...
takano-akio/mapmaybe-benchmarks
main.hs
cc0-1.0
928
0
16
267
414
210
204
25
2