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
-- | Includes functions providing command line I/O module Lycopene.Option ( lycoParser , execParserWithArgs , module Lycopene.Option.Command , module Lycopene.Option.Common ) where import Options.Applicative import Lycopene.Option.Common import Lycopene.Opti...
utky/lycopene
backup/Option.hs
apache-2.0
1,835
0
17
375
364
199
165
38
1
-- Copyright 2014 (c) Diego Souza <dsouza@c0d3.xxx> -- -- 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 applicabl...
locaweb/leela
src/warpdrive/src/warpdrive.hs
apache-2.0
7,446
0
22
2,034
2,035
1,051
984
136
2
-- Copyright 2017 Ondrej Sykora -- -- 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 agreed to in ...
ondrasej/heavenly-bodies
src/HBodies/Inputs.hs
apache-2.0
1,956
0
11
473
236
148
88
45
1
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QGraphicsRectItem.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:35 Warning : this file is machine generated ...
keera-studios/hsQt
Qtc/Enums/Gui/QGraphicsRectItem.hs
bsd-2-clause
2,439
0
18
511
578
292
286
49
1
module Main where import Gidl (run) main :: IO () main = run
GaloisInc/gidl
executables/Main.hs
bsd-3-clause
63
0
6
15
27
16
11
4
1
{-# LANGUAGE TypeOperators #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} module Ivory.BSP.STM32.Driver.UART.DMA ( dmaUARTTower , dmaUARTTower' ) where import Ivory.Language import Ivory.Stdlib import Ivory.Tower import Ivory.Tower.H...
GaloisInc/ivory-tower-stm32
ivory-bsp-stm32/src/Ivory/BSP/STM32/Driver/UART/DMA.hs
bsd-3-clause
15,046
0
26
4,109
3,955
1,892
2,063
294
1
{-# LANGUAGE OverloadedStrings #-} module Data.User where import Snap import Snap.Snaplet.Auth import Data.Aeson import Data.Int ------------------------------------------------------------------------------ import Db.Utils -- | A User of the Library GUI data User = ...
kylcarte/qclib
src/Data/User.hs
bsd-3-clause
795
0
11
230
190
105
85
24
1
module Sprite.Class where import Graphics.Rendering.OpenGL class Sprite a where pos :: a -> Vector3 Float draw :: a -> IO () update :: a -> a onScreen, offScreen :: a -> Bool onScreen s = (abs x) <= 1 && (abs y) <= 1 where Vector3 x y z = pos s offScreen = not . onScreen updateSprites :: Sprite a =>...
flazz/tooHS
src/Sprite/Class.hs
bsd-3-clause
381
0
11
92
163
85
78
12
1
module Katas.AlphabetCipherSpec ( spec ) where import Data.Maybe (fromJust) import Katas.AlphabetCipher (Headers (..), Table (..), TableDirection (..), decode, encode, findIn, makeSquareTable, makeTable, ...
jdwolk/wonderland-haskell-katas
test/Katas/AlphabetCipherSpec.hs
bsd-3-clause
1,751
0
21
695
506
274
232
42
1
{-# LANGUAGE CPP #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeFamilies #-} #if HAS_POLYKIND_TYPEABLE {-# LANGUAGE StandaloneDeriving #-} #endif module B.File ( FileMissing(..) , fileRule , oneFileRule , filterFileRule , bu...
strager/b
B/File.hs
bsd-3-clause
4,865
0
15
921
1,345
739
606
136
2
module Network.AWS.S3Log ( emptyLog , fetchLog , S3Log (..) , Quoted (..) , Requester (..) ) where import Network.AWS.S3Log.Data import Network.AWS.S3Log.Parallel
matthewSorensen/s3-tools
Network/AWS/S3Log.hs
bsd-3-clause
188
0
5
46
50
35
15
8
0
-- -- CNN : CNN filter generator -- {-# LANGUAGE BangPatterns #-} module Main ( main ) where import Control.DeepSeq import Control.Monad --import Data.List import Data.Time import Data.List (foldl') import Debug.Trace import Numeric.LinearAlgebra import System.Environment import System.IO import Text.Printf import...
eijian/deeplearning
src/Main-train.hs
bsd-3-clause
3,871
0
22
967
1,308
660
648
93
3
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} module Main where import Control.Monad.Trans.Either import Data.Aeson import Da...
asg0451/google-geoloc-servant
src/Main.hs
bsd-3-clause
1,903
0
12
830
353
196
157
40
2
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE ConstraintKinds #-} module Rogue.State where import Rogue.Level (positionValid) import Rogue.Types import Control.Lens hiding (Level) import Control.Lens.TH (declareLenses,declareCla...
elliottt/rogue
src/Rogue/State.hs
bsd-3-clause
1,948
0
10
367
471
250
221
35
2
{-| Module : IRTS.Simplified Description : Simplified expressions, where functions/constructors can only be applied to variables. Copyright : License : BSD3 Maintainer : The Idris Community. -} {-# LANGUAGE FlexibleContexts #-} module IRTS.Simplified(simplifyDefs, SDecl(..), SExp(..), SAlt(..)) where impor...
uuhan/Idris-dev
src/IRTS/Simplified.hs
bsd-3-clause
9,360
0
18
3,668
3,339
1,639
1,700
189
29
{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE CPP #-} -- {-# OPTIONS_GHC -fno-warn-orphans #-} -- {-# LANGUAGE OverloadedStrings #-} -- | -- Copyright : (c) Andreas Reuleaux 2015 -- License : BSD2 -- Maintainer: And...
reuleaux/pire
src/Pire/Syntax/Constructor.hs
bsd-3-clause
2,996
0
12
608
470
259
211
35
0
module Main where import Go.Move import Go.Board import SGF.Parser import System.Environment import Diagrams.Prelude hiding (Color, Empty) import Diagrams.Backend.SVG (renderSVG, SVG) import Data.Array ((!)) import qualified Data.Array as Array stone :: Color -> Diagram SVG stone Empty = strutX 1 stone Black = circ...
kebertx/GoFu
app/DrawGo.hs
bsd-3-clause
2,720
0
14
868
921
475
446
72
1
{-# LANGUAGE OverloadedStrings #-} module Web.EmbedThis.DataParser.Twitter ( TwitterDataParser(..) ) where import Control.Applicative import Data.Aeson import Data.Aeson.Types (parseMaybe) import Data.HashMap.Lazy import Data.Maybe import Data.Monoid import Data.Text as T import Data.Text (Text) import Network.UR...
rtrvrtg/embed-this
src/Web/EmbedThis/DataParser/Twitter.hs
bsd-3-clause
1,980
0
16
503
623
322
301
44
0
{-# LANGUAGE TupleSections, GADTs, ScopedTypeVariables, CPP #-} module NFA where #if __GLASGOW_HASKELL__ < 710 import Control.Applicative ( liftA2, (<$>) ) #else import Control.Applicative ( liftA2 ) #endif import Control.Arrow ( (***), (&&&), first ) import Control.DeepSeq ( NFData(..) ) import Control.Monad ( liftM ...
owst/Penrose
src/NFA.hs
bsd-3-clause
49,787
0
21
15,305
12,581
6,624
5,957
722
19
module Sexy.Classes.EitherC (EitherC(..)) where class EitherC e where left :: a -> e a b right :: b -> e a b either :: (a -> c) -> (b -> c) -> e a b -> c fromLeft :: a -> e a b -> a fromRight :: b -> e a b -> b
DanBurton/sexy
src/Sexy/Classes/EitherC.hs
bsd-3-clause
222
0
10
66
125
66
59
7
0
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE OverloadedStrings #-} -- | Reading from external processes. module System.P...
joozek78/stack
src/System/Process/Read.hs
bsd-3-clause
13,155
0
29
4,060
3,103
1,636
1,467
282
5
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE OverloadedStrings #-} module Heist.Splices.Json ( bindJson ) where ------------------------------------------------------------------------------ import Control.Monad.Reader import Data.Aeson import qualified Data.ByteString.Char8 as S import...
silkapp/heist
src/Heist/Splices/Json.hs
bsd-3-clause
8,487
0
16
2,744
1,696
897
799
119
6
{-# LANGUAGE TemplateHaskell #-} module Commands.Plugins.Spiros.Emacs.InteractiveCommands where import Commands.Mixins.DNS13OSX9 import Control.Arrow ((&&&)) immutableVocabulary :: [String] -> DNSEarleyRHS String immutableVocabulary = vocab . fmap (id &&& id) interactive :: DNSEarleyRHS String interac...
sboosali/commands-spiros
config/Commands/Plugins/Spiros/Emacs/InteractiveCommands.hs
gpl-2.0
109,782
0
8
22,821
90
54
36
10
1
-- NOTE: if this is NOT strict, then memory builds up {-# LANGUAGE Strict #-} module SugarScape.Core.Environment ( SugEnvBehaviour , sugEnvBehaviour ) where --import Control.Parallel.Strategies import Data.Foldable import SugarScape.Core.Common import SugarScape.Core.Discrete import SugarScape.Cor...
thalerjonathan/phd
thesis/code/sugarscape/src/SugarScape/Core/Environment.hs
gpl-3.0
4,227
0
18
1,178
891
477
414
79
4
{-# LANGUAGE OverloadedStrings, FlexibleContexts #-} import Control.Monad.Exception import qualified Data.ByteString.Lazy as B import JVM.ClassFile import JVM.Converter import JVM.Assembler import JVM.Builder import JVM.Exceptions import Java.ClassPath import qualified Java.Lang import qualified Java.IO test :: (Th...
ledyba/hs-java
TestGen.hs
lgpl-3.0
2,069
0
12
455
490
236
254
53
1
{-# LANGUAGE OverloadedStrings #-} module Bot.Action.Git ( git , createBranch , fetch , status , nuke , deleteBranches ) where import Bot.Action.Action import Bot.Types import Bot.Util import Control.Applicative import Control.Monad (void) import Control.Monad.Catch import Control.Monad.IO.Class import ...
andregr/bot
lib/Bot/Action/Git.hs
bsd-3-clause
3,428
0
15
854
1,046
539
507
80
8
----------------------------------------------------------------------------- -- | -- Module : Hadrian.Oracles.Cabal.Rules -- Copyright : (c) Andrey Mokhov 2014-2018 -- License : MIT (see the file LICENSE) -- Maintainer : andrey.mokhov@gmail.com -- Stability : experimental -- -- This module defines Shake rules...
sdiehl/ghc
hadrian/src/Hadrian/Oracles/Cabal/Rules.hs
bsd-3-clause
2,777
0
19
559
436
233
203
-1
-1
{-# LANGUAGE Haskell2010 #-} {-# LINE 1 "dist/dist-sandbox-261cd265/build/System/Posix/Terminal/ByteString.hs" #-} {-# LINE 1 "System/Posix/Terminal/ByteString.hsc" #-} {-# LANGUAGE CApiFFI #-} {-# LINE 2 "System/Posix/Terminal/ByteString.hsc" #-} {-# LINE 3 "System/Posix/Terminal/ByteString.hsc" #-} {-# LANGUAGE Safe...
phischu/fragnix
tests/packages/scotty/System.Posix.Terminal.ByteString.hs
bsd-3-clause
4,929
0
13
791
596
355
241
82
1
{-# LANGUAGE KindSignatures, TupleSections, GADTs, GeneralizedNewtypeDeriving, InstanceSigs, OverloadedStrings #-} module Graphics.Storyboard.Act where import Control.Concurrent.STM import Control.Monad import Data.Semigroup import Graphics.Blank hiding (Event) import Graphics.Storyboard.Behavior data Act whe...
tonymorris/story-board
src/Graphics/Storyboard/Act.hs
bsd-3-clause
1,416
0
14
294
491
253
238
29
1
{- ---------------------------------------------------------------------------------- - Copyright (C) 2010-2011 Massachusetts Institute of Technology - Copyright (C) 2010-2011 Yuan Tang <yuantang@csail.mit.edu> - Charles E. Leiserson <cel@mit.edu> - - This program is free software:...
Pochoir/Pochoir
src/PBasicParser.hs
gpl-3.0
34,346
0
28
11,422
7,962
3,934
4,028
624
12
{-# LANGUAGE DeriveGeneric, StandaloneDeriving, BangPatterns, CPP #-} module GenericsBenchCache (readPackageDescriptionCache) where import qualified Text.ParserCombinators.ReadP as Read import qualified Data.ByteString.Lazy as L import qualified Data.ByteString.Lazy.Char8 ...
basvandijk/binary
benchmarks/GenericsBenchCache.hs
bsd-3-clause
3,601
0
17
1,050
883
463
420
71
3
{-# LANGUAGE MultiParamTypeClasses, FlexibleContexts #-} module Opaleye.Binary where import Opaleye.QueryArr (Query) import qualified Opaleye.Internal.QueryArr as Q import qualified Opaleye.Internal.Binary as B import qualified Opaleye.Internal.Tag as T import qualified Opaleye.Internal.PrimQuery as PQ impo...
bergmark/haskell-opaleye
src/Opaleye/Binary.hs
bsd-3-clause
1,680
0
14
381
344
202
142
22
1
yes = do if a then forM x y else sequence z q; return ()
bitemyapp/apply-refact
tests/examples/Monad15.hs
bsd-3-clause
56
0
8
14
36
17
19
1
2
<?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="sl-SI"> <title>Report Generation</title> <maps> <homeID>reports</homeID> <mapref locati...
kingthorin/zap-extensions
addOns/reports/src/main/javahelp/org/zaproxy/addon/reports/resources/help_sl_SI/helpset_sl_SI.hs
apache-2.0
966
77
66
156
407
206
201
-1
-1
module Vectorise.Utils.Hoisting ( Inline(..) , addInlineArity , inlineMe , hoistBinding , hoistExpr , hoistVExpr , hoistPolyVExpr , takeHoisted ) where import Vectorise.Monad import Vectorise.Env import Vectorise.Vect import Vectorise.Utils.Poly import CoreSyn import CoreUtils import CoreUnfold i...
frantisekfarka/ghc-dsi
compiler/vectorise/Vectorise/Utils/Hoisting.hs
bsd-3-clause
2,794
0
15
664
712
382
330
64
2
{-# LANGUAGE PartialTypeSignatures #-} module AddAndOr5 where addAndOr5 :: (_, _) -> (_, _) -> (_, _) addAndOr5 (a, b) (c, d) = (a `plus` d, b || c) where plus :: Int -> Int -> Int x `plus` y = x + y
wxwxwwxxx/ghc
testsuite/tests/partial-sigs/should_compile/AddAndOr5.hs
bsd-3-clause
211
0
8
55
106
63
43
6
1
{-# LANGUAGE TypeFamilies #-} module T8020 where type family F a b where F (Maybe a) [a] = Int F b c = Bool data Proxy a = P type family G foo :: Proxy d -> F d d -> Bool foo _ = not bar :: Bool -> Bool bar = foo (P :: Proxy G)
ghc-android/ghc
testsuite/tests/indexed-types/should_compile/T8020.hs
bsd-3-clause
248
0
8
78
110
61
49
11
1
{-# LANGUAGE TemplateHaskell, UnboxedTuples #-} module TH_unboxedSingleton where f :: () -> (# Int #) f () = $( [| (# 3 #) |] )
urbanslug/ghc
testsuite/tests/th/TH_unboxedSingleton.hs
bsd-3-clause
131
0
6
28
35
21
14
4
1
{-# LANGUAGE FlexibleContexts, OverloadedStrings, ConstraintKinds #-} module Network.Salesforce where import Data.Monoid import Control.Applicative import Control.Monad.Reader import qualified Data.ByteString as BS import qualified Data.ByteString.UTF8 as BSU import Control.Monad.Trans.Control(MonadBaseControl) imp...
mebaran/hs-salesforce
Network/Salesforce.hs
mit
2,986
0
14
658
950
492
458
53
2
{------------------------------------------------------------------------------- A number consisting entirely of ones is called a repunit. We shall define R(k) to be a repunit of length k. For example, R(10) = 1111111111 = 11×41×271×9091, and the sum of these prime factors is 9414. Find the sum of the first forty pr...
dpieroux/euler
0132.hs
mit
2,826
0
16
730
655
374
281
31
2
-------------------------------------------------------------------------------- -- | Cluster fuck of unorganized data types {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE OverloadedStrings #-} module Web.SocketIO.Types.Base where --------...
banacorn/socket.io-haskell
Web/SocketIO/Types/Base.hs
mit
8,671
0
12
1,918
1,257
730
527
117
0
module Adb (Coordinate, makeCmds, screenshot) where import System.Cmd (system) import Codec.Picture (readPng) import Codec.Picture.Types (DynamicImage) adb :: String adb = "C:\\Users\\rce\\AppData\\Local\\Android\\sdk\\platform-tools\\adb.exe" sendevent :: String sendevent = adb ++ " shell sendevent /dev/input/event...
rce/jahti
src/Adb.hs
mit
1,067
0
11
248
317
176
141
28
1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE TemplateHaskell #-} module Unison.TermEdit where import Data.Aeson.TH import GHC.Generics import Unison.Term (Term) import Unison.Type (Type) import Unison.Var (Var) import Unison.Paths (Path) -- import qua...
nightscape/platform
shared/src/Unison/TermEdit.hs
mit
6,281
0
12
1,443
489
338
151
36
3
{-# LANGUAGE BangPatterns, DeriveDataTypeable, DeriveGeneric, FlexibleInstances, MultiParamTypeClasses #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module Com.Mysql.Cj.Mysqlx.Protobuf.DocumentPathItem.Type (Type(..)) where import Prelude ((+), (/), (.)) import qualified Prelude as Prelude' import qualified Data.Ty...
naoto-ogawa/h-xproto-mysql
src/Com/Mysql/Cj/Mysqlx/Protobuf/DocumentPathItem/Type.hs
mit
3,267
0
11
509
821
454
367
71
1
{-# LANGUAGE DuplicateRecordFields #-} module Scheduler where import Types import Data.List (maximumBy, minimumBy) import Data.Ord (comparing) import qualified Data.List.NonEmpty as NE firstFitScheduler :: Scheduler firstFitScheduler _ _ machines = machineId $ NE.head machines genericSingleFieldScheduler :: (Machi...
mohsen3/haskell-tutorials
src/job-scheduling/src/Scheduler.hs
mit
1,442
0
11
217
309
168
141
27
1
{-# LANGUAGE CPP #-} module Data.MotionPlanningProblem ( StateSpace(..) , DistFn , StateSampler , Interpolator , MotionValidity , StateValidity , GoalPredicate , discreteMotionValid , MotionPlanningQuery(..) , goalStateSatisfied , MotionCost ...
giogadi/hs-motion-planning
lib-src/Data/MotionPlanningProblem.hs
mit
3,393
0
14
907
605
344
261
48
1
-- palin.hs -- checks if palindrome main = interact checkPalindrome checkPalindrome :: String -> String checkPalindrome contents = unlines (map (\xs -> if isPalindrome xs then "palindrome" else "not a palindrome") (lines contents)) where isPalindrome xs = xs == reverse xs
doylew/practice
haskell/palin.hs
mit
287
0
11
55
81
42
39
7
2
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.SQLResultSet (js_getRows, getRows, js_getInsertId, getInsertId, js_getRowsAffected, getRowsAffected, SQLResultSet, castToSQLResultSet, gTypeSQLResultSet) where import Prelude ((.), (=...
manyoo/ghcjs-dom
ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/SQLResultSet.hs
mit
2,112
18
10
259
511
310
201
32
1
{-# LANGUAGE FlexibleInstances #-} module Graphics.Buffer ( createSphere , createSquare , createVector , createIndexedPyramid , createPatchPyramid , createBox , createTexturedBox , createTexturedSkyBox , createTexturedMesh , createRandomMesh , createTer...
Chatanga/kage
src/Graphics/Buffer.hs
mit
28,067
0
25
9,360
8,667
4,782
3,885
596
7
module CodeGen.AST where import qualified LLVM.General.AST as LLVM data Type = Int8 | Int16 | Int32 | Int64 type Var = (LLVM.Type, LLVM.Name) toLLVM :: Type -> LLVM.Type toLLVM Int8 = LLVM.IntegerType 8 toLLVM Int16 = LLVM.IntegerType 16 toLLVM Int32 = LLVM.IntegerType 32 toLLVM Int64...
LudvikGalois/CodeGen
src/CodeGen/AST.hs
mit
380
0
6
103
120
67
53
14
1
{-# LANGUAGE BangPatterns, MagicHash, UnboxedTuples #-} module Data.Urn.Internal.AlmostPerfect (almostPerfect, reverseBits#) where import Data.List.NonEmpty (NonEmpty(..)) import GHC.Integer.Logarithms import GHC.Exts -- TODO: Consider moving back to boxed Words, adding a wordLog2 function -- | Create an "almost pe...
antalsz/urn-random
src/Data/Urn/Internal/AlmostPerfect.hs
mit
2,954
0
15
705
684
379
305
52
2
{-| Module : Day24 Description : <http://adventofcode.com/2016/day/24 Day 24: Air Duct Spelunking> -} {-# OPTIONS_HADDOCK ignore-exports #-} module Day24 (main) where import Common (readDataFile, unfold) import Control.Monad (guard) import Data.Array (Array, (!), array, bounds, inRange) import Data.Char (isDigit)...
ephemient/aoc2016
src/Day24.hs
mit
2,251
0
21
539
1,083
602
481
43
1
-- | This module contains functions to print imports -- preserving original formatting. module Importify.Pretty ( printLovelyImports ) where import Universum import Control.Arrow ((&&&)) import Data.Text (strip) import Language.Haskell.Exts (Comment (..), ImportDecl (..), SrcSpan (..), SrcSpanInfo (..)...
serokell/importify
src/Importify/Pretty.hs
mit
3,089
0
14
914
597
334
263
46
2
module Improb.AST where data Program = Program Tempo [Alias] [Voice] deriving (Eq, Show) data Alias = Alias { identifier :: String , pattern :: MusicPattern } deriving (Eq, Show) type Tempo = Integer data Voice = Voice Instrument [Transition] deriving (Eq, Show) type Instrument = String data Transitio...
michaelbjames/improb
Improb/AST.hs
mit
910
0
8
192
321
187
134
22
0
{-| Module: VirtualArrow.Indices Description: Definitions of indices of proportionality and governability. -} module VirtualArrow.Indices ( gallagherIndex, governability ) where import VirtualArrow.Input import VirtualArrow.Election (oneDistrictProportionality) import qualified Data.Map.Strict as Map import C...
olya-d/virtual-arrow
src/VirtualArrow/Indices.hs
mit
2,624
0
16
657
673
370
303
59
2
module IsUpperCase where import Data.Char isUpperCase :: String -> Bool isUpperCase xs = foldr (&&) True $ test xs where test xs = fmap (\x -> if isAlpha x then isUpper x else True) xs
cojoj/Codewars
Haskell/Codewars.hsproj/IsUpperCase.hs
mit
198
0
11
48
77
41
36
5
2
module Helen.Core.Auth ( enforceQuaKitRoles ) where import Control.Lens ((.~)) import Control.Monad.State import Data.Function import qualified Data.Set as Set import qualified Network.Socket as Network import qualified Data.IP as IP import Luci.Messages (AuthRole(Local), Message, msgSenderAuthRole, ms...
achirkin/qua-kit
apps/hs/helen/src/Helen/Core/Auth.hs
mit
864
0
15
192
227
130
97
22
3
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-instancetypeconfig.html module Stratosphere.ResourceProperties.EMRClusterInstanceTyp...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/EMRClusterInstanceTypeConfig.hs
mit
5,099
0
13
403
623
355
268
50
1
{- Copyright (C) 2006-7 John MacFarlane <jgm@berkeley.edu> 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 option) any later version. This program is dis...
kowey/pandoc-old
src/Text/Pandoc/Writers/RST.hs
gpl-2.0
14,084
0
20
3,546
4,312
2,138
2,174
260
8
-- A non-constructive program using local signals. module T where import Tests.KesterelBasis e = signalE $ \s1 -> signalE $ \s2 -> ( presentE s1 (nothingE) (emitE s2) ) |||| ( presentE s2 ( presentE s1 (nothingE) (emitE s1) ) (no...
peteg/ADHOC
Tests/08_Kesterel/031_signalE_non_constructive.hs
gpl-2.0
423
0
15
150
122
66
56
17
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PackageImports #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} ----------------------------------------------...
katychuang/raw-pixels
src/Web/Application.hs
gpl-2.0
4,216
0
13
1,006
718
386
332
71
2
module Response.Export (returnPDF, exportTimetableImageResponse, exportTimetablePDFResponse) where import Control.Monad.IO.Class (liftIO) import Happstack.Server import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy as L import Export.GetImages import Export.ImageConversion (removeFile) impo...
christinem/courseography
app/Response/Export.hs
gpl-3.0
2,592
0
19
418
548
286
262
38
1
import System.IO import Data.List main :: IO () main = do hSetBuffering stdout NoBuffering -- DO NOT REMOVE loop loop :: IO () loop = do situationInput <- getSituationInput outcome <- return (play (readSituation situationInput)) putStrLn (show outcome) loop getSituationInput :: IO [String] ge...
hgwood/codingame
kirks_quest/TheDescent.hs
gpl-3.0
1,786
0
12
294
559
294
265
35
2
module HEP.Automation.MadGraph.Dataset.Set20110413set2 where import HEP.Storage.WebDAV import HEP.Automation.MadGraph.Model import HEP.Automation.MadGraph.Machine import HEP.Automation.MadGraph.UserCut import HEP.Automation.MadGraph.SetupType import HEP.Automation.MadGraph.Model.AxiGluon import HEP.Automation.MadGr...
wavewave/madgraph-auto-dataset
src/HEP/Automation/MadGraph/Dataset/Set20110413set2.hs
gpl-3.0
1,440
0
8
315
349
206
143
37
1
-- | Parse HMM models -- Currently contains a parser for HMMER3 models -- For more information on HMMER consult: <http://hmmer.org> module Bio.HMMParser ( parseHMMER3, readHMMER3, alphabetToSymbols, module Bio.HMMData ...
eggzilla/BioHMM
src/Bio/HMMParser.hs
gpl-3.0
8,821
0
13
1,717
2,575
1,194
1,381
226
2
{-# LANGUAGE FlexibleContexts , MultiParamTypeClasses , TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module DeUni.Dim3.Delaunay3D where import Prelude hiding (null, lookup) import Data.List (null, (\\)) import Data.Vector ((!)) import Linear.Vect import DeUni.Dim3.Hull3D () import DeUni....
lostbean/DeUni
src/DeUni/Dim3/Delaunay3D.hs
gpl-3.0
2,927
0
16
706
1,100
599
501
63
2
module TPL.Env where import Control.Applicative ((<$), (<$>)) import Control.Monad.Error (liftIO, throwError) import Data.IORef (modifyIORef, newIORef, readIORef, writeIORef) import qualified Data.Map as M import TPL.Er...
TikhonJelvis/TPL
src/TPL/Env.hs
gpl-3.0
1,676
0
13
490
600
308
292
30
2
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE QuasiQuotes #-} import Language.Haskell.TH import Str (str) fuck :: String fuck = [str|sdf|] main :: IO () main = do let x = fuck putStrLn x
KenetJervet/mapensee
haskell/template-haskell/Sample2/Main.hs
gpl-3.0
194
0
9
39
61
35
26
10
1
{-# LANGUAGE CPP, ScopedTypeVariables, DeriveDataTypeable, FlexibleContexts #-} {-| Common cmdargs modes and flags, a command-line options type, and related utilities used by hledger commands. -} module Hledger.Cli.Options ( -- * cmdargs flags & modes helpflags, detailedversionflag, inputflags, reportflag...
kmels/hledger
hledger/Hledger/Cli/Options.hs
gpl-3.0
22,410
0
15
4,654
4,128
2,301
1,827
345
3
{-# OPTIONS_GHC -Wall #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} module Dyno.Ocp ( OcpPhase(..) , OcpPhaseInputs(..) , OcpPhaseWithCov(..) , OcpPhase' , OcpPhaseInputs' , X , Z , U , P , R ...
ghorn/dynobud
dynobud/src/Dyno/Ocp.hs
lgpl-3.0
7,292
0
20
1,968
1,961
1,071
890
104
0
module Main where import Graphics.UI.GLUT import Data.IORef import Control.Applicative import Control.Monad import System.Exit import Logic import Display main :: IO () main = do (_progName, _args) <- getArgsAndInitialize initialDisplayMode $= [DoubleBuffered, WithDepthBuffer] initialWindowSize $= Size 1024 7...
impega/hsvroum
src/Main.hs
unlicense
2,574
1
15
567
817
387
430
63
2
module Main where {-- LOL, imports --} import System.IO import System.IO.Unsafe import System.Directory import System.Environment import Control.Monad import Control.Concurrent import Control.Concurrent.STM import Data.Binary import ...
jbetzend/CollatzConjecture
Main.hs
unlicense
4,089
0
17
1,411
1,294
663
631
81
5
{-# LANGUAGE TypeFamilies, RankNTypes #-} ----------------------------------------------------------------------------- -- Copyright 2019, Ideas project team. This file is distributed under the -- terms of the Apache License 2.0. For more information, see the files -- "LICENSE.txt" and "NOTICE.txt", which are inclu...
ideas-edu/ideas
src/Ideas/Common/Strategy/Abstract.hs
apache-2.0
8,748
0
12
1,892
2,521
1,319
1,202
138
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} module Neovim.API.THSpec where import Neovim.API.THSpecFunctions import Neovim.API.TH hiding (function) import qualified Neovim.API.TH as TH import Neovim.Context import qualified Neovim.C...
saep/nvim-hs
test-suite/Neovim/API/THSpec.hs
apache-2.0
4,409
0
17
1,143
1,159
577
582
85
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TupleSections #-} module PopVox.Action.SearchPosition ( searchPosition ) where import Control.Applicative import Control.Error import Control.Lens import Data.Aeson import qualified Data.ByteString.Lazy as LB im...
erochest/popvox-scrape
src/PopVox/Action/SearchPosition.hs
apache-2.0
1,210
0
16
363
285
164
121
-1
-1
import Control.Exception (bracket_) import System.Directory import System.FilePath ((</>)) import System.Info (os) import System.IO (IOMode(..), withFile) import System.Posix.User import Test.Tasty import Test.Tasty.ExpectedFailure import Test.Tasty.HUnit import System.Directory.Glob import System.Directory.Glob.GNU i...
rdnetto/glob-posix
test/Spec.hs
apache-2.0
3,070
0
15
813
908
472
436
70
2
{-# LANGUAGE BangPatterns #-} module Quote.Parser ( portAndCode , parseFrame , parseQuote ) where import Control.Applicative import Control.Arrow import Control.Monad import Data.Attoparsec.Char8 as P import Data.ByteString (ByteString) import qualified Data.ByteString as BS import Data.Ch...
cutsea110/tsr-test
Quote/Parser.hs
bsd-3-clause
3,584
0
13
972
1,230
616
614
119
1
module GameStage.Collider where import Prelude as P import Data.List as L import Data.Map as M import Class.Sprite import GameStage.GameObject collide xs ys = case minViewWithKey xs of Nothing -> [] Just ((kx, x), nextxs) -> let objys = toList ys in case find (\(_, y) -> gameObject x ...
c000/PaperPuppet
src/GameStage/Collider.hs
bsd-3-clause
466
0
17
131
181
99
82
14
3
{-# LANGUAGE GADTs, TypeFamilies,DataKinds,PolyKinds,KindSignatures #-} {-# LANGUAGE UndecidableInstances, TemplateHaskell #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE InstanceSigs, FlexibleContexts #-} module Serpentine.Crud where import Prelude import Serpentine import Serpentine.PathPiece import Data.Sing...
andrewthad/serpentine
src/Serpentine/Crud.hs
bsd-3-clause
1,090
0
10
174
292
158
134
27
4
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE MultiParamTypeClasses #-} module Scheduler.Google.Server ( Servant.Handler (..) , DriveFileType (..) , ...
limaner2002/EPC-tools
scheduler-ui/src/Scheduler/Google/Server.hs
bsd-3-clause
2,565
0
13
416
674
381
293
-1
-1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE MagicHash #-} module Data.CompactMap.Fetch ( getElement , extractElement , extractElementBS , extractElementInt ) where import Foreign import GHC.Ptr import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as LBS...
dmjio/CompactMap
src/Data/CompactMap/Fetch.hs
bsd-3-clause
2,253
0
22
632
789
419
370
52
1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE CPP #-} #if __GLASGO...
Lainepress/easy
Text/RE/PCRE/RE.hs
bsd-3-clause
14,707
0
12
3,861
2,510
1,404
1,106
307
5
{-# LANGUAGE GADTs #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE RecordWildCards #-} module Pattern where import Control.Applicative ((<$>), (<*>)) import Data.Maybe (maybeToList, catMaybes) import Note (Note (..), ABC (..), Octave) import...
blacktaxi/inversion
src/Pattern.hs
bsd-3-clause
2,124
0
9
423
687
377
310
-1
-1
{-# LANGUAGE NoMonomorphismRestriction #-} module ListBased where ------------------------------------------------------------------------------- import qualified Data.List as List import qualified Data.List.Split as Split ------------------------------------------------------------------------------- pack = ...
Soostone/string-compat
src/ListBased.hs
bsd-3-clause
515
0
5
62
97
62
35
15
1
{-# LANGUAGE CPP, BangPatterns, RecordWildCards, NamedFieldPuns, DeriveGeneric, DeriveDataTypeable, GeneralizedNewtypeDeriving, ScopedTypeVariables #-} -- | -- module Distribution.Client.ProjectBuilding ( BuildStatus(..), BuildStatusMap, BuildStatusRebuild(..), BuildReason(.....
thomie/cabal
cabal-install/Distribution/Client/ProjectBuilding.hs
bsd-3-clause
60,181
7
27
18,797
8,409
4,345
4,064
835
12
module Juggernaut.Api where import Juggernaut.Dependency import Control.Monad import Data.Maybe data Target = T String [String] [String] deriving Show makefile :: [Target] -> String makefile ts = join $ map makefile' ts makefile' :: Target -> String makefile' (T n ds cs) ...
markhibberd/juggernaut
src/Juggernaut/Api.hs
bsd-3-clause
3,154
0
22
915
1,515
823
692
63
2
module Main (main) where import Bakers12.Cli import Bakers12.Modes main :: IO () main = cmdArgs bakers12Modes >>= execBakers12
erochest/bakers12
src/Bakers12.hs
bsd-3-clause
132
0
6
23
41
23
18
5
1
{-# LANGUAGE UndecidableInstances #-} -- / Utilities to provide better error messages -- -- When dealing with type level programming in Haskell, especially when involving -- undecidable instances, one is often confronted with irritating compiler -- behaviour. This module shall mitigate the problems. -- -- A group of t...
sheyll/isobmff-builder
src/Data/Kind/Extra.hs
bsd-3-clause
4,941
2
18
1,129
1,407
807
600
-1
-1
import Data.Elf import Data.ByteString import Data.Binary.Get import Data.Word import Data.ByteString.Lazy.UTF8 import System.Environment (getArgs, getProgName) import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as LB import Control.Monad import Control.Applicative import qualified Data.Map as...
lally/libmet
src/Ppt/elfdump.hs
bsd-3-clause
4,589
0
18
1,850
1,043
553
490
88
7
{-# LANGUAGE DeriveDataTypeable #-} {- Copyright (c) 2014, 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 c...
alios/geodetic
src/Data/Geodetic/Coordinate.hs
bsd-3-clause
2,017
0
10
378
196
109
87
15
1
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE ViewPatterns #-} module ...
UCSD-PL/RefScript
src/Language/Rsc/Environment.hs
bsd-3-clause
8,298
0
13
1,746
1,750
953
797
148
2
{-# LANGUAGE TupleSections, OverloadedStrings #-} module Handler.Home where import Import import Yesod.Auth getHomeR :: Handler Html getHomeR = do mAuth <- maybeAuth defaultLayout $ do aDomId <- newIdent setTitle "Welcome To WriteMeAList.com!" toWidgetHead [hamlet| ...
ScaledSoftware/writemealist
Handler/Home.hs
bsd-3-clause
521
0
12
153
85
42
43
-1
-1
module Language.GroteTrap ( -- * Re-exports module Language.GroteTrap.Range, module Language.GroteTrap.Trees, module Language.GroteTrap.Language, module Language.GroteTrap.Unparse, module Language.GroteTrap.ShowTree, module Language.GroteTrap.Util, module Language.GroteTrap.Show, -- * Parsing and ev...
MedeaMelana/GroteTrap
Language/GroteTrap.hs
bsd-3-clause
764
0
5
95
133
92
41
19
0
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE ScopedTypeVariables #-} module Data.Leonine.Utils where import Data.Bits import Data.Convertible import Data.Either (either) import Data.Function (on) impor...
thsutton/leonine
lib/Data/Leonine/Utils.hs
bsd-3-clause
5,931
0
17
1,567
1,458
792
666
79
4
{-# Language RebindableSyntax #-} {-# Language TypeOperators #-} {-# Language FlexibleContexts #-} {-# Language ScopedTypeVariables #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} {-# OPTIONS_GHC -fno-warn-unused-do-bind #-} module Main where import Prelude hiding ((>>=), ...
abakst/symmetry
checker/tests/pos/WorkStealing00.hs
mit
1,971
0
16
717
497
258
239
36
1
{-# LANGUAGE DeriveDataTypeable #-} {- | Module : $Header$ Description : library names for HetCASL and development graphs Copyright : (c) Christian Maeder, DFKI GmbH 2008 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : provisional Portability : portable ...
keithodulaigh/Hets
Common/LibName.hs
gpl-2.0
4,316
0
12
863
1,243
663
580
116
2
module Config ( VanguardConfig(..) , NetConfig(..) , ControlConfig (..) , loadConfigFromFile ) where import Config.Internal
rlupton20/vanguard-dataplane
app/Config.hs
gpl-3.0
127
0
5
18
35
24
11
6
0
module Tuple where main :: Int main = snd ('1',2)
roberth/uu-helium
test/correct/Tuple.hs
gpl-3.0
51
0
6
11
23
14
9
3
1
{-# 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 #-} -- ...
olorin/amazonka
amazonka-elasticache/gen/Network/AWS/ElastiCache/DescribeCacheEngineVersions.hs
mpl-2.0
8,414
0
16
1,723
1,155
683
472
131
1
{-# LANGUAGE OverloadedStrings #-} -- Derived from AWS service descriptions, licensed under Apache 2.0. -- | -- Module : Network.AWS.CognitoSync.Types -- Copyright : (c) 2013-2015 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay@gmail.com> -- Stability ...
fmapfmapfmap/amazonka
amazonka-cognito-sync/gen/Network/AWS/CognitoSync/Types.hs
mpl-2.0
6,745
0
13
1,393
1,109
611
498
136
1