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
-- -- Replacer.hs -- -- Replace a subexpression with a different one. -- -- Gregory Wright, 18 September 2012 -- module Math.Symbolic.Wheeler.Replacer where import qualified Data.DList as DList import qualified Data.Map as Map import Data.Maybe import Math.Symbolic.Wheeler.Canonicalize import Math.Symbolic.Wheeler...
gwright83/Wheeler
src/Math/Symbolic/Wheeler/Replacer.hs
bsd-3-clause
7,631
0
19
2,391
2,155
1,151
1,004
126
5
-- Commented out exports represent things left -- to do, or things that no longer make sense module Graphics.Xhb.Connection ( Connection , connect , connect' -- , I.parseDisplay -- no reason not to export, but not sure why we would? , writeRequests , maximumRequestLength , prefetchMaximumReuestLength , connec...
aslatter/xcb-core
Graphics/Xhb/Connection.hs
bsd-3-clause
5,758
0
22
1,140
1,250
635
615
-1
-1
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module BitD.Protocol.VarData ( VarInt(..) , VarString(..) ) where import qualified Data.ByteString as BS import Data.String (IsString) import qualified Data.Binary.Get as BinG import qualified Data.Binary.Put as BinP import qualified Data.Binary as Bin...
benma/bitd
src/BitD/Protocol/VarData.hs
bsd-3-clause
1,812
0
11
519
534
281
253
41
0
{-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} -- | -- Module : Data.Array.Accelerate.Pretty.HTML -- Copyright : [2010..2011] Sean Seefried -- License : BSD3 -- -- Maintainer : Manuel M T Chakravarty <chak@cse.unsw.edu.au> -- Stability : expe...
robeverest/accelerate
Data/Array/Accelerate/Pretty/HTML.hs
bsd-3-clause
6,668
2
19
2,160
1,247
679
568
163
1
{-# LANGUAGE OverloadedStrings #-} module Site ( app ) where ------------------------------------------------------------------------------ import Control.Applicative import Data.IORef import Control.Monad.IO.Class import Data.ByteString (ByteString) import qualified Data.Text ...
archaephyrryx/CCG-Project
src/Site.hs
bsd-3-clause
1,551
0
11
407
305
174
131
32
1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE RebindableSyntax #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeSynonymInstances #-} module Mandelbrot.NikolaV3.Implementation where import qualified Prelude as P import Prelude hiding (iterate, map, zipWith) import Data.Array.Nikola.Backend.CUDA import Data...
mainland/nikola
examples/mandelbrot/Mandelbrot/NikolaV3/Implementation.hs
bsd-3-clause
3,277
0
15
973
1,425
757
668
91
2
module Sexy.Data.Bool ( bool' , otherwise , module X ) where import GHC.Types as X (Bool(..)) bool' :: a -> a -> Bool -> a bool' x _ True = x bool' _ x False = x otherwise :: Bool otherwise = True
DanBurton/sexy
src/Sexy/Data/Bool.hs
bsd-3-clause
211
0
7
57
86
51
35
10
1
{-# LANGUAGE TypeOperators, Rank2Types, ConstraintKinds, FlexibleContexts, CPP #-} {-# LANGUAGE ViewPatterns, TupleSections #-} {-# LANGUAGE DeriveFunctor, DeriveFoldable #-} {-# OPTIONS_GHC -Wall #-} {-# OPTIONS_GHC -fcontext-stack=34 #-} -- for N32 -- {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- TEMP -- {-# OPT...
conal/type-encode
src/TypeEncode/Plugin.hs
bsd-3-clause
13,134
0
22
2,907
3,456
1,826
1,630
189
3
{-# LANGUAGE NoImplicitPrelude #-} module HMenu.Provider (module X) where import HMenu.Provider.Path as X import HMenu.Provider.Types as X import HMenu.Provider.XDG as X
Adirelle/hmenu
src/HMenu/Provider.hs
bsd-3-clause
205
0
4
56
37
27
10
5
0
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE GADTs #-} module Llvm.Pass.Rewriter where import Control.Monad import Data.Maybe import Prelude hiding (succ) import qualified Compiler.Hoopl as H import Llvm.Hir.Data import Llvm.Query.Type import Llvm.Util.Monadic (maybeM) import Debug.Trace type MaybeChange a = a -...
sanjoy/hLLVM
src/Llvm/Pass/Rewriter.hs
bsd-3-clause
10,436
0
8
3,972
235
130
105
19
1
module Main where import FragnixServer ( application) import Network.Wai.Handler.Warp ( run) main :: IO () main = run 8081 application
phischu/fragnix-server
executable-src/Main.hs
bsd-3-clause
144
0
6
29
44
26
18
7
1
{-# LANGUAGE OverloadedStrings #-} module Combined where import Nero import Nero.Application (nest) import Data.Text.Lazy (Text) name :: Request -> Maybe Text name = preview (_GET . path . prefixed "/hello/") surname :: Request -> Maybe Text surname = preview (param "surname") app1 :: Request -> Maybe Response app1...
plutonbrb/nero-examples
examples/Combined.hs
bsd-3-clause
732
0
11
143
277
145
132
18
1
module Console ( defaultKeys , draw , getAction ) where import Data.Array.IArray import Data.Function (on) import Data.List (groupBy) import Graphics.Vty import Types draw :: Vty -> Level -> IO () draw vty level = do let level' = amap drawCell level cells = assocs level' rows = (map.map) snd $ g...
bjornars/HaskellGame
src/Console.hs
bsd-3-clause
1,450
0
14
412
583
305
278
-1
-1
{-# OPTIONS_GHC -fno-warn-unused-do-bind #-} module NanoParsec where import Data.Char import Control.Monad import Control.Applicative newtype Parser a = Parser { parse :: String -> [(a, String)] } runParser :: Parser a -> String -> a runParser m s = case parse m s of [(res, [])] -> res [(_, rs)] -> err...
zanesterling/haskell-compiler
src/NanoParsec/NanoParsec.hs
bsd-3-clause
4,361
0
13
1,148
1,644
850
794
115
4
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PackageImports #-} {-# LANGUAGE UnicodeSyntax #-} {-| [@ISO639-1@] - [@ISO639-2B@] paa [@ISO639-3@] hui [@Native name@] - [@English name@] Huli -} module Text.Numeral.Language.PAA.TestData (cardina...
telser/numerals
src-test/Text/Numeral/Language/PAA/TestData.hs
bsd-3-clause
5,244
0
8
1,324
993
664
329
112
1
{-# LANGUAGE GeneralizedNewtypeDeriving, LambdaCase, RecordWildCards #-} -- | Stability: Experimental module Mahjong.Riichi where import Data.List as L (delete) -- import Data.MultiSet as MS import Mahjong.Class -- import Mahjong.Hand import Mahjong.Player import Mahjong.Tile -- * Ri...
TakSuyu/mahjong
src/Mahjong/Riichi.hs
mit
4,623
0
13
1,235
867
459
408
63
2
module Crypto.Cipher.ECDSA.Util where import Data.Text.Lazy (Text) import Data.Text.Lazy.Read (hexadecimal) import qualified Data.ByteString.Lazy as BS readHexInteger :: Text -> Integer readHexInteger = either error fst . hexadecimal -- |Calulate the length in bits of an Integer (log2) bitSize :: Integer -...
fhaust/bitcoin
src/Crypto/Cipher/ECDSA/Util.hs
mit
936
0
15
220
314
172
142
21
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-redshift/gen/Network/AWS/Redshift/EnableLogging.hs
mpl-2.0
4,187
0
11
945
526
327
199
72
1
<?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="fa-IR"> <title>SOAP Scanner | ZAP Extension</title> <maps> <homeID>top</homeID> <mapre...
veggiespam/zap-extensions
addOns/soap/src/main/javahelp/org/zaproxy/zap/extension/soap/resources/help_fa_IR/helpset_fa_IR.hs
apache-2.0
974
80
66
160
415
210
205
-1
-1
{- safely running shell commands - - Copyright 2010-2013 Joey Hess <joey@kitenet.net> - - License: BSD-2-clause -} module Utility.SafeCommand where import System.Exit import Utility.Process import System.Process (env) import Data.String.Utils import Control.Applicative import System.FilePath import Data.Char {-...
abailly/propellor-test2
src/Utility/SafeCommand.hs
bsd-2-clause
3,995
4
12
773
1,080
567
513
64
4
module SDL.Input ( module SDL.Input.GameController , module SDL.Input.Joystick , module SDL.Input.Keyboard , module SDL.Input.Mouse ) where import SDL.Input.GameController import SDL.Input.Joystick import SDL.Input.Keyboard import SDL.Input.Mouse
svenkeidel/sdl2
src/SDL/Input.hs
bsd-3-clause
258
0
5
35
60
41
19
9
0
----------------------------------------------------------------------------- -- | -- Module : Network.Hackage.CabalInstall.Setup -- Copyright : (c) David Himmelstrup 2005 -- License : BSD-like -- -- Maintainer : lemmih@gmail.com -- Stability : provisional -- Portability : portable -- -- -----------...
FranklinChen/hugs98-plus-Sep2006
packages/Cabal/Network/Hackage/CabalInstall/Setup.hs
bsd-3-clause
8,823
2
17
2,806
2,072
1,116
956
159
14
{-# LANGUAGE CPP #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} module Test.Foundation.Network.IPv6 ( testNetworkIPv6 ) where import Foundation import Foundation.Check import Foundation.Network.IPv6 import Test.Data.Network import Test.Foundation.Storable -- | test pr...
vincenthz/hs-foundation
foundation/tests/Test/Foundation/Network/IPv6.hs
bsd-3-clause
2,307
0
13
459
768
428
340
22
1
module Sql ( module Sql.Init , module Sql.Sessions , module Sql.Users , module Sql.Utils ) where import Sql.Init import Sql.Sessions import Sql.Users import Sql.Utils
hherman1/CatanServ
src/Sql.hs
bsd-3-clause
188
0
5
45
50
32
18
9
0
{-# LANGUAGE NoImplicitPrelude, OverloadedStrings #-} {-# OPTIONS -Wall #-} module Main(main) where import Control.Applicative import Control.Monad hiding (forM) import qualified Data.Text.IO as T import Data.Foldable as Foldable import Data.Traversable import Data...
nushio3/Paraiso
examples-old/Life/LifeMain.hs
bsd-3-clause
4,756
0
15
1,108
1,420
791
629
89
1
module Main where import Hans.NetworkStack import qualified Hans.Layer.Ethernet as Eth import Hans.Device.Pcap main :: IO () main = do ns <- newNetworkStack Just (dev,nd) <- openPcap "eth0" $ Just $ Mac 1 2 3 4 5 6 print nd let Just mac = (ndMAC nd) Eth.addEthernetDevice (nsEthernet ns) mac (pcapSend dev)...
tolysz/hans-pcap
example/test.hs
bsd-3-clause
433
0
11
83
160
80
80
12
1
{-# LANGUAGE Haskell98 #-} {-# LINE 1 "Control/Monad/Trans/Control.hs" #-} {-# LANGUAGE CPP , NoImplicitPrelude , RankNTypes , TypeFamilies , FunctionalDependencies , FlexibleInstances , Undecidab...
phischu/fragnix
tests/packages/scotty/Control.Monad.Trans.Control.hs
bsd-3-clause
24,430
21
13
6,545
4,822
2,767
2,055
190
1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} -- | Take an existing build plan and bump all packages to the newest version in -- the same major version number. module Stackage.UpdateBuildPlan ( updateBuildConstraints , updateBuildPlan ) where impor...
jeffreyrosenbluth/stackage
Stackage/UpdateBuildPlan.hs
mit
2,121
0
14
567
453
242
211
42
4
{-# LANGUAGE NoMonomorphismRestriction #-} module Main where import Data.List import Data.Dynamic import System.Directory import System.IO import System.Environment (getArgs, getProgName) import System.Exit (exitFailure) import Text.Parsec import qualified Data.Map.Strict as M import qualified Data.Number.LogFloat a...
zaxtax/hakaru
haskell/Examples/Quadrotor.hs
bsd-3-clause
5,892
13
17
1,422
2,296
1,197
1,099
136
3
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 -} {-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable, DeriveFunctor, DeriveFoldable, DeriveTraversable #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE UndecidableInstan...
fmthoma/ghc
compiler/hsSyn/HsDecls.hs
bsd-3-clause
70,357
4
17
21,025
12,156
6,609
5,547
872
6
{-# LANGUAGE CPP #-} -- | Handy functions for creating much Core syntax module ETA.Core.MkCore ( -- * Constructing normal syntax mkCoreLet, mkCoreLets, mkCoreApp, mkCoreApps, mkCoreConApps, mkCoreLams, mkWildCase, mkIfThenElse, mkWildValBinder, mkWildEvBinder, sortQuantV...
pparkkin/eta
compiler/ETA/Core/MkCore.hs
bsd-3-clause
31,881
0
16
8,639
4,890
2,671
2,219
365
4
-- GSoC 2015 - Haskell bindings for OpenCog. {-# LANGUAGE TypeOperators #-} -- | This library defines Haskell Bindings for the AtomSpace. module OpenCog.AtomSpace ( -- * AtomSpace Environment AtomSpace , AtomSpaceObj , getParent , newAtomSpace , onAtomSpace , (<:) , runOnNewAtomSp...
inflector/atomspace
opencog/haskell/OpenCog/AtomSpace.hs
agpl-3.0
1,317
0
5
347
194
135
59
44
0
{-| Module : Idris.Unlit Description : Turn literate programs into normal programs. Copyright : License : BSD3 Maintainer : The Idris Community. -} module Idris.Unlit(unlit) where import Idris.Core.TT import Data.Char unlit :: FilePath -> String -> TC String unlit f s = do let s' = map ulLine (lines s) ...
tpsinnem/Idris-dev
src/Idris/Unlit.hs
bsd-3-clause
1,276
0
12
334
510
268
242
22
1
{-# LANGUAGE StandaloneKindSignatures #-} {-# LANGUAGE NoPolyKinds #-} module T16722 where import Data.Kind type D :: k -> Type data D a
sdiehl/ghc
testsuite/tests/saks/should_fail/T16722.hs
bsd-3-clause
140
0
5
25
25
17
8
-1
-1
{-# LANGUAGE ViewPatterns #-} -- Simple implementation of the Lambda Calculus. module Lambda where -- The datatype of Lambda Calculus terms. data Term = Lam !Term | App !Term !Term | Var !Int deriving (Show,Eq,Ord) -- Folds over a term. fold :: (t -> t) -> (t -> t -> t) -> (Int -> t) -> Term -> ...
shaunstanislaus/caramel
src/Lambda.hs
mit
1,620
0
13
496
717
357
360
41
5
{-# htermination (pt :: (c -> a) -> (b -> c) -> b -> a) #-} import qualified Prelude data MyBool = MyTrue | MyFalse data List a = Cons a (List a) | Nil pt :: (b -> a) -> (c -> b) -> c -> a; pt f g x = f (g x);
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/DOT_1.hs
mit
235
0
8
81
91
51
40
5
1
module Euler.Problem3Spec ( spec ) where import Helper import Euler.Problem3 spec :: Spec spec = do describe "primeFactors" $ do it "of 3" $ do (primeFactors 3 :: [Int]) `shouldBe` ([3] :: [Int]) it "of 6" $ do (primeFactors 6 :: [Int]) `shouldBe` ([2,3] :: [Int]) it "of 8" $ do (pri...
slogsdon/haskell-exercises
pe/testsuite/specs/Euler/Problem3Spec.hs
mit
642
0
22
172
293
158
135
19
1
module HaskellCourse.UntypedLC.Parser (parseExp) where import Data.Maybe (fromMaybe) import HaskellCourse.Parsing import HaskellCourse.Prim import HaskellCourse.UntypedLC.AST parseExp :: SExpr -> Exp parseExp (AtomNum n) = LitInt n parseExp (AtomSym s) = parseVar s parseExp (List [AtomSym "let", List [AtomSym v, e],...
joshcough/HaskellCourse
src/HaskellCourse/UntypedLC/Parser.hs
mit
745
0
11
123
326
169
157
16
2
-- module EventEmitter where {-# LANGUAGE OverloadedStrings #-} import Control.Concurrent import Control.Monad import Data.JSString import Data.String import GHCJS.Foreign import GHCJS.Foreign.Callback import GHCJS.Types import JavaScript.A...
beijaflor-io/ghcjs-commonjs
old-examples/EventEmitter.hs
mit
2,307
18
13
537
596
291
305
52
1
module Sgd.Num.Vector where -- http://stackoverflow.com/questions/17892065/mutable-random-access-array-vector-with-high-performance-in-haskell -- http://haskell.1045720.n5.nabble.com/fishing-for-ST-mutable-Vector-examples-td4333461.html -- import qualified Data.IntMap as IntMap import qualified Data.Vector.Unboxed as...
daz-li/svm_sgd_haskell
src/Sgd/Num/Vector.hs
mit
1,594
0
11
324
538
292
246
29
1
import Configuration.Dotenv (loadFile) import Database.PostgreSQL.Simple.Util (withTransactionRolledBack) import RunMigrations (runAllMigrations) import Test.Hspec (around_, describe, hspec) import Util (getConn) import qualified ConferenceSpec main :: IO () main = do loadFile False "config/config.env" conn <...
robertjlooby/confsinfo
backend/test/Spec.hs
mit
499
0
12
102
130
68
62
15
1
import Haste import Haste.DOM import Haste.Graphics.Canvas import Basal steps :: Int steps = 20000 size :: Int size = 500 main = do Just canv <- getCanvasById "field" Just button <- elemById "button" _ <- onEvent button OnClick (onButtonClick canv steps) seed <- newSeed renderRW canv seed steps ...
lesguillemets/schrammloewner
src/HexaRandom.hs
mit
650
0
12
161
263
130
133
22
1
{-# LANGUAGE InstanceSigs #-} module TwentyFive where import Control.Applicative (liftA2) newtype Compose f g a = Compose { getCompose :: f (g a) } deriving (Eq, Show) instance (Functor f, Functor g) => Functor (Compose f g) where fmap f (Compose fga) = Compose $ (fmap . fmap) f fga -- Twinplicative...
mudphone/HaskellBook
src/TwentyFive.hs
mit
2,150
0
10
576
872
457
415
52
0
{-# LANGUAGE UnicodeSyntax #-} module Pixs.Operations.Pixel where import Codec.Picture (PixelRGBA8(..)) import Data.Word import Control.Arrow ((***)) limit ∷ (Num c, Ord c) ⇒ c → c limit = max 0 . min 255 -- TODO: PixelRGBA8 should not really have an instance of -- ...
ayberkt/pixs
src/Pixs/Operations/Pixel.hs
mit
3,335
32
15
986
877
478
399
53
1
{-# LANGUAGE RankNTypes #-} -- | A convenience wrapper around Options.Applicative. module SimpleOptions ( simpleOptions , Options.addCommand , Options.simpleVersion ) where import Control.Applicative import Control.Monad.Trans.Either (EitherT) import Control.Monad.Trans.W...
fpco/stackage-cli
src/SimpleOptions.hs
mit
1,194
0
15
258
206
117
89
24
1
module Y2018.M07.D30.Exercise where import Data.Set (Set) -- We have two databases pilot, entities, exDir :: FilePath exDir = "Y2018/M07/D30/" pilot = "pilot_db.csv" entities = "entities_db.csv" -- We want to merge those databases into one SUPER-database -- Read in the tables from each database (mind the header in...
geophf/1HaskellADay
exercises/HAD/Y2018/M07/D30/Exercise.hs
mit
675
0
7
113
108
65
43
12
1
{-# LANGUAGE FlexibleInstances #-} module Sixteen where import GHC.Arr import Test.QuickCheck a = fmap (+1) $ read "[1]" :: [Int] b = (fmap . fmap) (++ "lol") (Just ["Hi,", "Hello"]) c = (*2) . (\x -> x - 2) d = ((return '1' ++) . show) . (\x -> [x, 1..3]) e :: IO Integer e = let ioi = readIO "1" :: IO Integer ...
mudphone/HaskellBook
src/Sixteen.hs
mit
7,282
0
13
1,808
3,571
1,865
1,706
208
1
module Proteome.Buffers.Syntax where import qualified Data.Map.Strict as Map (fromList) import Ribosome.Data.Syntax ( HiLink(HiLink), Syntax(Syntax), SyntaxItem(siOptions, siParams), syntaxMatch, syntaxVerbatim, ) import Text.RawString.QQ (r) asterisk :: SyntaxItem asterisk = item { siOptions = options,...
tek/proteome
packages/proteome/lib/Proteome/Buffers/Syntax.hs
mit
1,318
0
9
251
355
217
138
-1
-1
{-# LANGUAGE GADTs, KindSignatures, MultiParamTypeClasses, FlexibleContexts, FlexibleInstances, ScopedTypeVariables, TypeFamilies, EmptyDataDecls #-} module Language.SPL.Intermediate ( Intermediate (..), Index (..), Layout (..), peek, Translate (..), translate, convert, Accumulator (..), stochastic ) where import quali...
vbalalla/financial_contract_language
Language/Intermediate.hs
mit
8,979
390
59
1,611
4,040
2,038
2,002
-1
-1
{-# LANGUAGE PatternGuards, FlexibleContexts #-} module Crystal.Post (postprocess, DeclExpr) where import Control.Lens hiding (transform, transformM, universe) import Control.Monad import Control.Monad.Reader import Control.Monad.Writer import Data.List import Data.Generics import Data.Generics.Uniplate.Operations imp...
Botje/crystal
Crystal/Post.hs
gpl-2.0
3,003
0
17
932
1,233
626
607
63
8
-- This file is part of economy. -- -- economy 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. -- -- economy is distributed in the h...
rootmos/economy
src/Arithmetics.hs
gpl-3.0
6,511
0
23
1,662
2,053
993
1,060
103
1
{-# LANGUAGE OverloadedStrings #-} module InputChecker( checkArgs, InputError(..) )where --import qualified Data.Text as T --import System.Directory data InputError = InputError String deriving (Show) usageText :: String usageText = "Usage: 2 file inputs" errorText :: String errorText = "Invalid error ...
mkarpis/hdiff
src/InputChecker.hs
gpl-3.0
740
0
9
130
211
114
97
19
1
-- | Lexer for P -- | Juan García Garland (Nov. 2016) module Lexer where import Exception import Data.Char -- | Some tokens have attributes type Lexeme = String -- | DataType for tokens data Token = TProgram | TResult | TLParen | TRParen | TVar Lexeme | TZero | TAssignSym | TSuc ...
jota191/PLang
src/Lexer.hs
gpl-3.0
1,718
0
13
409
722
395
327
36
1
{-# LANGUAGE CPP #-} ---------------------------------------------------------------------- -- | -- Module : Text.TeX.Parser.Basic -- Copyright : 2015-2017 Mathias Schenner, -- 2015-2016 Language Science Press. -- License : GPL-3 -- -- Maintainer : mschenner.dev@gmail.com -- Stability :...
synsem/texhs
src/Text/TeX/Parser/Basic.hs
gpl-3.0
11,781
0
16
2,566
2,704
1,514
1,190
237
6
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-logging/gen/Network/Google/Resource/Logging/Folders/Locations/Buckets/List.hs
mpl-2.0
6,652
0
18
1,455
899
525
374
130
1
-- TODO: Refactor Betty.Signup, make it testable, and actually test -- that piece of code instead of this isolated code. module SESSpec (spec) where import TestImport #if USE_AWS_SES import Betty.SESCreds (access, ender, secret, sender) import Control.Monad.Trans.Resource (runResourceT) import Netwo...
sajith/betty-web
test/SESSpec.hs
agpl-3.0
1,834
0
19
552
350
206
144
7
1
module ViperVM.Library.OpenCL.FloatMatrixMul where import ViperVM.Backends.OpenCL.Program import ViperVM.Backends.OpenCL.Kernel import ViperVM.Common.Util (roundTo) import Paths_ViperVM program :: IO Program program = do fileName <- getDataFileName "lib/ViperVM/Library/OpenCL/FloatMatrixMul.cl" src <- readFile ...
hsyl20/HViperVM
lib/ViperVM/Library/OpenCL/FloatMatrixMul.hs
lgpl-3.0
736
0
8
119
225
125
100
19
1
{-# LANGUAGE TemplateHaskell, KindSignatures, DataKinds, PolyKinds, TypeFamilies, UndecidableInstances, GADTs, AllowAmbiguousTypes #-} module BackwardsStateMonad where import Data.Singletons.TH import Data.Singletons.Prelude $(promote [d| data Nat = Zero | Succ Nat bind :: (Nat -> (Foo, Nat)) -> (Foo -> Nat -> (...
jstolarek/sandbox
haskell/singletons/BackwardsStateMonad.hs
unlicense
1,161
0
10
394
139
75
64
28
1
module P9x.P00.P00_ ( myLast', myLast'', myLast''', myLast'''', myLast''''', myButLast, myButLast', myButLast'', myButLast''', myButLast'''', lastbut1, lastbut1safe, elementAt, elementAt', elementAt'', elementAt''', elementAt_w'pf, myLength, myLength1', myLength2', myLength3', myLength4', myLength5', my...
dkandalov/katas
haskell/p99/src/p9x/p00/P00_.hs
unlicense
31,138
0
16
8,375
15,828
8,487
7,341
-1
-1
-- Copyright (c) 2015 Bart Massey -- [This program is licensed under the "2-clause ('new') BSD License"] -- Please see the file COPYING in the source -- distribution of this software for license terms. import Text.SSV tsvFormat :: SSVFormat tsvFormat = csvFormat { ssvFormatSeparator = '\t' } main :: IO () main = int...
BartMassey/haskell-basic-examples
tabcomma2.hs
bsd-2-clause
356
0
8
61
56
32
24
5
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE Unsafe #-} {-# OPTIONS_HADDOCK show-extensions #-} {-| Copyright : (C) 2015, University of Twente License : BSD2 ...
Ericson2314/clash-prelude
src/CLaSH/Prelude/ROM/File.hs
bsd-2-clause
11,995
0
12
3,285
1,037
642
395
-1
-1
module TestTypes (run) where {- Everything below this comment can be copy-pasted into: https://repl.it/languages/haskell The on-line Haskell REPL doesn't seem to support selective imports of Prelude, so (+) has been replaced with (~+). -} infixl 6 ~+ class Additive a where (~+) :: a -> a -> a zero :: a instanc...
pmilne/algebra
test/TestTypes.hs
bsd-3-clause
2,068
0
13
659
788
393
395
50
1
#!/usr/local/bin/runghc {-# OPTIONS_GHC -Wall #-} {-# LANGUAGE Trustworthy,ScopedTypeVariables #-} module Main ( main ) where import MaintainData import System.Environment import System.Process import System.Directory import System.Exit import System.IO.Extra(writeFi...
Xidian-Haskell-Server-Keeper/XHSK-Home
maintain/Main.hs
bsd-3-clause
1,061
2
12
372
277
148
129
-1
-1
{-# LANGUAGE CPP #-} #if __GLASGOW_HASKELL__ {-# LANGUAGE DeriveDataTypeable, StandaloneDeriving #-} #endif #if !defined(TESTING) && __GLASGOW_HASKELL__ >= 703 {-# LANGUAGE Trustworthy #-} #endif #if __GLASGOW_HASKELL__ >= 708 {-# LANGUAGE RoleAnnotations #-} {-# LANGUAGE TypeFamilies #-} #endif #include "containers.h...
DavidAlphaFox/ghc
libraries/containers/Data/Map/Base.hs
bsd-3-clause
111,520
0
21
28,710
23,586
12,396
11,190
-1
-1
{-# LANGUAGE TypeFamilies, GeneralizedNewtypeDeriving, DataKinds, ViewPatterns,GADTs #-} import GL import OpenGlDigits import Control.Concurrent.STM import Control.Concurrent import Graphics.UI.Gtk hiding (Point,Signal, Object) import Graphics.UI.Gtk.OpenGL import Graphics.Rendering.OpenGL hiding (Projection) import...
paolino/sprites
ConnectsMain.hs
bsd-3-clause
12,387
64
18
3,909
4,900
2,443
2,457
227
6
{-# LANGUAGE MagicHash, NoImplicitPrelude, TypeFamilies, UnboxedTuples, RoleAnnotations #-} ----------------------------------------------------------------------------- -- | -- Module : GHC.Types -- Copyright : (c) The University of Glasgow 2009 -- License : see libraries/ghc-prim/LICENSE --...
alexander-at-github/eta
libraries/ghc-prim/GHC/Types.hs
bsd-3-clause
9,300
3
10
1,953
542
390
152
-1
-1
module Day13 (part1, part2, test1, getTile, showMap, testMap, part2Solution, part1Solution) where import Data.Bits import Data.Graph.AStar import qualified Data.HashSet as H import Data.List import Data.Graph.Inductive.Query.BFS import Data.Graph.Inductive.Graph import Data.Graph.Inductive.Patr...
z0isch/aoc2016
src/Day13.hs
bsd-3-clause
2,741
0
17
736
1,286
703
583
66
3
{-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE Flexib...
rolph-recto/liquidhaskell
src/Language/Haskell/Liquid/Constraint/Generate2.hs
bsd-3-clause
73,935
695
17
20,775
27,250
14,042
13,208
-1
-1
{-# LANGUAGE OverloadedStrings #-} module Storage.Object.Aws where import qualified Aws import qualified Aws.Core as Aws import qualified Aws.S3 as S3 import Control.Monad.IO.Class import Control.Monad.Trans.Resource (runResourceT) import qualified Data.ByteString as S import qualified Data.Text as T import q...
wayofthepie/collect
src/Storage/Object/Aws.hs
bsd-3-clause
1,807
0
17
404
424
230
194
40
1
{-# LANGUAGE OverloadedStrings #-} module Main where import Prelude hiding ((.), id) import Control.Category import Data.Monoid import Data.Maybe import Control.Applicative import qualified Data.ByteString as B import qualified Data.ByteString.Char8 as BS import qualif...
bernstein/ircfs
tests/TestEncode.hs
bsd-3-clause
7,347
0
13
1,631
1,888
1,079
809
121
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE StandaloneDeriving #-} module Spec.Wordpress (tests) where import qualified Data.Text as T import qualified Data.XML.Types as XML import Hakyll.Convert.Common (DistilledPost (..)) import Hakyll.Convert.Wordpress import Spec.SpecHelpers import Test.Tasty (TestTree, testG...
kowey/hakyll-convert
test/spec/Spec/Wordpress.hs
bsd-3-clause
12,402
0
17
3,260
2,268
1,220
1,048
265
1
{-# LANGUAGE DeriveDataTypeable #-} -- | -- Module : Network.Socks5.Types -- License : BSD-style -- Maintainer : Vincent Hanquez <vincent@snarc.org> -- Stability : experimental -- Portability : unknown module Network.Socks5.Types ( SocksVersion(..) , SocksCommand(..) , SocksMethod(..) , Sock...
erikd/hs-socks
Network/Socks5/Types.hs
bsd-3-clause
5,911
0
10
1,379
1,337
736
601
143
1
module SSH.Sender where import Control.Concurrent.Chan import Control.Monad (replicateM) import Data.Word import System.IO import System.Random import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy as LBS import SSH.Debug import SSH.Crypto import SSH.Packet import SSH.Util data SenderState ...
alexbiehl/hs-ssh
src/SSH/Sender.hs
bsd-3-clause
3,569
0
22
1,279
1,101
560
541
90
7
{-#LANGUAGE DeriveDataTypeable , DeriveFunctor , DeriveFoldable , DeriveTraversable #-} module Language.Asdf.AST where import Data.Data import Data.Foldable import Data.Traversable import qualified Data.Map as Map import Text.Parsec data Prec = None | In Rational |...
sw17ch/Asdf
src/Language/Asdf/AST.hs
bsd-3-clause
2,563
0
9
857
587
330
257
61
0
{-# LANGUAGE OverloadedStrings, PackageImports #-} import Control.Applicative import Control.Monad import "monads-tf" Control.Monad.Trans import Data.HandleLike import System.Environment import Network import Network.PeyoTLS.ReadFile import Network.PeyoTLS.Client import "crypto-random" Crypto.Random import qualified ...
YoshikuniJujo/peyotls
peyotls/examples/checkMyServer.hs
bsd-3-clause
1,111
8
15
195
376
196
180
31
2
module Day5.DoesntHeHaveInternElvesForThis ( countNiceStrings ) where import Data.List as L import Data.List.Split as S countNiceStrings :: String -> Int countNiceStrings = undefined -- filter doesNotContainDisallowedStrings . filter containsAtLeastOneLetterThatAppearsTwiceInARow . filter hasAtLeastThreeVowel...
fboyer/adventofcode-haskell
src/Day5/DoesntHeHaveInternElvesForThis.hs
bsd-3-clause
1,335
0
9
221
342
178
164
31
1
{-# OPTIONS_GHC -fno-warn-unused-imports #-} module Diagrams.Backend.HsQML.Tutorial ( -- * DiagramCanvas QML script -- $diagramcanvas -- * Context object -- $contextobject -- * Main window -- $mainwindow -- * Rendering diagrams -- $rendering ) where import Graphics.QML import Diagrams.Backend.HsQML import Diagrams...
marcinmrotek/diagrams-hsqml
src/Diagrams/Backend/HsQML/Tutorial.hs
bsd-3-clause
5,634
0
4
984
43
34
9
5
0
{-# LANGUAGE PatternGuards #-} import System.Exit (exitSuccess) import qualified Debug.Trace as T import Control.Monad (forM_, when) import Control.Monad.ST (runST) import Control.Applicative ((<$>)) import qualified Data.Vector as Vec import qualified Data.Vector.Mutable as VM import Data.Vector ((!), (//)) import qu...
dan-t/clothsim
Main.hs
bsd-3-clause
7,158
7
19
2,168
2,585
1,320
1,265
-1
-1
module Main where import Data.Monoid () import Test.Framework import Test.Framework.Providers.HUnit import Test.Framework.Providers.QuickCheck2 import Test.HUnit import Test.QuickCheck import qualified TestDigram import qualified TestEnnGramMap import qualified TestCandSel import qualified Properties main :: IO () ...
pcrama/message-compiler
test/Suite.hs
bsd-3-clause
2,810
0
9
347
451
243
208
55
1
----------------------------------------------------------------------------- -- | -- Module : RefacAsPatterns -- Copyright : (c) Christopher Brown 2007 -- -- Maintainer : cmb21@kent.ac.uk -- Stability : provisional -- Portability : portable -- -- This module contains a transformation for HaRe. -- Conver...
forste/haReFork
refactorer/RefacAsPatterns.hs
bsd-3-clause
18,714
0
22
5,798
6,274
3,133
3,141
-1
-1
module WSC.Util where import Control.Applicative import Data.ByteString.UTF8 as UTF8 import Data.HashSet as HashSet tupleA :: Applicative f => f a -> f b -> f (a, b) tupleA = liftA2 (,) set :: [String] -> HashSet ByteString set = HashSet.fromList . fmap UTF8.fromString
DylanLukes/Winchester-STG-Compiler
WSC/Util.hs
bsd-3-clause
272
0
9
45
103
57
46
8
1
{-# LANGUAGE PatternGuards, DeriveFunctor, TypeSynonymInstances #-} module Idris.Core.CaseTree(CaseDef(..), SC, SC'(..), CaseAlt, CaseAlt'(..), Phase(..), CaseTree, simpleCase, small, namesUsed, findCalls, findUsedArgs) where import Idris.Core.TT import Control.Monad.State i...
ctford/Idris-Elba-dev
src/Idris/Core/CaseTree.hs
bsd-3-clause
25,707
0
20
9,460
10,105
5,099
5,006
494
22
{-# LANGUAGE OverloadedStrings, ExtendedDefaultRules #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {-| Plot traces to html using lucid Example code: @ plotHtml :: Html () plotHtml = toHtml $ plotly "myDiv" [trace] & layout . title ?~ "my plot" & layout . width ?~ 300 @ where...
filopodia/open
plotlyhs/src/Graphics/Plotly/Lucid.hs
mit
1,351
0
14
273
299
158
141
23
1
{-# LANGUAGE DeriveDataTypeable, TemplateHaskell #-} module Rewriting.Derive.Instance where import Autolib.ToDoc import Autolib.Reader import Data.Typeable data ( Reader system, ToDoc system , Reader object, ToDoc object ) => Instance system object = Instance { system :: system ,...
florianpilz/autotool
src/Rewriting/Derive/Instance.hs
gpl-2.0
503
2
9
136
114
68
46
13
0
-- Copyright (c) 2013 Eric McCorkle. All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions -- are met: -- -- 1. Redistributions of source code must retain the above copyright -- notice, this list of conditi...
emc2/compiler-misc
src/Data/Hashable/ExtraInstances.hs
bsd-3-clause
2,424
0
10
398
206
133
73
13
0
{-# LANGUAGE ForeignFunctionInterface, CPP, FlexibleContexts, RankNTypes #-} {-| Bindings to the CUDD BDD library This is a straightforward wrapper around the C library. See <http://vlsi.colorado.edu/~fabio/CUDD/> for documentation. Exampe usage: > import Cudd.Cudd > > main = do > let manager = cuddInit > ...
maweki/haskell_cudd
Cudd/Cudd.hs
bsd-3-clause
14,778
18
18
3,166
5,084
2,558
2,526
344
2
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE DeriveDataTypeable #-} module VSim.VIR.Monad ( ParserState(..) , Parser(..) , ParserError(..) , runParser , newState , formatEr...
ierton/vsim
src/VSim/VIR/Monad.hs
bsd-3-clause
3,322
0
16
802
1,129
591
538
103
2
{-# LANGUAGE BangPatterns, CPP, MagicHash, Rank2Types, UnboxedTuples #-} {-# OPTIONS_GHC -fno-full-laziness -funbox-strict-fields #-} -- | Zero based arrays. -- -- Note that no bounds checking are performed. module Data.HashMap.Array ( Array , MArray -- * Creation , new , new_ , singleton ...
bgamari/unordered-containers
Data/HashMap/Array.hs
bsd-3-clause
13,153
0
14
3,718
3,912
2,005
1,907
-1
-1
module Dotnet.System.Xml.XmlAttributeTy where import Dotnet import Dotnet.System.Xml.XmlNodeTy data XmlAttribute_ a type XmlAttribute a = Dotnet.System.Xml.XmlNodeTy.XmlNode (XmlAttribute_ a)
alekar/hugs
dotnet/lib/Dotnet/System/Xml/XmlAttributeTy.hs
bsd-3-clause
195
0
7
20
43
29
14
-1
-1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE RankNTypes #-} ...
tolysz/prepare-ghcjs
spec-lts8/base/Data/Type/Equality.hs
bsd-3-clause
11,498
21
34
2,841
3,516
2,026
1,490
-1
-1
module ImportifyUsed (doCache) where import Importify.Main (doCache)
serokell/importify
test/test-data/importify@project/01-ImportifyUsed.hs
mit
80
0
5
18
19
12
7
2
0
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PatternGuards #-} {-# LANGUAGE...
anton-dessiatov/stack
src/Stack/Fetch.hs
bsd-3-clause
28,789
0
30
8,578
6,506
3,283
3,223
545
11
{-# LANGUAGE GADTs #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeInType #-} {-# LANGUAGE TypeOperators #-} module Bug where import Data.Kind data family Sing (a :: k) data HR (a :: j) (b :: k) where HRefl :: HR a a data instance Sing (z :: HR a...
ezyang/ghc
testsuite/tests/typecheck/should_compile/T13879.hs
bsd-3-clause
703
0
10
215
262
160
102
-1
-1
module A6 where --Any type/data constructor name declared in this module can be renamed. --Any type variable can be renamed. --Rename type Constructor 'BTree' to 'MyBTree' data BTree a = Empty | T a (BTree a) (BTree a) deriving Show buildtree :: Ord a => [a] -> BTree a buildtree [] = Empty buildtree...
kmate/HaRe
old/testing/unfoldAsPatterns/A6_TokOut.hs
bsd-3-clause
780
0
13
186
328
171
157
17
1
module Opaleye.SQLite.Operators (module Opaleye.SQLite.Operators) where import qualified Data.Foldable as F import Opaleye.SQLite.Internal.Column (Column(Column), unsafeCase_, unsafeIfThenElse, unsafeGt, unsafeEq) import qualified Opaleye.SQLite.Internal.Column as C...
bergmark/haskell-opaleye
opaleye-sqlite/src/Opaleye/SQLite/Operators.hs
bsd-3-clause
2,541
0
10
473
1,004
540
464
57
1
module Lib ( someFunc ) where someFunc :: IO () someFunc = print "some func"
juhp/stack
test/integration/tests/3396-package-indices/files/src/Lib.hs
bsd-3-clause
88
0
6
26
27
15
12
4
1
------------------------------------------------------------------------------ -- | -- Module: Plugins.Utils -- Copyright: (c) 2010 Jose Antonio Ortega Ruiz -- License: BSD3-style (see LICENSE) -- -- Maintainer: Jose A Ortega Ruiz <jao@gnu.org> -- Stability: unstable -- Portability: unportable -- Created: Sat Dec 11, 2...
tsiliakis/xmobar
src/Plugins/Utils.hs
bsd-3-clause
1,067
0
16
220
265
141
124
19
1
{-# OPTIONS -fwarn-tabs #-} -- Check we get a warning for multiple tabs, with the correct number of tabs -- mentioned module ShouldCompile where -- tab in middle of line tab1 = 'a' -- tab at end of line tab2 = 'b' -- two tabs in middle of line tab3 = 'c' tab4 = if True -- tab at start of line then 'd' -- tab at...
urbanslug/ghc
testsuite/tests/parser/should_compile/T9723b.hs
bsd-3-clause
378
8
5
89
49
33
16
8
2
module Pet.Pipeline where import Pet.Commands
fredmorcos/attic
projects/pet/archive/pet_haskell_modular_1/Pet/Pipeline.hs
isc
47
0
4
6
11
7
4
2
0
module Graphics.Urho3D.Input.InputConstants( MouseButton(..) , MouseButtonFlags , Qualifier(..) , QualifierFlags , Key(..) , Scancode(..) , HatPosition(..) , ControllerButton(..) , ControllerAxis(..) ) where import GHC.Generics import Graphics.Urho3D.Container.FlagSet import Data.Word import qua...
Teaspot-Studio/Urho3D-Haskell
src/Graphics/Urho3D/Input/InputConstants.hs
mit
89,469
0
8
15,606
22,506
12,830
9,676
-1
-1