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 DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-shopping-content/gen/Network/Google/Resource/Content/Accounts/Labels/Delete.hs
mpl-2.0
5,257
0
19
1,259
828
479
349
117
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-dialogflow/gen/Network/Google/Resource/DialogFlow/Projects/Locations/Agents/Flows/Pages/Get.hs
mpl-2.0
6,797
0
16
1,310
799
474
325
120
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-books/gen/Network/Google/Resource/Books/Bookshelves/Get.hs
mpl-2.0
3,323
0
15
791
461
274
187
67
1
{-# 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/SSLPolicies/Get.hs
mpl-2.0
3,331
0
15
757
392
236
156
63
1
-- Simple test of recursive integrals, from Beelsebob import Control.Arrow (first) import Data.Max import Data.AddBounds import FRP.Reactive.Behavior import FRP.Reactive.PrimReactive import FRP.Reactive.Internal.Reactive import FRP.Reactive.Internal.Behavior import FRP.Reactive.Future import FRP.Reactive import FRP.R...
ekmett/reactive
src/Test/Integ.hs
agpl-3.0
2,456
9
12
196
316
171
145
25
1
module AlecSequences.A273190Spec (main, spec) where import Test.Hspec import AlecSequences.A273190 (a273190) main :: IO () main = hspec spec spec :: Spec spec = describe "A273190" $ it "correctly computes the first 20 elements" $ take 20 (map a273190 [0..]) `shouldBe` expectedValue where expectedValue = [...
peterokagey/haskellOEIS
test/AlecSequences/A273190Spec.hs
apache-2.0
361
0
10
59
160
95
65
10
1
-- Isomorphism for sum and product types -- a+a = 2*a module Main where aa2a :: Either a a -> (Bool,a) aa2a (Left x) = (False,x) aa2a (Right x) = (True, x) _2aaa :: (Bool, a) -> Either a a _2aaa (False, x) = Left x _2aaa (True, x) = Right x print2 :: Either a a -> String print2 (Left x) ...
xunilrj/sandbox
books/category4programmers/6.5.main.hs
apache-2.0
638
0
9
194
288
154
134
18
1
import Data.List isLeap year | year `mod` 400 == 0 = True | year `mod` 100 == 0 = False | year `mod` 4 == 0 = True | otherwise = False ans (from:to:_) = filter isLeap [from..to] toStr :: [Int] -> String toStr [] = "NA\n" toStr x = unlines $ map show x main = do c <- getContents let i = map...
a143753/AOJ
0093.hs
apache-2.0
496
3
14
145
265
131
134
17
1
{-# LANGUAGE ScopedTypeVariables #-} module Util where import Test.QuickCheck.Property.Comb import Data.Set import qualified Data.List as L import Control.Applicative import Prelude hiding (pred, null) type LabelledSet a = (String, Set a) disjoint :: forall a. (Ord a) => Invariants [LabelledSet a] disjoint = sat $ ...
jfeltz/tasty-integrate
tests/Util.hs
bsd-2-clause
946
0
14
226
350
189
161
24
1
module Codewars.Parentheses where validParentheses :: String -> Bool validParentheses = validate 0 where validate depth [] = depth == 0 validate depth (b:bs) = if depth < 0 then False else ...
lisphacker/codewars
Parantheses.hs
bsd-2-clause
473
0
13
260
110
58
52
9
4
{-# LANGUAGE TemplateHaskell #-} module Main where import Control.Lens hiding ( Context, contexts ) import Control.Monad.Trans.Either ( EitherT(..) , runEitherT , hoistEither ) import Control.Monad.Tra...
mkiefel/trueskill
rolling_predict_app.hs
bsd-2-clause
9,272
0
21
3,339
2,424
1,288
1,136
-1
-1
{-# LANGUAGE FlexibleContexts, MultiParamTypeClasses, TypeSynonymInstances, PatternGuards, DeriveDataTypeable, FlexibleInstances #-} ----------------------------------------------------------------------------- -- | -- Module : XMonad.Hooks.UrgencyHook -- Copyright : Devin Mullins <me@twifkak.com> -- Licens...
reenberg/XMonadContrib
XMonad/Hooks/UrgencyHook.hs
bsd-3-clause
20,088
0
21
5,511
2,744
1,552
1,192
189
5
{-# LANGUAGE Arrows #-} {-# LANGUAGE MultiWayIf #-} import Control.Concurrent import Control.Monad import Control.Monad.IO.Class import Control.Concurrent.MVar import FRP.Yampa as Yampa import Arduino import Data.IORef import System.IO main = do -- Initialise arduino input <- defaultArduinoInput output <- defau...
turion/hacknotts14
src/Main.hs
bsd-3-clause
1,082
3
14
370
288
149
139
28
1
{-# LANGUAGE RankNTypes, ScopedTypeVariables #-} module Main where import qualified Data.Map as Map import Control.Monad import Control.Monad.Trans.Class import Control.Monad.Trans.RWS.Strict import Control.Monad.ST import Data.Array.Repa import Data.Array.Repa.Repr.ForeignPtr import Data.Array.Repa.IO.DevIL import ...
Ornedan/dom3conquestmaptool
dom3conquestmaptool.hs
bsd-3-clause
5,602
0
26
1,812
1,948
1,013
935
120
7
{-# LANGUAGE OverloadedStrings #-} ------------------------------------------------------------------------------ -- | This module is where all the routes and handlers are defined for your -- site. The 'app' function is the initializer that combines everything -- together and is exported by this module. module Site ...
imalsogreg/collabplot
server/src/Site.hs
bsd-3-clause
4,042
0
12
837
739
405
334
60
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE...
sjakobi/stack
src/Stack/Types/BuildPlan.hs
bsd-3-clause
16,476
0
17
4,611
4,288
2,299
1,989
407
2
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE UndecidableInstances #-} module Generics.Instant.Functions.Bytes ( -- $defaults ...
k0001/instant-bytes
src/lib/Generics/Instant/Functions/Bytes.hs
bsd-3-clause
7,757
0
13
1,662
2,010
1,053
957
-1
-1
module Turbinado.View.Monad ( -- * The 'View' Monad View, ViewT, ViewT', runView, runViewT, get, put, -- * Functions liftIO, catch ) where import Control.OldException (catchDyn) import Control.Monad.State import Control.Monad.Trans (MonadIO(..), liftIO) ...
abuiles/turbinado-blog
Turbinado/View/Monad.hs
bsd-3-clause
1,881
0
18
393
448
255
193
35
1
{-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE LambdaCase #-} module Data.Logic.Boolean ( module Data.Logic.Boolean , module Data.Logic.Boolean.Class ) where import Data.Logic.Atomic.Class import Data.Log...
kylcarte/finally-logical
src/Data/Logic/Boolean.hs
bsd-3-clause
1,968
0
12
461
698
381
317
63
0
{-# LANGUAGE CPP #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE RankNTypes #-} -- | -- Module : Data.Binary.Serialise.CBOR.Decoding -- Copyright : (c) Duncan Coutts 2015 -- License : BSD3-style (see LICENSE.txt) -- -- Maintainer : duncan@community.haskell.org -- Stability : exp...
thoughtpolice/binary-serialise-cbor
Data/Binary/Serialise/CBOR/Decoding.hs
bsd-3-clause
10,709
0
17
2,748
2,625
1,445
1,180
-1
-1
{- ------------------------------------------------------------------------ (c) The GHC Team, 1992-2012 DeriveConstants is a program that extracts information from the C declarations in the header files (primarily struct field offsets) and generates various files, such as a header file that can be #included into non-...
mcschroeder/ghc
utils/deriveConstants/Main.hs
bsd-3-clause
44,564
2
18
14,461
10,187
5,251
4,936
736
32
{-# LANGUAGE ForeignFunctionInterface #-} ------------------------------------------------------------------------------- -- | -- Copyright : (c) 2015 Michael Carpenter -- License : BSD3 -- Maintainer : Michael Carpenter <oldmanmike.dev@gmail.com> -- Stability : experimental -- Portability : portable -- -...
oldmanmike/CsoundRaw
src/Sound/Csound/RealtimeAudioIO.hs
bsd-3-clause
3,972
0
8
381
245
166
79
13
1
module Lib (main) where import BasePrelude import Control.Monad.IO.Class import Control.Monad.Random (getRandomR) import qualified Data.Text as T import qualified Data.Text.IO as T import Data.Vector (Vector, fromList, (!)) import Web.Spock main :: IO () main = do port <- fromMaybe 3030 <$> fmap read <$...
nejstastnejsistene/dirty-limericks
src/Lib.hs
bsd-3-clause
714
0
12
149
248
130
118
23
1
{-| Copyright : (c) Dave Laing, 2017 License : BSD3 Maintainer : dave.laing.80@gmail.com Stability : experimental Portability : non-portable -} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} ...
dalaing/type-systems
src/Fragment/IsoRec/Ast/Term.hs
bsd-3-clause
3,833
0
10
785
1,549
809
740
75
0
{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE TypeFamilies #-} module UniqMap ...
merijn/lambda-except
UniqMap.hs
bsd-3-clause
2,436
0
14
576
1,071
563
508
72
3
{-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} module Serv.Server.ServerEnv ( ServerEnv(..) , setupServerEnv ) where import Control.Exception import Data.Default.Class import Network.Wai import Network.Wai.Middleware.RequestLogger import ...
orangefiredragon/bear
src/Serv/Server/ServerEnv.hs
bsd-3-clause
1,111
0
15
290
252
143
109
28
2
{-# LANGUAGE GADTs #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} module Control.Quantum ( Amplitude , WaveFunction , Quantum , quantize , MonadQuantum , runQuantum , runQuantum' , measure , measurements ) wh...
ibab/haskell-quantum
src/Control/Quantum.hs
bsd-3-clause
5,371
0
14
1,452
1,888
993
895
109
3
{- | Module : Control.Monad.IO.Peel Copyright : © Anders Kaseorg, 2010 License : BSD-style Maintainer : Anders Kaseorg <andersk@mit.edu> Stability : experimental Portability : portable This module defines the class 'MonadPeelIO' of 'IO'-based monads into which control operations on 'IO' (such as e...
mcmaniac/monad-peel
Control/Monad/IO/Peel.hs
bsd-3-clause
4,111
0
13
824
816
456
360
54
1
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module SMACCMPilot.GCS.Gateway.Monad ( GW , runGW , lift , writeErr , writeLog , writeDbg , queuePushGW , queuePopGW , (>~>) , (>*>) , (>>~) ) where import qualified MonadLib as M import Control.Applicative import SMACCMPilot.GCS.Gateway.Console im...
GaloisInc/smaccmpilot-gcs-gateway
SMACCMPilot/GCS/Gateway/Monad.hs
bsd-3-clause
1,471
0
11
333
663
348
315
51
1
module Data.Picture.Drawing.ShapeMatrix ( module Data.Picture.Drawing.ShapeMatrix.ShapeMatrix, -- * Point Matrix module Data.Picture.Drawing.ShapeMatrix.PointMatrix, -- * Edge Matrix module Data.Picture.Drawing.ShapeMatrix.EdgeMatrix, -- * Polygon Matrix module Data.Picture.Drawing.ShapeMatrix.PolyMatrix ...
jbaum98/graphics
src/Data/Picture/Drawing/ShapeMatrix.hs
bsd-3-clause
537
0
5
50
81
62
19
9
0
{-# LANGUAGE MultiParamTypeClasses #-} module Util.Pseudo where import Control.Applicative import Control.Monad import Data.Monoid class PseudoFunctor pd where pdfmap :: (pd -> pd) -> pd -> pd class PseudoFoldable pd where pdfoldMap :: Monoid b => (pd -> b) -> pd -> b class (Applicative m, Monad m) => Pseud...
ocean0yohsuke/Simply-Typed-Lambda
src/Util/Pseudo.hs
bsd-3-clause
500
0
11
119
193
100
93
15
0
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards, NamedFieldPuns #-} module Network.Wai.Handler.Warp.HTTP2.HPACK where import Control.Arrow (first) import qualified Control.Exception as E import Data.ByteString.Builder (Builder) import qualified Data.ByteString.Char8 as B8 import Data.CaseInsensitive (...
mfine/wai
warp/Network/Wai/Handler/Warp/HTTP2/HPACK.hs
mit
1,907
0
13
282
451
249
202
40
1
{-# LANGUAGE OverloadedStrings #-} module Webserver where import Control.Applicative import Snap.Core import Snap.Util.FileServe import Snap.Http.Server import Snap.Util.FileUploads import qualified Data.Enumerator.List as EL import Control.Monad (liftM) import Contro...
cirquit/Personal-Repository
Haskell/arduino-webserver/old-repo/src/Webserver.hs
mit
3,306
0
14
746
846
465
381
62
2
f :: Int -> Int f x = x
itchyny/vim-haskell-indent
test/function/function_eq_last.out.hs
mit
26
0
5
11
18
9
9
3
1
{- DATX02-17-26, automated assessment of imperative programs. - Copyright, 2017, see AUTHORS.md. - - 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...
Centril/DATX02-17-26
libsrc/Norm/DoWToWhile.hs
gpl-2.0
1,378
0
11
275
113
64
49
13
2
{-# 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-autoscaling/gen/Network/AWS/AutoScaling/DescribeLaunchConfigurations.hs
mpl-2.0
6,551
0
14
1,365
908
530
378
109
1
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FunctionalDependencies, FlexibleInstances #-} {-# OPTIONS_HADDOCK hide #-} module SecondTransfer.MainLoop.Tokens( packHeaderTuples ,unpackHeaderTuples ,getHeader ,actionIsForAssociatedStream ,UnpackedNameValueLi...
shimmercat/second-transfer
hs-src/SecondTransfer/MainLoop/Tokens.hs
bsd-3-clause
5,141
0
16
1,448
1,105
607
498
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module URI.ByteString.Types where ------------------------------------------------------------------------------- import Data.ByteString (ByteString) import Data.Monoi...
bitemyapp/uri-bytestring
src/URI/ByteString/Types.hs
bsd-3-clause
3,997
0
9
845
567
340
227
55
0
{-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE TypeFamilies #-} ------------------------------------------------------------------------------------- -- | -- Copyright : (c) Hans Hoglund 2012-2014 -- -- L...
music-suite/music-score
src/Music/Score/Internal/Export.hs
bsd-3-clause
4,770
0
13
1,399
900
530
370
86
2
module Events where import GHC.RTS.Events.Analysis runMachine :: Machine s e -> [e] -> s runMachine machine = getState . validate machine where getState (Left (s,_)) = s getState (Right s) = s
mainland/dph
dph-event-seer/src/Events.hs
bsd-3-clause
202
0
10
41
83
45
38
6
2
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} ----------------------------------------------------------------------------- -- | -- Module : Diagrams.TwoD.Layout.Grid -- Copyright : (c) 2014 Pontus Gr...
diagrams/diagrams-contrib
src/Diagrams/TwoD/Layout/Grid.hs
bsd-3-clause
4,927
1
11
1,005
1,084
585
499
76
1
{-# LANGUAGE TemplateHaskell #-} module T16104_Plugin (plugin) where import GhcPlugins import Data.Bits plugin :: Plugin plugin = defaultPlugin {installCoreToDos = install} where install _ todos = return (test : todos) test = CoreDoPluginPass "Test" check check :: ModGuts -> CoreM ModGuts ...
sdiehl/ghc
testsuite/tests/plugins/T16104-plugin/T16104_Plugin.hs
bsd-3-clause
575
0
13
190
137
70
67
14
2
{-# LANGUAGE Haskell98 #-} {-# LINE 1 "src/System/PosixCompat/Time.hs" #-} {-# LANGUAGE CPP #-} {-| This module makes the operations exported by @System.Posix.Time@ available on all platforms. On POSIX systems it re-exports operations from @System.Posix.Time@, on other ...
phischu/fragnix
tests/packages/scotty/System.PosixCompat.Time.hs
bsd-3-clause
470
0
4
118
22
16
6
6
0
module Peano.Infer where import qualified Peano.Type as T import qualified Peano.Data as D import Autolib.Reporter import Autolib.ToDoc type Env = String -> Maybe T.Type std :: Env std "s" = Just $ T.App T.Nat T.Nat std "z" = Just $ T.Nat std _ = Nothing typeof :: Env -> D.Exp -> Reporter T.Type typeof env x = do ...
Erdwolf/autotool-bonn
src/Peano/Infer.hs
gpl-2.0
1,871
0
19
688
772
368
404
55
6
module Options.Misc where import Types miscOptions :: [Flag] miscOptions = [ flag { flagName = "-jN" , flagDescription = "When compiling with :ghc-flag:`--make`, compile ⟨N⟩ modules in parallel." , flagType = DynamicFlag } , flag { flagName = "-fno-hi-version-check" ...
sgillespie/ghc
utils/mkUserGuidePart/Options/Misc.hs
bsd-3-clause
1,328
0
8
427
178
114
64
30
1
{- | Module : $Header$ Description : union of signature parts Copyright : (c) Christian Maeder and Uni Bremen 2003-2005 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : experimental Portability : portable merging parts of local environment -} module Ha...
keithodulaigh/Hets
HasCASL/Merge.hs
gpl-2.0
4,634
0
15
1,164
1,692
840
852
111
11
import System.IO import Network.HaskellNet.SMTP import Text.Mime import qualified Data.ByteString.Char8 as BS import Codec.Binary.Base64.String smtpServer = "outmail.f2s.com" sendFrom = "test@test.org" sendTo = ["wrwills@gmail.com"] main = do con <- connectSMTP smtpServer message <- BS.readFile "example/message...
beni55/HaskellNet
example/smtp.hs
bsd-3-clause
1,224
0
14
174
222
120
102
17
1
yes = a >>= return . bob
mpickering/hlint-refactor
tests/examples/Default13.hs
bsd-3-clause
24
0
6
6
14
7
7
1
1
module Main where import qualified System.Directory as Dir import qualified System.Environment as Env import System.Exit (exitWith) import System.IO (hPutStrLn, stderr, stdin, stdout) import qualified System.Process as Proc import qualified Elm.Compiler.Version as Compiler import qualified Elm.Package as Pkg main ::...
laszlopandy/elm-compiler
src/CommandLineRouter.hs
bsd-3-clause
2,447
2
21
687
403
212
191
42
2
-- | -- Copyright : (c) 2011 Simon Meier -- License : GPL v3 (see LICENSE) -- -- Maintainer : Simon Meier <iridcode@gmail.com> -- Portability : portable -- -- Pretty-printing with support for highlighting keywords and comments. -- Currently this module is not functional on itself, but geared towards its -- use ...
rsasse/tamarin-prover
lib/utils/src/Text/PrettyPrint/Highlight.hs
gpl-3.0
1,641
0
8
303
277
164
113
28
1
module Test8 where f l = let x = 56 in x
SAdams601/HaRe
old/testing/refacSlicing/Test8AST.hs
bsd-3-clause
42
0
8
13
23
12
11
2
1
module Warning {-# WARNING ["You are configuring this package without cabal-doctest installed.", "The doctests test-suite will not work as a result.", "To fix this, install cabal-doctest before configuring."] #-} () where
Javran/twitter-conduit
Warning.hs
bsd-2-clause
256
0
3
65
8
6
2
-1
-1
{-# LANGUAGE TypeFamilies, GeneralizedNewtypeDeriving, StandaloneDeriving, FlexibleInstances #-} -- Test Trac #2856 module T2856 where import Data.Ratio ---------------------- class C a where data D a instance C Bool where newtype D Bool = DInt Int deriving (Eq, Show, Num) instance C a => C [a] where ...
lukexi/ghc
testsuite/tests/deriving/should_compile/T2856.hs
bsd-3-clause
718
0
8
140
225
124
101
14
0
{-# LANGUAGE PartialTypeSignatures, NamedWildCards, DatatypeContexts #-} module WildcardInADTContext2 where data (Eq _a) => Foo a = Foo { getFoo :: a }
ghc-android/ghc
testsuite/tests/partial-sigs/should_fail/WildcardInADTContext2.hs
bsd-3-clause
153
0
8
23
30
19
11
3
0
module Settings.Development where import Prelude development :: Bool development = #if DEVELOPMENT True #else False #endif production :: Bool production = not development
zhy0216/haskell-learning
yosog/Settings/Development.hs
mit
178
0
5
30
35
22
13
7
1
{-# LANGUAGE OverloadedStrings #-} --import Uri import Control.Applicative import Data.Attoparsec.Text as A import Data.Bits ((.|.), (.&.), shiftL) import Data.Char (chr, digitToInt, isAlpha, isAlphaNum, isHexDigit) --import Data.Attoparsec.Combinator import Data.Text --import Data.Text.Read as T type Scheme = Text ...
bjorg/HPlug
uriparser.hs
mit
5,343
0
20
1,515
2,030
1,061
969
127
5
{-# LANGUAGE BangPatterns, MultiWayIf #-} module Data.Smashy.Set where import qualified Data.Vector.Storable as VS import qualified Data.Vector.Storable.Mutable as VM import qualified Data.Vector.Storable.ByteString as BV import Data.Word import qualified System.Directory as SD import qu...
jahaynes/smashy
src/Data/Smashy/Set.hs
mit
9,747
145
23
3,581
3,041
1,550
1,491
204
6
{-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-} {-# LANGUAGE PatternS...
swift-nav/plover
src/Language/Plover/ParserTypes.hs
mit
7,167
0
15
2,161
2,861
1,478
1,383
166
1
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE PatternSynonyms #-} module Hash where import Data.Bits (Bits, xor) import Data.Map.Lazy as Map (Map, fromList, lookup) import Data.Set (empty, insert, member) import GameState import System.Random import ...
sebmathguy/icfp-2015
library/Hash.hs
mit
2,166
0
12
635
855
454
401
44
3
module Main where import Ringo.Parser (eval) import System.IO (hFlush, stdout) main :: IO () main = do welcomeMes repl welcomeMes :: IO () welcomeMes = putStr "Welcome!\n" repl :: IO () repl = do putStr "$ " hFlush stdout line <- getLine (putStrLn.eval) line repl
gogotanaka/Ringo
src/Interpreter.hs
mit
317
0
9
98
114
57
57
14
1
module Pivotal.Utilities ( apiToken ) where import System.Environment (getEnv) apiToken :: IO String apiToken = getEnv "PIVOTAL_TRACKER_API_TOKEN"
toddmohney/tracker_radiator
Pivotal/Utilities.hs
mit
165
0
5
35
37
21
16
6
1
module SudokuAmb where import Data.List import Control.Monad numlist = [1..9] allp (i,j) = concat [block,line,col] where block = [(i + dx - mod i 3,j + dy - mod j 3) |dx<-[0..2],dy<-[0..2]] line = [(i,dy)| dy <- [0..9]] col = [(dx,j)| dx<-[0..9]] get pos all = (map head).group.sort $ [ k | (...
ztuowen/sudoku
SudokuAmb.hs
mit
1,196
0
13
296
769
419
350
28
2
{-# LANGUAGE CPP, TypeFamilies, DeriveDataTypeable #-} module PGIP.GraphQL.Result.OMS where import PGIP.GraphQL.Result.ConservativityStatus import PGIP.GraphQL.Result.FileRange import PGIP.GraphQL.Result.IdReference import PGIP.GraphQL.Result.Language import PGIP.GraphQL.Result.LocIdReference import PGIP.GraphQL.Resu...
spechub/Hets
PGIP/GraphQL/Result/OMS.hs
gpl-2.0
1,622
0
9
488
279
180
99
37
0
{-# OPTIONS -w -O0 #-} {- | Module : ATC/Id.der.hs Description : generated Typeable, ShATermConvertible instances Copyright : (c) DFKI Bremen 2008 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : provisional Portability : non-portable(overlapping Typeabl...
nevrenato/Hets_Fork
ATC/Id.der.hs
gpl-2.0
1,180
0
5
181
58
41
17
8
0
{-# LANGUAGE GADTs #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} module Sepa.Debtor ( -- Debtor mkDebtor, Debtor, DebtorId, firstName, lastName, mandates, ...
gmarpons/sepa-debits
Sepa/Debtor.hs
gpl-3.0
7,132
19
15
1,944
1,496
815
681
127
4
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE...
kmilner/tamarin-prover
lib/theory/src/Theory/Constraint/System/Guarded.hs
gpl-3.0
32,653
1
31
9,181
8,808
4,531
4,277
484
24
#! /usr/bin/env runghc module Collatz where import Control.Monad (ap, when) import Control.Monad.Instances (Monad) import Data.Numbers.Primes (isPrime) import System.Environment (getArgs) main :: IO () main = getArgs >>= ap (when . (> 0) . length) (printLines . tail . collatz ....
CS-CLUB/contests
2012/submissions/Khalil Fazal/3/a/Collatz.hs
gpl-3.0
568
0
11
160
252
136
116
13
1
class X a where f :: a -> Int class Y a where g :: a -> Bool g = f
Helium4Haskell/helium
test/typeClasses/ClassInstaneError13.hs
gpl-3.0
79
0
7
33
42
21
21
5
0
module HEP.Automation.MadGraph.Dataset.Set20110404set1 where import HEP.Automation.MadGraph.Model import HEP.Automation.MadGraph.Machine import HEP.Automation.MadGraph.UserCut import HEP.Automation.MadGraph.Cluster import HEP.Automation.MadGraph.SetupType import HEP.Automation.MadGraph.Dataset.Common import HEP.Aut...
wavewave/madgraph-auto-dataset
src/HEP/Automation/MadGraph/Dataset/Set20110404set1.hs
gpl-3.0
1,649
0
10
475
378
224
154
41
1
{- This file is part of artgen. Foobar 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. Foobar is distributed in the hope that it will be us...
cdettmering/artgen
Chainer/Histogram.hs
gpl-3.0
2,469
0
10
584
425
219
206
22
2
{-| Module : Bench Description : Benchmark of Multilinear library Copyright : (c) Artur M. Brodzki, 2018 License : BSD3 Maintainer : artur@brodzki.org Stability : experimental Portability : Windows/POSIX -} module Main ( main ) where import Criterion.Main import Criterion.Types ...
ArturB/Multilinear
benchmark/2-cores/time/Bench.hs
gpl-3.0
1,496
0
10
339
354
191
163
24
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-games/gen/Network/Google/Resource/Games/Events/Record.hs
mpl-2.0
4,916
0
18
1,207
789
459
330
112
1
{-# 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/InstanceGroupManagers/DeleteInstances.hs
mpl-2.0
7,613
0
19
1,619
656
398
258
107
1
-- This Source Code Form is subject to the terms of the Mozilla Public -- License, v. 2.0. If a copy of the MPL was not distributed with this -- file, You can obtain one at http://mozilla.org/MPL/2.0/. {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} ...
kim/kafka-protocol
src/Network/Kafka/Protocol/Fetch.hs
mpl-2.0
1,897
0
7
438
315
194
121
58
1
module Typekwondo2 where chk :: Eq b => (a -> b) -> a -> b -> Bool chk f x y = (f x) == y arith :: Num b => (a -> b) -> Integer -> a -> b arith f x y = (f y) + fromInteger x
logistark/haskellbookexercises
6 - Typeclasses/typekwondo2.hs
apache-2.0
184
0
8
60
113
58
55
5
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {- Copyright 2019 The CodeWorld Authors. All rights reserved. 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...
alphalambda/codeworld
codeworld-compiler/src/CodeWorld/Compile/Requirements/Language.hs
apache-2.0
6,745
0
19
1,644
1,639
832
807
126
2
-- |Javascript pretty-printer. module Main where import Ovid.Net (getPageJavascript) import Javascript.Javascript (parseJavascriptFromFile) import Html.PermissiveParser (parseHtmlFromFile) import System.Environment (getArgs) import Data.List (isSuffixOf) import Control.Monad import Framework buildTime = #ifdef __TI...
brownplt/ovid
src/Jspp.hs
bsd-2-clause
1,032
0
16
196
278
144
134
-1
-1
module Orders where import GPS import Facing import Unit data Order = OrderMove UnitId [GPS] | OrderFace UnitId Facing | OrderNAI Int GPS deriving (Show, Eq) type Orders = [Order]
nbrk/ld
library/Orders.hs
bsd-2-clause
209
0
7
59
61
37
24
9
0
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module Main where import Data.Char import Data.String import Data.Monoid import Data.Maybe import Data.List (intercalate, isSuffixOf, groupBy, nub, sort) import Data.List.Split (splitOn, splitOneOf) import Data.Time.Format as Time import Control.Arr...
functorial/blog-source
Main.hs
bsd-3-clause
6,344
0
20
1,452
2,273
1,164
1,109
154
5
-- © 2002-2005 Peter Thiemann -- |Haskell98 version of the submission functions. module WASH.CGI.Submit98 ( InputHandle, HasValue (value) , F0 (F0), F1 (F1), F2 (F2), F3 (F3), F4 (F4), F5 (F5), F6 (F6), F7 (F7), F8 (F8) , FL (FL), FA (FA) , deF0, deF1, deF2, deF3, deF4, deF5, deF6, deF7, deF8 , deFL, deFA , deVal...
nh2/WashNGo
WASH/CGI/Submit98.hs
bsd-3-clause
12,973
19
22
2,961
5,687
2,895
2,792
260
3
{-# LANGUAGE DeriveFunctor #-} module Crossword.Description where import Text.Parsec hiding ((<|>)) import Crossword.Parser (Parser) import Crossword.Regex import qualified Crossword.Parser as P data Description = Description { horizontal :: [Clue Regex] , vertical :: [Clue Regex] , diagonal :: [Clue Rege...
hesselink/regex-crossword
src/Crossword/Description.hs
bsd-3-clause
1,144
0
14
312
365
203
162
30
1
-------------------------------------------------- -- Copyright 1994 by Peter Thiemann -- $Log: Parsers.hs,v $ -- Revision 1.1.1.1 1998/12/09 13:34:08 pjt -- Imported sources -- -- Revision 1.3 1994/03/15 15:34:53 thiemann -- minor revisions -- --Revision 1.2 1993/08/31 12:31:32 thiemann --reflect changes in ty...
FranklinChen/Ebnf2ps
src/Parsers.hs
bsd-3-clause
2,821
6
14
598
987
548
439
42
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveDataTypeable #-} -- | scan a local index downloaded from Hackage module Hackage where import Edit.Types import Edit.Parser import Control.Exception import Control.Monad import Data.Data import Data.Eith...
bergey/cabal-edit
executables/Hackage.hs
bsd-3-clause
2,708
0
15
697
681
368
313
58
3
module Cis194.Hw.Week1Spec (main, spec) where import Test.Hspec import Test.QuickCheck import Cis194.Hw.Week1 main :: IO () main = hspec spec spec :: Spec spec = do describe "toDigits" $ do it "should split digits of integer into a list" $ do toDigits 1234 `shouldBe` [1,2,3,4] it "should return an e...
halarnold2000/cis194
test/Cis194/Hw/Week1Spec.hs
bsd-3-clause
2,095
0
16
520
687
353
334
48
2
{-# LANGUAGE GeneralizedNewtypeDeriving, CPP #-} module Cauterize.GHC7.Support.Result ( Trace(..) , CautResult(..) , CautError(..) , failWithTrace , withTrace ) where #if __GLASGOW_HASKELL__ < 710 import Control.Applicative #endif import Control.Monad.Morph import Control.Monad.Trans.Reader import qualif...
cauterize-tools/caut-ghc7-ref
lib/Cauterize/GHC7/Support/Result.hs
bsd-3-clause
1,793
0
10
502
433
248
185
45
1
module Sexy.Instances.Nil.Maybe () where import Sexy.Data (Maybe(..)) import Sexy.Classes (Nil(..)) instance Nil (Maybe a) where nil = Nothing
DanBurton/sexy
src/Sexy/Instances/Nil/Maybe.hs
bsd-3-clause
147
0
7
22
58
36
22
5
0
module Deprecated.DiGraph.TreeMonoidFoldOnSimpleGraph where ---------------------------------------------------------------------- -- test experiments import Data.Hashable import PolyGraph.ReadOnly.DiGraph import PolyGraph.Common import PolyGraph.ReadOnly.DiGraph.Fold.TAMonoidFold import qualified Data.HashSet as HS ...
rpeszek/GraphPlay
play/Deprecated/DiGraph/TreeMonoidFoldOnSimpleGraph.hs
bsd-3-clause
2,217
0
12
419
467
265
202
-1
-1
{-# LANGUAGE FlexibleContexts #-} module Main where import Graphics.GPipe import qualified Data.Vec as Vec import Data.Vec.Nat import Data.Monoid import Data.IORef import Graphics.UI.GLUT (Window, mainLoop, postRedisplay, idleCallback, getArgsAndInitialize, ($=)) main :: IO () main = do ...
robgssp/strobe
Test2.hs
bsd-3-clause
3,512
0
14
585
1,794
932
862
59
1
module TUDMensa.Get (getWeekly) where import Control.Applicative import Data.Char import TUDMensa.Types import Network.HTTP import Text.HTML.TagSoup baseUrl :: String baseUrl = "http://www.studentenwerkdarmstadt.de/index.php?option=com_spk&task=" weeklyUrl :: Date -> Location -> Request String weeklyUrl NextWeek loc...
dschoepe/tud-mensa
TUDMensa/Get.hs
bsd-3-clause
610
0
15
88
191
101
90
15
1
{-# LANGUAGE QuasiQuotes #-} import LiquidHaskell import Prelude hiding (repeat, take) data L a = N | C a (L a) [lq| data L a <p :: (L a) -> Prop> = N | C (x::a) (xs::L <p> a <<p>>) |] [lq| measure isCons :: L a -> Prop isCons (N) = false isCons (C a l) = true |] [lq| type Stream a = {v: L <{\v -> (isCo...
spinda/liquidhaskell
tests/gsoc15/unknown/pos/Repeat.hs
bsd-3-clause
575
0
8
165
179
103
76
15
1
{-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_HADDOCK show-extensions #-} {-| Module : $Header$ Copyright : (c) 2015 Swinburne Software Innovation Lab License : BSD3 Maintainer : Rhys Adams <rhysadams@swin.edu.au> Stability : unstable Portability : portable Entry point for the subexecutor, called by the...
futufeld/eclogues
eclogues-impl/app/subexecutor/Main.hs
bsd-3-clause
3,574
0
15
735
976
521
455
-1
-1
{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeFamilies #-} module Web.Spock.Internal.SessionVault where #if MIN_VERSION_base(4,8,0) #else import Control.Applicative #endif import Control.Concurrent.STM (STM, atomically) import Control.Monad import Data.Hashable import qualified Data.Text as ...
agrafix/Spock
Spock/src/Web/Spock/Internal/SessionVault.hs
bsd-3-clause
2,790
0
13
552
805
420
385
59
1
module CheckedLang.TypeChecker ( typeOf , typeOfProgram , typeOfExpression , checkProgramType , checkExpressionType ) where import CheckedLang.Data import Control.Arrow (second) type TypeTry = Either TypeError type TypeResult = TypeTry Type checkProgramType :: Program -> Type -> TypeResult ch...
li-zhirui/EoplLangs
src/CheckedLang/TypeChecker.hs
bsd-3-clause
5,822
0
12
1,204
1,883
956
927
130
3
{-# LANGUAGE CPP #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariab...
tonyday567/naperian
src/NumHask/Array/Constraints.hs
bsd-3-clause
3,524
0
14
790
1,349
755
594
96
2
{-# OPTIONS_GHC -fno-warn-partial-type-signatures #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE PartialTypeSignatures #-} module Haskell.Ide.ExamplePluginAsync where import Control.Concurrent import Control.Concurrent.STM.TChan import ...
JPMoresmau/haskell-ide-engine
hie-eg-plugin-async/Haskell/Ide/ExamplePluginAsync.hs
bsd-3-clause
5,215
0
19
1,135
1,132
577
555
91
2
module HaskellEditor.Configuration where import HaskellEditor.Configuration.Types import qualified HaskellEditor.Files import qualified Data.ByteString import qualified Data.ByteString.Lazy import System.IO import Data.Yaml loadConfigFile :: FilePath -> IO (Maybe Configuration) loadConfigFile path = do maybeCon...
stevechy/haskellEditor
src/HaskellEditor/Configuration.hs
bsd-3-clause
1,122
0
13
186
261
131
130
24
2
{-# LANGUAGE FlexibleInstances, OverlappingInstances, TypeSynonymInstances, OverloadedStrings #-} module Database.Redis.Types where import Control.Applicative import Control.DeepSeq import Data.ByteString.Char8 (ByteString, pack) import qualified Data.ByteString.Lex.Fractional as F (readSigned, readDecimal) impor...
bitemyapp/hedis
src/Database/Redis/Types.hs
bsd-3-clause
3,400
0
12
968
1,045
539
506
78
0
module Test.Rebuild(main) where import Development.Shake import Test.Type import Text.Read import Data.List.Extra import Control.Monad import General.GetOpt data Opt = Timestamp String | Pattern Pat opts = [Option "" ["timestamp"] (ReqArg (Right . Timestamp) "VALUE") "Value used to detect what has rebuilt when" ...
ndmitchell/shake
src/Test/Rebuild.hs
bsd-3-clause
2,199
0
18
689
703
338
365
46
1
{-# LANGUAGE ForeignFunctionInterface #-} -- module Test where import Foreign.C.Types -- import Data.Map import Maybe -- main = putStrLn "11" fibonacci :: Int -> Int fibonacci n = fibs !! n where fibs = 0 : 1 : zipWith (+) fibs (tail fibs) -- local_map = Data.Map.fromList [(1,2), (3,4)] -- lookup_hs ::CInt ->...
mwotton/Hubris-Haskell
sample/Test.hs
mit
635
0
10
113
106
62
44
9
1
import Geometry import Drawing main = drawPicture myPicture myPicture points = red (drawSegment (b,c) & drawPointsLabels [a,b,c] ["A","B","C"] ) & faint (drawSegment (a,b) & drawPointLabel o "O" & drawSegment (o,a) & drawSegment (o,c') & drawPointLabel c' "C'" & drawArc (a,b,...
alphalambda/hsmath
src/Learn/Geometry/demo08euclid1_2.hs
gpl-2.0
823
0
25
261
425
228
197
18
1