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
-- !!! Qualifying with local module name module M where f x = M.f x
urbanslug/ghc
testsuite/tests/module/mod75.hs
bsd-3-clause
68
0
6
15
18
10
8
2
1
{-# LANGUAGE LambdaCase #-} {-| glue the "virtual" virtual keys ('Key' and 'Modifier') to "actual" virtual keys (operating system constants). -} module Workflow.OSX.Marshall where import Workflow.OSX.Constants import Workflow.OSX.Types import Data.Bits {- | Marshall the bitmask. relates Haskell types with Objecti...
sboosali/workflow-osx
workflow-osx/sources/Workflow/OSX/Marshall.hs
mit
4,281
0
7
1,385
687
359
328
111
84
{-# LANGUAGE Safe #-} {-# LANGUAGE ExplicitNamespaces #-} -- | A monadic library for implementing effectful computation in a modular way. -- -- This module provides the @Eff@ monad - the base type for all effectful -- computation. -- The @Member@ typeclass is the main interface for describing which effects -- are nece...
suhailshergill/extensible-effects
src/Control/Eff.hs
mit
1,116
0
5
186
122
87
35
15
0
module AST.Declaration where import AST.Annotation ( Annotation , Annotated , getAnnotation , setAnnotation , removeAnnotations ) import AST.Expression (Expression) import AST.Statement (Statement) import AST.Type (Type, TypeDecl, TypeDef, defName) import Util.Functions (applySnd) type File =...
jmikkola/Athena
src/AST/Declaration.hs
mit
1,473
0
13
370
525
272
253
35
1
module Dicom.StorageSOP.SCPDispatcher where import Network.Socket import qualified Network.BSD as BSD import qualified Network.Socket.ByteString.Lazy as NSB import Control.Exception import Control.Concurrent import Control.Monad import Control.Applicative import qualified Data.ByteString.Lazy as BL import Dicom.Networ...
danplubell/dicom-network
library/Dicom/StorageSOP/SCPDispatcher.hs
mit
4,113
0
15
891
839
410
429
74
5
-------------------------------------------------------------------------------- -- Power digit sum -- Problem 16 -- 215 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. -- What is the sum of the digits of the number 2^1000? -------------------------------------------------------------------------------- ...
bertdouglas/euler-haskell
001-050/16a.hs
mit
519
0
9
81
82
45
37
6
1
{-# LANGUAGE CPP #-} module GHCJS.DOM.Key ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.Key #else #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) import GHCJS.DOM.JSFFI.Generated.Key #else #endi...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/Key.hs
mit
322
0
5
33
33
26
7
4
0
{-| Module: Flaw.Editor.Entity.Texture Description: Texture entities. License: MIT -} {-# LANGUAGE GeneralizedNewtypeDeriving, OverloadedStrings, TemplateHaskell, TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Flaw.Editor.Entity.Texture ( ) where import qualified Data.ByteString as B import Data.D...
quyse/flaw
flaw-editor/Flaw/Editor/Entity/Texture.hs
mit
6,239
8
13
1,329
1,217
667
550
-1
-1
{-# LANGUAGE OverloadedStrings #-} module Data.STL.TextEnumerator where import Data.STL.TextParser import Data.Attoparsec.Enumerator import Data.Enumerator as E import qualified Data.Enumerator.Binary as ET import qualified Data.Enumerator.List as EL import Data.ByteString import Data.STL.Topology import Control.Monad...
yogeshsajanikar/stl
stl/src/Data/STL/TextEnumerator.hs
mit
1,422
0
14
379
367
197
170
31
2
{- Problem 6 Find out whether a list is a palindrome. A palindrome can be read forward or backward; e.g. (x a m a x). -} module Problems.Six where import Problems.Five isPalindrome [] = True isPalindrome list = list == myReverse list problemSix = do putStrLn "Problem 6" putStrLn "Find out whether a ...
maxdeviant/99-haskell
src/Problems/Six.hs
mit
680
0
9
159
138
69
69
13
1
module Y2016.M11.D02.Exercise where import Data.Map (Map) import Data.Set (Set) -- below import available from cabal (aeson) import Data.Aeson -- below imports available from 1HaskellADay git repository import Graph.JSON.Cypher.Read.Graphs import Data.Relation import Y2016.M11.D01.Exercise -- for User declaratio...
geophf/1HaskellADay
exercises/HAD/Y2016/M11/D02/Exercise.hs
mit
2,024
0
7
339
188
112
76
18
1
module Language.Python.Parser.Lexer ( PositionedToken(..) , Token(..) , Number(..) , lex ) where import Prelude hiding (lex) import Data.Char (digitToInt) import Control.Monad (void, when) import Control.Applicative import Text.Parsec ((<?>)) import Language.Python.Parser.Common import qualified Text....
Garciat/Hucc
src/Language/Python/Parser/Lexer.hs
mit
16,861
0
21
6,326
4,696
2,399
2,297
425
52
-- | -- Module : Southpaw.Interactive.Console -- Description : -- Copyright : (c) Jonatan H Sundqvist, 2015 -- License : MIT -- Maintainer : Jonatan H Sundqvist -- Stability : experimental|stable -- Portability : POSIX (not sure) -- -- Created September 6 2015 -- TODO | - Markup -- - Configuring ...
SwiftsNamesake/Southpaw
lib/Southpaw/Interactive/Console.hs
mit
4,988
8
17
903
899
480
419
45
2
{-# LANGUAGE CPP #-} {-# LANGUAGE TemplateHaskell #-} module Yesod.Routes.TH.ParseRoute ( -- ** ParseRoute mkParseRouteInstance ) where import Yesod.Routes.TH.Types import Language.Haskell.TH.Syntax import Data.Text (Text) import Yesod.Routes.Class import Yesod.Routes.TH.Dispatch mkParseRouteInstance ::...
psibi/yesod
yesod-core/Yesod/Routes/TH/ParseRoute.hs
mit
1,899
0
14
499
442
255
187
38
3
{-# LANGUAGE OverloadedStrings, MultiParamTypeClasses #-} module Database.HDBC.Aeson where import Data.Aeson import Data.Convertible import Database.HDBC import qualified Data.Text as T import qualified Data.Text.Encoding as T -- | Run a SQL query and return a value that can be cast via -- a FromJSON instance. exec...
danchoi/hdbc-aeson
Database/HDBC/Aeson.hs
mit
2,709
0
13
677
807
404
403
52
2
module Rules.Test (testRules) where import Base import Expression import Flavour import GHC import Oracles.Flag import Oracles.Setting import Settings import Target import Utilities -- TODO: clean up after testing testRules :: Rules () testRules = do "validate" ~> do need inplaceLibCopyTargets nee...
izgzhen/hadrian
src/Rules/Test.hs
mit
3,430
0
16
976
628
332
296
60
1
{- | Module : Summoner.Mode Copyright : (c) 2020-2022 Kowainik SPDX-License-Identifier : MPL-2.0 Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable Portability : Portable This module introduces different modes in which the command-line i...
vrom911/hs-init
summoner-cli/src/Summoner/Mode.hs
mit
993
0
7
260
135
80
55
-1
-1
module Tree (tree) where import Graphics.UI.GLUT import Cylinder tree :: GLfloat -> GLfloat -> GLfloat -> GLfloat -> IO() tree 0 r l ang = return() tree n r l ang = do preservingMatrix $ do positionCylinder displayTrunk displayFrame displayLeftBranch displayRightBranch wh...
smanilov/petulant-octo-tribble
Tree.hs
mit
1,128
0
13
428
405
203
202
32
1
{-# LANGUAGE OverloadedStrings #-} import Control.Monad.IO.Class import Data.Conduit import Data.Conduit.Network import qualified Data.ByteString.Char8 as BS -- Connect using: telnet 127.0.0.1 4000 main :: IO () main = runTCPServer (serverSettings 4000 "*") $ \appData -> appSource appData $$ awaitForever $ liftIO . ...
stormont/server-hs
Main.hs
mit
331
0
10
46
82
47
35
8
1
module RequestHandlers ( handleRequest ) where import Data.Attoparsec.ByteString (Parser, endOfInput, parseOnly) import Data.ByteString (ByteString) import Data.Int (Int32) import qualified Data.Pool as Pool import Data.Serialize.Put (putByteString, putWord32be, runPut) import qualified Database.PostgreSQL.Simple ...
cjlarose/kafkaesque
app/RequestHandlers.hs
mit
2,770
0
14
587
668
372
296
62
9
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE RankNTypes #-} module System.Etc.Internal.Types ( module System.Etc.Internal.Types , module System.Etc.Internal.Spec.Types ) where import RIO...
roman/Haskell-etc
etc/src/System/Etc/Internal/Types.hs
mit
5,667
0
17
1,587
1,534
835
699
173
4
{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE PatternGuards #-} {-# LANGUAGE CPP #-} -- | HTTP over TLS support for Warp via the TLS package. -- -- If HTTP\/2 is negotiated by ALPN, HTTP\/2 over TL...
utdemir/wai
warp-tls/Network/Wai/Handler/WarpTLS.hs
mit
17,031
0
18
4,484
3,405
1,874
1,531
309
6
module PayProto.Util ( module PayProto.Util , cs ) where import Data.String.Conversions (cs) import qualified Data.ByteString as BS import qualified Network.Haskoin.Crypto as HC import qualified Network.Haskoin.Script as HS -- Bitcoin addressToScript :: HC.Address -> HS.ScriptOutput addressToScript ...
runeksvendsen/bitcoin-payment-protocol
src/PayProto/Util.hs
cc0-1.0
548
0
11
101
148
87
61
14
2
module Type.Poly.Infer where import Type.Poly.Data import Type.Poly.Tree import Autolib.Reporter.Type hiding ( result ) import Autolib.ToDoc import Autolib.TES.Identifier import Control.Monad ( guard, when, forM ) import qualified Data.Map as M import Autolib.FiniteMap () -- instances infer :: Signature -> Expres...
Erdwolf/autotool-bonn
src/Type/Poly/Infer.hs
gpl-2.0
2,980
38
17
1,268
799
411
388
62
3
{-# LANGUAGE OverloadedStrings,DeriveDataTypeable #-} module DrupalTaxonomy where import qualified Text.JSON.Generic as Json import qualified Text.JSON.Types as JsonTypes import qualified Data.Maybe as Maybe import qualified Data.Aeson as Aeson import qualified Data.ByteString.Lazy as L import qualified Data.Byte...
shaan7/ghost-drupal-import
DrupalTaxonomy.hs
gpl-2.0
1,902
0
15
271
531
297
234
38
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE RecordWildCards #-} ------------------------------------------------------------------------------- -- Module : Main -- Copyright : (c) 2015-17 Marcelo Sousa ------------------------------------------------------------------------------- module Main where --import ...
marcelosousa/poet
src/Main.hs
gpl-2.0
5,400
0
17
1,380
1,288
650
638
92
6
{- | Module : Sound.FModEx.Raw.Output Description : Output FModEx library Haskell raw binding Copyright : (c) Dimitri Sabadie License : GPL-3 Maintainer : dimitri.sabadie@gmail.com Stability : experimental Portability : Linux only for now Output FModEx raw Haskell API. -} module Sound.FModEx.Raw...
phaazon/hsFModEx
Sound/FModEx/Raw/Output.hs
gpl-3.0
396
0
4
81
25
19
6
3
0
{- This file is part of TAE. TAE 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. TAE is distributed in the hope that it will be useful, but...
cdettmering/tae
Look.hs
gpl-3.0
909
0
7
178
42
24
18
5
0
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE TypeFamilies #-} -- Copyright (C) 2009-2012 John Millikin <jmillikin@gmail.com> -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation, either ver...
tmishima/haskell-dbus
lib/DBus/Transport.hs
gpl-3.0
15,110
750
10
3,094
4,029
2,252
1,777
289
16
module Main where import Data.FileStore import Network.Wai.Handler.Warp import Rest.Driver.Wai (apiToApplication) import System.Environment import Api (api) import ApiTypes (ServerData (..), runGitRestApi) readPa...
bitraten/gitrest
src/Main.hs
gpl-3.0
706
0
11
236
170
90
80
17
1
-- Fixity declarations cannot be inside a class scope class W a where infixr 5 ++
roberth/uu-helium
test/typeClassesParse/Nonnesting3.hs
gpl-3.0
87
0
6
21
16
8
8
2
0
{-# LANGUAGE TypeFamilies #-} -- | Test precedences module Tests.Precedence where import Control.Monad.Unit (Unit(..)) import qualified Control.Lens as Lens import Control.Lens.Tuple import qualified Lamdu.Calc.Term as V import qualified Lamdu.Sugar.Parens as Parens import qualified Lamdu.Sugar.Typ...
Peaker/lamdu
test/Tests/Precedence.hs
gpl-3.0
5,519
0
25
1,605
1,301
698
603
-1
-1
-- | {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE OverloadedLists #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} module SimpleADTs where import Data.Map.Strict (Map) import qualified Data.M...
capitanbatata/sandbox
lenses-for-adts-example/src/SimpleADTs.hs
gpl-3.0
8,251
0
13
2,132
1,982
1,069
913
131
1
module Import.Enum where import Import.Base import Data.Aeson (withText) import Database.Persist.TH (derivePersistField) data UserType = Customer | Manager | Admin deriving (Show, Read, Eq, Ord) derivePersistField "UserType" data PieceDataType = Plain | Reference | Markup | LinkList deriving (Show, Read, E...
sir-murray/lol
Import/Enum.hs
agpl-3.0
941
0
8
168
276
148
128
-1
-1
module Static where import Util intDefs protoName name methods = "\nimport Foundation\n\ \\n\ \public func idTf<T>(a: T, json: [String : AnyObject]) -> T { return a }\n\ \public protocol " ⧺ protoName ⧺ " {\n\ \ typealias CancellationToken\n\ \ func cancel(token: CancellationToken)\n\ \ func cast(method: Str...
cfr/burningbar
src/Static.hs
unlicense
13,170
0
12
3,291
63
35
28
8
1
module Converter.TH where import ClassyPrelude import Language.Haskell.TH -- |Returns True iff two ADTs have the same constructor. -- -- Intended code, with @(A1,...,An)@ being the constructors -- of @a@: -- -- @ -- isSame A1{} A1{} = True -- ... -- isSame An{} An{} = True -- isSame _ _ = False -- @ isSame :...
jtapolczai/Scratchpad
src/Converter/TH.hs
apache-2.0
952
0
19
294
330
170
160
21
4
module Braxton.A284436 (a284436) where import Helpers.BraxtonHelper (enumerateSequences, SymmetricRelation(..), ReflexiveRelation(..)) a284436 n = length $ enumerateA284436 n n enumerateA284436 = enumerateSequences Reflexive Symmetric product -- (1,2,6,2,18,12,24,24,792...) -- Counts A282170
peterokagey/haskellOEIS
src/Braxton/A284436.hs
apache-2.0
294
0
6
29
66
39
27
4
1
import Prelude data Encoded a = Single a | Multiple Int a deriving Show decodeModified :: [Encoded a] -> [a] decodeModified [] = [] decodeModified ((Single x):xs) = x:(decodeModified xs) decodeModified ((Multiple n x):xs) = (replicate n x) ++ (decodeModified xs)
2dor/99-problems-Haskell
11-20-lists-continued/problem-12.hs
bsd-2-clause
269
0
9
47
126
67
59
7
1
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QAbstractSlider_h.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 ...
uduki/hsQt
Qtc/Gui/QAbstractSlider_h.hs
bsd-2-clause
63,223
129
19
13,063
19,975
9,642
10,333
-1
-1
-- 296962999629 import Data.List.Ordered(has) import Euler(digitUsage, primeSieve) xx = 1487 ii = 3330 kk = 4 findTriples x i k = head [a*10^(k*2) + b*10^k + c | a <- ps, a /= x, let b = a+i, let c = b+i, digitUsage a == digitUsage b, digit...
higgsd/euler
hs/49.hs
bsd-2-clause
499
0
13
187
239
126
113
12
1
module Crusher where import Args import qualified Markup import qualified Stylesheet import Control.Applicative import Control.Monad.IO.Class import Control.Monad.Trans.Class import Control.Monad.Trans.Reader import Data.ByteString.Lazy (ByteString) import Data.Functor.Identity import Data.Text.Lazy (Text) import Luc...
intolerable/crusher
src/Crusher.hs
bsd-3-clause
2,481
0
26
507
790
414
376
-1
-1
module Language.CFamily.C.Analysis.TypeUtils ( -- * Constructors integral, floating, simplePtr, size_tType, ptrDiffType, boolType, voidType, voidPtr, constVoidPtr, charPtr, constCharPtr, stringType, valistType, -- * Classifiers isIntegralType, isFloati...
micknelso/language-c
src/Language/CFamily/C/Analysis/TypeUtils.hs
bsd-3-clause
8,359
0
12
1,775
1,954
1,012
942
152
5
{-# LANGUAGE FlexibleInstances, Rank2Types, BangPatterns #-} -- | -- Module : Data.Vector.Fusion.Bundle -- Copyright : (c) Roman Leshchinskiy 2008-2010 -- License : BSD-style -- -- Maintainer : Roman Leshchinskiy <rl@cse.unsw.edu.au> -- Stability : experimental -- Portability : non-portable -- -- Bundle...
rleshchinskiy/vector
Data/Vector/Fusion/Bundle.hs
bsd-3-clause
16,364
2
12
4,018
4,973
2,707
2,266
343
3
-- Copyright (c) 2016-present, Facebook, Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. module Duckling.Temperature.GA.Tests ( tests ) where import Prelude import Data.String import Test.Tasty impo...
facebookincubator/duckling
tests/Duckling/Temperature/GA/Tests.hs
bsd-3-clause
516
0
9
78
79
50
29
11
1
{-# LANGUAGE KindSignatures #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE FlexibleInstances #-} -- | We derive Atkey indexed monads from McBride module AtKey where
sleexyz/haskell-fun
AtKey.hs
bsd-3-clause
316
0
2
47
13
12
1
9
0
module Utilities where update :: (a -> a) -> Int -> [a] -> [a] update _ _ [] = [] update f 0 (a:as) = f a : as update f i (a:as) = a : update f (i-1) as
hans25041/gringotz-level
src/Utilities.hs
bsd-3-clause
160
0
8
47
113
60
53
5
1
{-# LANGUAGE TemplateHaskell #-} module Gfx.PostProcessing ( createPostProcessing , renderPostProcessing , usePostProcessing , deletePostProcessing , createTextDisplaybuffer , deleteSavebuffer , PostProcessing(..) , Savebuffer(..) , AnimationStyle(..) ) where import Graphics.Rendering.Op...
rumblesan/proviz
src/Gfx/PostProcessing.hs
bsd-3-clause
11,036
0
16
3,029
2,756
1,332
1,424
265
3
module Blog.Widgets.FlickrCollage where import Blog.Widgets.JsonUtilities import Blog.FrontEnd.ContentAtoms import Blog.BackEnd.HttpPoller import qualified System.Log.Logger as L import Random import Network.HTTP import Network.HTTP.Headers import Network.URI import Text.JSON import Data.Maybe import Control.Concur...
prb/perpubplat
src/Blog/Widgets/FlickrCollage.hs
bsd-3-clause
5,740
78
17
2,241
1,483
795
688
107
3
module Bitcoin.Test.Arbitrary where import Bitcoin.Tx import Bitcoin.Crypto import Crypto.Blockchain.Test.Arbitrary () import Test.QuickCheck import Crypto.Random instance Arbitrary PublicKey where arbitrary = do [a, b, c, d, e] <- vectorOf 5 arbitrary let drg = drgNewTest (a, b, c, d, e) ...
cloudhead/cryptocurrency
test/Bitcoin/Test/Arbitrary.hs
bsd-3-clause
801
0
12
249
221
118
103
26
0
{-# LANGUAGE OverloadedStrings #-} module Args (appArgs) where import qualified Data.Text as T import Options.Applicative import Options.Applicative.Types (readerAsk) import Protolude import Types appArgs :: Parser AppArgs appArgs = flag' ShowVersion (short 'v...
section77/datenverbrauch
src/Args.hs
bsd-3-clause
4,312
0
13
1,772
762
379
383
84
1
module Limonad.Server.Types where import Network.Socket (PortNumber, HostAddress) import System.Directory import Limonad.Interface.Types data Config = Config { getPort :: PortNumber, getPhysicalRoot :: String, getLogicalRoot :: String, getRoutes :: Routes } defaultConfig :: IO Config defaultConfi...
davbaumgartner/limonad
Limonad/Server/Types.hs
bsd-3-clause
494
22
12
115
144
85
59
-1
-1
{- Copyright (c) 2013, Markus Barenhoff <alios@alios.org> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of c...
alios/nauticlib
src/Data/ISO8211/Tree.hs
bsd-3-clause
4,089
0
12
917
870
452
418
67
2
{-# LANGUAGE ApplicativeDo #-} {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE Strict #-} module Main where import Data.List (elemIndex, splitAt) import Data.Maybe import J import JAdapter import System.Directory impo...
KenetJervet/j
app/Main.hs
bsd-3-clause
2,430
0
13
661
818
420
398
64
2
{-# LANGUAGE OverloadedStrings, Safe #-} module Evalso.Cruncher.Language.JRuby18 (jruby18) where import Evalso.Cruncher.Language (Language (..)) jruby18 :: Language jruby18 = Language { _codeFilename = "program.rb" , _compileCommand = Nothing , _compileTimeout = Nothing , _runCommand = ["jruby", "--headles...
eval-so/cruncher
src/Evalso/Cruncher/Language/JRuby18.hs
bsd-3-clause
443
0
7
76
101
67
34
13
1
{-# LANGUAGE OverloadedStrings #-} module Hop.ParserSpec where import Test.Hspec import Hop.Apps.Juno.Parser import Data.Ratio import Data.Text as T import Hop.Hoplite.Term import Hop.Hoplite.Types (Literal(..)) spec :: Spec spec = do describe "admins" testAdmins describe "hopperLite" testHopperLite describe "t...
haroldcarr/juno
z-no-longer-used/test/Hop/ParserSpec.hs
bsd-3-clause
1,670
0
18
517
431
222
209
52
1
module Hi where sayHi = putStrLn "hi from Module Hi!"
bzhkl/MonadTry
libHello/Hi.hs
bsd-3-clause
54
0
5
10
12
7
5
2
1
module Main where import Criterion.Main import Criterion.Types import Control.Concurrent (threadDelay, newEmptyMVar, forkIO, putMVar, readMVar) import Control.Monad (replicateM, replicateM_) import Control.Concurrent.STM (atomically) import Control.Concurrent.STM.TMVar {- Setup n async method calls each with m listen...
abstools/habs-runtime
bench/future.hs
bsd-3-clause
2,960
0
19
1,252
858
419
439
55
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} module Type.State where import Control.Applicative ( Applicative, (<$>), (<*>), (<|>) ) import Control.Monad.State import Data.Map ((!)) import qualified Data.Map as Map import qualified Data.Traversable as Traversable import qualified Data.Union...
Axure/elm-compiler
src/Type/State.hs
bsd-3-clause
7,622
0
22
2,587
2,014
1,038
976
183
5
{-| Module : Data.Vinyl.Utils.Proxy Copyright : (c) Marcin Mrotek, 2014 License : BSD3 Maintainer : marcin.jan.mrotek@gmail.com Create a dummy record parametrized by 'Proxy', for the purpose of guiding code generation through pattern matching. -} {-# LANGUAGE DataKinds , GADTs , PolyKinds , Rank...
marcinmrotek/vinyl-utils
src/Data/Vinyl/Utils/Proxy.hs
bsd-3-clause
1,102
0
11
233
288
163
125
22
1
{-# LANGUAGE GADTs #-} module Control.Concurrent.STM.MultiTVar ( MultiTVar(..) , loosenTVar , makeMultiTVar , zoomMultiTVar , newMultiTVar, newMultiTVarIO , readMultiTVar, readMultiTVarIO , readMultiTVarList, readMultiTVarListIO , readMultiTVarHead, readMultiTVarHeadIO , modifyMultiTVar, modifyMult...
marcinmrotek/zoom-refs
src/Control/Concurrent/STM/MultiTVar.hs
bsd-3-clause
2,130
0
8
374
780
391
389
44
1
module AWS.EC2.Types.KeyPair ( KeyPair(..) ) where import AWS.Lib.FromText data KeyPair = KeyPair { keyPairName :: Text , keyPairFingerprint :: Text } deriving (Show, Read, Eq)
IanConnolly/aws-sdk-fork
AWS/EC2/Types/KeyPair.hs
bsd-3-clause
201
0
8
49
59
37
22
7
0
{-# LANGUAGE NPlusKPatterns #-} module Ch7ex where -- : set expandtab ts=4 ruler number spell import Test.QuickCheck -- import Data.List import qualified Data.Attoparsec.ByteString.Char8 as A -- for isDigit import Data.Char -- import Debug.Trace ------------------------------------------------------- -- ...
HaskellForCats/HaskellForCats
MenaBeginning/Ch007/ch7example.hs
mit
10,059
2
16
2,463
757
439
318
34
1
module Untyped.Parser where import ClassyPrelude hiding (head, many, some, try) import Control.Lens import GHC.Natural import Text.Megaparsec import Text.Megaparsec.Char import Control.Monad.State.Lazy import Data.List.NonEmpty (NonEmpty(..)) import Data.Void (Void) import Prelude (head) import T...
jfranklin9000/urbit
pkg/hs/proto/lib/Untyped/Parser.hs
mit
9,966
0
16
3,384
3,498
1,830
1,668
-1
-1
{-# LANGUAGE TypeSynonymInstances #-} {- | Module : ./Common/MathLink.hs Description : A Haskell MathLink interface Copyright : (c) Ewaryst Schulz, DFKI Bremen 2011 License : GPLv2 or higher, see LICENSE.txt Maintainer : Ewaryst.Schulz@dfki.de Stability : experimental Portability : non-portable (se...
spechub/Hets
Common/MathLink.hs
gpl-2.0
14,942
0
17
3,626
3,749
1,912
1,837
350
6
{- | Module : ./HasCASL/AsUtils.hs Description : some utilities for the abstract syntax 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 utility functions and ...
spechub/Hets
HasCASL/AsUtils.hs
gpl-2.0
14,704
0
20
3,689
4,675
2,415
2,260
280
9
{-# LANGUAGE CPP , GADTs , DataKinds , TypeFamilies , FlexibleContexts , UndecidableInstances , LambdaCase , OverloadedStrings , Rank2Types #-} {-# OPTIONS_GHC -Wall -fwarn-tabs -fsimpl-tick-factor=1000 #-} module Langua...
zachsully/hakaru
haskell/Language/Hakaru/Runtime/Prelude.hs
bsd-3-clause
10,011
17
15
3,191
3,893
2,098
1,795
-1
-1
-- | -- Module : $Header$ -- Copyright : (c) 2013-2014 Galois, Inc. -- License : BSD3 -- Maintainer : cryptol@galois.com -- Stability : provisional -- Portability : portable {-# LANGUAGE Safe #-} {-# LANGUAGE DeriveDataTypeable #-} module Cryptol.Eval.Error where import Cryptol.Utils.Panic import...
TomMD/cryptol
src/Cryptol/Eval/Error.hs
bsd-3-clause
1,531
0
10
288
326
177
149
31
1
module Load where import API import System.Plugins -- -- load doesn't seem to behave nicely when using dirname on hier names -- -- make, and maybe other places, use dirname to work out various names -- from paths, which is invalid when hier names are used.. -- testload = do s <- make "../Plugin1.hs" ["-i../a...
abuiles/turbinado-blog
tmp/dependencies/hs-plugins-1.3.1/testsuite/pdynload/bayley1/Load.hs
bsd-3-clause
1,141
0
15
298
345
165
180
27
5
module RAM.Make where import Inter.Types import RAM.Type import RAM.Check import RAM.Machine import RAM.Property import RAM.Example import qualified Machine.Numerical.Config as C import qualified Machine.Numerical.Make as M import qualified Machine.Numerical.Inter as I import qualified Autolib.Reporter.Checker as R...
florianpilz/autotool
src/RAM/Make.hs
gpl-2.0
624
0
8
159
175
112
63
22
1
{-# LANGUAGE CPP, RecordWildCards #-} module Types ( PackageName , Package(..) , HaddockPkgLoc(..) , HpVersion(..) , GhcVersion(..) , IncludeType(..) , Include , Release(..) , BuildConfig(..) , GhcInstallAction , GhcInstall(..) ) where #if MIN_VERSION_base(4,6,0) impo...
ardumont/haskell-platform
hptool/src/Types.hs
bsd-3-clause
4,654
0
11
970
847
492
355
77
2
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- -- Module : IDE.Pane.Search -- Copyright : (c) ...
573/leksah
src/IDE/Pane/Search.hs
gpl-2.0
17,587
0
23
5,554
3,690
1,827
1,863
-1
-1
{-# LANGUAGE OverloadedStrings #-} module Main where import Data.Monoid import Graphics.Vty ( Event, Attr, white, blue, cyan, green, red, yellow , black ) import Brick.Main import Brick.Types ( Widget ) import Brick.Widgets.Core ( (<=>) , withAttr , vBox , str ) import Brick.Util (on, fg) import B...
ktvoelker/brick
programs/AttrDemo.hs
bsd-3-clause
1,965
0
11
583
411
235
176
52
1
{-# LANGUAGE OverloadedStrings #-} module Main (main) where import Web.Scotty import Control.Monad.IO.Class import Data.Monoid import Network.Wai.Middleware.RequestLogger import Network.Wai.Middleware.Static import Network.Wai.Parse import qualified Text.Blaze.Html5 as H import Text.Blaze.Html5.Attributes import Te...
beni55/scotty
examples/upload.hs
bsd-3-clause
1,708
0
23
571
495
262
233
37
1
{-# OPTIONS_GHC -fglasgow-exts #-} {-# LANGUAGE UndecidableInstances #-} -- UndecidableInstances now needed because the Coverage Condition fails -- !!! Functional dependency test. Hugs [Apr 2001] fails to typecheck this -- We should infer this type for foo -- foo :: Q (S (S Z)) (S Z) module ShouldCompile where data ...
hvr/jhc
regress/tests/1_typecheck/2_pass/ghc/tc125.hs
mit
878
0
8
248
335
177
158
-1
-1
{-# LANGUAGE CPP, OverloadedStrings #-} #if __GLASGOW_HASKELL__ >= 702 {-# LANGUAGE Trustworthy #-} #endif -- | -- Module: Data.Text.Lazy.Builder.RealFloat -- Copyright: (c) The University of Glasgow 1994-2002 -- License: see libraries/base/LICENSE -- -- Write a floating point value to a 'Builder'. module Data.T...
23Skidoo/text
Data/Text/Lazy/Builder/RealFloat.hs
bsd-2-clause
8,440
108
26
2,690
2,315
1,268
1,047
150
19
module A (B.f) where import A as B f = f
forste/haReFork
tools/base/Modules/tests/1/A.hs
bsd-3-clause
43
0
5
13
21
14
7
3
1
{-# LANGUAGE PolyKinds, GADTs, ExplicitForAll #-} {-# OPTIONS_GHC -fwarn-incomplete-patterns #-} module KindEqualities where data TyRep1 :: * -> * where TyInt1 :: TyRep1 Int TyBool1 :: TyRep1 Bool zero1 :: forall a. TyRep1 a -> a zero1 TyInt1 = 0 zero1 TyBool1 = False data Proxy (a :: k) = P data TyRep :: k ->...
olsner/ghc
testsuite/tests/dependent/should_compile/KindEqualities.hs
bsd-3-clause
550
0
10
123
198
107
91
19
1
module Foo where import Control.Monad.Fix z :: Maybe [Int] z = mdo x <- return (1:x) return (take 4 x)
forked-upstream-packages-for-ghcjs/ghc
testsuite/tests/parser/should_fail/readFail040.hs
bsd-3-clause
115
0
10
32
57
30
27
-1
-1
{-# LANGUAGE OverloadedStrings #-} module Main where import Control.Lens import Control.Monad (unless, when) import Control.Monad.IO.Class import Control.Monad.Trans.Class import Data.Aeson import Data.Default (def) import Data.Maybe...
marcelbuesing/mattermost-bot
src/Main.hs
mit
5,451
18
35
1,301
1,751
862
889
103
1
module Text.Pandoc.TikZ.GhostScript where import Text.Pandoc.TikZ.Error (guardIO) import Control.Monad.Trans.Except import Control.Monad.Trans.Class (lift) import System.Process (proc, createProcess, waitForProcess, StdStream(CreatePipe),...
claudio-mattera/pandoc-tikz
src/Text/Pandoc/TikZ/GhostScript.hs
mit
1,624
0
15
481
409
222
187
38
2
module Database ( module X , withDatabase , DatabaseM , Database(..) ) where import ClassyPrelude import Control.Monad.Logger (MonadLogger,) import Control.Monad.Trans.Control (MonadBaseControl) import Crypto.Random.DRBG import Database.Internal import Database.Persist.Sql (withSqlConn, SqlBackend) import Database.Per...
ianthehenry/basilica
Database.hs
mit
1,119
0
11
194
338
187
151
-1
-1
-- This source code is distributed under the terms of a MIT license, -- Copyright (c) 2016-present, SoundCloud Ltd. -- All rights reserved. -- -- This source code is distributed under the terms of a MIT license, -- found in the LICENSE file. {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LAN...
soundcloud/haskell-kubernetes
lib/Kubernetes/Utils.hs
mit
2,119
0
14
511
548
291
257
42
2
module Nunavut.Util.NonEmpty where import Control.Lens (Lens', lens) import Data.List.NonEmpty (NonEmpty (..), fromList, toList, (<|)) _head :: Lens' (NonEmpty a) a _head = lens (head . toList) setHead where setHead (_ :| ls) v = v :| ls _last :: Lens' (NonEmpty ...
markcwhitfield/nunavut
src/Nunavut/Util/NonEmpty.hs
mit
487
0
10
167
194
107
87
10
2
{-# LANGUAGE CPP #-} module GHCJS.DOM.SVGAnimatedTransformList ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.SVGAnimatedTransformList #else #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) import...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/SVGAnimatedTransformList.hs
mit
385
0
5
33
33
26
7
4
0
triangleList :: [Int] --triangleList = map ((\xs -> (sum xs, xs)) . enumFromTo 1) [1..] triangleList = map (\n -> n * (n + 1) `div` 2) [1..] main :: IO () main = print $ triangleList !! 501 -- Nao ta dando certo, que houve ? :(
DestructHub/ProjectEuler
Problem012/Haskell/solution_1.hs
mit
229
0
11
49
72
41
31
4
1
module Game.Entity where import Engine.Graphics import Game.Model import Util.Vector2 import qualified Graphics.Rendering.OpenGL as GL data Entity = Entity { angle :: Float , model :: Model , velocity :: Vector2 , position :: Vector2 } createEntity :: Entity createEntity = Entity { angle = 0 , positio...
kaisellgren/ankka
src/Game/Entity.hs
mit
618
0
12
131
210
115
95
21
1
-- Copyright (c) 2016-present, SoundCloud Ltd. -- All rights reserved. -- -- This source code is distributed under the terms of a MIT license, -- found in the LICENSE file. {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE TemplateHaskell #-} module Kubern...
soundcloud/haskell-kubernetes
lib/Kubernetes/Model/V1/PodCondition.hs
mit
1,908
0
14
573
368
216
152
47
1
------------------------------------------------------------------------------- -- | -- Module : System.Hardware.Arduino.SamplePrograms.Blink -- Copyright : (c) Levent Erkok -- License : BSD3 -- Maintainer : erkokl@gmail.com -- Stability : experimental -- -- The /hello world/ of the arduino world, bl...
aufheben/lambda-arduino
packages/hArduino-0.9/System/Hardware/Arduino/SamplePrograms/Blink.hs
mit
1,322
0
11
287
122
68
54
11
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-launchtemplatedata-placement.html module Stratosphere.ResourceProperties.EC2LaunchTemplate...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/EC2LaunchTemplatePlacement.hs
mit
3,797
0
12
349
537
304
233
42
1
{-# htermination ceiling :: RealFrac a => a -> Int #-}
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Prelude_ceiling_1.hs
mit
55
0
2
11
3
2
1
1
0
{-# LANGUAGE CPP #-} module Main where import Control.Monad import Control.Concurrent import System.Directory import System.FilePath import System.IO import System.IO.Error import System.Exit import System.Console.GetOpt import System.Environment import Data.Maybe import Data.Version (showVersion) import Data.Time.Loc...
nomeata/darcs-mirror-arbtt
src/capture-main.hs
gpl-2.0
2,569
0
16
788
657
348
309
72
3
----------------------------------------------------------------------------- -- | -- Module : DSP.Filter.FIR.Taps -- Copyright : (c) Matthew Donadio 1998 -- License : GPL -- -- Maintainer : m.p.donadio@ieee.org -- Stability : experimental -- Portability : portable -- -- Functions for creating recta...
tolysz/dsp
DSP/Filter/FIR/Taps.hs
gpl-2.0
3,813
0
14
1,093
1,436
769
667
52
1
{-# LANGUAGE FlexibleInstances #-} module DataTypesEtc where -- all datatypes are defined here so we can import this file when we need one of the types. -- because we do it like this we can make the project more modular because otherwise modules have to import each other. -- Embedded language for alphabet: data Alpha...
Ertruby/PPFinalProject
src/DataTypesEtc.hs
gpl-2.0
3,576
0
8
1,685
528
319
209
70
1
{-| Implementation of the Ganeti Query2 node group queries. -} {- Copyright (C) 2012 Google Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your optio...
damoxc/ganeti
src/Ganeti/Query/Network.hs
gpl-2.0
5,861
0
15
988
1,127
612
515
89
2
{-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module Web.Admin where import Control.Monad.Trans.Maybe import Data.Text.Encoding import Snap import Snap.Snaplet.Auth createUserH :: Handler b (Au...
katychuang/raw-pixels
src/Web/Admin.hs
gpl-2.0
597
0
14
172
139
72
67
16
1
module Kopia.Interpreter (execute) where import System.IO.Error (catchIOError) import Data.Time (getCurrentTimeZone, utcToLocalTime, formatTime, LocalTime) import System.Locale (defaultTimeLocale) import Control.Monad ((<=<)) import Kopia.Filesystem import Kopia.Model.Order (Order(..)) import Kopia.Model.Command (Comm...
Jefffrey/Kopia
src/Kopia/Interpreter.hs
gpl-3.0
2,188
0
12
498
655
337
318
-1
-1
module Interface.GUI ( game , GUIConfig , guiPort , guiCssPath , defaultGUIConfig ) where import Control.Monad import qualified Graphics.UI.Threepenny as UI import Graphics.UI.Threepenny.Core import qualified Reactive.Threepenny as FRP import qualified Game as Game import Interface.Common dat...
gregorias/rummikubsolver
src/Interface/GUI.hs
gpl-3.0
5,985
12
24
1,302
1,814
898
916
154
6
{-# OPTIONS_GHC -F -pgmF hspec-discover #-} -- main :: IO () -- main = putStrLn "Test suite not yet implemented" --import SAT.Mios --main :: IO () --main = do -- print =<< solveSAT (CNFDescription 4 5 "") [[1,2,-3], [-1, -4], [2,4], [1,-3,4], [-3,4]]
shnarazk/mios
test/Spec.hs
gpl-3.0
253
0
2
45
9
8
1
1
0
{-# LANGUAGE CPP #-} #if __GLASGOW_HASKELL__ {-# LANGUAGE DeriveDataTypeable, StandaloneDeriving #-} #endif #if !defined(TESTING) && __GLASGOW_HASKELL__ >= 703 {-# LANGUAGE Trustworthy #-} #endif ----------------------------------------------------------------------------- -- | -- Module : Data.Map.Base -- Copyri...
technogeeky/d-A
include/containers-0.5.0.0/Data/Map/Base.hs
gpl-3.0
106,467
0
21
28,019
21,935
11,503
10,432
-1
-1
-- Copyright (C) 2013 Che-Liang Chiou. -- Haste.Concurrent is really painful to use; let's do it my way. module Store ( getBool, getInt, getString, putBool, putInt, putString, ) where import Haste import Haste.Prim foreign import ccall js_getBool :: JSString -> IO Bool foreign import ccal...
clchiou/gwab
chrome/Store.hs
gpl-3.0
1,122
0
9
242
373
193
180
27
1