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 : XMonad.Actions.RandomBackground -- Copyright : (c) 2009 Anze Slosar -- translation to Haskell by Adam Vogt -- License : BSD3-style (see LICENSE) -- -- Maintainer : <vogt.adam@gmail.com> -- Stabi...
pjones/xmonad-test
vendor/xmonad-contrib/XMonad/Actions/RandomBackground.hs
bsd-2-clause
2,515
0
15
608
635
361
274
34
3
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Maybe -- Copyright : (c) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : lib...
beni55/haste-compiler
libraries/ghc-7.10/base/Data/Maybe.hs
bsd-3-clause
7,281
0
10
1,549
792
523
269
57
2
{-# LANGUAGE OverloadedStrings #-} import qualified Network.HTTP.Conduit as Http import qualified Data.ByteString.Lazy as BS import qualified Data.ByteString.Lazy.Char8 as BS8 import qualified Data.ByteString.UTF8 as UTF import qualified Data.Maybe as Mb import qualified Control.Monad as M import qualified Network impo...
milleniumbug/conoogle
main.hs
mit
2,051
0
16
444
675
380
295
56
1
module Data.Bitcoin.TransactionSpec where import Data.Bitcoin.Script (Script (..)) import Data.Bitcoin.Transaction import qualified Data.ByteString.Char8 as BS8 (pack) import qualified Data.HexString as HS (hexString) import Test.Hspec spec :: Spec spec = do descr...
solatis/haskell-bitcoin-tx
test/Data/Bitcoin/TransactionSpec.hs
mit
2,360
0
22
321
332
173
159
21
2
{-# LANGUAGE CPP #-} module GHCJS.DOM.SVGPathSegCurvetoCubicAbs ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.SVGPathSegCurvetoCubicAbs #else #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) impo...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/SVGPathSegCurvetoCubicAbs.hs
mit
388
0
5
33
33
26
7
4
0
{-# LANGUAGE TemplateHaskell #-} module AMD64RegAlloc where import Control.Monad.State.Lazy import Data.Char import Data.List import AMD64 import qualified Data.Set as S type SymReg = String type RealReg = String type Vtable = [] (SymReg, RealReg) data RegEnv = RegEnv { instCount :: Int, ...
Sword-Smith/hfasto
src/AMD64RegAlloc.hs
mit
24,388
0
24
6,151
8,749
4,365
4,384
470
7
{-# LANGUAGE OverloadedStrings #-} module Text.Greek.Phonology.ShowText where import Prelude hiding (lookup) import Data.Map.Strict (Map, fromList, lookup) import Data.Text (Text, intercalate) import Data.Text.Format (Shown(..), Only(..)) import Data.Text.Format.Strict (format') import Data.Tuple (swap) import Text.G...
scott-fleischman/greek-grammar
haskell/greek-grammar/src/Text/Greek/Phonology/ShowText.hs
mit
2,765
0
11
437
1,114
644
470
69
2
{-# LANGUAGE OverloadedStrings #-} module Factory.User ( insertUserTable' ) where import TestImport import qualified Database.Persist as P import Data.Text insertUserTable' :: Text -> Text -> Example (Key User) insertUserTable' ident name = do key <- runDB $ P.insert $ User { userIdent = ident , ...
cosmo0920/Ahblog
tests/Factory/User.hs
mit
387
0
10
86
113
61
52
13
1
{-# LANGUAGE OverloadedStrings #-} module Wpub.GetImage where import System.Directory ( createDirectoryIfMissing, doesFileExist ) import qualified Data.ByteString.Lazy as LB import Network.HTTP.Base (urlEncode) import Network.HTTP.Conduit ( simpleHttp, HttpException ) import Text.XML.HXT.Core hiding ( xshow, when ) ...
k16shikano/wikipepub
Wpub/GetImage.hs
mit
2,437
0
19
595
750
402
348
54
5
module Euler.E69 where import Euler.Lib ( totient , areCoprimes ) euler69 :: Int -> Int euler69 n = snd $ maximum $ [ (q x $ totient x, x) | x <- [ 2 .. n ] ] q :: Int -> Int -> Double q n t = (fromIntegral n) / (fromIntegral t) -- This is the *real full* definition of the totient, not very efficient, though tot...
D4r1/project-euler
Euler/E69.hs
mit
448
4
9
105
190
102
88
12
1
{-# htermination (<=) :: Ordering -> Ordering -> Bool #-}
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Prelude_LTEQ_11.hs
mit
58
0
2
10
3
2
1
1
0
{-# LANGUAGE TemplateHaskell #-} module Data.CTG1371.Internal.Types ( getFMPStatus , getHRTwinOffsetStatus , getDECGLogicStatus , getHRCrossChannelStatus , getTelemetryStatus , getFSPO2Availab...
danplubell/CTG1371
library/Data/CTG1371/Internal/Types.hs
mit
10,708
0
9
3,189
1,907
1,094
813
204
1
-- The expression f x g y means: -- -- g x = x + 0 f a b = a + b -- seems to work t1 x y = f(x (g y)) -- syntax error --t2 x y = ((f x) g) y -- compiles but looks wrong t3 x y = f (x g) y t4 x y = f(x, g y)
codingSteve/fp101x
20151109/exercise5.hs
cc0-1.0
222
0
9
77
102
53
49
5
1
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-} {- | Module : $Header$ Description : Maude Signatures Copyright : (c) Martin Kuehl, Uni Bremen 2008-2009 License : GPLv2 or higher, see LICENSE.txt Maintainer : mkhl@informatik.uni-bremen.de Stability : experimental Portability : portable ...
nevrenato/Hets_Fork
Maude/Sign.hs
gpl-2.0
15,258
0
17
4,095
4,533
2,410
2,123
310
4
module Shell ( Shell, runShell -- Добавьте другие функции для работы с Shell по вкусу , getCurrentDirectory, putCurrentDirectory ) where import Control.Monad.Trans data Shell a = Undefined instance Functor Shell where fmap = undefined instance Monad Shell where return = undefined (>>=) =...
nkartashov/haskell
shell/Shell.hs
gpl-2.0
742
0
7
128
132
76
56
18
1
{- The Delve Programming Language Copyright 2009 John Morrice Distributed under the terms of the GNU General Public License v3, or ( at your option ) any later version. This file is part of Delve. Delve is free software: you can redistribute it and/or modify it under the terms of the GNU Gene...
elginer/Delve
src/CharParser.hs
gpl-3.0
2,259
4
11
629
497
258
239
57
1
module Prompt where import qualified Data.List as L import XMonad.Prompt theme :: XPConfig theme = def { font = "xft:DejaVu Sans:pixelsize=13:antialias=true" , position = Top , bgColor = "black" , promptBorderWidth = 0 , height = 20 , historyFilter = L.nub , historySize = 30 }
omar-polo/dotfiles
Xorg/xmonad/app/Prompt.hs
gpl-3.0
306
0
7
74
73
48
25
12
1
----------------------------------------------------------------------------- -- | -- Module : Data.Queue -- Copyright : (c) The University of Glasgow 2002 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : libraries@haskell.org -- Stability : experimental -- Portability...
kaoskorobase/mescaline
resources/hugs/packages/base/Data/Queue.hs
gpl-3.0
3,501
6
9
1,126
649
362
287
28
1
{-# LANGUAGE CPP, PackageImports #-} #if __GLASGOW_HASKELL__ >= 701 {-# LANGUAGE Safe #-} #endif -- | -- This module defines bitwise operations for signed and unsigned -- integers. module Data.Bits ( Bits( (.&.), (.|.), xor, -- :: a -> a -> a complement, -- :: a -> a shift, -- :: a ->...
jwiegley/ghc-release
libraries/haskell2010/Data/Bits.hs
gpl-3.0
787
0
5
300
77
70
7
20
0
{-# LANGUAGE TemplateHaskell, FlexibleInstances #-} module Dns where import Test.QuickCheck import qualified Data.ByteString.Lazy as L import qualified Data.ByteString.Char8 as L8 import qualified Data.ByteString.Lazy.Char8 as LC8 import qualified Data.ByteString as B import qualified Data.ByteString.Internal as IB (...
fcostantini/QuickFuzz
src/Dns.hs
gpl-3.0
1,904
0
9
347
236
157
79
23
1
module Slackware.Process ( outErrProcess , runSlackBuild ) where import Conduit (ConduitM, (.|), runConduit, sourceHandle) import Control.Monad.IO.Class (liftIO) import Data.ByteString.Char8 as C8 import Data.Void (Void) import GHC.IO.Handle (Handle, hClose) import System.Environment (getEnvironment) impor...
Dlackware/dlackware
src/Slackware/Process.hs
gpl-3.0
1,593
0
13
391
453
266
187
45
1
-- | This module contains data structures for phylogeny data module Bio.PhylogenyData where import Data.Tree data PhylogenyNode = PhylogenyNode { -- node id in GenBank phylogenyId :: Maybe String, -- parent node id in GenBank taxonomy database distance :: Maybe Double } deriving (Show, Read, Eq)
eggzilla/Phylogeny
src/Bio/PhylogenyData.hs
gpl-3.0
317
0
9
66
56
33
23
6
0
module HTML where import Control.Exception ( SomeException, catch, evaluate ) import Data.ByteString.Lazy ( toStrict ) import Data.Char import Network.HTTP.Conduit import Data.Text as T ( concat, lines, pack, strip, unpack ) import Data.Text.Encoding ( decodeUtf8 ) import Text.HTML.TagSoup import Text.Regex.PCRE ( (=~...
phaazon/tellbot
src/HTML.hs
gpl-3.0
2,261
0
20
458
783
398
385
42
3
module Test where import Data.List import Data.Ord import Test.Tasty import Test.Tasty.SmallCheck as SC import Test.Tasty.QuickCheck as QC import Test.Tasty.HUnit import Agent main :: IO () main = defaultMain tests tests :: TestTree tests = testGroup "FrSIR Tests" [unitTests] unitTests :: TestTree unitTests = ...
thalerjonathan/phd
coding/libraries/chimera/examples/ABS/SIRExamples/FrSIR/Tests/Test.hs
gpl-3.0
1,314
0
6
303
99
60
39
17
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-dynamodb/gen/Network/AWS/DynamoDB/BatchWriteItem.hs
mpl-2.0
13,997
0
16
2,530
956
621
335
90
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.Drive.Types...
brendanhay/gogol
gogol-drive/gen/Network/Google/Drive/Types/Product.hs
mpl-2.0
200,579
0
69
49,899
37,781
21,819
15,962
4,198
1
{- ORMOLU_DISABLE -} -- Implicit CAD. Copyright (C) 2011, Christopher Olah (chris@colah.ca) -- Copyright (C) 2016, Julia Longtin (julial@turinglace.com) -- Released under the GNU AGPLV3+, see LICENSE {-# LANGUAGE TypeApplications #-} {-# LANGUAGE ViewPatterns #-} module Graphics.Implicit.ObjectUtil.GetImplicit2 (...
colah/ImplicitCAD
Graphics/Implicit/ObjectUtil/GetImplicit2.hs
agpl-3.0
2,848
2
16
593
961
551
410
43
2
module QuantLib.Methods.McExperimental ( module QuantLib.Methods.McExperimental ) where import Control.Monad import qualified Control.Monad.MC as MC import QuantLib.Stochastic.Process -- Components: -- 1. Path generator by normal distribution generateNormalPath :: (MC.MonadMC m) => Int -> m [Double] ...
paulrzcz/hquantlib
src/QuantLib/Methods/McExperimental.hs
lgpl-3.0
421
0
9
75
99
60
39
7
1
-- | -- Module: SwiftNav.SBP.Flash -- Copyright: Copyright (C) 2015 Swift Navigation, Inc. -- License: LGPL-3 -- Maintainer: Mark Fine <dev@swiftnav.com> -- Stability: experimental -- Portability: portable -- -- Messages for reading/writing the device's onboard flash memory. Many of -- these messages targ...
mookerji/libsbp
haskell/src/SwiftNav/SBP/Flash.hs
lgpl-3.0
11,971
0
11
1,944
1,881
985
896
-1
-1
module Data.Aeson.Query.Filter.Functions where import Data.Text (Text) import Control.Monad (foldM) import Data.Aeson import Data.Aeson.Parser import Data.Aeson.Types import qualified Data.Vector as V import Data.Aeson.Query.AesonUtils type FilterFunction = (Value -> Result Value) attributeFilter :: Text -> FilterF...
jaimeMF/aeson-query
src/Data/Aeson/Query/Filter/Functions.hs
unlicense
864
0
10
151
308
165
143
23
2
module Op ( Op , OpF (PutStrLn, ReadFile, GetTimestamp, GetArgs) , putStrLn' , readFile' , getTimestamp' , getArgs' ) where import Control.Monad.Free import Data.Time.Clock data OpF x = PutStrLn String x | ReadFile FilePath (String -> x) | GetTimestamp (DiffTime -> x) | GetArgs ([String]...
aztecrex/haskell-testing-with-free-monad
src/Op.hs
unlicense
814
0
9
189
332
180
152
30
1
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE OverloadedStrings #-} module Network.GRPC.HighLevel.Generated ( -- * Types MetadataMap(..) , MethodName(..) , GRPCMethodType(..) , GRPCImpl(..) , MkHandler , Host(..) , Port(..) , StatusDetails(..) , StatusCode(..) ,...
awakenetworks/gRPC-haskell
src/Network/GRPC/HighLevel/Generated.hs
apache-2.0
3,738
0
11
760
607
394
213
63
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE LambdaCase #-} module Main where import Data.List (intercalate) import Data.Text (Text) import Data.Text.IO (hGetContents) import Control.Monad.Except import Control.Monad.State (runStateT) --import Text.Show.Pretty (pPrint) import System.Environment (getArgs) import Sys...
shockkolate/etch
etchy/Main.hs
apache-2.0
2,070
0
15
366
645
354
291
42
2
{-# LANGUAGE OverloadedStrings #-} module Actions.ChangePassword.Handler (handler) where import Data.Text (Text) import qualified Data.Text as T import qualified Data.Text.Lazy as TL import Text.Blaze.Html5 (Html, (!)) import qualified Text.Blaze.Html5 as H import qualified Text.Blaze.Html5.Attributes as A import Tex...
DataStewardshipPortal/ds-wizard
DSServer/app/Actions/ChangePassword/Handler.hs
apache-2.0
2,341
0
23
473
667
357
310
53
2
import Data.List cnv l = sortBy (\[i0,v0] [i1,v1] -> let cv = compare v1 v0 ci = compare i0 i1 in if ci /= EQ then ci else cv ) l...
a143753/AOJ
3028.hs
apache-2.0
865
0
14
402
459
237
222
23
2
-- Hoff -- A gatekeeper for your commits -- Copyright 2016 Ruud van Asseldonk -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- A copy of the License has been included in the root of the repository. {-# LANGUAGE DeriveGeneric #-...
ruuda/hoff
src/Project.hs
apache-2.0
9,662
0
13
1,727
1,706
956
750
173
7
import Control.Monad import Data.Char import System.Random {-main = do-} {-putStrLn "Hello, world!"-} {-name <- getLine-} {-asd <- putStrLn ("Hi, " ++ name ++ "!")-} {-main = do-} {-line <- getLine-} {-if null line-} {-then return ()-} {-else do-} {-putStrLn $ reverseWords line-} ...
paulbarbu/haskell-ground
io.hs
apache-2.0
2,327
0
17
699
539
284
255
45
3
module HuttonICanvas where import Graphics.Blank import Data.Text (pack) import Life.Types import Life.Engine.Hutton import Life.Display.ICanvas import Life.Scenes -- Runs Life indefinitely life :: Config -> [Pos] -> IO () life c b = blankCanvas 3000 { events = [pack "mousedown"] } $ \dc -> do lifeICanvas dc (scene ...
ku-fpg/better-life
examples/HuttonICanvas.hs
bsd-2-clause
596
0
11
165
200
114
86
14
1
-- | -- Module : Crypto.Cipher.Types.Block -- License : BSD-style -- Maintainer : Vincent Hanquez <vincent@snarc.org> -- Stability : Stable -- Portability : Excellent -- -- block cipher basic types -- {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE ViewPatterns...
nomeata/cryptonite
Crypto/Cipher/Types/Block.hs
bsd-3-clause
10,456
0
21
3,364
2,312
1,208
1,104
152
4
module Uniform ( UnifNat(..) , newUnifNat , maybeUnifNat , allUnifs , mappend , mempty , addBit , bitToUnifNat , exchange , gcdPlus , extractUseful , decision , ratioDecision , ratioUndecision ) where imp...
cullina/Extractor
src/Uniform.hs
bsd-3-clause
2,623
0
13
808
967
519
448
65
2
{-# LANGUAGE CPP, PatternSynonyms, ScopedTypeVariables #-} #if __GLASGOW_HASKELL__ >= 800 {-# OPTIONS_GHC -Wno-missing-pattern-synonym-signatures #-} #endif -------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.Tokens -- Copyright : (c) Sven Panne 2019 --...
haskell-opengl/OpenGLRaw
src/Graphics/GL/Tokens.hs
bsd-3-clause
316,783
2
5
41,424
23,662
23,654
8
5,908
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE UndecidableInstances #-} module Servant.Client....
cblp/haskell-telegram-api
src/Servant/Client/MultipartFormData.hs
bsd-3-clause
4,494
0
22
1,155
1,006
538
468
-1
-1
-- Manually write instances. {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Twitter.Manual ( Metadata(..) , Geo(..) , Story(..) , Result(..) ) where import Prelude () import Prelude.Compat import Control.Applicative import D...
sol/aeson
examples/Twitter/Manual.hs
bsd-3-clause
4,037
0
33
1,327
1,002
528
474
122
0
{-# LANGUAGE FlexibleContexts #-} module Villefort.Daily where import Villefort.Definitions import Villefort.Database import Control.Monad.Reader import Data.Time import Data.Time.Calendar.OrdinalDate import Data.List.Split as S import Control.Concurrent (threadDelay) -- | Date representation data D = D { year :: Int...
Chrisr850/Villefort
src/Villefort/Daily.hs
bsd-3-clause
3,696
0
15
795
1,343
672
671
97
3
module Test.ElmSourceGenerators where import Test.QuickCheck wsRequired :: Gen String wsRequired = elements [ " " , "\n " , "{-A-}" , "{-A-}{-B-}" , " --A\n " ] wsOptional :: Gen String wsOptional = oneof [ wsRequired, return "" ] withWhitespace :: Gen String -> [String] -> Gen String...
fredcy/elm-format
tests/Test/ElmSourceGenerators.hs
bsd-3-clause
1,553
0
13
498
470
240
230
65
1
{-# LANGUAGE FlexibleInstances, IncoherentInstances #-} module Idris.IdeSlave(parseMessage, convSExp, IdeSlaveCommand(..), sexpToCommand, toSExp, SExp(..), SExpable) where import Text.Printf import Numeric import Data.List -- import qualified Data.Text as T import Text.Parsec import Core.TT data SExp = SexpList [SE...
christiaanb/Idris-dev
src/Idris/IdeSlave.hs
bsd-3-clause
4,195
0
15
1,119
1,528
770
758
98
4
-- | PandocAgda. import Data.Maybe import Data.List import Text.XHtml.Strict import Control.Monad.IO.Class import System.Environment import System.Console.GetOpt import Text.Pandoc.Definition import Text.Pandoc.Options import Text.Pandoc.Readers.Markdown import Text.Pandoc.Writers.HTML import Agda.Interaction.Options...
divipp/PandocAgda
PandocAgda.hs
bsd-3-clause
5,717
0
21
1,518
1,689
879
810
116
13
module System.IO.FileSystem.Slow where import System.IO.Exception import System.IO.UV.Internal import System.IO.UV.Manager import System.IO.UV.Exception import Control.Concurrent.MVar import Foreign.Ptr import Foreign.C import Data.CBytes scandir :: CBytes -> IO [(CBytes, UVDirEntType)] scandir path = do uvm <- g...
winterland1989/stdio
System/IO/FileSystem/Slow.hs
bsd-3-clause
1,186
0
20
461
341
172
169
34
3
{-# LANGUAGE GeneralizedNewtypeDeriving, TypeFamilies, TypeOperators #-} module TermGen where import Control.Monad import Data.MemoTrie import Data.Typeable import Control.Arrow((***)) import Data.List hiding (intersect, and) import Prelude hiding (and) import Data.Maybe data Term fam = Var Int fam | Const String fam...
jystic/QuickSpec
experiment/TermGen.hs
bsd-3-clause
7,115
0
12
1,769
2,472
1,318
1,154
-1
-1
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE MagicHash #-} -- | Local nodes -- module Control.Distributed.Process.No...
haskell-distributed/distributed-process
src/Control/Distributed/Process/Node.hs
bsd-3-clause
52,375
26
39
14,879
12,250
6,348
5,902
975
20
-- Copyright (c) 2014-present, Facebook, Inc. -- All rights reserved. -- -- This source code is distributed under the terms of a BSD license, -- found in the LICENSE file. An additional grant of patent rights can -- be found in the PATENTS file. module MonadBench (main) where import Control.Monad import Data.Time.Clo...
tolysz/Haxl
tests/MonadBench.hs
bsd-3-clause
1,789
0
17
391
525
265
260
43
6
{-# OPTIONS_GHC -fno-warn-missing-signatures #-} {-# LANGUAGE CPP #-} module Main where import Prelude hiding ( (.), id ) import Control.Category import Criterion.Main import qualified Data.ByteString.Builder as L import qualified Data.ByteString.Lazy as L import Data.Proxy impo...
sheyll/isobmff-builder
benchmarks/bit-records/Main.hs
bsd-3-clause
6,934
0
22
3,345
1,423
712
711
-1
-1
module Test.Arhelk.Armenian.Lemma( testModule ) where import Arhelk.Armenian.Lemma import Arhelk.Core.Rule import Data.List as L import Data.Monoid import Data.Text as T import qualified Test.Framework as TF import Test.Framework.Providers.HUnit import Test.HUnit import TextShow import Arhelk.Core.Rule import...
Teaspot-Studio/arhelk-armenian
test/Test/Arhelk/Armenian/Lemma.hs
bsd-3-clause
4,058
0
16
606
662
355
307
41
3
{-# LANGUAGE DeriveDataTypeable #-} module Zoom.Args where import System.Console.CmdArgs import System.Console.CmdArgs.Explicit arguments :: Mode [(String,String)] arguments = mode "explicit" [] "Explicit sample program" (flagArg (upd "file") "FILE") [flagOpt "world" ["hello","h"] (upd "world") "WHO" "World argument" ...
iand675/Zoom
Zoom/Args.hs
bsd-3-clause
596
0
9
100
213
118
95
14
2
module Rede.MainLoop.Common( chunkProducerHelper ) where import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as LB import Rede.SpdyProtocol.Framing.AnyFrame ( lengthFromPerfunct , perfunctoryClassify ) chunkProducerHelper :: Mona...
alcidesv/ReH
hs-src/Rede/MainLoop/Common.hs
bsd-3-clause
1,405
4
16
454
332
171
161
32
3
-- Ferlicot Delbecque Cyril -- PF TP3 module Main where import Graphics.Gloss main::IO() main = animate (InWindow "L-systeme" (1000, 1000) (0, 0)) white dragonAnime dessin :: Picture dessin = interpreteMot (((-150,0),0),100,1,pi/3,"F+-") "F+F--F+F" type Symbole = Char type Mot = [Symbole] type Axiome = Mot ...
jecisc/TP_PF_L3
PF-TP3/src/Main.hs
mit
6,431
0
17
1,608
2,199
1,205
994
119
3
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE MultiParamTypeClasses #-} module Language.Haskell.TH.Simple.Type ( Simple(..) , Type(..), tvars , Context , Pred(..) , Exp(..) , Lit(..) , Pat(..) , TH.Name, TH.mkName ) where import qualified Language.Haskell.TH as TH import Language...
solorab/proof-haskell
Language/Haskell/TH/Simple/Type.hs
mit
4,934
0
15
1,232
2,294
1,179
1,115
132
1
module ExportBoolPartially (Bool (True)) where import Data.Bool (Bool (False, True))
serokell/importify
test/test-data/base@basic/35-ExportBoolPartially.hs
mit
96
0
6
21
29
20
9
4
0
{-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-} {- | Module : ./CASL/OMDocExport.hs Description : CASL-to-OMDoc conversion Copyright : (c) Ewaryst Schulz, DFKI Bremen 2009 License : GPLv2 or higher, see LICENSE.txt Maintainer : ewaryst.schulz@dfki.de Stability : provisional Portability : ...
spechub/Hets
CASL/OMDocExport.hs
gpl-2.0
10,041
0
18
2,626
3,083
1,616
1,467
190
8
{-# LANGUAGE FlexibleContexts #-} {-| Web server for the metadata daemon. -} {- Copyright (C) 2014 Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must r...
apyrgio/ganeti
src/Ganeti/Metad/WebServer.hs
bsd-2-clause
8,613
0
15
1,910
2,043
1,037
1,006
163
4
module GDAL.VRT ( VRTDataset , VRTSourcedRasterBand , ScaleOffset(..) , ScaleRatio(..) , ImageReadFunc , createVRT , createVRTBand , addSimpleSource , addComplexSource , addFuncSource , vrtBandAsBand , getSrcDstWin ) where import GDAL.Internal.VRT import GDAL -- | Calculates the source an destination envelopes for ...
meteogrid/bindings-gdal
src/GDAL/VRT.hs
bsd-3-clause
2,137
0
17
522
691
353
338
53
1
{-# LANGUAGE RecursiveDo #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE Rank2Types #-} {-# OPTIONS_GHC -ddump-simpl -ddump-rules -ddump-spec -ddump-to-file -dsuppress-coercions -dsuppress-...
ryantrinkle/reflex-dom
reflex-dom/benchmark.hs
bsd-3-clause
7,579
0
16
1,587
337
206
131
37
1
{-# LANGUAGE DefaultSignatures, FlexibleContexts #-} -- | -- Module: Data.Aeson.Types.Class -- Copyright: (c) 2011-2015 Bryan O'Sullivan -- (c) 2011 MailRank, Inc. -- License: Apache -- Maintainer: Bryan O'Sullivan <bos@serpentine.com> -- Stability: experimental -- Portability: portable -- -...
plaprade/aeson
Data/Aeson/Types/Class.hs
bsd-3-clause
6,527
0
11
1,317
649
412
237
39
1
{-# LANGUAGE ScopedTypeVariables #-} module Eta.CodeGen.Utils where import Eta.Main.DynFlags import Eta.BasicTypes.Name import Eta.Types.TyCon import Eta.BasicTypes.BasicTypes import Eta.BasicTypes.DataCon (DataCon) import Eta.BasicTypes.Id import Eta.BasicTypes.Literal import Eta.StgSyn.StgSyn import Codec.JVM import...
rahulmutt/ghcvm
compiler/Eta/CodeGen/Utils.hs
bsd-3-clause
6,227
0
20
1,658
1,883
976
907
-1
-1
{-# LANGUAGE OverloadedStrings #-} module Elm.Docs where import Control.Applicative ((<|>)) import Control.Monad import Data.Aeson ((.:), (.:?), (.=)) import qualified Data.Aeson as Json import qualified Data.Aeson.Encode.Pretty as Json import qualified Data.ByteString.Lazy.Char8 as BS import qualified Data.Map as Map...
mgold/Elm
src/Elm/Docs.hs
bsd-3-clause
5,789
0
18
1,762
1,632
894
738
156
1
{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_HADDOCK show-extensions #-} -- | -- Module : Yi.Keymap.Vim.InsertMap -- License : GPL-2 -- Maintainer : yi-devel@googlegroups.com -- Stability : experimental -- Portability : portable module Yi.Keymap.Vim.InsertMap (defInsertMap) where import ...
siddhanathan/yi
yi-keymap-vim/src/Yi/Keymap/Vim/InsertMap.hs
gpl-2.0
10,112
0
22
3,338
2,880
1,480
1,400
207
22
data List a = Nil | Cons a (List a) deriving (Show) is_empty :: List t -> Bool is_empty Nil = True is_empty _ = False is_empty2 lst = case lst of Nil -> True _ -> False count :: List t -> Int count lst = case lst of Nil -> 0 Cons a nex...
junnf/Functional-Programming
codes/list_cons.hs
unlicense
1,468
9
11
561
658
332
326
47
3
{-# LANGUAGE NamedFieldPuns #-} -- | cabal-install CLI command: repl -- module Distribution.Client.CmdRepl ( replAction, ) where import Distribution.Client.ProjectOrchestration ( PreBuildHooks(..), runProjectPreBuildPhase, selectTargets , ProjectBuildContext(..), runProjectBuildPhase ...
tolysz/prepare-ghcjs
spec-lts8/cabal/cabal-install/Distribution/Client/CmdRepl.hs
bsd-3-clause
2,531
0
13
559
375
222
153
44
1
-- | Settings are centralized, as much as possible, into this file. This -- includes database connection settings, static file locations, etc. -- In addition, you can configure a number of different aspects of Yesod -- by overriding methods in the Yesod typeclass. That instance is -- declared in the Foundation.hs file....
pbrisbin/lemonstand
Settings.hs
bsd-2-clause
2,372
0
9
408
253
163
90
-1
-1
module MyDoc where import Text.PrettyPrint import EnvM import MUtils import Control.Monad import Data.Char(isSpace) type Heading = (Int,String) data TxtDec = Plain | Emph | Code | Math deriving (Eq,Show) type DecString = (TxtDec,String) type Code = [String] type TxtBlock = [Paragraph] data Parag...
SAdams601/HaRe
old/tools/hs2html/MyDoc.hs
bsd-3-clause
1,575
0
11
486
708
374
334
45
3
module ShowMilestones where import qualified Github.Issues.Milestones as Github import Data.List (intercalate) main = do possibleMilestones <- Github.milestones "thoughtbot" "paperclip" case possibleMilestones of (Left error) -> putStrLn $ "Error: " ++ show error (Right milestones) -> putSt...
bitemyapp/github
samples/Issues/Milestones/ShowMilestones.hs
bsd-3-clause
923
0
15
159
249
127
122
19
2
{-# LANGUAGE UnboxedSums, MagicHash #-} module Main where type Ty = (# () | () #) {-# NOINLINE showTy #-} showTy :: Ty -> String showTy (# _ | #) = "(# _ | #)" showTy (# | () #) = "(# | () #)" main :: IO () main = do print (showTy (# undefined | #)) print (showTy (# | () #))
olsner/ghc
testsuite/tests/unboxedsums/unboxedsums11.hs
bsd-3-clause
285
0
11
73
101
55
46
11
1
{-# LANGUAGE ApplicativeDo #-} {-# OPTIONS_GHC -ddump-types #-} module A where test2 f = do x <- f 3 y <- f 4 return (x + y)
ezyang/ghc
testsuite/tests/determinism/determ021/A.hs
bsd-3-clause
132
0
9
34
47
23
24
7
1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE DeriveGeneric #-} module Main where import Control.Monad.IO.Class (liftIO) import Control.Monad.Reader (ReaderT, ask, lift, ...
krdlab/haskell-oidc-client
examples/scotty/Main.hs
mit
7,087
0
17
2,848
1,843
964
879
146
4
import XMonad main = do xmonad $ defaultConfig
nocotan/dotfiles
.xmonad/xmonad.hs
mit
48
0
7
9
16
8
8
-1
-1
{-# LANGUAGE CPP #-} module Language.Haskell.GhcOpts.Cabal ( getPackageGhcOpts , mkCabalConfig , findCabalFile ) where import Language.Haskell.GhcOpts.Types import System.Posix.Files (getFileStatus, modificationTime) import Control.Exception (IOException, catch) import Control.Monad (when) import Control.Mona...
ranjitjhala/ghc-options
src/Language/Haskell/GhcOpts/Cabal.hs
mit
11,140
5
30
2,752
2,321
1,251
1,070
155
5
{- Adapted from reactive-banana-gtk (https://github.com/emonkak/reactive-banana-gtk). Last updated 3 years ago! The original code seems to have been written for an older version of the reactive-banana library. This module translates the original code to the current version of reactive-banana (0.8.0.2) -} {...
dbanerjee1979/dirc
Reactive/Banana/Gtk.hs
mit
2,501
0
16
583
923
478
445
44
1
-- 一橋大学 2017年 入試問題 数学 第2問 import Data.List import Data.Maybe limitedSearch = [[x,y,z] | x <- range, y <- range, z <- range, (x*x == (y*z+7)) && (y*y == (z*x+7)) && (z*z == (x*y+7)) && x <= y && y <= z] where range = [-10..10] factorize 1 = [1] factorize n = nub.sort $ con...
zettsu-t/examQuestions
univ2017math.hs
mit
1,984
0
19
603
1,141
600
541
37
1
module Hamming (distance) where distance :: Integral a => String -> String -> Maybe a distance (x:xs) (y:ys) = (if x /= y then (+1) else id) <$> distance xs ys distance [] [] = Just 0 distance _ _ = Nothing
exercism/xhaskell
exercises/practice/hamming/.meta/examples/success-standard/src/Hamming.hs
mit
226
0
8
61
111
59
52
5
2
{-# language FlexibleInstances #-} {-# language MultiParamTypeClasses #-} {-# language DeriveDataTypeable #-} module Lattice.LLL.Task where import Lattice.LLL.Compute import qualified Lattice.Reduce as LR import Autolib.Reporter hiding ( run, execute ) import Autolib.ToDoc import Autolib.Reader import Autolib.Size ...
marcellussiegburg/autotool
collection/src/Lattice/LLL/Task.hs
gpl-2.0
3,346
0
20
1,212
1,082
574
508
82
2
module Cryptography.SystemAlgebra where import Notes import Cryptography.SystemAlgebra.AbstractSystems import Cryptography.SystemAlgebra.DiscreteSystems import Cryptography.SystemAlgebra.SecureChannels systemAlgebraS :: Note systemAlgebraS = section "System Algebra" $ do a...
NorfairKing/the-notes
src/Cryptography/SystemAlgebra.hs
gpl-2.0
381
0
7
80
53
30
23
10
1
import GRPSeed as Genome --USAGE: Change GRPSeed in the import above. --The imported file should have a consistent module name without any '-' --also, the stat file should exist --TODO for usage of Genome's State variable: Add another CLI parameter that reads state and writes it to agentStats import System.I...
vektordev/GP
src/GRPHeadless.hs
gpl-2.0
2,712
0
19
544
563
286
277
43
2
{-# Language OverloadedStrings, FlexibleInstances, TypeFamilies, NoMonomorphismRestriction, ScopedTypeVariables, FlexibleContexts #-} module Test.Helper where import Data.Text (Text) import qualified Data.Text as T import Test.Tasty import Test.Tasty.HUnit import Test.HUnit.Diff (.==.) :: (Show a, Eq a) => a -> a -> ...
mattraibert/codetest
src/Test/Helper.hs
gpl-3.0
523
0
9
72
153
85
68
11
1
-- | -- Copyright : (c) 2010 Simon Meier -- License : GPL v3 (see LICENSE) -- -- Maintainer : Simon Meier <iridcode@gmail.com> -- Portability : portable -- -- Type-class abstracting computations that need a fresh name supply. module Control.Monad.Fresh.Class ( MonadFresh(..) ) where -- import Control.Basics ...
samscott89/tamarin-prover
lib/utils/src/Control/Monad/Fresh/Class.hs
gpl-3.0
2,618
0
10
560
531
296
235
39
0
{-# LANGUAGE TypeFamilies, NamedFieldPuns, TemplateHaskell, MultiParamTypeClasses, FlexibleInstances #-} module Lamdu.Sugar.Names.Walk ( MonadNaming(..) , NameType(..), _GlobalDef, _TaggedVar, _TaggedNominal, _Tag , isGlobal , FunctionSignature(..), Disambiguator , IsUnambiguous(..) , NameConve...
Peaker/lamdu
src/Lamdu/Sugar/Names/Walk.hs
gpl-3.0
20,916
0
18
5,531
8,238
4,140
4,098
-1
-1
-- yammat - Yet Another MateMAT -- Copyright (C) 2015 Amedeo Molnár -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Affero General Public License as published -- by the Free Software Foundation, either version 3 of the License, or -- (at your option) an...
Mic92/yammat
Handler/CashCheck.hs
agpl-3.0
1,690
0
15
321
265
134
131
-1
-1
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} -- GIMP Toolkit (GTK) UTF aware string marshalling -- -- Author : Axel Simon -- -- Created: 22 June 2001 -- -- Copyright (c) 1999..2002 Axel Simon -- -- This library is free software; you can redistribute it and/or ...
juhp/gtk2hs
glib/System/Glib/UTFString.hs
lgpl-3.0
9,216
0
13
2,061
2,382
1,236
1,146
172
2
module Language.SSVM.Parser (parseVM, parseSourceFile) where import Data.Monoid import qualified Data.Map as M import Text.Parsec import Text.Parsec.Token import Text.Parsec.Language import Language.SSVM.Types baseLanguage = haskell data ParserState = PState { inDefinition :: Bool, newWord :: Bool, wordsCo...
portnov/simple-stacked-vm
Language/SSVM/Parser.hs
lgpl-3.0
3,879
0
18
1,106
1,410
683
727
136
35
doubleMe x = x + x doubleUs x y = doubleMe x + doubleMe y boomBangs xs = [ if x < 10 then "BOOM!" else "BANG!" | x <- xs, odd x] -- -------------------------------------------------------------------- -- Using list comprehension -- length' xs = sum [1 | _ <- xs] -- Using recursion length' :: (Num b) => [a] -> b l...
ngzax/lyah
double_me.hs
unlicense
3,568
0
12
897
1,139
623
516
59
2
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-} module Level2 where import Debug.Trace -- -- -- Imports -- -- -- import Data.Either -- -- -- Data types -- -- -- data Term = Constant String | Variable String deriving (Show, Eq) type Atom = (String, Term) type Clause = (Atom,...
wouwouwou/2017_module_8
src/haskell/FP_project_Martijn/Level2.hs
apache-2.0
7,973
0
16
2,164
2,189
1,184
1,005
121
3
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QGraphicsItemGroup.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:15 Warning : this file is machine generated...
keera-studios/hsQt
Qtc/Gui/QGraphicsItemGroup.hs
bsd-2-clause
38,998
0
14
5,485
10,717
5,420
5,297
-1
-1
{-# LANGUAGE NoImplicitPrelude #-} module Utils.Vigilance.Worker ( workForeverWith , workForeverWithDelayed , workForever) where import ClassyPrelude import Control.Concurrent (threadDelay) workForeverWithDelayed :: Int -> (SomeException -> IO ()) -> IO () -...
MichaelXavier/vigilance
src/Utils/Vigilance/Worker.hs
bsd-2-clause
709
0
10
166
201
104
97
14
1
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE ImpredicativeTypes #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE RankNTypes #-} {-#...
gcross/LogicGrowsOnTrees
LogicGrowsOnTrees/sources/LogicGrowsOnTrees/Parallel/Common/Supervisor.hs
bsd-2-clause
23,498
0
19
4,308
2,831
1,534
1,297
330
4
{-# LANGUAGE NamedFieldPuns, OverloadedStrings #-} module MusicPad.Env ( module Rika.Scene , module Rika.Engine , module Rika.Env , module Rika.Component.Script.Helper , module Rika.Data.Tensor , module MusicPad.Type , module Control.Monad , module Rika.Component.Script.Shell , module Rika.Engine.Loader , module ...
nfjinjing/level5
src/MusicPad/Env.hs
bsd-3-clause
805
0
5
93
188
127
61
29
0
{-# LANGUAGE FlexibleContexts #-} module PatternRecogn.Gauss.Projected( ClassificationParamBinary, ClassificationParamBinaryWithProjectionVec, calcParamBinary, calcClassificationParams, calcClassificationParamsWithRnd, classifyProjected, -- low level api: findProjection, findProjectionWithRnd, projectClasses, ...
EsGeh/pattern-recognition
src/PatternRecogn/Gauss/Projected.hs
bsd-3-clause
3,262
94
15
503
1,016
568
448
83
2
module Data.Text.Shrinkers where import Data.Text (Text) import qualified Data.Text as X import Test.QuickCheck.Arbitrary (shrinkList) text :: (Char -> [Char]) -> Text -> [Text] text f = map X.pack . shrinkList f . X.unpack
massysett/barecheck
lib/Data/Text/Shrinkers.hs
bsd-3-clause
226
0
8
35
88
51
37
6
1
--All types should be declared here. --TODO : XPath module HScraper.Types where import qualified Data.Text as T data NodeType = Text T.Text | Element T.Text AttrList deriving (Show) data NTree a = NTree a [NTree a] | NullTree deriving (Show) type AttrList = [(T.T...
Nishant9/hScraper
HScraper/Types.hs
bsd-3-clause
949
0
8
282
401
215
186
26
1
{-# LANGUAGE TypeOperators #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE DataKinds, PolyKinds #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, FlexibleContexts #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAG...
AaronFriel/eff-experiments
src/Data/Iota/Unified/Indexed.hs
bsd-3-clause
24,643
1
15
8,120
4,296
2,429
1,867
-1
-1
module Control.Yield.State where import Control.Yield import Control.Monad import Control.Monad.Fix data StateCommand s = Get | Put s stateI :: (Monad m) => s -> Consuming r m (StateCommand s) s stateI s0 = delay (go s0) where go s = stateStep s >>= go stateStep :: (Monad m) => s -> Producing s (StateComm...
DanBurton/yield
Control/Yield/State.hs
bsd-3-clause
732
0
10
167
337
174
163
21
2
{-# LANGUAGE ScopedTypeVariables #-} module Main where import GHC.Float import Graphics.EasyPlot import qualified Sound.File.Sndfile as Snd import qualified Sound.File.Sndfile.Buffer.Vector as B import qualified Data.Vector.Generic as V import qualified Data.Sequence as S import qualified Data.Foldable as F import So...
Smurf/Tempoist
Examples/FilterExample.hs
bsd-3-clause
3,077
0
16
683
819
430
389
43
1