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 DeriveFunctor ,PatternGuards ,BangPatterns ,OverloadedStrings ,DeriveDataTypeable ,FlexibleContexts ,RecordWildCards ,CPP #-} -- | Example: -- -- > {-# LANGUAGE OverloadedStrings #-} -- > import Text.Recognition.Antigate -- > import Data.Default -- > import Network -- >...
exbb2/antigate
Text/Recognition/Antigate.hs
mit
17,324
0
18
4,492
3,802
2,063
1,739
330
9
module Problem1 where import Data.List multipleOf :: Int -> Int -> Bool n `multipleOf` m = n `mod` m == 0 filterMultiplesOf :: [Int] -> Int -> [Int] xs `filterMultiplesOf` n = filter (`multipleOf` n) xs filterMultiplesOfAll :: [Int] -> [Int] -> [Int] xs `filterMultiplesOfAll` [] = [] xs `filterMultiplesOfAll` (y:ys...
Strikingwolf/project-euler
src/Problem1.hs
mit
582
0
8
94
247
142
105
13
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeApplications #-} module Hash where import Control.Monad.IO.Class (liftIO) import Control.Exception (bracket) import qualified Data.ByteString ...
shlevy/hnix-store
hnix-store-core/tests/Hash.hs
mit
2,138
0
17
610
303
182
121
39
1
{-# LANGUAGE OverloadedStrings, DoAndIfThenElse #-} -- | This module provides a way in which the Haskell standard input may be -- forwarded to the IPython frontend and thus allows the notebook to use -- the standard input. -- -- This relies on the implementation of file handles in GHC, and is -- generally unsafe and te...
aostiles/LiveHaskell
src/IHaskell/IPython/Stdin.hs
mit
4,585
0
14
1,001
710
373
337
70
2
module GHCJS.DOM.Notification ( ) where
manyoo/ghcjs-dom
ghcjs-dom-webkit/src/GHCJS/DOM/Notification.hs
mit
42
0
3
7
10
7
3
1
0
main :: IO () main = do putStrLn "Introduzca un valor para a: " aCadena <- getLine putStrLn "Introduzca un valor para b: " bCadena <- getLine let a = read aCadena :: Float b = read bCadena :: Float suma = (+) a b producto = a * b cocienteAB = (/) a b coc...
clinoge/primer-semestre-udone
src/03-aritmetica/aritmetica.hs
mit
509
0
10
183
166
79
87
16
1
{-# LANGUAGE DoAndIfThenElse #-} module Database.Kayvee.Kayvee where import Control.Applicative hiding (empty) import Control.Exception import System.IO import Data.Binary.Get import Data.Binary.Put import qualified Data.ByteString.Lazy as BL import Data.ByteString.Char8 (pack) import Debug.Trace import Database.Kayv...
deweyvm/kayvee
src/Database/Kayvee/Kayvee.hs
mit
2,287
0
14
636
818
402
416
68
3
module Language.Core.Printer where import Text.PrettyPrint.Leijen import Prelude hiding ((<$>)) import Language.Core.ADT atom :: CoreExpr -> Doc atom (EVar v) = text v atom (ENum n) = text $ show n atom (ECon tag arity) = text "Pack" <> braces (int tag <> text ", " <> int arity) atom x = parens $ expr x expr :: Cor...
notcome/ImplFP
src/Language/Core/Printer.hs
mit
2,644
4
14
916
1,103
568
535
65
4
module Main ( main ) where import Data.Proxy (Proxy (..)) import Language.PureScript.Bridge (BridgePart, buildBridge, defaultBridge, mkSumType, typeName, ...
input-output-hk/cardano-sl-explorer
src/purescript/Main.hs
mit
2,462
0
13
786
647
351
296
-1
-1
module Main where import Hgen import Data.List import Data.Maybe import Debug.Trace import System.Random (randomRIO) pick :: [a] -> Maybe (IO a) pick [] = Nothing pick xs = Just (fmap (xs !!) $ randomRIO (0, length xs - 1)) pickVal :: [a] -> IO a pickVal xs = (fromJust $ pick xs) -- TODO: Check for duplicates pick2...
AgustinCB/hgen
examples/Sudoku.hs
gpl-2.0
4,736
30
15
1,063
2,252
1,244
1,008
120
2
{-# LANGUAGE FlexibleContexts, NoMonomorphismRestriction #-} import Control.Monad import Diagrams.Backend.Cairo import Diagrams.Combinators import Diagrams.TwoD.Text import Diagrams.TwoD.Types import Diagrams.Util import Graphics.Rendering.Diagrams import System.FilePath import Data.Colour.Names import Diagrams.Prelud...
DanielSchuessler/hstri
TextureGen.hs
gpl-3.0
1,920
10
12
444
715
372
343
47
1
module Mescaline.Pattern.Ppar ( ptpar , ppar , takeBeats ) where import Control.Lens import qualified Data.IntPSQ as PQ import Data.List (foldl', unfoldr) import Sound.SC3.Lang.Pattern.P import Mescaline.Time (Beats, HasDelta(..)) import Mescaline.Pattern.Event...
kaoskorobase/mescaline
lib/mescaline-patterns/src/Mescaline/Pattern/Ppar.hs
gpl-3.0
1,540
25
15
569
623
344
279
42
4
{- The Delve Programming Language Copyright 2009 John Morrice Distributed under the terms of the GNU General Public License v3, or ( at your option ) any later version. This file is part of Delve. Delve is free software: you can redistribute it and/or modify it under the terms of the GNU Gene...
elginer/Delve
src/DPretty.hs
gpl-3.0
1,234
0
10
274
80
48
32
5
2
{-# LANGUAGE FlexibleInstances #-} module Model where import ClassyPrelude.Yesod import Database.Persist.Quasi import Yesod.Auth.Account import Data.PaperStatus import qualified Data.ConferencePhase as C -- You can define all of your database entities in the entities file. -- You can find more information on persist...
ackao/APRICoT
web/conference-management-system/Model.hs
gpl-3.0
907
7
8
140
148
81
67
-1
-1
module Kevin.IRC.Packet ( Packet(..), parsePacket, readable ) where import Prelude hiding (takeWhile) import qualified Data.Text as T import Data.Char import Data.Attoparsec.Text import Control.Applicative ((<|>), (<$>), (<*>), (*>), (<*)) data Packet = Packet { prefix :: Maybe T.Text ...
ekmett/kevin
Kevin/IRC/Packet.hs
gpl-3.0
2,318
0
12
500
891
469
422
62
2
module Main where import Test.Framework (defaultMain, testGroup) import qualified Ssh.NetworkIO.Tests import qualified Ssh.Cryption.Tests main :: IO () main = defaultMain [ testGroup "Ssh.NetworkIO.Tests" Ssh.NetworkIO.Tests.tests , testGroup "Ssh.Cryption.Tests" Ssh.Cryption.Tests.tests ]
bcoppens/HaskellSshClient
tests/TestSuite.hs
gpl-3.0
315
0
8
53
73
44
29
9
1
module Main where import Lib main :: IO () main = gameLoop
KReinders/hypercube
src/Main.hs
gpl-3.0
61
0
6
14
22
13
9
4
1
-- {-# LANGUAGE GeneralizedNewtypeDeriving #-} ------------------------------------------------------------------------------------- -- | -- Copyright : (c) Hans Hoglund 2012 -- -- License : GPL -- -- Maintainer : hans@hanshoglund.se -- Stability : stable -- Portability : portable -- -- Wrapper around hsc3 f...
hanshoglund/imitator
src/Music/Imitator/Sound.hs
gpl-3.0
18,543
21
14
5,024
4,234
2,386
1,848
328
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} module Cli (doInitSession, evalString, Session(..)) where import Control.Applicative import DynFlags import GHC import GHC.Paths import GhcMonad (liftIO) ...
kvnesterov/IdaHaskell
src/Cli.hs
gpl-3.0
5,943
0
28
1,824
1,685
828
857
147
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Photos/Get.hs
mpl-2.0
2,825
0
15
663
315
193
122
51
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-cloudsearch/gen/Network/Google/Resource/CloudSearch/Query/Search.hs
mpl-2.0
5,480
0
17
1,244
724
428
296
101
1
-- This file is part of purebred -- Copyright (C) 2018-2019 Róman Joost -- -- purebred is free software: you can redistribute it and/or modify -- it under the terms of the GNU Affero General Public License as published by -- the Free Software Foundation, either version 3 of the License, or -- (at your option) any later...
purebred-mua/purebred
src/Purebred/UI/FileBrowser/Keybindings.hs
agpl-3.0
1,942
0
11
286
442
247
195
18
1
{-# LANGUAGE DataKinds #-} module TestBTree(testBTree) where import Data.Function import Data.List hiding (null) import Data.Monoid import Prelude hiding (null) import Test.Tasty import Test.Tasty.QuickCheck import Test.QuickCheck import Data.FixFile import Data.FixFile.BTree import qualified Data.FixFile.Tree23 as...
revnull/fixfile
tests/TestBTree.hs
lgpl-3.0
4,084
0
14
914
1,419
749
670
91
4
<?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="ar-SA"> <title>DOM XSS Active Scan Rule | ZAP Extension</title> <maps> <homeID>top</homeID>...
0xkasun/security-tools
src/org/zaproxy/zap/extension/domxss/resources/help_ar_SA/helpset_ar_SA.hs
apache-2.0
986
80
66
163
421
213
208
-1
-1
{- - Copyright (c) 2017 The Agile Monkeys S.L. <hackers@theam.io> - - 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 requi...
theam/haskell-do
src/common/HaskellDo/View.hs
apache-2.0
5,188
0
21
1,131
1,024
503
521
92
1
import Data.List ans' :: Int -> [Int] -> Int -> Int ans' 1 n s = if elem s n then 1 else 0 ans' n num s = let max' = maximum num min' = minimum num smax = max' * ( div ( (n+1) * n ) 2 ) smin = min' * ( div ( (n+1) * n ) 2 ) num' = filter (\x -> s > x * n) num in -- Wrong Anser...
a143753/AOJ
0070.hs
apache-2.0
829
0
16
293
344
181
163
24
4
{-# LANGUAGE OverloadedStrings, FlexibleInstances, NoMonomorphismRestriction #-} module CourseStitch.Templates.Concept where import CourseStitch.Templates.Utils import {-# SOURCE #-} CourseStitch.Templates.Topic (topicSimple) import {-# SOURCE #-} CourseStitch.Templates.Resource (resourceSimple) instance ToHtml (Ent...
coursestitch/coursestitch-api
lib/CourseStitch/Templates/Concept.hs
apache-2.0
2,080
0
11
372
622
307
315
44
2
module Data.Core.Contract ( ) where import Data.Core.Table (Position) import Data.Core.Suit (Suit) data Doubled = Undoubled | Doubled | Redoubled deriving (Eq, Ord) instance Show Doubled where show Undoubled = "" show Doubled = "x" show Redoubled = "xx" data Contract = AllPass | Contract...
Sventimir/bridge-tools
Data/Core/Contract.hs
apache-2.0
899
0
10
284
310
162
148
23
0
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : Gui.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:30 Warning : this file is machine generated - do not modif...
keera-studios/hsQt
Qtc/ClassTypes/Gui.hs
bsd-2-clause
496,955
0
12
61,194
146,183
75,071
71,112
-1
-1
{-# LANGUAGE OverloadedStrings #-} module Mentions where import Data.Char (isSpace) import Data.Either (rights) import Data.Attoparsec.Text import Control.Applicative import GitHub.Data (mkOwnerName, mkRepoName) import qualified Data.Text as T import qualified GitHub.Auth as Github import qualified GitHub.Data.Issu...
amir/ghc-dashboard
src/Mentions.hs
bsd-3-clause
2,183
0
13
411
583
321
262
54
1
-- | Module : XMonad.Libs.SSH -- | Copyright : (c) Oliver Dunkl -- | License : BSD (see LICENSE) -- -- | Maintainer : Oliver Dunkl <oliver.dunkl@gmx.at> -- -- | This module is responsible for working with SSH. module XMonad.Libs.SSH ( SSH, fireSSHPrompt ) where import XMonad import XMonad.Prompt import X...
odi/xmonad-ext
src/XMonad/Libs/SSH.hs
bsd-3-clause
1,671
0
11
437
268
150
118
23
1
import Data.Char (digitToInt) f = sum . map digitToInt . show $ product [1..100] main :: IO () main = print f
stulli/projectEuler
eu20.hs
bsd-3-clause
112
1
8
24
60
29
31
4
1
{-# LANGUAGE TypeOperators #-} -- | Module for common functions used in a vector environment module Vector where import Data.List import qualified Data.Array.Repa as R -- | Type for one dimensional arrays of type double type DoubleVector = R.Array R.U (R.Z R.:. Int) Double type Point = DoubleVector -- | Function to ca...
axhav/AFPLAB3
Vector.hs
bsd-3-clause
2,285
0
15
634
1,007
533
474
37
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} module Servant.StateGraph.GraphSpec where import Test.Hspec import qualified Data.Text as T import Data.Typeable import Data.Proxy (Proxy(..)) import Serv...
corajr/servant-state-graph
test/Servant/StateGraph/GraphSpec.hs
bsd-3-clause
2,988
0
12
717
882
492
390
77
1
module Data.Concurrent.Queue.Roq.LogDumper ( hroq_log_dumper ) where hroq_log_dumper = error $ "hroq_log_dumper undefined"
alanz/hroq
src/Data/Concurrent/Queue/Roq/LogDumper.hs
bsd-3-clause
132
0
5
21
23
15
8
4
1
---------------------------------------------------------------------------- -- | -- Module : Server.Tags -- Copyright : (c) Sergey Vinokurov 2016 -- License : BSD3-style (see LICENSE) -- Maintainer : serg.foo@gmail.com -- Created : Monday, 15 August 2016 -- The actual server that handles tags ----...
sergv/tags-server
src/Haskell/Language/Server/Tags.hs
bsd-3-clause
14,156
0
31
3,869
3,339
1,712
1,627
294
16
module Music.Pitch.Tokawa where
music-suite/music-pitch
src/Music/Pitch/Tokawa.hs
bsd-3-clause
34
0
3
5
7
5
2
1
0
{-# LANGUAGE OverloadedStrings, CPP, ScopedTypeVariables #-} module Network.Wai.Application.Classic.CGI ( cgiApp ) where import qualified Control.Exception as E (SomeException, IOException, try, catch, bracket) import Control.Monad (when, (<=<)) import Data.ByteString (ByteString) import qualified Data.ByteStri...
kazu-yamamoto/wai-app-file-cgi
Network/Wai/Application/Classic/CGI.hs
bsd-3-clause
6,887
0
14
1,557
1,878
1,020
858
125
3
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.Raw.ARB.ClipControl -- Copyright : (c) Sven Panne 2015 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : portable -- ...
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/ARB/ClipControl.hs
bsd-3-clause
820
0
4
103
64
50
14
10
0
{-# OPTIONS_GHC -Wall #-} {-# OPTIONS_GHC -Wno-missing-signatures #-} {-# OPTIONS_GHC -fwarn-incomplete-uni-patterns #-} {-# LANGUAGE PatternSynonyms #-} module Day23 where import Test.Hspec import qualified Text.Megaparsec.String as P import qualified Text.Megaparsec as P import Data.Functor (($>)) import Utils im...
guibou/AdventOfCode2016
src/Day23.hs
bsd-3-clause
4,394
0
20
1,172
1,677
848
829
80
6
{-# OPTIONS -Wall -Werror #-} module Main where import Data.Time.Calendar.Easter import Data.Time.Calendar import Data.Time.Format import System.Locale days :: [Day] days = [ModifiedJulianDay 53000 .. ModifiedJulianDay 53014] showWithWDay :: Day -> String showWithWDay = formatTime defaultTimeLocale "%F %A" main :...
takano-akio/time
test/TestEaster.hs
bsd-3-clause
761
0
20
120
267
141
126
17
1
{-# LANGUAGE MonoLocalBinds#-} module PrettyPrint --(pShow) where import Text.PrettyPrint.ANSI.Leijen import Value hiding (isInfix) import Lambda import Name import Associativity -- $setup -- >>> import Operator -- | pretty Print Lambda`s -- -- * all printed terms can be parsed by 'Parser.parseString'. -- * Correct...
kwibus/myLang
src/PrettyPrint.hs
bsd-3-clause
4,758
0
19
1,430
1,225
640
585
77
12
{-| The types for configuring @feedGipeda@. Correspond to the different modes of operation that are possible, but in a type-safe way. -} module FeedGipeda.Types where import Data.Time (NominalDiffTime) -- | Important file paths for the master node. data Paths = Paths { configFile :: FilePath --...
sgraf812/feed-gipeda
src/FeedGipeda/Types.hs
bsd-3-clause
2,306
0
8
469
399
223
176
46
1
module Data.List.PointedList.Circular ( -- Re-export many of the regular PointedList features module Data.List.PointedList -- And, of course, export the alternatives here , next , previous , delete , deleteLeft , deleteRight , moveN ) where import Data.List.PointedList ( PointedList(..) , focu...
jeffwheeler/pointedlist
Data/List/PointedList/Circular.hs
bsd-3-clause
2,650
0
10
715
734
385
349
53
1
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} module Distribution.Solver.Modular.Linking ( validateLinking ) where import Prelude () import Distribution.Solver.Compat.Prelude hiding (get,put) import Control.Exception (assert) import Control.Monad.Reader import Control.Monad....
mydaum/cabal
cabal-install/Distribution/Solver/Modular/Linking.hs
bsd-3-clause
21,017
0
21
5,580
5,474
2,810
2,664
306
11
{-# LANGUAGE DataKinds #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE TemplateHaskell #-} module Numeric.Units.Dimensional.TH ( -- * Quantities fixedPointType , quantityType -- * Dimensions , dimensionType -- * Quasi-Quotes , fixed -- * Raw Type-Level Number Splices , exactPiType , integerType ) where imp...
dmcclean/dimensional-th
src/Numeric/Units/Dimensional/TH.hs
bsd-3-clause
4,375
0
13
1,052
970
575
395
81
20
module Main (main ) where import Test.Tasty import TestTypeCheker import TestBruijn import TestArbitrary import TestEval import TestPrettyPrintLambda import TestParser import TestType import TestLogic import TestSearchTree import TestTopologicalSort import TestModify main :: IO () main = defaultMain tests tests...
kwibus/myLang
tests/test.hs
bsd-3-clause
579
0
6
123
113
70
43
28
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} module Web.BitPay.Types where import qualified Data.Aeson as Ae import Data.Data (Data, Typeable) import qualified Data.Text as T import qualified Data.Time as Ti...
k0001/bitpay-client
src/lib/Web/BitPay/Types.hs
bsd-3-clause
10,376
0
27
2,215
2,381
1,336
1,045
270
1
import Test.QuickCheck prop_monoid_id x = mempty `mappend` x == x && x `mappend` mempty == x prop_monoid_assoc x y z = (x `mappend` y) `mappend` z == x `mappend` (y `mappend` z)
cullina/Extractor
test/BasicTests.hs
bsd-3-clause
181
0
9
35
84
49
35
4
1
import System.Environment (getArgs) import Data.Char (isDigit) import Data.List (isPrefixOf) jsonMenu :: Int -> String -> Int jsonMenu a [] = a jsonMenu a xs | not (isPrefixOf "\"id\": " xs) = jsonMenu a (tail xs) | head xs'' == ',' = jsonMenu (a+y) xs'' | otherwise ...
nikai3d/ce-challenges
easy/json_menu_ids.hs
bsd-3-clause
659
0
13
238
262
128
134
16
1
module MixFix.Dic where import MixFix.Expr -- import Control.Monad (foldM) import Data.Map (Map) import qualified Data.Map as Map import Data.List (find) -- | Operator Properties data Property = Assoc -- ^ The operator is associative | AssocLeft -- ^ The operator is left associative | As...
pachopepe/mfxparser
src/MixFix/Dic.hs
bsd-3-clause
7,021
0
12
2,473
2,079
1,106
973
131
4
module Vandelay.DSL.Estimates.Output ( outputRow ) where import Vandelay.DSL.Core import qualified Data.Map.Lazy as M -- | Output a row outputRow ∷ OutputRequest → EstimatesHM → [(Maybe FilePath, ModelName)] → Either ErrorMsg Text outputRow or est ms = do result <- m...
tumarkin/vandelay
src/Vandelay/DSL/Estimates/Output.hs
bsd-3-clause
4,540
0
19
1,559
1,048
550
498
-1
-1
module GR4J where import Data.List import Stats type Parameter = Double type Runoff = Double type RunoffSeries = [Runoff] type Storage = Double type Precipitation = Double type Evaporation = Double type Date = String type ObservationSeries = [Observation] type Days = Double type Magnitude = Double data State = ...
tinyrock/gr4j
src/GR4J.hs
bsd-3-clause
4,020
0
21
1,400
1,543
844
699
117
2
{-# LANGUAGE CPP #-} {-| Maintainer: Thomas.DuBuisson@gmail.com Stability: beta Portability: portable -} module Crypto.Modes ( -- * Initialization Vector Type, Modifiers (for all ciphers, all modes that use IVs) dblIV -- * Authentication modes , cbcMac', cbcMac, cMac, cMac' ...
TomMD/crypto-api
Crypto/Modes.hs
bsd-3-clause
7,978
0
15
1,969
3,286
1,761
1,525
127
5
{-# LANGUAGE CPP #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE DefaultSignatures #-} module Language.Wart.Parser ( Parser , ParserState (..) , runParser , MonadParser (..) ) where import Control.Applicative import Control.Monad.State.Strict import...
sonyandy/wart
src/Language/Wart/Parser.hs
bsd-3-clause
1,522
0
11
330
422
232
190
34
1
{-# LANGUAGE JavaScriptFFI, GeneralizedNewtypeDeriving #-} module GHCJS.Three.Camera ( Camera(..), IsCamera(..), OrthographicCamera(..), IsOrthoGraphicCamera(..), PerspectiveCamera(..), IsPerspectiveCamera(..), Left, Right, Top, Bottom, Fov, Aspect, Near, Far, Zoom, FocalLength, FrameSize, mkOrthogr...
manyoo/ghcjs-three
src/GHCJS/Three/Camera.hs
bsd-3-clause
6,788
201
10
1,402
1,863
990
873
139
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} -- | -- Module: Data.Aviation.WX -- Copyright: (C) 2014-2016, Hans-Christian Esperer -- License: MIT -- Maintainer: Hans-Christian Esperer <hc@hces...
hce/avwx
src/Data/Aviation/WX.hs
mit
37,100
0
19
10,782
8,343
4,733
3,610
745
2
module Youido where
diffusionkinetics/open
youido/lib/Youido.hs
mit
21
0
2
4
4
3
1
1
0
-- This file is part of HamSql -- -- Copyright 2014 by it's authors. -- Some rights reserved. See COPYING, AUTHORS. {-# LANGUAGE TemplateHaskell #-} module Database.HamSql.Internal.Documentation where import Data.FileEmbed import qualified Data.Text as T import Data.Text.Encoding import qualified Data.Text.IO as T.IO...
hemio-ev/hamsql
src/Database/HamSql/Internal/Documentation.hs
gpl-3.0
1,453
0
11
232
415
219
196
36
2
{-# 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-dynamodb/gen/Network/AWS/DynamoDB/UpdateTable.hs
mpl-2.0
7,882
0
13
1,661
962
587
375
115
1
{-# LANGUAGE Rank2Types #-} module Options.Applicative.Common ( -- * Option parsers -- -- | A 'Parser' is composed of a list of options. Several kinds of options -- are supported: -- -- * Flags: simple no-argument options. When a flag is encountered on the -- command line, its value is returned. -- ...
ntc2/optparse-applicative
Options/Applicative/Common.hs
bsd-3-clause
12,333
0
21
3,225
4,317
2,164
2,153
282
7
{-# OPTIONS_GHC -fno-implicit-prelude #-} ----------------------------------------------------------------------------- -- | -- Module : Data.HashTable -- Copyright : (c) The University of Glasgow 2003 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : libraries@haskell.org...
alekar/hugs
packages/base/Data/HashTable.hs
bsd-3-clause
16,286
38
23
3,532
3,431
1,903
1,528
242
4
{-# LANGUAGE CPP #-} module TcInteract ( solveSimpleGivens, -- Solves [EvVar],GivenLoc solveSimpleWanteds -- Solves Cts ) where #include "HsVersions.h" import BasicTypes ( infinity, IntWithInf, intGtLimit ) import HsTypes ( hsIPNameFS ) import FastString import TcCanonical import TcFlatten import Var...
acowley/ghc
compiler/typecheck/TcInteract.hs
bsd-3-clause
83,456
29
22
24,462
12,389
6,394
5,995
-1
-1
{-# LANGUAGE ScopedTypeVariables, CPP, ForeignFunctionInterface #-} -- | Copyright : (c) 2010 Jasper Van der Jeugt -- (c) 2010 - 2011 Simon Meier -- License : BSD3-style (see LICENSE) -- -- Maintainer : Simon Meier <iridcode@gmail.com> -- Portability : GHC -- -- Encodings using ASCII encode...
meiersi/bytestring-builder
Data/ByteString/Lazy/Builder/BasicEncoding/ASCII.hs
bsd-3-clause
8,538
0
11
1,510
1,229
712
517
150
1
{- (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 \section[PrelNames]{Definitions of prelude modules and names} Nota Bene: all Names defined in here should come from the base package - ModuleNames for prelude modules, e.g. pREL_BASE_Name :: ModuleName - Modules for prelude modules e...
elieux/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
93,689
0
10
21,362
14,436
8,215
6,221
1,433
2
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE DeriveFunctor #-} ----------------------------------------------------------------------------- -- | -- Module : Text.ParserCombinators.ReadP -- Copyright : (c) The University of...
alexander-at-github/eta
libraries/base/Text/ParserCombinators/ReadP.hs
bsd-3-clause
14,894
1
17
3,946
3,770
1,943
1,827
222
6
import Data.Bits (FiniteBits (..), unsafeShiftL, unsafeShiftR, (.&.), (.|.)) import Data.Char (intToDigit) import Data.Word (Word8, Word16, Word32, Word64, bitReverse8, bitReverse16, bitReverse32, bitReverse64) import Numeric (showIntAtBase...
sdiehl/ghc
testsuite/tests/primops/should_run/T16164.hs
bsd-3-clause
2,348
0
13
545
533
296
237
32
1
{-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- -- Building info tables. -- -- (c) The University of Glasgow 2004-2006 -- ----------------------------------------------------------------------------- module StgCmmLayout ( mkArgDescr, emitCall, emit...
tjakway/ghcjvm
compiler/codeGen/StgCmmLayout.hs
bsd-3-clause
20,072
0
22
5,596
3,595
1,924
1,671
279
25
#!/usr/bin/env stack -- stack --resolver lts-9.21 script {-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-}...
gbwey/persistent
.github/reproductionTemplates/mongo.hs
mit
1,105
0
13
248
176
97
79
23
1
{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-} module RepType ( -- * Code generator views onto Types UnaryType, NvUnaryType, isNvUnaryType, unwrapType, -- * Predicates on types isVoidTy, -- * Type representation for the code generator typePrimRep, typePrimRep1, runtimeRepPri...
shlevy/ghc
compiler/simplStg/RepType.hs
bsd-3-clause
12,147
0
14
3,286
2,428
1,258
1,170
216
6
{-# LANGUAGE Unsafe #-} {-# LANGUAGE NoImplicitPrelude , BangPatterns , MagicHash , UnboxedTuples , DeriveDataTypeable , StandaloneDeriving #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | -- Mod...
beni55/haste-compiler
libraries/ghc-7.10/base/GHC/Weak.hs
bsd-3-clause
5,930
0
24
1,519
589
323
266
46
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-ecsparameters.html module Stratosphere.ResourceProperties.EventsRuleEcsParameters where import S...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/EventsRuleEcsParameters.hs
mit
2,032
0
13
212
265
151
114
28
1
{-# LANGUAGE OverloadedStrings #-} {- | Module : Network.MPD.Commands.Database Copyright : (c) Ben Sinclair 2005-2009, Joachim Fasting 2012 License : MIT (see LICENSE) Maintainer : joachifm@fastmail.fm Stability : stable Portability : unportable The music database. -} module Network.MPD.Commands.Datab...
matthewleon/libmpd-haskell
src/Network/MPD/Commands/Database.hs
mit
2,381
0
9
492
502
280
222
42
1
-- Isograms -- http://www.codewars.com/kata/54ba84be607a92aa900000f1 module Isogram where import Data.Char (toLower) import Data.List (nub) isIsogram :: String -> Bool isIsogram s = length (nub str) == length (str) where str = map toLower s
gafiatulin/codewars
src/7 kyu/Isogram.hs
mit
244
0
8
36
74
41
33
5
1
-- The dropWhile Function -- http://www.codewars.com/kata/54f9c37106098647f400080a/ module Codewars.Exercise.DropWhile where import Prelude hiding (dropWhile, span, break) dropWhile :: [a] -> (a -> Bool) -> [a] dropWhile [] _ = [] dropWhile (x:xs) p | p x = dropWhile xs p | otherwise = x : xs
gafiatulin/codewars
src/7 kyu/DropWhile.hs
mit
315
0
8
66
108
59
49
6
1
import Control.Applicative import Control.Monad import Data.Colour import Data.Colour.Names import Data.Maybe import Data.Time import Game.Graphics import qualified Graphics.UI.GLFW as GLFW import Linear.V2 windowWidth, windowHeight :: ...
caryoscelus/graphics
examples/example1/Main.hs
mit
2,321
3
31
695
795
384
411
53
1
{-# LANGUAGE CPP #-} module GHCJS.DOM.AudioBufferCallback ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.AudioBufferCallback #else #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) import GHCJS.DOM...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/AudioBufferCallback.hs
mit
370
0
5
33
33
26
7
4
0
{-| Module: Treb.Routes.DataBlockFilter Description: Trebuchet DataBlockFilter route type and function definitons. Copyright: Travis Whitaker 2015 License: MIT Maintainer: twhitak@its.jnj.com Stability: Provisional Portability: POSIX -} {-# LANGUAGE DataKinds, TypeOperators, OverloadedStrings #-} module...
MadSciGuys/trebuchet
src/Treb/Routes/DataBlockFilter.hs
mit
660
0
10
102
75
44
31
9
1
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE TypeFamilies #-} module Protop.Core.Exponentials ( (:->)(..) , Curry(..) , Uncurry(..) , UNCC(..) , CUNC(..) , Eval , eval...
brunjlar/protop
src/Protop/Core/Exponentials.hs
mit
3,392
0
10
1,172
1,491
782
709
82
1
{-| Module : Formula Description : Logical formula related code Copyright : (c) Alex Nelson, 2015 License : MIT Maintainer : pqnelson@gmail.com Stability : experimental Portability : POSIX This code is related to all the formula manipulation. So far, it is just propositional calculus, but eventually it w...
pqnelson/surak
src/Formula.hs
mit
7,155
0
13
1,980
2,028
1,028
1,000
142
20
--Of course this solution is mind bloggling. --The key thing here is how fibs is defined. --see this link for an explaination prob2 = sum [x | x <- takeWhile (<=4000000) fibs, even x] where fibs = 1:1:zipWith (+) fibs (tail fibs) main = print(prob2)
gideondsouza/projecteuler-multilingual
haskell/problem2.hs
mit
277
0
10
72
80
43
37
3
1
{-# LANGUAGE OverloadedStrings #-} module Coinbase.Exchange.Socket.Test (tests) where import Control.Concurrent import Control.Concurrent.Async import Control.Monad import Data.Aeson import Test.Tasty import Test.Tasty.HUnit import qualified Network.WebSoc...
dimitri-xyz/coinbase
test/Coinbase/Exchange/Socket/Test.hs
mit
3,689
0
16
931
821
413
408
63
3
import System.IO import Control.Monad import Data.Char import System.Random putStr' :: String -> IO () putStr' [] = return () putStr' (x:xs) = do putChar x;putStr xs putStrLn' :: String -> IO () putStrLn' [] = putChar '\n' putStrLn' (x:xs) = do putChar x; putStrLn' xs majin = do c <- getChar when (c /= ' ') $ ...
RAFIRAF/HASKELL
IO/io.hs
mit
6,795
1
15
1,717
2,679
1,319
1,360
-1
-1
import Control.Monad import PowerMate printEvents :: Maybe FilePath -> IO () printEvents Nothing = putStrLn "No PowerMate found!" printEvents (Just dev) = do h <- openDevice dev forever $ do e <- readEvent h putStrLn $ show e main = searchForDevice >>= printEvents
ppelleti/powermate
powermate-print.hs
mit
280
0
11
58
97
45
52
10
1
-- -- -- ------------------ -- Exercise 12.16. ------------------ -- -- -- module E'12'16 where
pascal-knodel/haskell-craft
_/links/E'12'16.hs
mit
106
0
2
24
13
12
1
1
0
solution = total*total - sum [n*n | n <- values] where values = [1..100] total = sum values main = do print solution
drcabana/euler-fp
source/hs/P06.hs
epl-1.0
132
0
9
38
63
32
31
4
1
module AnagramTests where import Anagram hiding (main) import qualified Data.Map as Map import Test.HUnit -- ######### Tests testWordOccurrences1 :: Test.HUnit.Test testWordOccurrences1 = [(' ',6),('a',3),('d',1),('e',2),('h',3),('i',2),('l',1),('n',1),('o',1),('r',1),('s',3),('t',4),('y',1)...
ardumont/haskell-lab
test/AnagramTests.hs
gpl-2.0
8,852
0
12
3,506
2,535
1,608
927
157
1
{- Copyright (C) 2009 Gwern Branwen <gwern0@gmail.com> and 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 ...
mduvall/gitit
Network/Gitit/Feed.hs
gpl-2.0
5,734
0
16
1,233
1,270
704
566
73
4
module H12 where data Dup a = Multiple Int a | Single a deriving (Show) decodeModified :: (Eq a) => [Dup a] -> [a] decodeModified [] = [] decodeModified (Single x : as) = x : decodeModified as decodeModified (Multiple n x : as) = take n (repeat x) ++ decodeModified as
hsinhuang/codebase
h99/H12.hs
gpl-2.0
273
0
8
56
130
68
62
6
1
{-# LANGUAGE NoImplicitPrelude #-} module Lamdu.Sugar.Convert.Expression.Actions ( addActions, makeAnnotation ) where import Prelude.Compat import Control.Lens.Operators import Control.Monad (guard) import Control.MonadA (MonadA) import qualified Data.Map as Map import ...
rvion/lamdu
Lamdu/Sugar/Convert/Expression/Actions.hs
gpl-3.0
3,367
0
15
968
805
439
366
-1
-1
module Main ( main ) where import Prelude hiding ( fail ) import ExtractVersionUpdates import MyCabal import Control.Monad import Data.Maybe main :: IO () main = forM_ tests $ \(txt,v') -> runTest v' txt runTest :: MonadFail m => (Version, Revision) -> String -> m () runTest v' txt = case isVersionUpdate txt of ...
opensuse-haskell/configuration
src/regression-test/regression-test.hs
gpl-3.0
1,695
0
13
465
480
276
204
29
2
module Main (main) where import Read main = repl [] True
tehmatt/Chankillo
src/main.hs
gpl-3.0
59
0
6
13
24
14
10
3
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-dynamodb/gen/Network/AWS/DynamoDB/GetItem.hs
mpl-2.0
10,158
0
12
2,093
1,067
653
414
108
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-compute/gen/Network/Google/Resource/Compute/InstanceTemplates/Delete.hs
mpl-2.0
4,851
0
16
1,024
481
291
190
76
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-maps-engine/gen/Network/Google/Resource/MapsEngine/Layers/Permissions/BatchUpdate.hs
mpl-2.0
3,861
0
15
841
395
239
156
64
1
module Handler.Logout where import Import getLogoutR :: Handler Html getLogoutR = defaultLayout $ do $(widgetFile "logout") postLogoutR :: Handler Html postLogoutR = error "Not yet implemented: postLogoutR"
learnyou/learnyou
Handler/Logout.hs
agpl-3.0
210
0
10
30
52
27
25
-1
-1
{-# LANGUAGE OverloadedStrings #-} ------------------------------------------------------------ -- Copyright : Erik de Castro Lopo <erikd@mega-nerd.com> -- License : BSD3 ------------------------------------------------------------ module Test.TestServer ( runTestServer , runTestServerTLS -- Add this here...
olorin/http-proxy
Test/TestServer.hs
bsd-2-clause
4,116
0
16
1,004
984
519
465
78
2
----------------------------------------------------------------------------- -- | -- Module : Distribution.Client.Configure -- Copyright : (c) David Himmelstrup 2005, -- Duncan Coutts 2005 -- License : BSD-like -- -- Maintainer : cabal-devel@haskell.org -- Portability : portable -- ...
plumlife/cabal
cabal-install/Distribution/Client/Configure.hs
bsd-3-clause
10,783
0
20
2,873
1,769
976
793
174
4
module Signal.Wavelet.C1Bench where import Control.Arrow ((&&&)) import Data.Vector.Storable hiding (take, head) import Signal.Wavelet.C1 {-# INLINE benchDwt #-} benchDwt :: (Vector Double, Vector Double) -> Vector Double benchDwt (ls, sig) = dwt ls sig {-# INLINE benchIdwt #-} benchIdwt :: (Vector ...
jstolarek/lattice-structure-hs
bench/Signal/Wavelet/C1Bench.hs
bsd-3-clause
849
0
9
176
322
184
138
20
1
-- | The main module. module Main ( main ) where import Jat.CompGraph import Jat.JatM import Jat.PState import Jat.Utils.Args import Jat.Utils.Dot import Jat.Utils.Pretty import Jat.Utils.TRS import Jinja.Program as P import Control.Monad.Identity (runIdentity) import Data.Char (toLower) import Data.Maybe (fromMay...
ComputationWithBoundedResources/jat
src/Main.hs
bsd-3-clause
3,400
1
22
887
1,303
662
641
85
4