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
module Generator ( generateLevel ) where import Graphics.UI.GLUT import FRP.Yampa.VectorSpace import Control.Monad import System.Random import Datatypes import Physics generateLevel :: Int -> Int -> StdGen -> GameLevel generateLevel enemyAmount asteroidAmount gen = GameLevel $ generateSeveralObjects enemyAmoun...
turion/haskell-asteroids
src/Generator.hs
mit
2,450
0
12
588
1,083
582
501
58
1
module Util where import Data.List import qualified Data.PSQueue as PSQ import qualified Data.Sequence as Seq import qualified Data.Set as Set import qualified Data.Foldable as Fold import Regular appendTo :: [a] -> a -> [a] appendTo as a = as ++ [a] -- Insert a list of (key, prio) values into a PSQ.PSQ insertList ...
afroisalreadyinu/LogAnalyzer
daemon/Util.hs
gpl-2.0
3,167
0
16
692
1,116
600
516
60
2
-- ColaDePrioridadPropiedades.hs -- Propiedades del TAD de colas de prioridad. -- José A. Alonso Jiménez https://jaalonso.github.com -- ===================================================================== {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE FlexibleInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module...
jaalonso/I1M-Cod-Temas
src/Tema_16/ColaDePrioridadPropiedades.hs
gpl-2.0
5,673
0
9
986
617
357
260
-1
-1
{-# LANGUAGE OverloadedStrings #-} module ByteStringUtils ( deleteAll, readBool, readNumber, readColor, compareStr , split, join, rstrip, replace -- MissingH reimplementations -- , mySub, mySubG -- pcre-less wrappers and reimplementations ...
bakineggs/k-framework
tools/OutputFilter/ByteStringUtils.hs
gpl-2.0
6,745
0
18
2,099
1,365
739
626
79
3
{- This module was generated from data in the Kate syntax highlighting file json.xml, version 1.3, by Sebastian Pipping (sebastian@pipping.org) -} module Text.Highlighting.Kate.Syntax.Json (highlight, parseExpression, syntaxName, syntaxExtensions) where import Text.Highlighting.Kate.Types import Text.High...
ambiata/highlighting-kate
Text/Highlighting/Kate/Syntax/Json.hs
gpl-2.0
6,911
0
20
1,049
1,875
996
879
124
9
module FormalLanguage.GrammarProduct.TH where import FormalLanguage.CFG.TH
choener/GrammarProducts
FormalLanguage/GrammarProduct/TH.hs
gpl-3.0
77
0
4
7
13
9
4
2
0
module Paths_binomial_theorem ( version, getBinDir, getLibDir, getDataDir, getLibexecDir, getDataFileName, getSysconfDir ) where import qualified Control.Exception as Exception import Data.Version (Version(..)) import System.Environment (getEnv) import Prelude catchIO :: IO a -> (Exception.IOException -...
nastya13/binomial-theorem
dist/build/autogen/Paths_binomial_theorem.hs
gpl-3.0
1,596
0
10
182
371
213
158
28
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} module HsPredictor.CSV.Load where -- standard import Control.Exception (bracket, catch, throwIO) import Control.Monad (when) import Control.Monad.Error (liftIO) import Data.Text ...
jacekm-git/HsPredictor
library/HsPredictor/CSV/Load.hs
gpl-3.0
4,395
0
15
1,298
1,291
674
617
98
4
{---------------------------------------------------------------------} {- Copyright 2015, 2016 Nathan Bloomfield -} {- -} {- This file is part of Feivel. -} {- ...
nbloomf/feivel
src/Feivel/Grammar/Perm.hs
gpl-3.0
1,639
0
8
622
137
91
46
14
0
{-# LANGUAGE ViewPatterns #-} module Cards.Shuffle (getCards, pick) where import Cards import System.Random import Control.Monad import Control.Applicative -- | Returns a 4-list of disjunct and distinct 8-lists. -- | All Cards will be dealt randomly. -- | dkc: Number of decks. -- | plc: Number of players. -- | cpp:...
Bolpat/CardGames
src/Cards/Shuffle.hs
gpl-3.0
1,839
0
11
469
578
303
275
28
1
{-# OPTIONS_GHC -Wall #-} module GrammarFilters where import Control.Monad import Grammar liftFilter :: (Grammar -> a) -> Node -> a liftFilter getter (Node g _ _) = getter g -- Read this type signature as (a -> Bool) -> (a -> Bool) -> a -> Bool andAlso :: (Monad m) => m Bool -> m Bool -> m Bool andAlso = liftM2 (&...
penguinland/nlp
GrammarFilters.hs
gpl-3.0
3,504
0
8
607
1,154
591
563
93
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-cognito-sync/gen/Network/AWS/CognitoSync/DescribeIdentityUsage.hs
mpl-2.0
4,661
0
9
931
528
323
205
67
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-ec2/gen/Network/AWS/EC2/EnableVpcClassicLink.hs
mpl-2.0
4,542
0
9
912
490
300
190
59
1
{- Author: Christian Sternagel <c.sternagel@gmail.com> (2009-2015, 2017) Author: René Thiemann <rene.thiemann@uibk.ac.at> (2009-2014) License: LGPL (see file COPYING.LESSER) -} module Main (main) where import Ceta -- the certifier import qualified Claim import System.Environment -- for getArgs import System.IO -- fo...
jwaldmann/ceta-postproc
src/Main.hs
lgpl-3.0
3,936
16
24
913
1,103
567
536
85
7
module Color ( Color(..), cadd, cfilter, cscale, isIntense ) where -- Color in R G B format -- values ranges from 0 to 1 data Color = Color !Double !Double !Double deriving (Show) -- Adds two colors, like combining two lights cadd :: Color -> Color -> Color cadd (Color r1 g1 b1) (Color r2 g2 b2) = Color (r1+r...
netom/haskell-ray
src/Color.hs
lgpl-3.0
773
0
7
162
303
164
139
18
1
-- Copyright 2016 TensorFlow authors. -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agree...
tensorflow/haskell
tensorflow-ops/src/TensorFlow/Gradient.hs
apache-2.0
39,949
27
20
11,374
10,119
5,425
4,694
-1
-1
{-# LANGUAGE OverloadedStrings #-} module Document where import qualified Data.Text as T import Data.Attoparsec.Text import Test.Tasty import Test.Tasty.HUnit import Text.ABNF.ABNF.Types import Text.ABNF.Document.Parser import Text.ABNF.Document.Types import Util testDoc :: (Eq a, Show a) => Parser a -> T.Text -> a...
Xandaros/abnf
test/Document.hs
bsd-2-clause
5,891
0
27
2,603
1,609
796
813
122
2
-- | -- Module : Text.Megaparsec.ShowToken -- Copyright : © 2015 Megaparsec contributors -- License : BSD3 -- -- Maintainer : Mark Karpov <markkarpov@opmbx.org> -- Stability : experimental -- Portability : portable -- -- Pretty printing function and instances for use in error messages. module Text....
neongreen/megaparsec
Text/Megaparsec/ShowToken.hs
bsd-2-clause
1,637
0
7
305
241
135
106
23
1
-- | Tests for Kernel density estimates. module Tests.KDE ( tests )where import Data.Vector.Unboxed ((!)) import qualified Data.Vector.Unboxed as U import Test.Framework (Test, testGroup) import Test.Framework.Providers.QuickCheck2 (testProperty) import Test.QuickCheck ...
00tau/statistics
tests/Tests/KDE.hs
bsd-2-clause
1,089
0
13
319
347
188
159
28
1
{-# LANGUAGE Rank2Types, FlexibleContexts #-} import Call import Audiovisual.Deck as Deck import Control.Lens import Control.Monad.State.Strict import Data.Foldable (foldMap) import qualified Data.Set as Set import Data.Set (Set) import System.IO.Unsafe import Data.List import Data.List.Split (splitWhen) main = runCal...
fumieval/rhythm-game-tutorial
src/tutorial-passive.hs
bsd-3-clause
1,877
0
15
369
732
382
350
45
1
module Graphics.Gnewplot ( module Graphics.Gnewplot.Types, module Graphics.Gnewplot.Exec, module Graphics.Gnewplot.Panels, module Graphics.Gnewplot.Style ) where import Graphics.Gnewplot.Types import Graphics.Gnewplot.Exec import Graphics.Gnewplot.Style import Graphics.Gn...
glutamate/gnewplot
Graphics/Gnewplot.hs
bsd-3-clause
335
0
5
70
60
41
19
10
0
{-# LANGUAGE MultiWayIf #-} import Control.Applicative import Control.Arrow import Control.Concurrent import Control.Monad (when, void) import Data.Aeson import Data.IORef import Data.Maybe import Data.Word import Data.Bits import qualified Data.ByteString.Lazy as BS import GHC.Float import Graphics.UI.SDL a...
ivanperez-keera/hacknotts2015
LeapPaint.hs
bsd-3-clause
12,828
0
22
4,332
4,465
2,344
2,121
307
33
{-# LANGUAGE OverloadedLists, OverloadedStrings, QuasiQuotes #-} module AbstractInterpretation.LiveVariableSpec where import Data.Map (Map) import Data.Vector (Vector) import qualified Data.Map as M import qualified Data.Vector as V import Grin.TH import Grin.Grin import Grin.PrimOpsPrelude import Test.Hspec i...
andorp/grin
grin/test/AbstractInterpretation/LiveVariableSpec.hs
bsd-3-clause
42,388
239
24
16,638
8,403
5,132
3,271
737
1
module LiftIOE where import Control.Monad.Error --TODO make this actually properly catch errors like spoon liftIOE :: IO a -> ErrorT String IO a liftIOE = liftIO liftEIO :: Either String a -> ErrorT String IO a liftEIO (Left s) = throwError s liftEIO (Right x) = return x
maurer/15-411-Haskell-Base-Code
src/LiftIOE.hs
bsd-3-clause
276
0
7
52
90
46
44
7
1
module Main where ------------------------------------------------------------------------------ import Data.Function ((&)) import Data.Monoid ((<>)) import Language.Javascript.JSaddle (JSM, syncPoint) import Language.Javascript.JSaddle.Warp (run)...
gspia/reflex-dom-htmlea
example1/app-wai/Main.hs
bsd-3-clause
2,242
0
11
509
397
225
172
31
1
{-# OPTIONS_GHC -Wall #-} module HW06.HW06Tests where import HW06.HW06 import Testing -- Exercise 1 ----------------------------------------- testFib :: () -> Bool testFib _ = map fib [0..7] == [0, 1, 1, 2, 3, 5, 8, 13] testFibs1 :: () -> Bool testFibs1 _ = take 8 fibs1 == [0, 1, 1, 2, 3, 5, 8, 13] ex01Tests :: [...
kemskems/cis194-spring13
src/HW06/HW06Tests.hs
bsd-3-clause
1,756
0
8
394
688
395
293
36
1
{-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE InstanceSigs #-} {-# LANGUAGE...
et4te/zero
src/Zero/AuthToken/Client.hs
bsd-3-clause
2,119
0
15
601
416
239
177
41
0
{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} module Bead.View.Content.Home.Page ( home , deleteUsersFromCourse , deleteUsersFromGroup ) where import Control.Monad.IO.Class import qualified Data.Map as Map import Data.Maybe (catMaybes) import Data.Time import ...
andorp/bead
src/Bead/View/Content/Home/Page.hs
bsd-3-clause
2,774
0
21
594
614
343
271
70
1
{-# OPTIONS_GHC -fno-warn-type-defaults #-} import Test.Hspec (Spec, describe, it, shouldBe) import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith) import School (add, empty, grade, sorted) main :: IO () main = hspecWith defaultConfig {configFastFail = True} specs specs :: Spec specs = describe ...
vaibhav276/exercism_haskell
grade-school/test/Tests.hs
mit
1,675
0
14
613
492
282
210
31
1
{-# OPTIONS_GHC -fno-warn-orphans #-} -- | Unsafe arbitrary instances for crypto primitives. module Test.Pos.Crypto.Arbitrary.Unsafe () where import Universum import Test.QuickCheck (Arbitrary (..), choose) import Test.QuickCheck.Instances () import Pos.Binary.Class (Bi) imp...
input-output-hk/pos-haskell-prototype
crypto/test/Test/Pos/Crypto/Arbitrary/Unsafe.hs
mit
2,174
0
10
531
355
211
144
-1
-1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE LambdaCase #-} {-# OPTIONS_HADDOCK show-extensions #-} -- | -- Module : Yi.Keymap.Emacs -- License : GPL-2 -- Maintainer : yi-devel@googlegroups.c...
siddhanathan/yi
yi-keymap-emacs/src/Yi/Keymap/Emacs.hs
gpl-2.0
13,824
0
18
4,873
3,212
1,631
1,581
-1
-1
module Case3 where main :: Int main = f undefined f :: a -> Int f xs = case xs of x -> 42
roberth/uu-helium
test/correct/Case3.hs
gpl-3.0
113
0
7
47
44
24
20
7
1
module ExprCompShadowVar where main :: [Int] main = [ x | x <- [1,2], x <- [3, 4] ]
roberth/uu-helium
test/staticwarnings/ExprCompShadowVar.hs
gpl-3.0
87
0
8
22
48
29
19
3
1
{-# LANGUAGE DeriveDataTypeable #-} module InnerEar.Types.Score where import Text.JSON import Text.JSON.Generic import Data.Map data Score = Score { correctAnswers :: Int, falsePositives::Int, -- times user thinks it is this the answer but correct answer is something else falseNegatives::Int -- times user th...
JamieBeverley/InnerEar
src/InnerEar/Types/Score.hs
gpl-3.0
1,513
0
11
307
538
275
263
31
3
{-# 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/CopyClusterSnapshot.hs
mpl-2.0
6,843
0
13
1,296
733
451
282
93
1
{-# LANGUAGE ExistentialQuantification #-} -- Without a type sig this is slightly tricky. -- See #1430 -- Reason: we get an implication constraint (forall a. Typeable a => Typeable b), -- when generalising unExTypeable. We want to infer a context for the -- whole thing of (Typeable b). -- See Note [Inference and im...
sdiehl/ghc
testsuite/tests/typecheck/should_compile/tc228.hs
bsd-3-clause
548
0
7
98
55
33
22
5
1
{-| Module : Pkg.Package Description : Functionality for working with Idris packages. Copyright : License : BSD3 Maintainer : The Idris Community. -} {-# LANGUAGE CPP #-} module Pkg.Package where import System.Process import System.Directory import System.Exit import System.IO import System.FilePath ((</>)...
tpsinnem/Idris-dev
src/Pkg/Package.hs
bsd-3-clause
14,922
18
29
4,401
4,139
2,004
2,135
322
18
{- (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 \section{Tidying up Core} -} {-# LANGUAGE CPP, ViewPatterns #-} module TidyPgm ( mkBootModDetailsTc, tidyProgram, globaliseAndTidyId ) where #include "HsVersions.h" import TcRnTypes import DynFlags import CoreSyn import CoreUnfold import CoreFV...
snoyberg/ghc
compiler/main/TidyPgm.hs
bsd-3-clause
63,779
0
19
19,619
7,480
4,048
3,432
569
5
-- | alles aufsammeln, was mit Rechten zu tun hat module Control.Admin.DB where import Control.SQL import Control.Types import qualified Control.Student import Prelude hiding ( all ) get_tutored :: SNr -> IO [ VNr ] get_tutored snr = do conn <- myconnect stat <- squery conn $ Query ( Select $ ...
Erdwolf/autotool-bonn
src/Control/Admin/DB.hs
gpl-2.0
1,120
12
18
328
393
195
198
31
1
{-# LANGUAGE RankNTypes, GADTs #-} module Data.Functor.Contravariant.Rift where import Control.Arrow import Data.Functor.Contravariant import Data.Functor.Contravariant.Divisible -- * Curried contravariant Day convolution / right kan lift newtype Rift g h a = Rift { runRift :: forall b c. (b -> (a, c)) -> g c -> h b ...
xuwei-k/kan-extensions
src/Data/Functor/Contravariant/Kan/Rift.hs
bsd-3-clause
1,476
0
11
410
200
113
87
10
0
module EnumFrom5 where {- map2 xs = map (+) [ 1 ,2 .. 5] -} map2 xs = (case ((+), [1,2..5]) of (f, []) -> [] (f, (x : xs)) -> (f x) : (map (+) [1,2 .. 5]))
kmate/HaRe
old/testing/generativeFold/EnumFrom5.hs
bsd-3-clause
189
0
12
72
100
60
40
4
2
{-+ This module contains experimental stuff to complete the dictionary translation by translating class declarations to record types and instance declaration to record values. Doing this while staying within the source abstract syntax is a bit clumbsy, unfortunately. The default methods in class declarations are place...
kmate/HaRe
old/tools/base/TI/TiClassInst2.hs
bsd-3-clause
7,909
27
19
1,833
862
496
366
-1
-1
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1998 \section[ConLike]{@ConLike@: Constructor-like things} -} {-# LANGUAGE CPP, DeriveDataTypeable #-} module ConLike ( ConLike(..) , conLikeArity , conLikeFieldLabels , conLikeInstOrigArgTys ...
anton-dessiatov/ghc
compiler/basicTypes/ConLike.hs
bsd-3-clause
3,562
0
8
858
768
423
345
72
1
{-# LANGUAGE TypeFamilies #-} module ShouldCompile where import Data.Kind (Type) class C8 a where data S8 a :: Type -> Type instance C8 Int where data S8 Int a = S8Int a
sdiehl/ghc
testsuite/tests/indexed-types/should_compile/Simple4.hs
bsd-3-clause
178
0
7
40
58
32
26
-1
-1
{-| Module : Idris.IdeMode Description : Idris' IDE Mode License : BSD3 Maintainer : The Idris Community. -} {-# OPTIONS_GHC -fwarn-incomplete-patterns #-} {-# LANGUAGE FlexibleInstances, IncoherentInstances, PatternGuards #-} module Idris.IdeMode(parseMessage, convSExp, WhatDocs(..), IdeModeCommand(..), s...
kojiromike/Idris-dev
src/Idris/IdeMode.hs
bsd-3-clause
17,311
0
16
5,134
5,537
2,850
2,687
280
3
-- trac #2059 {-# LANGUAGE ForeignFunctionInterface #-} module Main(main) where import Control.Monad import Foreign.C -- disable inaccurate single precision for GHCJS main = do let d = [0, pi, pi/2, pi/3, 1e10, 1e20] :: [Double] f = [0, pi, pi/2, pi/3, 1e10, 1e20] :: [Float] mapM_ (test "sin...
seereason/ghcjs
test/pkg/base/Numeric/num009.hs
mit
1,388
0
14
466
452
237
215
26
1
-- !!! Jon Hill reported a bug in desugaring this in 0.09 -- !!! (recursive with n+k patts) -- {-# LANGUAGE NPlusKPatterns #-} module ShouldCompile where takeList :: Int -> [a] -> [a] takeList 0 _ = [] takeList (n+1) [] = [] takeList (n+1) (x:xs) = x : takeList n xs
urbanslug/ghc
testsuite/tests/deSugar/should_compile/ds038.hs
bsd-3-clause
283
2
8
68
97
52
45
6
1
{-# LANGUAGE BangPatterns, DataKinds, DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module Hadoop.Protos.YarnServerResourceManagerServiceProtos.ReplaceLabelsOnNodeResponseProto (ReplaceLabelsOnNodeResponseProto(..)) where import Prelude ((+), (/)) i...
alexbiehl/hoop
hadoop-protos/src/Hadoop/Protos/YarnServerResourceManagerServiceProtos/ReplaceLabelsOnNodeResponseProto.hs
mit
3,151
1
16
549
554
291
263
53
0
main :: IO () main = do input <- filter validChar <$> readFile "input.txt" putStrLn . nextPassword . nextPassword $ input nextPassword :: String -> String nextPassword = until validPassword (getNext . increment) . getNext . increment validPassword :: String -> Bool validPassword pass = all ($pass) conditions ...
devonhollowood/adventofcode
2015/day11/day11.hs
mit
1,677
0
11
431
690
348
342
43
2
{-# LANGUAGE GADTs #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeApplications #-} {-# OPTIONS_GHC -fno-warn-orphans #-} -- | Protocol/versioning related communication types. module Pos.Infra.Communication.Types.Protocol ( checkInSpecs , Conversation...
input-output-hk/pos-haskell-prototype
infra/src/Pos/Infra/Communication/Types/Protocol.hs
mit
13,947
0
17
3,686
3,204
1,780
1,424
-1
-1
module Data.UTC.Class ( module Data.UTC.Class.IsDate , module Data.UTC.Class.IsTime , module Data.UTC.Class.IsUnixTime , module Data.UTC.Class.HasUnixTime , module Data.UTC.Class.Epoch ) where import Data.UTC.Class.Epoch import Data.UTC.Class.IsDate import Data.UTC.Class.IsTime import Data.UTC.Class.IsUnix...
lpeterse/haskell-utc
Data/UTC/Class.hs
mit
358
0
5
41
84
61
23
11
0
{-| Module: Y2015.D20 Description: Advent of Code Day 20 Solutions. License: MIT Maintainer: @tylerjl Solutions to the day 20 set of problems for <adventofcode.com>. Original credit for most of this due to aepsilon: <https://www.reddit.com/r/adventofcode/comments/3xjpp2/day_20_solutions/cy5brqe> -} module ...
tylerjl/adventofcode
src/Y2015/D20.hs
mit
2,086
0
14
574
596
327
269
35
1
-------------------------------------------------------------------------- -- Copyright (c) 2007-2010, ETH Zurich. -- All rights reserved. -- -- This file is distributed under the terms in the attached LICENSE file. -- If you do not find this file, copies can be found by writing to: -- ETH Zurich D-INFK, Haldeneggsteig...
modeswitch/barrelfish
hake/ARM11MP.hs
mit
6,125
0
17
2,348
905
508
397
110
1
module MyList.List where infixr 5 :-: data List a = Empty | a :-: (List a) deriving(Show, Read, Eq, Ord) instance Functor List where fmap f Empty = Empty fmap f (x:-:xs) = (f x) :-: (fmap f xs)
weswilliams/learn-haskell
src/MyList/List.hs
mit
200
0
8
45
103
56
47
6
0
module System.Random.Extensions where import System.Random as Random randomIORational :: IO Rational randomIORational = do d <- randomIO :: IO Double (return (toRational d))
stevedonnelly/haskell
code/System/Random/Extensions.hs
mit
186
0
10
35
55
30
25
6
1
import Common main = print $ head [ n | n <- [1..], fib n >= (10^999) ]
lekto/haskell
Project-Euler-Solutions/problem0025.hs
mit
73
0
11
19
48
25
23
2
1
module Game.Network.Server where
mfpi/q-inqu
Game/Network/Server.hs
mit
32
0
3
2
7
5
2
1
0
{-# LANGUAGE PatternSynonyms #-} -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module JSDOM.Generated.RTCRtpSender (getParameters, getParameters_, replaceTrack, getTrack, getTrackUnsafe, getTrackUnchecked, R...
ghcjs/jsaddle-dom
src/JSDOM/Generated/RTCRtpSender.hs
mit
2,960
0
14
428
680
398
282
-1
-1
module CachingFS where import qualified Data.ByteString.Char8 as B import Control.Applicative ((<|>)) import Control.Concurrent import Control.Exception import System.Posix.Types import System.Posix.Time import FS import PathMap (Path, empty) import FSCache import Prelude hiding (lookup) addCache :: Int -> FS -> IO...
ffwng/httpfs
src/CachingFS.hs
mit
2,192
0
17
452
797
395
402
56
4
module Internal where import Text.ParserCombinators.Parsec (ParseError) import Data.IORef (IORef,newIORef,readIORef) import Control.Monad.Except (throwError,ExceptT) import Control.Monad.IO.Class (liftIO) import System.IO (Handle) data LispVal = Identifier String | List [LispVal] | DottedLi...
shouya/thinking-dumps
wys48h/code/Internal.hs
mit
3,144
0
11
1,053
950
499
451
68
1
ma :: (a -> b) -> [a] -> [b] -- failed --ma f = foldr (\ x xs -> xs ++ [f x]) [] -- failed --ma f = foldr (\ x xs -> f x ++ xs) [] -- failed --ma f = foldl (\ xs x -> f x : xs) [] -- correct ma f = foldl (\ xs x -> xs ++ [f x]) []
AlexMckey/FP101x-ItFP_Haskell
Sources/map.hs
cc0-1.0
234
0
10
72
69
40
29
2
1
import System.Directory import Control.Monad(filterM) import Data.Char(toLower) import Data.List main :: IO () main = getCurrentDirectory >>= renameAndRecurse getSubdirectories :: IO [FilePath] getSubdirectories = do files <- getCurrentDirectory >>= getDirectoryContents filterM doesDirectoryExist files renameAndRe...
icendoan/Fun
haskell/tolower.hs
gpl-2.0
1,031
0
15
158
362
181
181
24
1
{-#LANGUAGE RecordWildCards, TypeSynonymInstances, FlexibleInstances, DoAndIfThenElse #-} {-#LANGUAGE MultiParamTypeClasses #-} ------------------------------------------------------------------------------- -- Module : Model.GCS -- Copyright : (c) 2016 Marcelo Sousa -- -- This module defines the model of computa...
marcelosousa/poet
src/Model/GCS.hs
gpl-2.0
2,651
0
10
602
366
237
129
41
1
module Darcs.Patch.CommuteFn ( CommuteFn, commuterIdFL, commuterFLId, commuterIdRL, commuterRLId, MergeFn, mergerIdFL, TotalCommuteFn, totalCommuterIdFL, totalCommuterFLId, totalCommuterFLFL ) where import Darcs.Patch.Witnesses.Ordered ( (:>)(..) , (:\/:)(..) , (...
DavidAlphaFox/darcs
src/Darcs/Patch/CommuteFn.hs
gpl-2.0
3,344
0
13
793
1,233
652
581
-1
-1
-- | Settings are centralized, as much as possible, into this file. This -- includes database connection settings, static file locations, etc. -- In addition, you can configure a number of different aspects of Yesod -- by overriding methods in the Yesod typeclass. That instance is -- declared in the Foundation.hs file....
bartoszw/yelca
Settings.hs
gpl-2.0
5,175
0
12
1,391
470
283
187
-1
-1
{- - The Lambda Shell, an interactive environment for evaluating pure untyped lambda terms. - Copyright (C) 2005-2011, Robert Dockins - - 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 Founda...
robdockins/lambda-shell
src/Version.hs
gpl-2.0
22,721
0
9
4,779
1,193
787
406
382
1
module HEP.Automation.MadGraph.Dataset.Set20110712set8 where import HEP.Storage.WebDAV.Type 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.C8V import HEP.Automation.MadGr...
wavewave/madgraph-auto-dataset
src/HEP/Automation/MadGraph/Dataset/Set20110712set8.hs
gpl-3.0
2,337
0
16
775
533
331
202
50
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE TypeSynonymInstances #-} -- {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} -- Copyright : (c) 2019 Robert Künnemann ...
tamarin-prover/tamarin-prover
lib/sapic/src/Sapic/Annotation.hs
gpl-3.0
4,802
0
11
1,038
952
543
409
74
3
{-# LANGUAGE CPP #-} module Bachelor.SeqParse.PreParse where {- - Pre-Parses an eventlog file and returns information about the - event blocks within. - -} #define EVENTLOG_CONSTANTS_ONLY #include "EventLogFormat.h" import Control.Monad (when) import Control.Monad.Except import Data.Binary.Get import Data.ByteStr...
brtmr/Eden-Tracelab-cli-tool
src/Bachelor/SeqParse/PreParse.hs
gpl-3.0
4,559
2
16
1,392
963
517
446
92
3
{- Trabalho 2 Resp.: Rodrigo Ferreira Guimarães Disc.: Linguaguem de Programação Orie.: Rodrigo Bonifácio Func.: Expansão da linguaguem F4LAE, que já implementa avaliação outermost, para comportar a Lazy Evaluation de forma completa, ou seja, com a estratégia de compartilhamento. -} module F6LAE where {- ...
rodrigofegui/UnB
2017.2/Linguagens de Programação/Trab 2/F6LAE.hs
gpl-3.0
9,432
0
14
3,511
2,503
1,316
1,187
159
11
{-# LANGUAGE TemplateHaskell, ScopedTypeVariables #-} {-# OPTIONS -Wall -fno-warn-unused-imports #-} module DotUtil.Lenses where import Data.Lens.Template import Data.GraphViz.Types.Canonical import Language.Haskell.TH.Syntax import Text.Groom import Language.Haskell.TH import Data.Lens.Common import Data.GraphViz.Attr...
DanielSchuessler/hstri
DotUtil/Lenses.hs
gpl-3.0
1,987
0
9
322
678
381
297
37
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Worker/List.hs
mpl-2.0
2,671
0
13
640
306
188
118
49
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Create.hs
mpl-2.0
5,348
0
16
1,188
717
424
293
100
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.AppsLicensing.Types.Sum -- Copyright : (c) 2015-2016 B...
rueshyna/gogol
gogol-apps-licensing/gen/Network/Google/AppsLicensing/Types/Sum.hs
mpl-2.0
610
0
4
109
29
25
4
8
0
{-# 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/RegionInstanceGroupManagers/PatchPerInstanceConfigs.hs
mpl-2.0
7,103
0
19
1,494
640
382
258
113
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/HTTPHealthChecks/Patch.hs
mpl-2.0
5,422
0
17
1,178
561
337
224
92
1
{- tempgres, REST service for creating temporary PostgreSQL databases. Copyright (C) 2014-2020 Bardur Arantsson This program 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 versi...
ClockworkConsulting/tempgres-server
server/src/Tempgres/Configuration.hs
agpl-3.0
4,442
0
10
1,482
326
214
112
41
1
{-# Language NamedFieldPuns #-} module EVM.Symbex.Main where import System.Environment (getArgs) import EVM.Assembly import EVM.Symbex import EVM.Symbex.Print import qualified Dappsys.Weth -- import Data.Generics.Uniplate.Data import Data.Aeson (encode) import qualified Data.ByteString as BS import Data.Text.Enco...
mbrock/symbex
src/EVM/Symbex/Main.hs
agpl-3.0
2,286
0
21
604
653
351
302
61
8
{-# LINE 1 "regex-hsc.hsc" #-} {-# LANGUAGE CPP #-} {-# LINE 2 "regex-hsc.hsc" #-} {-# LANGUAGE ForeignFunctionInterface #-} module Regex where import Foreign import Foreign.C.Types {-# LINE 10 "regex-hsc.hsc" #-}
egaburov/funstuff
Haskell/ffi/regex-hsc.hs
apache-2.0
224
0
4
40
18
14
4
5
0
module Data.Hand ( Hand, hand, getSuit, addCard, discard ) where import Data.List (sort, delete) import Data.Map (Map) import Data.Set (Set) import qualified Data.Map as Map import qualified Data.Set as Set import Data.Core.Card (Card(..), Suit, Rank) newtype Hand = Hand (Map Suit (Set Rank)) ...
Sventimir/bridge-tools
Data/Hand.hs
apache-2.0
973
0
10
218
434
234
200
28
1
{-# LANGUAGE TupleSections, OverloadedStrings, ScopedTypeVariables #-} {-# OPTIONS_GHC -fno-warn-missing-signatures #-} module Handler.Utils where import Import import qualified Data.List import qualified Data.Text import Database.Persist.Store import Data.Prefix.Units import Data.Int (Int64) import Text.Printf impor...
Tener/personal-library-yesod
Handler/Utils.hs
bsd-2-clause
3,698
0
19
931
1,048
537
511
-1
-1
{-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE Safe #-} -- See: https://github.com/clash-lang...
Ericson2314/clash-prelude
src/CLaSH/Prelude/RAM.hs
bsd-2-clause
6,064
0
13
1,907
962
547
415
-1
-1
{-# LANGUAGE TypeFamilies, QuasiQuotes, MultiParamTypeClasses, TemplateHaskell, OverloadedStrings #-} module Main where import Yesod.Default.Config (fromArgs) import Yesod.Default.Main (defaultMain) import Application main :: IO () main = defaultMain fromArgs withXmlHDBC
qrilka/xmlhdbc
Main.hs
bsd-3-clause
276
0
6
32
50
30
20
7
1
{-# LANGUAGE OverloadedStrings #-} module Data.Tiled.Test.Xml where import Data.ByteString.Lazy.Char8 as BS import Data.Char import Data.String import qualified Prelude import Prelude hiding (show) import Text.XML.Generator import Text.XML.HXT.Core import ...
chrra/htiled
tests/Data/Tiled/Test/Xml.hs
bsd-3-clause
3,546
0
25
1,078
1,159
608
551
91
3
module Aws.Sqs.Commands( module Aws.Sqs.Commands.AddPermission, module Aws.Sqs.Commands.DeleteMessage, module Aws.Sqs.Commands.DeleteQueue, module Aws.Sqs.Commands.ListQueues, module Aws.Sqs.Commands.GetQueueAttributes, module Aws.Sqs.Commands.ChangeMessageVisibility, module Aws.Sqs.Commands.CreateQueue, ...
jgm/aws
Aws/Sqs/Commands.hs
bsd-3-clause
930
0
5
69
174
127
47
23
0
{-# LANGUAGE DeriveDataTypeable , DeriveGeneric , EmptyDataDecls , TemplateHaskell , TypeFamilies #-} module Model.ProjectCreationError where import Data.Aeson import Data.JSON.Schema import Data.Typeable import GHC.Generics import Generics.Regular import Generics.Regular.XmlPickler import Rest.Error imp...
wayofthepie/riverd
src/lib/Model/ProjectCreationError.hs
bsd-3-clause
865
0
6
108
160
89
71
25
0
{- Problem 11 Find the greatest product of adjacent numbers in a grid Result 70600674 0.02 s -} module Problem11 (solution) where import Data.List import CommonFunctions solution = maximum' . map maxProduct $ horizontal ++ vertical ++ diag1 ++ diag2 where ...
quchen/HaskellEuler
src/Problem11.hs
bsd-3-clause
2,755
0
12
917
1,510
968
542
34
2
module Language.PowerPC.RTL ( RTL (..) , Stmt (..) , E (..) , Cond (..) , stmt , (<==) , assign , cmp , if' , while , (==.) , (/=.) , (<.) , (<=.) , (>.) , (>=.) , (&&.) , (||.) ) where import Data.Bits infix 4 ==., /=., <., <=., >., >=. infixl 3 &&. infixl 2 ||. infixr 0 <=...
tomahawkins/powerpc
Language/PowerPC/RTL.hs
bsd-3-clause
3,098
0
11
1,105
1,601
887
714
160
1
module Pathfinder.Character ( Character (..) , getCharacterLevel ) where import Pathfinder.Misc import {-# SOURCE #-} Pathfinder.Race import Pathfinder.Class import Pathfinder.Abilities import Pathfinder.Skill import Pathfinder.Feat import qualified Data.Text as T import qualified Data.Set as Set import qualifie...
Elarnon/npc-gen
Pathfinder/Character.hs
bsd-3-clause
979
0
14
208
336
190
146
34
1
module TinyBlog.Config( Config(..) ) where data Config = Config { cBlogName :: String -- ^ blog name , cHostName :: String -- ^ host name , cAuthorName :: String -- ^ author name , cCopyright :: String -- ^ copyright , cEmail :: String -- ^ email , cDescription :: String...
nsyee00/tinyblog
src/TinyBlog/Config.hs
bsd-3-clause
461
0
8
134
84
56
28
11
0
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE CPP #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} module Bead.View.Pagelets where import Prelude hiding (span) import Data.Char (isAlphaNum) import Data.Data import Data.Maybe (fromMaybe) import ...
pgj/bead
src/Bead/View/Pagelets.hs
bsd-3-clause
21,493
0
29
5,431
6,475
3,292
3,183
420
9
module ERC.Variables where import Prelude import Control.Monad.ST.Trans import ERC.Monad type Var s = STRef s (?) :: Var s t -> ERC s t (?) = readSTRef assign :: Var s t -> ERC s t -> ERC s () assign v valERC = do val <- valERC ifInvalidUseDummy () $ writeSTRef v val (.=) :: Var s t -> ERC s t -> ERC s () ...
michalkonecny/aern2
aern2-erc/src/ERC/Variables.hs
bsd-3-clause
347
0
9
87
167
89
78
15
1
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 Typechecking class declarations -} {-# LANGUAGE CPP #-} module TcClassDcl ( tcClassSigs, tcClassDecl2, findMethodBind, instantiateMethod, tcClassMinimalDef, Hs...
gcampax/ghc
compiler/typecheck/TcClassDcl.hs
bsd-3-clause
16,692
0
20
5,432
2,809
1,477
1,332
198
3
{-# OPTIONS_GHC -F -pgmF inch #-} {-# LANGUAGE RankNTypes, GADTs, KindSignatures, ScopedTypeVariables, NPlusKPatterns #-} module Vectors where data Vec :: * -> Nat -> * where VNil :: Vec a 0 VCons :: forall a (n :: Nat) . a -> Vec a n -> Vec a (n+1) deriving Show vhead :: forall (n :: Nat) a. Vec...
adamgundry/inch
examples/Vectors.hs
bsd-3-clause
3,685
106
14
1,177
2,087
1,118
969
-1
-1
-- Copyright (c) 2016-present, Facebook, Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. An additional grant -- of patent rights can be found in the PATENTS file in the same directory. module Duckling.T...
rfranek/duckling
tests/Duckling/Time/IT/Tests.hs
bsd-3-clause
645
0
9
103
94
58
36
12
1
module SpecMain where import Test.Hspec import AppHandlerSpec import JSONConnectionSpec import RepositorySpec import URLMapperSpec main :: IO () main = hspec $ do appHandlerSpec jsonConnectionSpec repositorySpec urlMapperSpec
keitax/wikirick
spec/SpecMain.hs
bsd-3-clause
237
0
7
37
52
28
24
12
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE MultiWayIf #-} module Game.PlayerHud where import Control.Lens (use, preuse, ix, (^.), (.=), zoom, (%=), (&), (%~)) import Control.Monad (when, liftM) import Data.Bits ((.|.), (.&.), complement) import Data.Maybe (isJust) import qualified Data.Vector as V import qualifie...
ksaveljev/hake-2
src/Game/PlayerHud.hs
bsd-3-clause
12,772
0
23
3,926
3,462
1,677
1,785
-1
-1
{-# LANGUAGE UndecidableInstances #-} -- | Full Boxes module Data.ByteString.IsoBaseFileFormat.Util.FullBox (FullBox (..), fullBox, BoxFlags (..)) where import Data.ByteString.IsoBaseFileFormat.Box import Data.ByteString.IsoBaseFileFormat.ReExports import Data.ByteString.IsoBaseFileFormat.Util.BoxContent -- | A 'Ful...
sheyll/isobmff-builder
src/Data/ByteString/IsoBaseFileFormat/Util/FullBox.hs
bsd-3-clause
3,358
0
21
780
1,070
548
522
-1
-1
{-# LANGUAGE NoImplicitPrelude , CPP #-} ----------------------------------------------------------------------------- -- | -- Module : Math.Combinatorics.Species.Class -- Copyright : (c) Brent Yorgey 2010 -- License : BSD-style (see LICENSE) -- Maintainer : byorgey@cis.upenn.edu -- Stabil...
timsears/species
Math/Combinatorics/Species/Class.hs
bsd-3-clause
8,888
0
10
1,912
882
562
320
86
1
{-| Module : Pipes.KeyValueCsv.Cell Copyright : (c) Marcin Mrotek, 2015 License : BSD3 Maintainer : marcin.jan.mrotek@gmail.com Stability : experimental Helper functions -} {-# LANGUAGE RankNTypes #-} module Pipes.KeyValueCsv.Internal where import Pipes.KeyValueCsv.Internal.Types import Control.Lens...
marcinmrotek/pipes-key-value-csv
src/Pipes/KeyValueCsv/Internal.hs
bsd-3-clause
2,276
0
19
496
585
308
277
52
3