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 CPP, MagicHash, UnboxedTuples, ForeignFunctionInterface #-} #if __GLASGOW_HASKELL__ >= 701 {-# LANGUAGE Trustworthy #-} #endif ----------------------------------------------------------------------------- -- | -- Module : Control.Concurrent.STM.TVar -- Copyright : (c) The University of Glasgow 2...
ml9951/ghc
libraries/pastm/Control/STMHaskell/STM.hs
bsd-3-clause
973
0
7
189
78
56
22
11
0
{-# LANGUAGE TemplateHaskell #-} module Server.ServerT where import Control.Lens (makeLenses) import qualified Data.Vector as V import qualified Constants import Game.EntityStateT import QCommon.SizeBufT import Types makeLenses ''ServerT newServerT :: ServerT newSe...
ksaveljev/hake-2
src/Server/ServerT.hs
bsd-3-clause
842
0
11
267
184
111
73
24
1
data Customer = Customer Int String [String] deriving (Show) customerID :: Customer -> Int customerID (Customer id _ _) = id customerName :: Customer -> String customerName (Customer _ name _) = name customerAddress :: Customer -> [String] customerAddress (Customer _ _ address) = address
NeonGraal/rwh-stack
ch03/AltCustomer.hs
bsd-3-clause
308
0
7
64
108
57
51
8
1
module Tc.TcLcg where -- this module implements the functions for compute -- the least commom generalization of two simple -- types. import Control.Monad import Control.Monad.Trans import Data.Char import Data.List import qualified Data.Map as Map import Language.Haskell.Exts import Tc.TcMonad import Tc.TcSubst im...
rodrigogribeiro/mptc
src/Tc/TcLcg.hs
bsd-3-clause
4,623
3
15
1,659
2,268
1,183
1,085
138
2
module Main where import System import System.Cmd import Language.MUDA.AST import Language.MUDA.Parser import Language.MUDA.PPrint debugPrinter ast = do putStrLn $ "// [DBG]" putStrLn $ show ast main = do args <- getArgs if length args > 0 then do { r...
syoyo/MUDA
Main.hs
bsd-3-clause
419
0
12
149
116
62
54
12
2
module Cauterize.Options where import Cauterize.Version (versionString) import Options.Applicative data CautOpts = CautOpts { schemaFile :: FilePath , specPath :: FilePath } deriving (Show) runWithOptions :: (CautOpts -> IO ()) -> IO () runWithOptions fn = do mopts <- execParser optio...
cauterize-tools/cauterize
bin/Cauterize/Options.hs
bsd-3-clause
911
0
11
210
260
136
124
27
2
module EFA.Flow.Topology.Variable where import qualified EFA.Flow.Topology.Index as Idx import qualified EFA.Flow.Part.Index as PartIdx import qualified EFA.Flow.SequenceState.Index as FlowIdx import qualified EFA.Graph.Topology.Node as Node import qualified EFA.Equation.RecordIndex as RecIdx import qualified EFA.Equ...
energyflowanalysis/efa-2.1
src/EFA/Flow/Topology/Variable.hs
bsd-3-clause
3,136
0
11
715
982
513
469
86
6
{-# LANGUAGE TypeSynonymInstances, OverlappingInstances, FlexibleInstances #-} module Json ( Jsonable(..), JsonArray, JsonObject ) where import Data.Char (toLower, toUpper) import Data.List.Utils (join) import qualified Text.Parse as Parse import qualified Text.ParserCombinators.Poly.Plain as PolyPlai...
dyreshark/learn-haskell
Json.hs
bsd-3-clause
2,891
3
12
843
669
369
300
-1
-1
{-# LANGUAGE FlexibleContexts #-} module Install.Fetch where import Control.Monad.Error (MonadError, MonadIO, liftIO, throwError) import qualified Codec.Archive.Zip as Zip import qualified Data.List as List import qualified Network.HTTP.Client as Client import System.Directory (doesDirectoryExist, getDirectoryContents...
rtfeldman/elm-package
src/Install/Fetch.hs
bsd-3-clause
1,665
0
15
335
503
266
237
36
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} module Docker.Redhat ( Redhat , Redhat6 , Redhat7 , centos6 , centos7 , InotifyTools , inotifyTools , SHA256(..) , installRpm , installRpm' ) where ...
jystic/sandwich-press
src/Docker/Redhat.hs
bsd-3-clause
2,132
0
15
527
545
311
234
-1
-1
{-# LANGUAGE OverloadedStrings #-} module ProveEverywhere.Server where import Prelude hiding (lookup) import Control.Concurrent (forkIO, threadDelay) import Control.Concurrent.MVar import Control.Exception import Control.Monad (void) import Data.Aeson import Data.CaseInsensitive () import Data.HashMap.Strict (HashMap...
prove-everywhere/server
src/ProveEverywhere/Server.hs
bsd-3-clause
5,669
0
20
1,406
1,790
893
897
129
8
module HW5.StackVM (StackVal(..), StackExp(..), Stack, Program, stackVM) where -- Values that may appear in the stack. Such a value will also be -- returned by the stackVM program execution function. data StackVal = IVal Integer | BVal Bool | Void deriving Show -- The various expressions our VM understands. data Stac...
cgag/cis-194-solutions
src/HW5/StackVM.hs
bsd-3-clause
2,223
0
9
749
810
425
385
39
1
module Math.IRT.Model.Generic where class GenericModel a where fromRasch :: Double -> a fromOnePLM :: Double -> a fromTwoPLM :: Double -> Double -> a fromThreePLM :: Double -> Double -> Double -> a fromFourPLM :: Double -> Double -> Double -> Double -> a
argiopetech/irt
Math/IRT/Model/Generic.hs
bsd-3-clause
284
0
10
73
86
47
39
7
0
{-# LANGUAGE TemplateHaskell #-} module Main where import Test.Framework import Game main = do let g = read "{0|{0|*}}" :: Game g' = read "{0|*}" :: Game print g print $ rawShow g print $ isnumber g print $ zero <* g' defaultMain [ gameTests ]
girving/games
Tests.hs
bsd-3-clause
270
0
10
72
90
44
46
13
1
module CVTool.Writers (writePDF, writeLaTeX, writeHtml, writeJSON, writeMarkdown) where import qualified Text.Pandoc as P ( writeJSON, writeMarkdown, writeLaTeX, writeHtmlString, WriterOptions(..), def) import Text.Pandoc.PDF setOptions :: String -> P.WriterOptions setOptions template = P.def { P.writerTe...
wbthomason/cv-tool
lib/CVTool/Writers.hs
bsd-3-clause
783
0
8
107
226
124
102
19
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} module Language.Fixpoint.Smt.Bitvector ( -- * Constructor Bv (..) -- * Sizes , BvSize (..) -- * Operators , BvOp (..) -- * BitVector Sort Constructor , mkSort -- * BitVec...
gridaphobe/liquid-fixpoint
src/Language/Fixpoint/Smt/Bitvector.hs
bsd-3-clause
1,847
0
10
533
397
227
170
37
1
import Graphics.Gloss import Data.Fixed import Graphics.Gloss.Data.ViewPort import Data.List import Control.Monad.Random import System.Random bslash :: Float -- ^ Thickness -> (Float, Float) -- ^ Width, height -> Picture bslash t (w,h) = Polygon [(0,0),(t,0),(w,h-t),(w,h),(w-t,h),(0,t)] fslash ...
jchmrt/tenprint
main.hs
mit
2,696
0
19
795
1,295
703
592
78
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...
DATX02-17-26/DATX02-17-26
Test/Norm/FloatToDoubleTest.hs
gpl-2.0
1,163
0
6
203
59
36
23
8
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 ...
noughtmare/yi
yi-keymap-vim/src/Yi/Keymap/Vim/InsertMap.hs
gpl-2.0
10,368
0
22
3,431
2,933
1,497
1,436
215
22
-- $Id$ module NPDA.Dot ( module Autolib.Dot.Dot ) where import NPDA.Type import Autolib.Dot.Dot import qualified Autolib.Dot.Graph as G import qualified Autolib.Dot.Node as N import qualified Autolib.Dot.Edge as E import Autolib.ToDoc import Autolib.Set import Autolib.FiniteMap import Data.Maybe -- | zustände...
florianpilz/autotool
src/NPDA/Dot.hs
gpl-2.0
2,053
58
18
661
658
361
297
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-datapipeline/gen/Network/AWS/DataPipeline/DeletePipeline.hs
mpl-2.0
3,381
0
9
708
362
223
139
48
1
{-# OPTIONS_GHC -fglasgow-exts #-} ----------------------------------------------------------------------------- -- | -- Module : Control.Comonad.Context.Class -- Copyright : (C) 2008 Edward Kmett -- License : BSD-style (see the file LICENSE) -- -- Maintainer : Edward Kmett <ekmett@gmail.com> -- Stabili...
urska19/MFP---Samodejno-racunanje-dvosmernih-preslikav
Control/Comonad/Context/Class.hs
apache-2.0
882
4
9
164
212
118
94
-1
-1
{-# OPTIONS -fglasgow-exts #-} module API where data Null = Null { a, b :: Int } null :: Null null = Null { a = 42 , b = 1 }
abuiles/turbinado-blog
tmp/dependencies/hs-plugins-1.3.1/testsuite/unload/sjwtrap/api/API.hs
bsd-3-clause
129
0
8
36
46
30
16
5
1
-- | A renderer that produces a native Haskell 'String', mostly meant for -- debugging purposes. -- {-# LANGUAGE OverloadedStrings #-} module Text.Blaze.Renderer.String ( fromChoiceString , renderMarkup , renderHtml ) where import Data.List (isInfixOf) import qualified Data.ByteString.Char8 as SBC imp...
FranklinChen/blaze-markup
src/Text/Blaze/Renderer/String.hs
bsd-3-clause
3,906
0
14
1,070
1,145
611
534
74
11
module CodeGen.Shared(generateShared) where import Types import CCode.Main import CodeGen.CCodeNames import CodeGen.Typeclasses import CodeGen.Function import CodeGen.ClassTable import qualified AST.AST as A import Data.Maybe import Data.List -- | Generates a file containing the shared (but not included) C -- code o...
Paow/encore
src/back/CodeGen/Shared.hs
bsd-3-clause
3,165
0
20
1,114
829
436
393
-1
-1
-- | Exposes things that are considered to be too unstable for inclusion in the exports of "Data.Graph.Wrapper". -- -- Use of this module should be avoided as it will change frequently and changes to this module alone will not necessarily -- follow the Package Versioning Policy. {-# OPTIONS_HADDOCK not-home #-} module ...
batterseapower/graph-wrapper
Data/Graph/Wrapper/Internal.hs
bsd-3-clause
3,574
0
14
778
1,142
592
550
51
3
{- | Module : $Header$ Description : A process interface for communication with other programs Copyright : (c) Ewaryst Schulz, DFKI Bremen 2009 License : GPLv2 or higher, see LICENSE.txt Maintainer : Ewaryst.Schulz@dfki.de Stability : provisional Portability : non-portable (various -fglasgow-exts e...
mariefarrell/Hets
Interfaces/Process.hs
gpl-2.0
10,397
0
16
3,081
1,778
918
860
136
4
-- | -- Module : Data.UUID.Named -- Copyright : (c) 2008 Antoine Latter -- -- License : BSD-style -- -- Maintainer : aslatter@gmail.com -- Stability : experimental -- Portability : portable -- -- -- This module implements Version 3/5 UUIDs as specified -- in RFC 4122. -- -- These UUIDs identify an object ...
alphaHeavy/uuid
Data/UUID/Named.hs
bsd-3-clause
1,959
0
14
399
325
198
127
35
1
import FFI import Prelude main = do let a1 = ("string",1) :: (String,Int) putStrLn $ showPair a1 putStrLn $ showList [1..3] putStrLn $ showString "Just a plain string" l1 <- readList "[4,5,6]" putStrLn . showList . map (1+) $ l1 (s,i) <- readPair "[\"first\",2]" putStrLn $ s ++ " wa...
fpco/fay
examples/showExamples.hs
bsd-3-clause
956
0
10
194
268
138
130
23
1
{-# LANGUAGE CPP #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module Lazyfoo.Lesson19 (main) where import Prelude hiding (any, mapM_) import Control.Monad hiding (mapM_) import Data.Int import Data.Maybe import Data.Monoid import Foreig...
seppeljordan/sdl2
examples/lazyfoo/Lesson19.hs
bsd-3-clause
5,244
0
33
1,732
1,516
756
760
121
15
import Graphics.UI.Gtk main :: IO () main = do initGUI window <- windowNew set window [windowTitle := "File Chooser Widget", windowDefaultWidth := 500, windowDefaultHeight := 400 ] fch <- fileChooserWidgetNew FileChooserActionOpen containerAdd window fch selopt <- ch...
phischu/gtk2hs
docs/tutorial/Tutorial_Port/Example_Code/GtkChap5-2a.hs
lgpl-3.0
1,964
0
20
688
443
191
252
50
5
-- This triggers the same issue that prevents HashTable from building data Foo a = Foo [a] deriving Show data Bar a = Bar !(Foo a) deriving Show main = print (Bar (Foo ["Hi!"]))
hvr/jhc
regress/tests/6_fixed_bugs/UnpackedPoly.hs
mit
181
0
10
37
61
34
27
5
1
module ScopeProgram(scopeProgram,scopeProgram',PNT(..)) where import ScopeModule import PNT(PNT(..)) import PrettyPrint import OutputM import HsModule(hsModName) scopeProgram (mss0,wms) = if null errors then return (mss,wms) else fail (pp $ vcat errors) where (mss,mrefs) = scopeProgram' (mss0,wms) ...
forste/haReFork
tools/base/ScopeProgram.hs
bsd-3-clause
851
1
11
200
369
199
170
22
4
{-# LANGUAGE EmptyDataDecls, TypeFamilies, TypeOperators, GADTs, KindSignatures #-} module T3330c where import Data.Kind data (f :+: g) x = Inl (f x) | Inr (g x) data R :: (Type -> Type) -> Type where RSum :: R f -> R g -> R (f :+: g) class Rep f where rep :: R f instance (Rep f, Rep g) => Rep (f :+: g) wher...
sdiehl/ghc
testsuite/tests/indexed-types/should_fail/T3330c.hs
bsd-3-clause
1,393
9
8
445
291
154
137
-1
-1
{-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE DataKinds, PolyKinds #-} module T13780a where data family Sing (a :: k) data Foo a = a ~ Bool => MkFoo data instance Sing (z :: Foo a) = (z ~ MkFoo) => SMkFoo
sdiehl/ghc
testsuite/tests/dependent/should_fail/T13780a.hs
bsd-3-clause
247
0
8
46
67
40
27
7
0
{-# LANGUAGE PartialTypeSignatures, NamedWildCards #-} module UncurryNamed where unc :: (_a -> _b -> _c) -> (_a, _b) -> _c unc = uncurry
urbanslug/ghc
testsuite/tests/partial-sigs/should_compile/UncurryNamed.hs
bsd-3-clause
138
0
8
24
40
24
16
4
1
{-# LANGUAGE PackageImports #-} {-# OPTIONS_GHC -fno-warn-dodgy-exports -fno-warn-unused-imports #-} -- | Reexports "Foreign.Marshal.Utils.Compat" -- from a globally unique namespace. module Foreign.Marshal.Utils.Compat.Repl ( module Foreign.Marshal.Utils.Compat ) where import "this" Foreign.Marshal.Utils.Compat
haskell-compat/base-compat
base-compat/src/Foreign/Marshal/Utils/Compat/Repl.hs
mit
316
0
5
31
31
24
7
5
0
import Control.Applicative import Control.Monad import Data.List import Text.Printf data Sign a = Pos a | Neg a deriving Eq main :: IO () main = do tests <- readLn forM_ [1..tests] $ \caseNum -> do [l, x] <- map read <$> words <$> getLine s <- concat . replicate x <$> getLine let ans = ...
marknsikora/codejam
6224486/C.hs
mit
2,196
0
22
1,165
799
410
389
51
20
bar x b where bar x = zap foo a c d = quux
chreekat/vim-haskell-syntax
test/golden/nested/where-decl.hs
mit
55
1
5
24
30
14
16
-1
-1
{-# LANGUAGE DeriveGeneric #-} module Parse ( LayerParseDefinition(..) , NetworkParseDefinition(..) , TrainingParseDefinition(..) , InputParseDefinition(..) , toMatrixFloat , toNetwork ) where import Network.Layer import Network.Neuron import Network.Network import Data.Aeson import GHC.Generics...
jbarrow/LambdaNet-browser
Parse.hs
mit
2,956
0
11
772
631
347
284
48
1
{-# LANGUAGE DeriveFunctor #-} module Vimus.Command.Parser where import Prelude hiding (takeWhile) import Data.List (intercalate) import Control.Monad import Control.Applicative type Name = String type Value = String -- | Errors are ordered from less specific to more specific...
vimus/vimus
src/Vimus/Command/Parser.hs
mit
3,179
0
15
788
992
513
479
70
2
{-# LANGUAGE OverloadedStrings #-} module RegisterTest ( registerSpecs ) where import TestImport import qualified Data.Text as T import qualified Data.List as L cleanDB :: YesodExample App () cleanDB = do runDB $ deleteWhere ([] :: [Filter Wish]) runDB $ deleteWhere ([] :: [Filter Wishlist]) runDB...
lulf/wishsys
tests/RegisterTest.hs
mit
3,145
0
16
1,105
652
281
371
69
1
module Main where import Password (findNextPassword) input = "hepxcrrq" partOne = findNextPassword input partTwo = fmap findNextPassword $ findNextPassword input main = print partTwo
corajr/adventofcode2015
11/Main.hs
mit
187
0
6
28
48
26
22
6
1
module Exercise2 where import Test.QuickCheck -- maxi x y returns the maximum of x and y maxi :: Int -> Int -> Int maxi i j | i >= j = i | otherwise = j -- sumsq n returns 1*1 + 2*2 + ... + n*n sumsq :: Int -> Int sumsq 0 = 0 sumsq i = (i' * i') + (sumsq (i' - 1)) where i' = abs i sumsq' :: Int ...
tdeekens/tda452-code
Exercises/exercise-2.hs
mit
1,660
0
10
476
742
387
355
45
2
module Eval (flatten, reduceB, beta) where import Defs import Data.Maybe import Data.List import Control.Applicative flatten :: [Defn] -> Maybe Lambda flatten ds = flatten' <$> main where main = snd <$> find ((== "Main").fst) resolved flatten' :: Lambda -> Lambda flatten' (Free s) = fromMaybe (Free s) ...
lukegrehan/lambda
Eval.hs
mit
1,537
0
12
478
772
380
392
36
7
{-# OPTIONS_GHC -fno-warn-unused-matches #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE OverloadedStrings #-} module Matek.Inline ( mkScalar , mkDecomposable , blockMap , matekCtx ) where ...
chpatrick/matek
src/Matek/Inline.hs
mit
6,030
20
22
1,756
1,413
784
629
-1
-1
{-# LANGUAGE QuasiQuotes #-} module ProC.ParserSpec ( spec ) where import ProC.Language import ProC.Parser import Test.Hspec import Text.RawString.QQ spec :: Spec spec = describe "parseProC" $ do it "parses Hello World" $ parseProC [r| print("Hello World"); |...
ianagbip1oti/ProC
test/ProC/ParserSpec.hs
mit
2,026
0
19
626
584
305
279
49
1
module Vector ( Vect, xComp, yComp, zComp, vect, (^+^), (^-^), (*^), (^*), (^/), (<.>), (><), magnitude, zeroVect, negateVect, sumVect ) where infixl 6 ^+^ infixl ...
abbottk/MICL
DSL/PNP/Vector.hs
cc0-1.0
2,185
0
11
747
879
482
397
60
1
module Tests.ParseJuicyTest (parseJuicyTestDo) where import Test.HUnit import Scan.ParseJuicy( getThePixelsRightOfCenter, convertPixelsToMillmeters, calculateRadiusFrom, averageValueOf, removeLeftOfCenterPixels, TargetValueIndex(..), calculatePixelsPerMillmeter ) import CornerPoints.Radius(Radius...
heathweiss/Tricad
src/Tests/ParseJuicyTest.hs
gpl-2.0
3,865
0
15
753
537
289
248
58
1
module Shortlines where -- interact :: (String -> String) -> IO () main :: IO () main = interact (unlines . filter ((<10) . length) . lines) -- cat resources/quotes | runhaskell shortline -- I'm -- trying -- to -- free -- your -- mind, -- Neo.
ardumont/haskell-lab
src/io/shortline.hs
gpl-2.0
247
0
12
50
56
35
21
3
1
{-# language TemplateHaskell #-} {-# language DeriveDataTypeable #-} {-# language GeneralizedNewtypeDeriving #-} module FD.Data where import Autolib.Reader import Autolib.ToDoc import qualified Data.Set as S import Data.Typeable import Control.Applicative ((<$>),(<*>)) formula0 :: Formula formula0 = [ Atom (Re...
marcellussiegburg/autotool
collection/src/FD/Data.hs
gpl-2.0
1,342
0
9
294
476
262
214
34
1
{-# LANGUAGE FlexibleInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module OpenSandbox.World.ChunkSpec (main,spec) where import Common import Control.Monad import Data.NBTSpec() import qualified Data.Vector as V import Data.Word import Test.Hspec import Test.QuickCheck import Test.QuickCheck.Test import OpenSandb...
oldmanmike/opensandbox
test/OpenSandbox/World/ChunkSpec.hs
gpl-3.0
4,470
0
13
999
1,305
638
667
120
1
-- | Parse RNAfold output -- For more information on RNAfold consult: <http://www.tbi.univie.ac.at/RNA/RNAfold> module Bio.RNAfoldParser ( systemRNAfold, parseRNAfold, readRNAfold, systemRNAfoldOptions, ...
eggzilla/ViennaRNAParser
src/Bio/RNAfoldParser.hs
gpl-3.0
4,062
0
11
915
954
455
499
84
1
{-# LANGUAGE FlexibleContexts #-} module Lib.Syntax.Annotated where import Control.Comonad import Control.Comonad.Cofree import Control.Monad.Free import Data.Traversable import Control.Monad.Error import Lib.Errors import Lib.Syntax.Core import Li...
gatlin/psilo
src/Lib/Syntax/Annotated.hs
gpl-3.0
903
0
10
207
182
104
78
18
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Enterprises/List.hs
mpl-2.0
3,433
0
12
739
313
195
118
49
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Services/SetIAMPolicy.hs
mpl-2.0
5,584
0
16
1,216
784
459
325
115
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-youtube-analytics/gen/Network/Google/Resource/YouTubeAnalytics/Groups/List.hs
mpl-2.0
5,346
0
16
1,234
577
347
230
82
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-billing/gen/Network/Google/Resource/CloudBilling/Services/List.hs
mpl-2.0
4,982
0
17
1,202
809
469
340
113
1
module Cloud.Haskzure.Resources where import Cloud.Haskzure.Resources.Networking import Cloud.Haskzure.Resources.ResourceGroups (ResourceGroup (..))
aznashwan/haskzure
Cloud/Haskzure/Resources.hs
apache-2.0
171
0
6
31
30
21
9
3
0
module Examples.NextHop ( nhExamples ) where import Utils import LaTeX import Algebra.Matrix import Algebra.Semiring import PathInformations.NextHop nhExamples :: Int -> Matrix NextHop nhExamples 0 = M (toArray 5 [ zero, A 1 2, zero, zero, zero , zero, zero, zero, zero, zero ...
sdynerow/Semirings-Library
haskell/Examples/NextHop.hs
apache-2.0
552
0
9
203
184
104
80
14
1
{-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE TypeFamilies #-} module Data.Authenticated.Fix (FixAuth(..)) where import Data.Authenticated newtype FixAuth f a = FixAuth { unFixAuth :: f (Auth (FixAuth f a) a) } instance (Show (f (Auth (FixAuth f a) a))) => Show (FixAuth f a) where showsPrec n (FixAuth f) = s...
derekelkins/ads
Data/Authenticated/Fix.hs
bsd-2-clause
730
0
12
135
316
165
151
-1
-1
{- | Module : Data.Graph.Analysis.Algorithms.Clustering Description : Clustering and grouping algorithms. Copyright : (c) Ivan Lazar Miljenovic 2009 License : 2-Clause BSD Maintainer : Ivan.Miljenovic@gmail.com Clustering and grouping algorithms that are graph-invariant and require no ...
ivan-m/Graphalyze
Data/Graph/Analysis/Algorithms/Clustering.hs
bsd-2-clause
15,781
0
14
4,429
3,304
1,784
1,520
165
2
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude, MagicHash #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | -- Module : GHC.Err -- Copyright : (c) The University of Glasgow, 1994-2002 -- License : see libraries/base/LICENSE --...
bitemyapp/ghc
libraries/base/GHC/Err.hs
bsd-3-clause
1,969
0
10
351
190
121
69
19
1
{-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} -- | Assign codes and inner layer to each word according to Huffman coding module Huffman(Code, Bin(..), Coding(..), huffmanEncode, asNum) where import Data.HashMap.Strict(empty, ...
RayRacine/hs-word2vec
Huffman.hs
bsd-3-clause
4,434
0
19
1,552
1,284
692
592
77
2
module Data.Array.Accelerate.BLAS.Internal.Nrm2 where import Data.Array.Accelerate.BLAS.Internal.Common import Data.Array.Accelerate import Data.Array.Accelerate.CUDA.Foreign import qualified Foreign.CUDA.BLAS as BL import Prelude hiding (zipWith, map) cudaNrm2F :: Vector Float -> CIO (Scalar Float) cudaNrm2F x = do...
alpmestan/accelerate-blas
src/Data/Array/Accelerate/BLAS/Internal/Nrm2.hs
bsd-3-clause
1,742
0
12
453
562
286
276
36
1
{-# LANGUAGE OverloadedStrings, PackageImports #-} import Control.Applicative import Control.Arrow import Control.Monad import "monads-tf" Control.Monad.Trans import Data.Maybe import Data.Pipe import Data.HandleLike import Text.XML.Pipe import Network import Network.PeyoTLS.Client import Network.PeyoTLS.ReadFile impo...
YoshikuniJujo/forest
subprojects/xmpipe/tls.hs
bsd-3-clause
15,582
254
15
2,594
6,350
3,458
2,892
399
2
{- FSQL : Parser/Base.hs -- Basic parser definitions - - Copyright (C) 2015 gahag - All rights reserved. - - This software may be modified and distributed under the terms - of the BSD license. See the LICENSE file for details. -} module Parser.Base ( Parser, OperatorTable ) where import Data.Functor....
gahag/FSQL
src/Parser/Base.hs
bsd-3-clause
599
0
6
147
84
52
32
7
0
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE TemplateHaskell #-} module Database.DSH.Backend.Sql.HDBC ( hdbcKey , hdbcDescr , hdbcInteger , hdbcDouble , hdbcBool , hdbcChar , hdbcText , hdbcDecimal , hdbcDay ) where import qualified Data.ByteString.Char8 as BSC import...
ulricha/dsh-sql
src/Database/DSH/Backend/Sql/HDBC.hs
bsd-3-clause
4,288
0
12
1,417
1,441
708
733
94
9
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeFamilies #-} import Control.Monad import qualified Data.Text as T import Web.Spock import Web.Spock.Config import AutoPlaylist.Api (app) import AutoPlay...
tdietert/auto-playlist
web/Server.hs
bsd-3-clause
971
0
20
306
230
122
108
25
3
{-# LANGUAGE GADTs #-} module DBOp where import Prelude hiding (Read) {- DB operations DSL -} data Create data Read data Update data Delete data DBOp o r a where Find :: DBOp Read r a Create :: DBOp Create r a Chain :: (a -> DBOp o r b) -> DBOp o r a -> DBOp o r b Map :: (a -> b) -> DBOp o r a -> DBOp o...
lambdatoast/gadt-spec
src/DBOp.hs
bsd-3-clause
325
0
9
91
133
74
59
-1
-1
{-# LANGUAGE CPP #-} {-# LANGUAGE ImplicitParams #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE BangPatterns #-} module TestCont where import Haskus.Utils.ContFlow import Haskus.Utils.Monad import Haskus.Utils.Variant import Data.Char -- | Explicit ...
hsyl20/ViperVM
scripts/ContFlow.hs
bsd-3-clause
6,180
13
15
1,939
2,377
1,258
1,119
-1
-1
-- 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. An additional grant -- of patent rights can be found in the PATENTS file in the same directory. {-# LANGUAGE Over...
rfranek/duckling
tests/Duckling/Url/Tests.hs
bsd-3-clause
1,128
0
11
200
178
103
75
22
1
{-# LANGUAGE CPP #-} module Flag where import DynFlags import Types listFlags :: Options -> IO String listFlags opt = return $ convert opt $ [ "-f" ++ prefix ++ option #if __GLASGOW_HASKELL__ == 702 | (option,_,_,_) <- fFlags #else | (option,_,_) <- fFlags #endif , prefix <- ["","no-"] ]
conal/ghc-mod
Flag.hs
bsd-3-clause
307
0
9
68
90
52
38
9
1
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE OverloadedStrings #-} module Util.QuakeFile ( QuakeFile , open , close , writeString , readString , writeInt ,...
ksaveljev/hake-2
src/Util/QuakeFile.hs
bsd-3-clause
38,210
0
19
11,754
9,844
4,699
5,145
803
5
module HasOffers.API.Affiliate.AffiliateUser where import Data.Text import GHC.Generics import Data.Aeson import Control.Applicative import Network.HTTP.Client import qualified Data.ByteString.Char8 as BS import HasOffers.API.Common -----------------------------------------------------------------------------...
kelecorix/api-hasoffers
src/HasOffers/API/Affiliate/AffiliateUser.hs
bsd-3-clause
324
0
4
31
50
34
16
8
0
module Main ( main ) where import Cauterize.GHC7.Generate import Cauterize.GHC7.Options import Cauterize.GHC7.Version import Options.Applicative (execParser) main :: IO () main = runWithOptions caut2hs runWithOptions :: (CautGHC7Opts -> IO ()) -> IO () runWithOptions fn = do mopts <- execParser options case...
cauterize-tools/caut-ghc7-ref
src/Main.hs
bsd-3-clause
462
0
12
96
142
71
71
17
2
{-# LANGUAGE OverloadedStrings #-} -- | Variables, commands and functions. The /interface/ to -- the processing.js API (<http://processingjs.org/reference>), -- with some additions, deletions and modifications. module Graphics.Web.Processing.Core.Interface ( -- * Predefined values screenWidth, screenHeigh...
Daniel-Diaz/processing
Graphics/Web/Processing/Core/Interface.hs
bsd-3-clause
11,859
0
13
2,794
3,193
1,770
1,423
-1
-1
{-# LANGUAGE GADTs #-} -- | Pretty printing module Pretty where import AST pretty :: Pretty a => a -> String pretty x = bpretty 0 x "" class Pretty a where bpretty :: Int -> a -> ShowS instance Pretty a => Pretty [a] where bpretty _ list = showString "[" . go list where go [] = showString "]" ...
ollef/Bidirectional
Pretty.hs
bsd-3-clause
2,828
0
15
844
1,147
555
592
74
1
{-| Module : Idris.Elab.Implementation Description : Code to elaborate instances. Copyright : License : BSD3 Maintainer : The Idris Community. -} {-# LANGUAGE PatternGuards #-} module Idris.Elab.Implementation(elabImplementation) where import Idris.AbsSyntax import Idris.ASTUtils import Idris.Core.CaseTree...
jmitchell/Idris-dev
src/Idris/Elab/Implementation.hs
bsd-3-clause
21,539
1
28
7,290
7,682
3,819
3,863
399
40
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 -} {-# LANGUAGE CPP, DeriveDataTypeable, ScopedTypeVariables #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} -- Note [Pass s...
sdiehl/ghc
compiler/GHC/Hs/Expr.hs
bsd-3-clause
111,958
0
20
31,900
20,624
10,954
9,670
1,365
40
{-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE ScopedTypeVariables #-} ----------------------------------------------------------------------------- -- | -- Module : Control.Distributed.Process.ManagedProcess.Client -- Copyright : (c) Tim Watson 2012 - 2013 -- License : BSD3 (see the fil...
qnikst/distributed-process-client-server
src/Control/Distributed/Process/ManagedProcess/Client.hs
bsd-3-clause
7,433
0
15
1,543
1,356
742
614
83
3
module Main where import Test.HUnit import qualified System.CrawlerServiceTest (tests) import qualified Unit.Model.CrawlerTest (tests) import qualified Unit.Service.CrawlerServiceTest (tests) main :: IO () main = runTestTT unitTests >> runTestTT systemTests >> return () unitTests = test [ "CrawlerTest" ~: ...
ptek/sclent
tests/RunTests.hs
bsd-3-clause
499
0
8
69
126
73
53
14
1
module HaskellTools.Types where import Data.Vector (Vector) import qualified Data.Text as T data Repo = Repo { repoPackageName :: T.Text , stars :: Integer , forks :: Integer , collaborators :: Integer } deriving (Show, Eq) type PackageRepos = (Vector (T.Text, T.Text, T.Text))
diogob/haskell-tools
src/HaskellTools/Types.hs
bsd-3-clause
291
0
9
55
97
60
37
10
0
import Text.ParserCombinators.Parsec csvFile = endBy line eol line = sepBy cell (char ',') cell = many (noneOf ",\n\r") {-- snippet eol --} eol = do char '\n' char '\r' <|> return '\n' {-- /snippet eol --} parseCSV :: String -> Either ParseError [[String]] parseCSV input = parse csvFile "(unknown)" input...
binesiyu/ifl
examples/ch16/csv5.hs
mit
321
0
8
65
108
54
54
9
1
-- Tic-tac-toe example from chapter 11 of Programming in Haskell, -- Graham Hutton, Cambridge University Press, 2016. -- Basic declarations import Data.Char import Data.List import System.IO size :: Int size = 3 type Grid = [[Player]] data Player = O | B | X deriving (Eq, Ord, Show) next :: Player -...
thalerjonathan/phd
coding/learning/haskell/grahambook/Code_Solutions/tictactoe.hs
gpl-3.0
4,990
0
14
1,848
2,213
1,111
1,102
133
2
module SigNoDef where main :: IO ()
roberth/uu-helium
test/staticerrors/SigNoDef.hs
gpl-3.0
38
0
6
9
14
8
6
2
0
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE ScopedTypeVariables #-} module CO4.Example.LPOSL where import Language.Haskell.TH (runIO) import qualified Satchmo.Core.SAT.Minisat import qualified Satch...
abau/co4
test/CO4/Example/LPOSL.hs
gpl-3.0
3,823
0
22
1,461
749
406
343
55
1
module ExportShowInstance2 where data A = MkA Int deriving Show
roberth/uu-helium
test/make/ExportShowInstance2.hs
gpl-3.0
66
0
6
12
16
10
6
2
0
{-# 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-storagegateway/gen/Network/AWS/StorageGateway/DescribeBandwidthRateLimit.hs
mpl-2.0
6,635
0
14
1,299
768
458
310
95
1
{-# LANGUAGE RecordWildCards, FlexibleInstances, MultiParamTypeClasses #-} module Network.MQTT.EncoderSpec (spec) where import Network.MQTT.Packet import Network.MQTT.Encoder ( encodePacket ) import Network.MQTT.Parser ( parsePacket ) import Test.Small...
rasendubi/arachne
test/Network/MQTT/EncoderSpec.hs
bsd-3-clause
4,311
0
21
1,357
1,166
590
576
79
4
module Challenger.Ident where -- $Id$ data Ident = Ident {aufgabe :: Int } deriving (Show, Read) showIdentForDatei :: Ident -> String showIdentForDatei i = show (aufgabe i)
florianpilz/autotool
src/Challenger/Ident.hs
gpl-2.0
182
0
8
36
59
33
26
4
1
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE ExistentialQuantifi...
ezyang/ghc
libraries/base/GHC/TypeLits.hs
bsd-3-clause
6,427
2
10
1,504
1,231
724
507
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE TypeFamilyDependencies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE UndecidableInstances #-} module T12522b where import Data.Kind (Type) newtype I a = I a type family Curry (as :: [Type]) b = f | f -> as b where Curry '[] b = I b Cu...
sdiehl/ghc
testsuite/tests/indexed-types/should_compile/T12522b.hs
bsd-3-clause
511
0
8
114
160
96
64
-1
-1
{-# LANGUAGE OverloadedStrings #-} -- | -- Module : Data.Text.Lazy.Read -- Copyright : (c) 2010, 2011 Bryan O'Sullivan -- -- License : BSD-style -- Maintainer : bos@serpentine.com -- Stability : experimental -- Portability : GHC -- -- Functions used frequently when reading textual data. module Data.Text....
mightymoose/liquidhaskell
benchmarks/text-0.11.2.3/Data/Text/Lazy/Read.hs
bsd-3-clause
7,930
0
19
1,961
1,609
860
749
130
5
{-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -O #-} -- -O casused a Lint error in the simplifier, so I'm putting that in -- all the time, so we don't miss it in a fast validate module T7891 where import Data.Kind (Type) newtype T = T (forall t. t -> t) tf ::...
sdiehl/ghc
testsuite/tests/typecheck/should_compile/T7891.hs
bsd-3-clause
771
0
10
221
220
122
98
-1
-1
----------------------------------------------------------------------------- -- | -- Module : Distribution.Client.Haddock -- Copyright : (c) Andrea Vezzosi 2009 -- License : BSD-like -- -- Maintainer : cabal-devel@haskell.org -- Portability : portable -- -- Interfacing with Haddock -- ----------------...
corngood/cabal
cabal-install/Distribution/Client/Haddock.hs
bsd-3-clause
2,763
0
18
700
560
311
249
48
2
{-# LANGUAGE Safe, Trustworthy #-} -- | Basic test to see if Safe flags compiles module SafeFlags10 where f :: Int f = 1
urbanslug/ghc
testsuite/tests/safeHaskell/flags/SafeFlags10.hs
bsd-3-clause
124
0
4
27
16
11
5
4
1
{-# LANGUAGE MagicHash #-} module T8262 where foo x = Just (1#)
ryantm/ghc
testsuite/tests/typecheck/should_fail/T8262.hs
bsd-3-clause
66
0
6
14
19
11
8
3
1
{-# LANGUAGE PolyKinds, KindSignatures #-} module Foo where data T (a :: j k) = MkT
wxwxwwxxx/ghc
testsuite/tests/polykinds/T6039.hs
bsd-3-clause
87
0
6
19
22
14
8
3
0
module Main ( main ) where import System.Directory ( createDirectoryIfMissing ) import Color ( Color(..), saveRender ) main :: IO () main = do putStrLn "Starting render..." createDirectoryIfMissing True "output" saveRender "output/experiment00.bmp" 640 480 testRenderFunction putStrLn ...
stu-smith/rendering-in-haskell
src/experiment00/Main.hs
mit
559
0
8
132
153
75
78
-1
-1