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 MultiParamTypeClasses #-} {-# LANGUAGE PatternGuards #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ExtendedDefaultRules #-} {-# LANGUAGE FlexibleContexts #-} {-# OPTIONS_GHC -fno-warn-type-defaults...
chrisdone/descriptive
src/Descriptive/JSON.hs
bsd-3-clause
8,887
0
26
4,143
2,507
1,255
1,252
266
5
{-| Module : MZinHaskell Description : Integration of MiniZinc 2.0 in Haskell License : BSD3 Maintainer : Klara Marntirosian <klara.mar@cs.kuleuven.be> Stability : experimental This module provides IO functionality for running the Haskell representation of a MiniZinc model and getting back the solutions in...
GRACeFUL-project/haskelzinc
src/Interfaces/MZinHaskell.hs
bsd-3-clause
6,814
0
25
2,125
1,012
536
476
91
7
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} -- |...
mainland/nikola
src/Data/Array/Nikola/Util/Generic.hs
bsd-3-clause
1,125
0
10
203
227
132
95
23
1
{-# LANGUAGE DeriveDataTypeable #-} module InteractivePrompt where import System.Console.CmdArgs import System.Directory import System.FilePath import System.Exit import Control.Monad import Control.Applicative import GetURLs import GPTracklists import Data.Aeson import qualified Data.ByteString.Lazy as B import Contr...
shaurya0/GPWebCrawler
src/InteractivePrompt.hs
bsd-3-clause
2,693
0
12
474
605
307
298
54
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} module Templates.Containers where import Text.InterpolatedString.Perl6 (q) import Types containerIndexTemplate :: Template containerIndexTemplate = Template "index.js" template where template = [q|import COMPONENTContainer fro...
tpoulsen/generate-component
src/Templates/Containers.hs
bsd-3-clause
995
0
6
186
67
43
24
10
1
{-# LANGUAGE ExistentialQuantification , ScopedTypeVariables #-} module Rad.QL.Define.Field where import Control.Monad.Trans.Class import qualified Data.ByteString as B import Data.ByteString.Builder import Data.Maybe (fromJust, fromMaybe) import Data.Monoid ((<>)) i...
jqyu/bustle-chi
src/Rad/QL/Define/Field.hs
bsd-3-clause
6,813
0
13
2,081
2,726
1,417
1,309
-1
-1
{-# LANGUAGE BangPatterns #-} module Main (main) where import Control.Monad (void, forever) import Criterion.Main import Series.Types import Series.Combinators import Series.Prelude import qualified Series.FreeT.Prelude as F import qualified Series.Prelude.Direct as N import qualified Series.Producer.Prelude as Pr ...
michaelt/series
benchmarks/benchmarks.hs
bsd-3-clause
14,211
0
21
4,052
4,920
2,665
2,255
308
2
module Main (main) where import qualified Data.ByteString.Lazy as BL import Data.Binary.Get import Data.Binary.Put import Codec.Tracker.S3M main :: IO () main = BL.putStrLn . runPut <$> putModule <$> runGet getModule =<< BL.getContents
riottracker/modfile
examples/putS3M.hs
bsd-3-clause
278
0
9
73
74
44
30
7
1
import Data.Matrix import qualified Data.Vector as V intGrid :: [Char] -> [[Int]] intGrid = fmap (fmap read . words) . lines toMatrix :: String -> Matrix Int toMatrix = fromLists . intGrid size = 4 :: Int subs :: Matrix a -> [Matrix a] subs m = do i <- [1..nrows m - size + 1] j <- [1..ncols m - size + 1] ...
mskmysht/ProjectEuler
src/Problem11.hs
bsd-3-clause
848
0
14
226
463
238
225
25
1
{-# LANGUAGE ForeignFunctionInterface #-} module Main where import System.Event (EventManager) import GHC.Conc.Sync (sharedCAF) import Foreign.Ptr (Ptr) import Data.IORef (IORef, newIORef, readIORef) import System.IO.Unsafe (unsafePerformIO) import Control.Monad import Control.Concurrent import System.Timeout.Rese...
basvandijk/resettable-timeouts
test.hs
bsd-3-clause
1,162
0
10
179
237
123
114
26
1
module Channel where import qualified Data.HashMap.Lazy as HM import qualified User as U import Control.Concurrent.MVar import Control.Concurrent import Utility data Channel = Channel { name :: String, topic :: MVar String, users :: MVar [MVar U.User] } -- sendToChannel takes the channel, a user to not send th...
allonsy/chirp
src/Channel.hs
bsd-3-clause
1,614
0
13
320
548
268
280
40
2
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE UndecidableInstances #-} module ...
mohsen3/csv-conduit
src/Data/CSV/Conduit.hs
bsd-3-clause
15,361
0
20
3,977
2,874
1,557
1,317
207
3
{-# LANGUAGE PackageImports #-} -- http://graphics.cs.brown.edu/games/quake/quake3.html#RenderPatch module Q3Patch where import Control.Monad import "linear" Linear import Data.Vector (Vector,(!)) import qualified Data.Vector as V import qualified Data.Vector.Mutable as MV import BSP tessellate :: Vector DrawVertex...
csabahruska/gpipe-quake3
Q3Patch.hs
bsd-3-clause
2,718
0
22
859
979
519
460
33
2
module W3C.TurtleTest where import Test.Tasty import qualified Test.Tasty.HUnit as TU import Data.Maybe (fromJust) import qualified Data.Text as T import W3C.Manifest import W3C.W3CAssertions import Data.RDF.Types import Data.RDF.Query import Text.RDF.RDF4H.TurtleParser import Text.RDF.RDF4H.NTriplesParser import D...
jutaro/rdf4h
testsuite/tests/W3C/TurtleTest.hs
bsd-3-clause
1,921
0
13
301
593
307
286
38
1
-- Copyright 2019 Google LLC -- -- Use of this source code is governed by a BSD-style -- license that can be found in the LICENSE file or at -- https://developers.google.com/open-source/licenses/bsd -- | This module defines custom types for defining names of various -- syntax terms. -- -- These types are all instances...
google/ghc-source-gen
src/GHC/SourceGen/Name.hs
bsd-3-clause
2,433
0
9
430
370
221
149
41
2
{-# LANGUAGE DeriveFoldable, DeriveFunctor, DeriveTraversable, NoMonomorphismRestriction, ScopedTypeVariables, TupleSections #-} module TypeCheck where import Control.Monad import Data.Either (Either) import Control.Monad.State import Control.Monad.Trans.Either (runEitherT, Eit...
davnils/minijava-compiler
src/TypeCheck.hs
bsd-3-clause
10,190
5
23
2,341
3,873
1,953
1,920
205
14
{-# LANGUAGE BangPatterns #-} module Data.Picture.Drawing.ShapeMatrix.EdgeMatrix ( EdgeMatrix, addEdge ) where import Control.Monad import Data.Pair import Data.Matrix import Data.Picture.Drawing.ShapeMatrix.ShapeMatrix import Data.Picture.Drawing.Line newtype EdgeMatrix = EdgeMatrix { runEM :: Matrix D...
jbaum98/graphics
src/Data/Picture/Drawing/ShapeMatrix/EdgeMatrix.hs
bsd-3-clause
862
0
13
154
320
168
152
19
1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE ImplicitParams #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TupleSectio...
input-output-hk/pos-haskell-prototype
networking/src/Network/Broadcast/OutboundQueue/ConcurrentMultiQueue.hs
mit
22,790
0
26
6,596
4,307
2,193
2,114
-1
-1
{-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE CPP #-} module IHaskell.Test.Parser (testParser) where import Prelude import Data.String.Here (hereLit) import Test.Hspec import Test.Hspec.Contrib.HUnit import Test.HUnit (assertBool, assertFailure) import IHaske...
thomasjm/IHaskell
src/tests/IHaskell/Test/Parser.hs
mit
8,248
0
18
2,384
1,873
959
914
158
2
{- | Module : ./Adl/Print.hs Description : pretty printing ADL syntax Copyright : (c) Stef Joosten, Christian Maeder DFKI GmbH 2010 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : provisional Portability : portable -} module Adl.Print (adlGA) where i...
spechub/Hets
Adl/Print.hs
gpl-2.0
4,856
0
23
1,326
1,915
978
937
132
3
module ExprLambdaDupVar where main = \a a -> 0
roberth/uu-helium
test/staticerrors/ExprLambdaDupVar.hs
gpl-3.0
49
0
5
11
16
10
6
2
1
-- GSoC 2015 - Haskell bindings for OpenCog. {-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE TypeFamilies #-} {-# LANGU...
jswiergo/atomspace
opencog/haskell/OpenCog/AtomSpace/Inheritance.hs
agpl-3.0
2,218
0
11
597
585
339
246
-1
-1
-- Copyright (C) 2016-2017 Red Hat, Inc. -- -- This library is free software; you can redistribute it and/or -- modify it under the terms of the GNU Lesser General Public -- License as published by the Free Software Foundation; either -- version 2.1 of the License, or (at your option) any later version. -- -- This libr...
atodorov/bdcs
src/BDCS/Files.hs
lgpl-2.1
5,258
0
19
1,390
1,347
686
661
90
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-missing-fields #-} {-# OPTIONS_GHC -fno-warn-missing-signatures #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -------------------...
getyourguide/fbthrift
thrift/compiler/test/fixtures/includes/gen-hs/Includes_Consts.hs
apache-2.0
2,526
0
8
430
483
343
140
44
1
module BitcoinCore.Transaction.Optcodes (OPCODE(..), opcodeTable) where import Data.Tuple (swap) import Data.List (lookup) import Data.Maybe (fromMaybe) import Test.QuickCheck.Arbitrary (Arbitrary(..)) import Test.QuickCheck.Gen (elements) data OPCODE = OP_FALSE | OP_PUSHDATA1 | OP_PUSHDATA2 | OP_PUSHDATA4 ...
clample/lamdabtc
backend/src/BitcoinCore/Transaction/Optcodes.hs
bsd-3-clause
4,136
0
11
1,027
1,427
924
503
221
1
{-# LANGUAGE Haskell98 #-} {-# LINE 1 "src/Text/Read/Compat.hs" #-} {-# LANGUAGE CPP, NoImplicitPrelude #-} module Text.Read.Compat ( -- * The 'Read' class Read(..), ReadS, -- * Haskell 2010 functions reads, read, readParen, lex, -- * New par...
phischu/fragnix
tests/packages/scotty/Text.Read.Compat.hs
bsd-3-clause
591
0
5
164
91
64
27
21
0
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="da-DK"> <title>ToDo-List</title> <maps> <homeID>todo</homeID> <mapref location="map.jhm...
denniskniep/zap-extensions
addOns/todo/src/main/javahelp/help_da_DK/helpset_da_DK.hs
apache-2.0
955
77
67
155
408
207
201
-1
-1
{-# LANGUAGE MultiParamTypeClasses, FlexibleContexts #-} module Opaleye.SQLite.Internal.Binary where import Opaleye.SQLite.Internal.Column (Column(Column)) import qualified Opaleye.SQLite.Internal.Tag as T import qualified Opaleye.SQLite.Internal.PackMap as PM import qualified Opaleye.SQLite.Internal.Haske...
bergmark/haskell-opaleye
opaleye-sqlite/src/Opaleye/SQLite/Internal/Binary.hs
bsd-3-clause
2,088
0
13
458
598
341
257
38
1
{-# OPTIONS -cpp #-} {-# LANGUAGE LambdaCase #-} module Main where import Control.Concurrent (forkIO, threadDelay) import Control.Concurrent.MVar (putMVar, takeMVar, newEmptyMVar) import Control.Monad import Control.Exception import Data.Maybe (isNothing) import System.Environment (getArgs) import System.Exit import S...
sdiehl/ghc
testsuite/timeout/timeout.hs
bsd-3-clause
6,100
1
19
2,164
873
433
440
-1
-1
import System.IO (hFlush, stdout) import System.Environment (getArgs) import Control.Monad (mapM) import Control.Monad.Except (runExceptT) import Control.Monad.Trans (liftIO) import qualified Data.Map as Map import qualified Data.Traversable as DT import Readline (readline, load_history) import Types import Reader (re...
0gajun/mal
haskell/step7_quote.hs
mpl-2.0
6,464
0
21
2,140
2,468
1,218
1,250
158
13
{-# LANGUAGE NoImplicitPrelude #-} module Stack.Options.HaddockParser where import Options.Applicative import Options.Applicative.Args import Stack.Options.Utils import Stack.Prelude import Stack.Types.Config -- | Parser for haddock arguments. haddockOptsParser :: Boo...
MichielDerhaeg/stack
src/Stack/Options/HaddockParser.hs
bsd-3-clause
771
0
15
301
120
65
55
17
1
module ShouldFail where import ImpExp_Exp single :: [a] -> Maybe a single (Single x) = Just x single _ = Nothing
siddhanathan/ghc
testsuite/tests/patsyn/should_compile/ImpExp_Imp.hs
bsd-3-clause
115
0
7
23
47
25
22
5
1
{-# LANGUAGE QuasiQuotes #-} module Main where main :: IO () main = p undefined where p = \parse -> case () of [parse||] -> return () _ -> return ()
urbanslug/ghc
testsuite/tests/quasiquotation/qq004/qq004.hs
bsd-3-clause
196
0
12
78
67
37
30
7
2
{-# htermination (zipWith :: (b -> c -> a) -> (List b) -> (List c) -> (List a)) #-} import qualified Prelude data MyBool = MyTrue | MyFalse data List a = Cons a (List a) | Nil zipWith :: (a -> b -> c) -> (List a) -> (List b) -> (List c); zipWith z (Cons a as) (Cons b bs) = Cons (z a b) (zipWith ...
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/zipWith_1.hs
mit
355
0
9
102
149
80
69
6
1
{-# LANGUAGE FlexibleInstances #-} module Language.Lambda.Util.PrettyPrint where import qualified Data.List as L class PrettyPrint a where prettyPrint :: a -> String instance PrettyPrint String where prettyPrint = id newtype PDoc s = PDoc [s] deriving (Eq, Show) instance PrettyPrint s => PrettyPrint (PDoc ...
sgillespie/lambda-calculus
src/Language/Lambda/Util/PrettyPrint.hs
mit
1,190
0
10
252
520
271
249
36
1
module Examples where import Text.Blaze.Html5 hiding (nav,map,progress) import Text.Blaze.Html5.Attributes hiding (content) import Text.Blaze.Html.Renderer.Pretty import Data.Monoid import Utils import Components import Grid import Templates import Models import CDN ...
lnunno/blaze-bootstrap3
Bootstrap3/Examples.hs
mit
7,393
0
17
2,210
1,810
957
853
92
2
module Proteome.Data.PersistBuffers where import Data.Aeson (FromJSON, ToJSON (toEncoding), defaultOptions, genericToEncoding) import Path (Abs, File, Path) data PersistBuffers = PersistBuffers { current :: Maybe (Path Abs File), buffers :: [Path Abs File] } deriving stock (Eq, Generic, Show) deriving...
tek/proteome
packages/proteome/lib/Proteome/Data/PersistBuffers.hs
mit
427
0
11
69
126
73
53
-1
-1
module ProjectEuler.Problem120 ( problem , f ) where import ProjectEuler.Types problem :: Problem problem = pureProblem 120 Solved result {- Idea: let B(n,k) denote "n choose k" (a.k.a binomial coefficient) (a + 1)^n = sum{ B(n,i)*a^(n-i)*1^i, i = 0 to n } (a - 1)^n = sum{ B(n,i)*a^(n-i)*(-1)^i, i = ...
Javran/Project-Euler
src/ProjectEuler/Problem120.hs
mit
1,542
0
11
428
187
103
84
16
2
#!/usr/bin/env stack -- stack --resolver lts-10.0 --install-ghc runghc --package turtle -- for randomly picking up a language to use module Main where import System.Random languages :: [String] languages = words "Python3 C# JavaScript Ruby Scala Kotlin" langCount :: Int langCount = length languages main :: IO () ...
Javran/leetcode
WhatLang.hs
mit
427
0
12
84
105
57
48
11
1
list = [(x,y) | x <- [1,2,3], y <- [4,5,6]] list' = do x <- [1,2,3] y <- [4,5,6] return (x,y) list'' = [1,2,3] >>= (\x -> [4,5,6] >>= (\y -> return (x,y)))
raventid/coursera_learning
haskell/stepik/5.4list_as_monad_lecture.hs
mit
166
0
12
43
154
90
64
7
1
paren '(' = 1 paren ')' = -1 (.&&.) f g a = (f a) && (g a) isBalanced = (((==0) . last) .&&. all (>=0)) . scanl1 (+) . map paren main = do content <- getContents print $ length $ filter isBalanced $ lines content
MAPSuio/spring-challenge16
balanced_parens/larstvei.hs
mit
220
0
11
54
128
66
62
7
1
eachLine f = unlines . map f . lines main :: IO () main = do input <- getLine let times = read input :: Int interact (eachLine $ solver "" []) -- Op stack, symbol stack, exprression -> ans solver :: String -> [String] -> String -> String solver (o:op) (x:(y:symbol)) [] = solver op ((y ++ x ++ [o]) : symbol) ...
pollow/OJSol
SPOJ/onp.hs
mit
2,139
0
16
606
1,164
606
558
70
6
{-# LANGUAGE OverloadedStrings #-} module PrepareDatabase where {- Parses related part of UnicodeData.txt, and prepare a representation for efficient querying. -} import Control.Monad import Data.Bifunctor import Data.Char import Data.Function import Data.List import qualified Data.Map.Strict as M import qualif...
Javran/misc
unicode-data/src/PrepareDatabase.hs
mit
3,524
0
20
1,093
1,413
760
653
78
15
{-# LANGUAGE DeriveGeneric #-} module D20.Internal.Character.Feat where import GHC.Generics import D20.Internal.Character.Skill import D20.Internal.Character.Ability import D20.Internal.Character.FeatEffect import qualified Data.Map as M -- TODO: this is ok until we start to need custom prerequisites. data FeatPre...
elkorn/d20
src/D20/Internal/Character/Feat.hs
mit
1,581
0
9
312
277
160
117
-1
-1
{-# OPTIONS_GHC -O0 #-} module Handler.Admin.Group where import Import import Handler.Admin.Modlog (addModlogEntry) import qualified Data.Text as T (intercalate) ------------------------------------------------------------------------------------------------------------- groupsForm :: Html -> MFor...
ahushh/Monaba
monaba/src/Handler/Admin/Group.hs
mit
5,090
0
27
1,194
1,356
698
658
-1
-1
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module DemoContractAST where import Data.Time import Data.List (transpose) import Data.Monoid (Monoid (..)) import System.Locale import Text.XML.HaXml.Types import Text.XML.HaXml.XmlContent.Parser import Common (DiffDateTime, adjustDateTime, DateTime, FeeCalc) import Calen...
netrium/Netrium
examples/DemoContractAST.hs
mit
11,807
0
18
2,969
2,861
1,532
1,329
239
3
module Rebase.Data.Profunctor.Sieve ( module Data.Profunctor.Sieve ) where import Data.Profunctor.Sieve
nikita-volkov/rebase
library/Rebase/Data/Profunctor/Sieve.hs
mit
107
0
5
12
23
16
7
4
0
import Math.NumberTheory.Primes.Sieve (primes) import Math.NumberTheory.Primes.Testing (isPrime) import Data.Time.Clock -- Returns the number of decimal digits of a number nbrDigits :: Integral a => a -> Int nbrDigits = (+1) . floor . logBase 10 . fromIntegral -- Returns the number obtained by concating two numbers ...
dpieroux/euler
0/0060b.hs
mit
3,201
23
16
779
914
526
388
58
2
{ module Parser ( parseExpr, parseTokens, ) where import Lexer import Syntax }
JohnKossa/Contractual-C
Parser.hs
mit
83
2
4
17
23
15
8
-1
-1
module AoC.Day11 ( search, shortinput, fullinput, fullinput2 ) where -- import Debug.Trace import Control.Monad import qualified Data.List as L import Data.Vector (Vector, (!), concat) import Data.Hashable import Data.HashSet (HashSet) import qualified Data.HashSet as H import qualified Data.Vector as V impo...
rzeigler/advent-of-code-2016
Lib/AoC/Day11.hs
mit
3,931
0
16
1,000
1,570
855
715
87
3
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} module AutoFilterTests ( tests ) where import Test.SmallCheck.Series import Test.Tasty (testGroup, TestTree) import Test.Tasty.SmallCheck (testProperty) import Codec.Xlsx import Codec.Xlsx.Parser.Internal import Codec.Xlsx.Writer.Internal i...
qrilka/xlsx
test/AutoFilterTests.hs
mit
628
0
15
95
138
83
55
18
1
-- hmonads.hs import qualified Control.Monad import System.Environment (getArgs) main :: IO () -- main = getLine >>= putStrLn -- main = putStrLn =<< getLine -- main = putStrLn Control.Monad.>=> putStrLn main = putStrLn "Hello" >> putStrLn "How are you"
gitrookie/functionalcode
code/Haskell/snippets/hmonads.hs
mit
263
0
6
49
46
26
20
4
1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedLists #-} --{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Irg.Lab2.Geometry.Matrix where import qualified Irg.Lab2.Geometry.Vector as V import qualified Data.Vector as V2 type Number = Float type Vector = V.Vector N...
DominikDitoIvosevic/Uni
IRG/src/Irg/Lab2/Geometry/Matrix.hs
mit
2,306
0
15
470
1,101
577
524
54
2
module NLP.OPUS.Raw (parseRaw) where import NLP.OPUS.Util (mkCorpus) import NLP.OPUS.Types import Data.Text (Text, pack) import Data.List (transpose) import Text.XML.HXT.Expat import Text.XML.HXT.Core -- | Raw OPUS format parser -- Input is a list of pairs: language name - raw file path. parseRaw :: [(Lang, FilePa...
akru/nlp-opus
src/NLP/OPUS/Raw.hs
mit
963
0
16
247
292
155
137
24
1
module Gui where import Data.Map import Graphics.UI.SDL import Graphics.UI.SDL.TTF.Render import Attacker import Bunker import Dataset import Utils -- Display the main screen elements displayMainScreen appData = do -- Display the background applySurface 0 0 (getBackgroundImg appData) (getScreen appData) ...
joeyinbox/space-invaders-haskell
src/Gui.hs
gpl-2.0
11,551
0
20
2,494
3,778
1,882
1,896
125
26
{-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE RecordWildCards #-} ------------------------------------------------------------------------------- -- Module : Domain.Concrete.State -- Copyright : (c) 2015-17 Marcelo Sousa -- -- The domai...
marcelosousa/poet
src/Domain/Powerset/State.hs
gpl-2.0
11,344
0
18
2,732
3,779
1,945
1,834
268
10
{- Copyright 2012 liquid_amber This file is part of PicasaDB. PicasaDB 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. PicasaDB is distrib...
liquidamber/PicasaDB
pmpDB.hs
gpl-3.0
1,041
0
9
166
117
69
48
-1
-1
module Config where import Data.Configurator(load,require,Worth(Required)) import Data.Configurator.Types as C import Data.Text(unpack,pack) import Data.Maybe(fromJust,fromMaybe) import Network.URI import Transforms import Types as T configure::FilePath -> IO T.Config configure path = do cfg <...
bcorrigan/PipeFeed
src/Config.hs
gpl-3.0
2,202
0
20
1,023
551
284
267
34
3
{-# LANGUAGE CPP #-} -- | -- Module : Packages -- Copyright : (C) 2017-2019 Jens Petersen -- -- Maintainer : Jens Petersen <petersen@fedoraproject.org> -- Stability : alpha -- -- Explanation: Cloning and pulling package git repos -- This program is free software: you can redistribute it and/or modify -...
fedora-haskell/fedora-haskell-tools
fhpkg.hs
gpl-3.0
28,759
1
28
7,224
8,384
4,185
4,199
-1
-1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances...
berdario/hitmessage
hitmessage.hs
agpl-3.0
3,295
0
12
1,099
716
367
349
84
1
{- Bustle.Loader: loads logs using one of the two sub-loaders Copyright © 2011–2012 Collabora Ltd. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at you...
wjt/bustle
Bustle/Loader.hs
lgpl-2.1
2,181
0
15
483
350
187
163
31
4
{-# LANGUAGE FlexibleContexts , FlexibleInstances , FunctionalDependencies , MultiParamTypeClasses , QuasiQuotes , TemplateHaskell #-} module Avro.Records ( FieldDesc ( FieldDesc , fieldName , fieldDoc , fieldDefaultValue , fieldO...
cumber/havro
src/Avro/Records.hs
lgpl-3.0
2,279
0
9
659
626
370
256
91
1
import Control.Monad a = do x <- [1..50] guard $ '7' `elem` show x return x
Crazycolorz5/Haskell-Code
Comprehensions.hs
unlicense
78
0
8
18
45
22
23
5
1
module TreapTest where import qualified Treap as T import Test.Hspec import Test.QuickCheck import System.Random main :: IO () main = hspec $ describe "empty" $ it "is a valid Treap" $ verbose $ property $ \seed -> T.checkTreap (T.newStdGenTreap seed)
songpp/my-haskell-playground
tests/TreapTest.hs
apache-2.0
279
0
10
67
84
46
38
10
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Openshift.V1.PodTemplateSpec where import GHC.Generics import Kubernetes.V1.ObjectMeta import Openshift.V1.PodSpec import qualified Data.Aeson ...
minhdoboi/deprecated-openshift-haskell-api
openshift/lib/Openshift/V1/PodTemplateSpec.hs
apache-2.0
887
0
9
111
100
61
39
16
0
-- Copyright (c) 2010 - Seweryn Dynerowicz -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agree...
sdynerow/SemiringsLibrary
Policy/UsablePath.hs
apache-2.0
1,010
0
8
201
219
120
99
17
0
module BrownPLT.TypedJS.Unification ( unify , unifyList , subst ) where import BrownPLT.TypedJS.Prelude import BrownPLT.TypedJS.PrettyPrint (renderType) import BrownPLT.TypedJS.Infrastructure import BrownPLT.TypedJS.TypeDefinitions import qualified Data.Map as M doesOccurIn :: String -> Type ...
brownplt/strobe-old
src/BrownPLT/TypedJS/Unification.hs
bsd-2-clause
5,287
0
16
1,651
2,120
1,029
1,091
145
16
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ViewPatterns #-} -- | Tag a Store instance with structural version info to ensure we're -- reading ...
martin-kolinek/stack
src/Data/Store/VersionTagged.hs
bsd-3-clause
4,305
0
20
1,196
1,052
544
508
93
2
module WithTiming.Programs (basic, allowAnyExitCode) where import qualified Data.Text as T import System.Exit (ExitCode (..)) import WithTiming.Prediction (showDiff) import WithTiming.Program successful :: ExitCode -> Bool successful ExitSuccess = True successful _ ...
holguinj/with-timing
src/WithTiming/Programs.hs
bsd-3-clause
1,468
0
14
327
371
179
192
34
2
{-# LANGUAGE PackageImports #-} module Control.Applicative (module M) where import "base" Control.Applicative as M
silkapp/base-noprelude
src/Control/Applicative.hs
bsd-3-clause
120
0
4
18
21
15
6
3
0
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANG...
hy-zhang/parser
experimental/Arith1.hs
bsd-3-clause
3,238
0
12
849
1,102
578
524
74
1
{-# LANGUAGE OverloadedStrings #-} module Mime where import Type jsonMime :: Mime jsonMime = "application/json" {-# INLINE jsonMime #-} cssMime :: Mime cssMime = "text/css" {-# INLINE cssMime #-} jsMime :: Mime jsMime = "application/javascript" {-# INLINE jsMime #-}
g0v/encoding-mashup-server
src/Mime.hs
bsd-3-clause
271
0
4
43
41
27
14
12
1
{-# LANGUAGE DeriveDataTypeable, DeriveFunctor, FlexibleInstances, GADTs, OverloadedStrings, RankNTypes, RecordWildCards #-} -- | -- Module : Network.Wreq.Internal.Types -- Copyright : (c) 2014 Bryan O'Sullivan -- -- License : BSD-style -- Maintainer : bos@serpentine.com -- Stability : experimental -...
bitemyapp/wreq
Network/Wreq/Internal/Types.hs
bsd-3-clause
10,487
1
14
2,406
1,388
864
524
125
4
{-# LANGUAGE OverloadedStrings #-} module Data.Patron where import Snap import Database.SQLite.Simple import qualified Data.Text as T import Data.Aeson import Data.Int ------------------------------------------------------------------------------ import Db.Utils -- ...
kylcarte/qclib
src/Data/Patron.hs
bsd-3-clause
2,142
0
11
477
505
276
229
51
1
{-# LANGUAGE DeriveGeneric, GeneralizedNewtypeDeriving #-} -- | Creation of items on the server. Types and operations that don't involve -- server state nor our custom monads. module Game.LambdaHack.Server.ItemRev ( ItemKnown(..), NewItem(..), ItemRev, UniqueSet , newItemKind, newItem -- * Item discovery types ...
LambdaHack/LambdaHack
engine-src/Game/LambdaHack/Server/ItemRev.hs
bsd-3-clause
11,370
0
24
2,795
2,526
1,327
1,199
-1
-1
{-# LANGUAGE PatternGuards #-} module Spec.StripExtensions ( stripWSIExtensions ) where import Spec.Spec import Spec.Command import Spec.Type import Write.TypeConverter(cTypeDependencyNames) import Write.Utils import Data.Maybe(catMaybes) -- | 'stripWSIExtensions' removes everything that depends upon any window...
oldmanmike/vulkan
generate/src/Spec/StripExtensions.hs
bsd-3-clause
3,419
0
13
986
703
370
333
66
1
module Main where import Control.Applicative import Control.Monad import Control.Monad.Cont -- import Control.Arrow( (***) ) import Control.Lens -- import Data.Maybe( fromJust ) import System.Environment( getArgs ) import System.Exit( exitSuccess ) import System.Random( newStdGen, {- split, -} randoms ) import Text.P...
ownclo/alohas
app/Main.hs
bsd-3-clause
3,084
0
23
1,014
497
272
225
46
1
module Day07 where import Control.Monad.State.Lazy import Data.Bits import Data.Map.Strict ((!)) import Data.Word import qualified Data.Map.Strict as Map import Text.Parsec hiding (State) import Text.Parsec.String type Instruction = (Ident, Expr) data Expr = Atom Atom | And Atom Atom | Or Atom Atom | LShift ...
patrickherrmann/advent
src/Day07.hs
bsd-3-clause
2,460
0
12
614
921
478
443
-1
-1
{-# LANGUAGE CPP, GeneralizedNewtypeDeriving, NoImplicitPrelude, PackageImports, FlexibleContexts, StandaloneDeriving, UndecidableInstances #-} {-# OPTIONS -Wall #-} module Language.Paraiso.Tuning.Genetic ( Genome, Species(..), makeSpecies, readGenome, overwriteGenome, mutate, cross, triangulate, ge...
nushio3/Paraiso
Language/Paraiso/Tuning/Genetic.hs
bsd-3-clause
10,733
0
20
3,174
3,464
1,775
1,689
248
7
-- | -- Module : Network.Machine.Protocol.NNTP -- Copyright : Lodvær 2015 -- License : BSD3 -- -- Maintainer : Lodvær <lodvaer@gmail.com> -- Stability : provisional -- Portability : unknown -- -- NNTP machines. module Network.Machine.Protocol.NNTP where -- TODO
lodvaer/machines-network
src/Network/Machine/Protocol/NNTP.hs
bsd-3-clause
285
0
3
59
19
17
2
1
0
module GW.API.Recipe where import ClassyPrelude import GW.API.DbService import Data.Aeson data Ingredient = Ingredient { ingredientItemId :: Int , ingredientCount :: Int } deriving (Show) instance FromJSON Ingredient where parseJSON (Object v) = Ingredient <$> (v .: "item_id") <*> (v .: "co...
andgate/gwtrader
src/GW/API/Recipe.hs
bsd-3-clause
1,062
0
16
264
312
180
132
41
0
{-# LANGUAGE GeneralizedNewtypeDeriving #-} -- | This module provides the Jat monad providing access to the current -- 'Program' and counters. module Jat.JatM ( JatM (..) , Jat , initJat , evalJat , getProgram , freshVarIdx , nextVarIdx , freshKey , module Control.Monad ) where import Jinja.Pr...
ComputationWithBoundedResources/jat
src/Jat/JatM.hs
bsd-3-clause
1,746
0
10
387
453
251
202
47
1
{-# LANGUAGE OverloadedStrings #-} module Data.Text.Wrap where import Data.Text (Text) import qualified Data.Text as T import Data.Text.ICU.Types -- | A type representing the possible errors produced by -- | running one of the wrapping functions with invalid inputs data WrapError = InvalidWidth | PlaceholderTooLarge ...
Hrothen/textwrap
src/Data/Text/Wrap.hs
bsd-3-clause
3,514
0
9
1,194
457
281
176
49
1
{-# LANGUAGE OverloadedStrings #-} module Web.Orion.Config where import Data.Configurator import Data.Configurator.Types import Data.List import Control.Monad import System.Environment import System.Directory import System.IO defaultCfgFileName :: String defaultCfgFileName = "orion.cfg" defaultCfgFileContents :: S...
schell/orion
src/Web/Orion/Config.hs
bsd-3-clause
1,727
0
14
385
402
203
199
42
2
module Data.Text.Benchmarks.Micro.DecodeUtf8 ( benchmark ) where import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as BL import qualified Data.Text as T import qualified Data.Text.IO as T import qualified Data.Text.Encoding as T import qualified Data.Text.Lazy as TL import qualified D...
JensTimmerman/text-benchmarks
src/Data/Text/Benchmarks/Micro/DecodeUtf8.hs
bsd-3-clause
2,804
0
15
827
1,060
531
529
76
1
{-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE LambdaCase #-} --{-# LANGUAGE ViewPatterns #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} --{-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} {-#...
divipp/lensref
src/LensRef.hs
bsd-3-clause
22,143
0
21
5,352
7,295
3,715
3,580
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} -- | This module defines a uniform interface for interacting with -- compressed archives (zip files and tarballs). The interface is -- small: -- -- 1) Read an archive using either the 'readArchive' helper (which -- reads a file off of disk) or 'decodeArchive' (which works on --...
travitch/archive-inspection
src/Codec/Archive.hs
bsd-3-clause
5,206
0
14
1,139
1,181
628
553
102
10
module Test.Spec.TxMetaScenarios ( txMetaScenarioA , txMetaScenarioB , txMetaScenarioC , txMetaScenarioD , txMetaScenarioE , txMetaScenarioF , txMetaScenarioG , txMetaScenarioH , txMetaScenarioI , txMetaScenarioJ , bracketActiveWalletTxMeta , TxScenarioRet ) where ...
input-output-hk/pos-haskell-prototype
wallet/test/unit/Test/Spec/TxMetaScenarios.hs
mit
17,887
0
19
5,284
4,367
2,392
1,975
-1
-1
-- | -- Module : Network.OAuth.Util -- Copyright : (c) Joseph Abrahamson 2013 -- License : MIT -- -- Maintainer : me@jspha.com -- Stability : experimental -- Portability : non-portable -- module Network.OAuth.Util where import qualified Data.ByteString as S import Network.HTTP.Types (urlEnc...
ibotty/oauthenticated
src/Network/OAuth/Util.hs
mit
395
0
6
81
56
38
18
5
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveFunctor #-} module Data.Prop where import Control.Arrow ((&&&)) import Control.Monad (void) import Data.Tuple.HT import Numeric.Natural import qualified Numeric.Natural.Prelude as N import Numeric.Natural.QuickCheck () import Data.Typeable (Typeable) import Data.M...
solorab/proof-haskell
Data/Prop.hs
mit
7,049
0
14
1,716
2,157
1,160
997
123
2
{-# LANGUAGE CPP #-} {- | Module : $Header$ Description : utility functions that can't be found in the libraries Copyright : (c) Klaus Luettich, Uni Bremen 2002-2006 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : provisional Portability : portable Uti...
mariefarrell/Hets
Common/Utils.hs
gpl-2.0
16,000
0
20
4,271
4,396
2,308
2,088
286
6
{-# LANGUAGE GADTs #-} module HN.Optimizer.Utils where import Compiler.Hoopl import qualified Data.Map as M import Data.Maybe import HN.Optimizer.ClassyLattice import HN.Optimizer.Node rewriteExitF :: (DefinitionNode -> f -> Maybe DefinitionNode) -> Node e x -> f -> Maybe (Graph Node e x) rewriteExitF _ (Entry _) _ ...
kayuri/HNC
HN/Optimizer/Utils.hs
lgpl-3.0
2,596
1
13
496
1,193
596
597
46
3
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TupleSections #-} module HERMIT.Dictionary.Remembered ( -- * Remembering definitions. externals , prefixRemembered , rememberR , unfoldRememberedR ...
ku-fpg/hermit
src/HERMIT/Dictionary/Remembered.hs
bsd-2-clause
4,025
0
15
855
839
452
387
61
1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} -- | SHA256 digest module Distribution.Server.Features.Security.SHA256 ( SHA256Digest , sha256 , sha256DigestBytes ) where -- stdlibs import Control.Applicative import Control.DeepSeq import Control.Monad import quali...
agrafix/hackage-server
Distribution/Server/Features/Security/SHA256.hs
bsd-3-clause
4,193
0
14
1,192
719
400
319
69
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE ViewPatterns #-} module Domain.Tenant where import Domain.Base import Opaleye import Data.Text hiding (head) import Control.Monad.IO.Class (liftIO) import Control.Lens import qualified Database.PostgreSQL.Simple as PGS impo...
meditans/haskell-webapps
ServantOpaleye/Domain/Tenant.hs
mit
2,439
0
12
455
412
240
172
38
2
module Shift.Meta ( Meta (..) , vector , meta ) where -- -- $Id$ import Util.Size import ToDoc import Shift.Type import Shift.Verify import Shift.Computer (find, ffind, zustands_folge, next0) import Reporter vector :: Meta -> Int -> Pins vector me k = do (x, d) <- zip (start me) (diff me) return $ x + ...
Erdwolf/autotool-bonn
src/Shift/Meta.hs
gpl-2.0
1,562
14
19
462
555
283
272
48
2
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE CPP #-} module Utils ( globalAdmin , globalHost , globalHttpPort , shell , withGlobalConn , ShellFailure(..) ) where #if __GLASGOW_HASKELL__ < 710 import Control.Applicative #endif imp...
k-bx/riak-haskell-client
tests/Utils.hs
apache-2.0
2,086
0
15
425
500
281
219
-1
-1
-- | Internal types to the library. module Stack.Types.Internal where import Control.Concurrent.MVar import Control.Monad.Logger (LogLevel) import Data.Text (Text) import Network.HTTP.Client.Conduit (Manager,HasHttpManager(..)) import Stack.Types.Config -- | Monadic environment. data Env config = Env {envConfig ::...
duplode/stack
src/Stack/Types/Internal.hs
bsd-3-clause
1,692
0
11
307
471
255
216
57
0
#!/usr/bin/env runhaskell import Data.List import System main = do args <- getArgs case args of ["gather", rtsStat, combinatorrentStat, timeStat] -> gatherStats rtsStat combinatorrentStat timeStat ["present", database] -> presentStats database gatherStats rtsStat combinatorrentS...
beni55/combinatorrent
tools/postproc.hs
bsd-2-clause
1,903
1
13
563
606
306
300
43
2
module Text.Parsec.String.Expr (buildExpressionParser ,Operator(..) ,OperatorTable ,E.Assoc(..) )where {- Wrappers for the Text.Parsec.Expr module with simplified types. -} import Text.Parsec...
EliuX/AdHocParser
src/Text/Parsec/String/Expr.hs
bsd-3-clause
867
0
11
288
250
139
111
15
3