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 Latte.Lang ( module Latte.Lang.Abs, module Latte.Lang.ErrM, module Latte.Lang.Lex, module Latte.Lang.Par, module Latte.Lang.Print, module Latte.Lang.Skel, parseProgram ) where import Control.Monad.Except import Latte.Lang.Abs import Latte.Lang.ErrM import Latte.Lang.Lex import Latte.Lang.Par import Lat...
mpsk2/LatteCompiler
src/Latte/Lang.hs
mit
636
16
13
107
217
121
96
26
2
module NightClub where import Text.Show.Functions import Data.List type Trago = (Cliente -> Cliente) data Cliente = UnCliente { nombre :: String, resistencia :: Int, amigos :: [Cliente], tragos :: [Trago] } instance Eq Cliente where (==) cliente1 cliente2 = nombre cliente1 == nombre cliente2 instance Sh...
emanuelcasco/tp-paradigmas-funcional
src/NightClub.hs
mit
6,247
0
16
1,128
1,734
939
795
130
1
module ProjectRosalind.Motif.ExpressionParsing where import Text.Parsec (ParseError, SourcePos, getPosition) import Text.Parsec.String (Parser) import ProjectRosalind.Motif.Parsec (try) import ProjectRosalind.Motif.Char (oneOf, noneOf, char, digit, satisfy) import ProjectRosalind.Motif.Combinator (eof, many1, manyTil...
brodyberg/Notes
ProjectRosalind.hsproj/LearnHaskell/lib/ProjectRosalind/Motif/ExpressionParsing.hs
mit
2,427
0
13
438
629
345
284
51
1
import Test.Tasty import Test.Tasty.QuickCheck as QC -- I will use Tasty as a testing library as soon as I figure out how to unit test -- IO functions like getCharacters and getUpcomingCalendarEvents main :: IO () main = putStrLn "Test suite not yet implemented"
AlexGagne/evecalendar
test/Spec.hs
mit
266
0
6
47
34
20
14
4
1
module Y2018.M01.D23.Solution where {-- Continuing on our Prolog-y adventures in Haskell, let's look at P27 from P99: P27 (**) Group the elements of a set into disjoint subsets. a) In how many ways can a group of 9 people work in 3 disjoint subgroups of 2, 3 and 4 persons? Write a predicate that generates all the po...
geophf/1HaskellADay
exercises/HAD/Y2018/M01/D23/Solution.hs
mit
3,906
0
29
619
582
328
254
28
1
module HaskQuest.Game.Parser ( PlayerAction (..) , parseChoice ) where import qualified Data.Char (toLower) {- For handling user input and then doing things. -} data PlayerAction = Go String | Back | Inventory | Description | Inspect String | Take String | Drop String ...
pdarragh/HaskQuest
src/HaskQuest/Game/Parser.hs
mit
1,157
0
9
339
355
186
169
34
2
module T where import Tests.KesterelBasis -- |||| demands coPaused and shouldn't be. e = nothingE |||| pauseE c = arr (\() -> ()) >>> runE e test_constructive = isJust (isConstructive c)
peteg/ADHOC
Tests/08_Kesterel/BugFinders/000_parallel_coPaused.hs
gpl-2.0
191
0
9
35
60
33
27
5
1
{-# LANGUAGE TypeSynonymInstances, FlexibleContexts, FlexibleInstances, GeneralizedNewtypeDeriving, MultiParamTypeClasses, RecursiveDo, TypeFamilies, OverloadedStrings, RecordWildCards,UndecidableInstances, PackageImports, TemplateHaskell, RankNTypes #-} module MarXup.Diagram.Tikz where import Graphics.Diagrams.Core ...
jyp/MarXup
MarXup/Diagram/Tikz.hs
gpl-2.0
3,692
0
25
1,061
1,023
511
512
87
2
{- | Description : experimental logic for the specification of qualitative constraint calculi Copyright : (c) Otto-von-Guericke University of Magdeburg License : GPLv2 or higher, see LICENSE.txt The "ConstraintCASL" folder contains the skeleton of an instance of "Logic.Logic" for ConstraintCASL, an experimenta...
spechub/Hets
ConstraintCASL.hs
gpl-2.0
422
0
2
67
5
4
1
1
0
{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances, FlexibleInstances #-} {- | Module : $Header$ Description : Comorphism from Propostional Logic to OWL 2 Copyright : (c) Felix Gabriel Mance License : GPLv2 or higher, see LICENSE.txt Maintainer : f.mance@jacobs-university.de Stability : provi...
nevrenato/Hets_Fork
OWL2/Propositional2OWL2.hs
gpl-2.0
3,988
0
13
748
945
500
445
90
8
{-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE ExistentialQuantification #-} ----------------------------------------------------------------------...
mzini/TcT
source/Tct/Method/Combinator.hs
gpl-3.0
22,312
0
20
7,267
5,863
3,033
2,830
393
1
{-| Module : PhaseParser License : GPL Maintainer : helium@cs.uu.nl Stability : experimental Portability : portable -} module Helium.Main.PhaseParser(phaseParser) where import Helium.Main.CompileUtils import Helium.Parser.LexerToken(Token) import Helium.Parser.Parser (module_) import...
Helium4Haskell/helium
src/Helium/Main/PhaseParser.hs
gpl-3.0
1,359
0
15
300
327
177
150
26
2
-- import Hack.Contrib.Middleware.Debug -- import Hack.Contrib.Request (inputs) -- import Hack.Contrib.Middleware.Inspect import Hack.Contrib.Middleware.SimpleAccessLogger -- import Hack.Contrib.Middleware.Lambda -- import Hack.Contrib.Middleware.Lucky -- import Hack.Contrib.Middleware.ShowStatus import Bamboo import B...
nfjinjing/bamboo
src/Main.hs
gpl-3.0
2,647
0
13
486
519
310
209
56
2
-- UUAGC 0.9.52.1 (Helium/StaticAnalysis/Directives/TS_Apply.ag) module Helium.StaticAnalysis.Directives.TS_Apply where import Top.Types import Helium.Syntax.UHA_Syntax import Helium.StaticAnalysis.Miscellaneous.TypeConstraints import Helium.StaticAnalysis.Miscellaneous.ConstraintInfo import Data.List import Heli...
roberth/uu-helium
src/Helium/StaticAnalysis/Directives/TS_Apply.hs
gpl-3.0
38,680
0
24
11,795
6,718
3,762
2,956
666
3
{-# LANGUAGE TypeOperators, LambdaCase #-} module Typedrat.Auth (Authenticated, IsAdmin, userFromSession, authHook, adminHook, redirectView, callbackView, logoutView) where import Control.Lens import Control.Monad.IO.Class import Data.Aeson import Data.Aeson.Lens import qualified Data.ByteString.Char8 as BS import Dat...
typedrat/typedrat-site
app/Typedrat/Auth.hs
gpl-3.0
4,382
0
16
940
1,374
705
669
-1
-1
{-# LANGUAGE TemplateHaskell, FlexibleInstances#-} module Tar where import Test.QuickCheck import DeriveArbitrary import Codec.Archive.Tar import System.Posix.Types import qualified Data.ByteString.Lazy as L import Data.DeriveTH import Data.Word(Word32) import Vector import ByteString $(devArbitrary ''Entry) me...
fcostantini/QuickFuzz
src/Tar.hs
gpl-3.0
370
0
8
47
86
53
33
14
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-firebasehosting/gen/Network/Google/Resource/FirebaseHosting/Sites/Versions/Delete.hs
mpl-2.0
4,685
0
15
1,096
699
409
290
101
1
{-# OPTIONS_GHC -Wall #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE PatternSynonyms #-} module Dyno.DirectCollocation.Formulate ( CollProblem(..), ...
ghorn/dynobud
dynobud/src/Dyno/DirectCollocation/Formulate.hs
lgpl-3.0
45,228
0
23
14,428
18,773
9,601
9,172
877
2
module CLITest (tests) where import Test.Tasty import Test.Tasty.HUnit import DMSS.CLI.Internal import DMSS.CLI ( process , Cli (Cli) , FlagSilent (SilentOff) ) import DMSS.Daemon.Common ( cliPort ) import DMSS.CLI.Command ( Command (Id) , IdComm...
dmp1ce/DMSS
src-test/CLITest.hs
unlicense
2,523
0
18
572
493
265
228
43
1
module Util ( module Data.List, module Console, module Util, module Data.Char ) where import Database.HDBC import Database.HDBC.PostgreSQL import Console import Data.List (intercalate) import Data.Char (isSpace) gs :: SqlValue -> String gs y@(SqlByteString x) = fromSql y gs SqlNull = "" gb :: SqlValue -> B...
sourcewave/pg-schema-diff
Util.hs
unlicense
1,622
0
11
403
815
435
380
42
5
module RandomSpec where import Control.Applicative import qualified Data.Vector as V import SpecUtils import WaTor.Random import Test.Hspec import Test.Hspec.Expectations.Contrib spec :: Spec spec = do describe "shuffle" $ it "shoul...
erochest/wa-tor
specs/RandomSpec.hs
apache-2.0
1,278
0
19
463
429
223
206
28
1
module HW7.Buffer where -- Type class for data structures that can represent the text buffer -- of an editor. class Buffer b where -- | Convert a buffer to a String. toString :: b -> String -- | Create a buffer from a String. fromString :: String -> b -- | Extract the nth line (0-indexed) from a buffer. ...
cgag/cis-194-solutions
src/HW7/Buffer.hs
bsd-3-clause
861
0
9
205
96
57
39
8
0
import qualified Pt.StateMachineTest as SM import Test.HUnit import Control.Monad (void,mapM_) main :: IO () main = void $ mapM_ runTestTT [ SM.tests ]
mrak/ptui
test/Spec.hs
bsd-3-clause
154
0
8
25
56
32
24
5
1
{-# LANGUAGE OverloadedStrings #-} module Render.OpenGL.GLFWbGLDriver ( glfwbGLDriver , gldInit , gldSetMode , gldShutdown , gldBeginFrame , gldE...
ksaveljev/hake-2
src/Render/OpenGL/GLFWbGLDriver.hs
bsd-3-clause
7,051
0
19
2,060
1,558
805
753
-1
-1
{-# LANGUAGE ParallelListComp #-} -- | 'Utils' is a module of assorted utilities. module Utils where import Data.Char (isSpace) import Data.List (dropWhileEnd) -- | 'filterLines' @lns@ filters empty lines and lines containing only -- space characters from @lns@. -- -- > filterLines ["hello", " \t ", "goodbye"] == ["...
jabolopes/fmark
src/Utils.hs
bsd-3-clause
1,923
0
13
459
373
207
166
27
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module Web.RTBBidder.Types.Request.Device (Device(..)) where import qualified Data.Aeson as AESON import Data.Aeson ((.=), (.:), (.:?), (.!=)) import qualified Data.Text as TX import Web.RTBBidder.Types.Request.Geo (Geo(..)) data Device = Device {...
hiratara/hs-rtb-bidder
src/Web/RTBBidder/Types/Request/Device.hs
bsd-3-clause
3,167
0
11
826
1,046
558
488
107
0
{-# OPTIONS_GHC -fno-warn-orphans #-} {-# LANGUAGE NamedFieldPuns, RecordWildCards, BangPatterns, StandaloneDeriving, GeneralizedNewtypeDeriving #-} module Distribution.Server.Features.EditCabalFiles ( initEditCabalFilesFeature , diffCabalRevisions , Change(..) ) where import Distribution.Serve...
snoyberg/hackage-server
Distribution/Server/Features/EditCabalFiles.hs
bsd-3-clause
19,689
0
18
5,246
4,856
2,447
2,409
387
5
{-# OPTIONS -XDeriveDataTypeable -XTypeSynonymInstances -XMultiParamTypeClasses -XExistentialQuantification -XOverloadedStrings -XFlexibleInstances -XUndecidableInstances -XFunctionalDependencies #-} {- | A persiste...
ariep/TCache
src/Data/Persistent/Collection.hs
bsd-3-clause
7,627
0
19
1,835
2,620
1,309
1,311
146
4
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.Raw.Version11 -- Copyright : (c) Sven Panne 2015 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : portable -- ------...
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/Version11.hs
bsd-3-clause
16,248
0
4
2,720
2,686
1,798
888
883
0
-- 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. {-# LANGUAGE GADTs #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} module Duckling.AmountOfMo...
facebookincubator/duckling
Duckling/AmountOfMoney/MN/Rules.hs
bsd-3-clause
7,236
0
18
1,707
1,825
1,004
821
199
2
{-# LANGUAGE CPP, BangPatterns, Rank2Types, MagicHash #-} -- | -- Module : UnboxedAppend -- Copyright : (c) 2010 Simon Meier -- License : BSD3-style (see LICENSE) -- -- Maintainer : Simon Meier <iridcode@gmail.com> -- Stability : experimental -- Portability : tested on GHC only -- -- Try using unboxed po...
meiersi/blaze-builder
benchmarks/UnboxedAppend.hs
bsd-3-clause
9,316
0
18
2,345
2,393
1,249
1,144
169
3
module Distance (DistanceFunction, minkowski, euclidean, manhattan, cosineDistance) where import HuskyML -- | Given two vectors returns a distance type DistanceFunction = [Feature] -> [Feature] -> Double -- | Given two vectors and a degree returns the minkowski distance minkowski :: Int -> DistanceFunction minkowski...
jc423/Husky
src/Distance.hs
bsd-3-clause
1,043
0
14
188
299
167
132
12
1
module EFA.Report.Format where import qualified EFA.Equation.RecordIndex as RecIdx import qualified EFA.Equation.Mix as Mix import qualified Type.Data.Num.Unary as Unary import qualified Data.Char.Small as SmallChar import qualified Data.Char.Number as NumberChar import qualified Data.FixedLength as FixedLength impo...
energyflowanalysis/efa-2.1
src/EFA/Report/Format.hs
bsd-3-clause
13,465
0
23
3,508
4,997
2,583
2,414
326
2
{-# LANGUAGE OverloadedStrings #-} module Main where import Web.Scotty import Control.Monad import Text.Regex.PCRE import Data.Char import Control.Monad import Control.Monad.IO.Class import System.Environment (getEnv) import Network.Wai.Middleware.RequestLogger (logStdoutDev) import qualified Data.Set as Set import ...
mg50/hypnerotomachia
src/Main.hs
bsd-3-clause
1,449
0
16
256
409
214
195
40
1
module Edit ( executeEditCommand ) where import Control.Monad import Control.Monad.Reader import Control.Monad.Maybe import Database.HDBC import Data.Char (isDigit) import Data.List import Text.Parsec import System.Console.Haskeline import TodoArguments import Util import Configuration import Filter import Ra...
robertmassaioli/hdo
src/Edit.hs
bsd-3-clause
5,613
0
22
1,867
1,287
644
643
78
7
-- code structure written by John MacFarlane, -- I filled in some missing pieces and make it compile. {-# LANGUAGE PackageImports #-} {-# LANGUAGE OverloadedStrings #-} module Hack2.Handler.HappstackServer (run, runWithConfig, ServerConf(..), appToServerPart) where import Control.Arrow ((>>>)) import "mtl" Contro...
nfjinjing/hack2-handler-happstack-server
src/Hack2/Handler/HappstackServer.hs
bsd-3-clause
5,783
0
14
1,662
1,356
774
582
132
8
import Control.Concurrent import System.IO import Network main :: IO () main = do soc <- listenOn $ PortNumber 54492 (h, _, _) <- accept soc hPutStrLn h "Good-bye!" threadDelay 1000000 hClose h
YoshikuniJujo/xmpipe
test/exSever.hs
bsd-3-clause
200
0
9
38
82
39
43
10
1
module Day4 ( parseRoom , parseRooms , Room(..) , genCksum , getValidRooms , getSectorSum , decryptChar , decryptRoom ) where import Text.Regex.Posix import Data.Map as Map import Data.List as List import Data.Ord import Data.Char as Char data Room = Room { name :: String, sector :: Integer, cksum :...
reidwilbur/aoc2016
src/Day4.hs
bsd-3-clause
1,651
0
15
389
686
373
313
46
3
--------------------------------------------------------------- -- | -- Module : Data.Minecraft.Release194.Version -- Copyright : (c) 2016 Michael Carpenter -- License : BSD3 -- Maintainer : Michael Carpenter <oldmanmike.dev@gmail.com> -- Stability : experimental -- Portability : portable -- -...
oldmanmike/hs-minecraft-protocol
src/Data/Minecraft/Release194/Version.hs
bsd-3-clause
616
0
4
101
59
41
18
10
1
import Test.Hspec import TLV main :: IO () main = hspec $ do describe "parseTLVs" $ do it "gracefully handles no bytes" $ do parseTLVs [] `shouldBe` [] describe "a single TLV" $ do describe "by tag" $ do it "can parse a 1-byte long tag" $ do let input = [0x5A, 0x01, 0x01] ...
wgyn/tlv-parser
test/Spec.hs
bsd-3-clause
1,808
0
25
598
651
358
293
42
1
{-# LINE 1 "GHC.Err.hs" #-} {-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude, MagicHash, ImplicitParams #-} {-# LANGUAGE RankNTypes, TypeInType #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | -- Module : GHC.Err -- Copyright : (c) ...
phischu/fragnix
builtins/base/GHC.Err.hs
bsd-3-clause
3,659
0
9
694
307
199
108
-1
-1
{-# LANGUAGE OverloadedStrings, TemplateHaskell #-} module Web.Slack.Types.Team where import Data.Text (Text) import Web.Slack.Types.Id import Web.Slack.Types.TeamPreferences import Web.Slack.Types.Base import Control.Lens.TH import Data.Aeson import Control.Applicative import Prelude data Team = Team { _t...
madjar/slack-api
src/Web/Slack/Types/Team.hs
mit
1,749
0
22
736
350
201
149
46
0
import Control.Monad (MonadPlus(..)) shortcircuitLeft f = {-- snippet shortcircuitLeft --} mzero >>= f == mzero {-- /snippet shortcircuitLeft --} shortcircuitRight v = {-- snippet shortcircuitRight --} v >> mzero == mzero {-- /snippet shortcircuitRight --} {-- snippet guard --} guard :: (MonadPl...
binesiyu/ifl
examples/ch15/MonadPlus.hs
mit
516
0
10
112
141
77
64
9
1
{- | Module : $Id: DataP.hs 14719 2011-03-16 13:29:01Z maeder $ Copyright : (c) DFKI GmbH License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : provisional Portability : portable Adaptation and extension of a parser for data definitions given in appendix of G...
nevrenato/HetsAlloy
utils/DrIFT-src/DataP.hs
gpl-2.0
5,136
0
13
1,739
1,592
818
774
151
2
module Text.RDF.RDF4H.TurtleParser_ConformanceTest where -- Testing imports import Test.Framework.Providers.API import Test.Framework.Providers.HUnit import qualified Test.HUnit as TU -- Import common libraries to facilitate tests import Control.Monad (liftM) import Data.RDF.GraphTestUtils import Data.RDF.Query impor...
cordawyn/rdf4h
testsuite/tests/Text/RDF/RDF4H/TurtleParser_ConformanceTest.hs
bsd-3-clause
6,751
0
14
1,521
1,914
985
929
119
5
-- | <http://library.gnome.org/devel/glib/stable/glib-utilities.html> module Bindings.GLib.Utilities ( module Bindings.GLib.Utilities.CommandlineOptionParser, module Bindings.GLib.Utilities.DateAndTimeFunctions, module Bindings.GLib.Utilities.HostnameUtilities, module Bindings.GLib.Utilities.SimpleXmlSubsetPars...
magthe/bindings-dsl
bindings-glib/src/Bindings/GLib/Utilities.hs
bsd-3-clause
647
0
5
39
86
63
23
11
0
module Lambda.Tree ( toTree, display, peng ) where import Lambda.Data import Tree import Autolib.Dot.Dotty instance ToTree Lambda where toTree t = case t of Variable v -> Node ( show v ) [] Apply fun arg -> Node "@" [ toTree fun, toTree arg ] Abstract var body -> Node ( "\\" ++ show var...
Erdwolf/autotool-bonn
src/Lambda/Tree.hs
gpl-2.0
341
0
12
95
133
68
65
10
0
{- Copyright 2015 Google Inc. All rights reserved. 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 a...
xwysp/codeworld
codeworld-base/src/GHC/IO/Buffer.hs
apache-2.0
741
0
4
136
25
19
6
4
0
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="fa-IR"> <title>Context Alert Filters | ZAP Extension</title> <maps> <homeID>top</homeID> ...
0xkasun/security-tools
src/org/zaproxy/zap/extension/alertFilters/resources/help_fa_IR/helpset_fa_IR.hs
apache-2.0
983
80
66
161
417
211
206
-1
-1
{- Copyright 2015 Google Inc. All rights reserved. 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 a...
Ye-Yong-Chi/codeworld
codeworld-base/src/Control/Monad/Instances.hs
apache-2.0
761
0
4
136
25
19
6
4
0
{-| Module : Language.Qux.Lexer Description : A Parsec lexer for the Qux language. Copyright : (c) Henry J. Wylde, 2015 License : BSD3 Maintainer : hjwylde@gmail.com A "Text.Parsec" lexer for the Qux language. -} {-# OPTIONS_HADDOCK hide, prune #-} module Language.Qux.Lexer where import Control.Monad ...
qux-lang/language-qux
src/Language/Qux/Lexer.hs
bsd-3-clause
2,741
0
9
688
829
432
397
64
1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE LambdaCase #-} -- | Generat...
anton-dessiatov/stack
src/Stack/Coverage.hs
bsd-3-clause
22,201
0
30
7,314
4,984
2,490
2,494
393
9
module Control.Gruppe -- $Id$ ( module Control.Gruppe.Typ , module Control.Gruppe.DB , module Control.Gruppe.CGI ) where import Control.Gruppe.Typ import Control.Gruppe.DB import Control.Gruppe.CGI
Erdwolf/autotool-bonn
trial/src/Control/Gruppe.hs
gpl-2.0
210
0
5
33
48
33
15
7
0
-- Both blocks are illegal Haskell 98, because of the un-saturated -- type synonym, but (rather obscurely) at one point (GHC 6.3), we -- accepted 'blah', but rejected 'blah1' module ShouldFail where data T = T -- This was erroneously accepted type Foo a = String -> Maybe a type Bar m = m Int blah = undefined :: Bar ...
sdiehl/ghc
testsuite/tests/typecheck/should_fail/tcfail129.hs
bsd-3-clause
401
0
6
86
81
49
32
8
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="pl-PL"> <title>ToDo-List</title> <maps> <homeID>todo</homeID> <mapref location="map.jhm...
kingthorin/zap-extensions
addOns/todo/src/main/javahelp/help_pl_PL/helpset_pl_PL.hs
apache-2.0
955
77
67
155
408
207
201
-1
-1
module Pfe3Metrics where import Data.Maybe(mapMaybe) import PFE0(allModules,pput) import PFE3(parseModule) import HsDeclStruct(DI(..)) import HsModule(hsModDecls) import DefinedNames(definedType) import HasBaseStruct(basestruct) import Statistics import PfeParse import MUtils pfe3MetricsCmds = [("classmetrics", (n...
SAdams601/HaRe
old/tools/pfe/Pfe3Metrics.hs
bsd-3-clause
1,053
0
15
193
406
212
194
-1
-1
module WhereIn4 where --A definition can be demoted to the local 'where' binding of a friend declaration, --if it is only used by this friend declaration. --Demoting a definition narrows down the scope of the definition. --In this example, demote the top level 'sq' to 'sumSquares' --In this case (there is single matc...
SAdams601/HaRe
old/testing/demote/WhereIn4_TokOut.hs
bsd-3-clause
599
0
7
149
78
43
35
6
1
{-# LANGUAGE GADTs, EmptyDataDecls, TypeFamilies, TypeOperators, DataKinds, FlexibleInstances #-} {- Defines a C-like printf function using DataKinds extensions. -} module T13659 where import Data.Kind (Type) -- format string parameterized by a list of types data Format (fmt :: [Type]) where X :: Format '[] ...
sdiehl/ghc
testsuite/tests/polykinds/T13659.hs
bsd-3-clause
514
0
10
120
107
63
44
8
0
module Main (main) where import Language.Haskell.HLint (hlint) import System.Exit (exitFailure, exitSuccess) arguments :: [String] arguments = [ "benchmark" , "executable" , "library" , "test-suite" ] main :: IO () main = do hints <- hlint arguments if null hints then exitSuccess else exi...
danplubell/CTG1371
test-suite/HLint.hs
mit
329
0
8
74
97
56
41
13
2
module Main where import Commands import Lib import Configuration import Driver.Console dummyScript :: Script () dummyScript = do forward 5.5 clockwise 30.0 forward 3.2 main :: IO () main = run dummyScript
research-team/robot-dream
app/Main.hs
mit
222
0
7
48
69
35
34
12
1
main = readFile "018.txt" >>= ( print . best . map (map (read :: String -> Int) . words) . lines ) -- dynamic best (x:[]) = x best (x:xs) = zipWith (+) x $ zipWith max z ys where z@(_:ys) = best xs...
nickspinale/euler
complete/018.hs
mit
321
0
14
167
123
64
59
7
1
{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE UndecidableInstances #-} {-# OPTIONS_GHC -fno-warn-orphans -fno...
gbwey/persistent
persistent-template/Database/Persist/TH.hs
mit
69,073
0
23
20,156
16,423
8,628
7,795
-1
-1
module Y2018.M11.D05.Solution where import Control.Arrow ((***)) import Data.Array import Data.Set (Set) import qualified Data.Set as Set {-- This is from @fermatslibrary tweet on calculator-rectangular numbers: https://twitter.com/fermatslibrary/status/1052544515632959488 It is put forward for every 'rectangular ...
geophf/1HaskellADay
exercises/HAD/Y2018/M11/D05/Solution.hs
mit
3,567
0
12
774
1,091
631
460
37
1
module Vm.Ecma where import Ecma.Prims import Data.Word import Data.Int import Vm.Def import qualified Data.HashTable.IO as H import qualified MonadLib as ML {- data VmRt = VmRt_Undefined | VmRt_Null | VmRt_Boolean Bool | VmRt_Int Int32 |...
phylake/avm3
vm/ecma.hs
mit
1,508
0
4
393
44
31
13
7
0
module Text.Enhask.CoreSpec where import Test.Hspec -- `main` is here so that this module can be run from GHCi on its own. It is -- not needed for automatic spec discovery. main :: IO () main = hspec spec spec :: Spec spec = describe "foo" $ it "42 == 42" $ 42 `shouldBe` 42
astynax/enhask
test/Text/Enhask/CoreSpec.hs
mit
285
0
8
64
62
35
27
9
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-missing-fields #-} {-# OPTIONS_GHC -fno-warn-missing-signatures #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -------------------...
danplubell/hbase-haskell
src/Database/HBase/Internal/Thrift2/THBaseService.hs
mit
71,566
327
29
13,711
19,396
9,586
9,810
1,519
16
module Syntax where type Name = String type Path = String data Expr = Float Double | BinaryOp Name Expr Expr | Var Name | VarDef Name Name | Call Name [Expr] | MethodCall Name [Expr] | Function Name [Expr] Expr | Module Name [Expr] | Class Name [Expr] | Import Name Path | Extern Name [Expr] | ...
NoxHarmonium/lithium-lang
src/Syntax.hs
mit
410
0
7
107
155
92
63
20
0
{-# LANGUAGE TemplateHaskell #-} import System.Exit import Data.List import Data.Maybe import Control.Monad import Control.Applicative import Test.QuickCheck import Test.QuickCheck.All import Test.QuickCheck.Test import PathFinder.Graph as G import PathFinder.PathFinder instance (Arbitrary a, Eq a) => Arbitrary (G...
MonadNomads/PathFinder
tests/tests.hs
mit
1,821
0
16
621
671
334
337
43
1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE FlexibleInstances #-} module Diagrams.Plots.Basic.Types ( -- * General plot options PlotOpt , x , y , height , width , title , file , xlab , ylab , xNames , yNames , xLabelOpt ...
kaizhang/haskell-plot
src/Diagrams/Plots/Basic/Types.hs
mit
1,729
0
9
538
378
239
139
63
0
fib = 1 : 1 : zipWith (+) fib (tail fib) main = print $ sum $ takeWhile (<4000001) $ filter even fib
dpieroux/euler
0/0002.hs
mit
101
0
8
23
58
30
28
2
1
1 + 2 -- 3 3 * 4 -- 12 5 / 2 -- 2.5 div 5 2 -- 2 5 `div` 2 -- 2 True && True -- True False || False -- False not True -- False 5 == 5 -- True 5 \= 5 -- False "hello" == "hello" -- True succ 8 -- 9 succ 8.5 -- 9.5 succ 'h' -- 'i' succ "h" -- Thro...
bhuber/Software-Foundations
haskell/notes.hs
mit
4,074
59
8
1,227
1,318
732
586
-1
-1
module LMonad.Label.PowerSet where import Data.Set (Set) import qualified Data.Set as Set import Prelude import LMonad -- | Power set label made of all combinations of the principals. data Ord p => PSLabel p = PSLabel { psLabelConfidentiality :: Set p , psLabelIntegrity :: Set p } deriving...
jprider63/LMonad
src/LMonad/Label/PowerSet.hs
mit
1,565
0
13
415
461
232
229
35
1
module Language.SystemF.Parser ( parseExpr, parseType ) where import Control.Monad import Data.Functor import Prelude hiding (abs) import Text.Parsec import Text.Parsec.String import Language.SystemF.Expression parseExpr :: String -> Either ParseError (SystemFExpr String String) parseExpr = parse (whitespace ...
sgillespie/lambda-calculus
src/Language/SystemF/Parser.hs
mit
2,134
0
11
448
820
421
399
61
1
{-# LANGUAGE OverloadedStrings #-} module Bfparser ( Program (..) , Command (..) , parseProgram ) where import Data.Attoparsec.Text (Parser, endOfInput, char, many') import Control.Applicative ((<|>), (<*), (*>), (<$>)) {-import Data.Text-} {-m1 = "[+++..>>>>--[,,..++--]++--]"-} {-m2 = "+++..>>>>--,,..++--++...
ajjaic/hs-bfk
Bfparser.hs
mit
1,703
0
10
371
373
208
165
39
1
import Control.Monad import Data.List.Extra import Data.Maybe import qualified Data.Char as C import qualified Data.Map as Map import qualified Data.Set as Set ------ iread :: String -> Int iread = read do2 f g x = (f x, g x) answer :: (Show a) => (String -> a) -> IO () answer f = interact $ (++"\n") . show . f ord...
msullivan/advent-of-code
2017/A4.hs
mit
1,021
0
15
230
480
251
229
27
3
module Main where import Lexer import Parser import AST import Pretty getAST src = case scan src of Left err -> error err Right toks -> parseCool toks main :: IO () main = do src <- getContents print (pretty $ getAST src)
gnuvince/vfb-coolc
src/Main.hs
mit
265
0
10
86
93
46
47
12
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-creditspecification.html module Stratosphere.ResourceProperties.EC2InstanceCreditSpecification w...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/EC2InstanceCreditSpecification.hs
mit
1,544
0
12
157
173
100
73
22
1
#!/usr/bin/runghc {-# Language TemplateHaskell, QuasiQuotes, FlexibleContexts, TypeOperators, TupleSections, LambdaCase, OverloadedStrings, NoMonomorphismRestriction, RelaxedPolyRec, ScopedTypeVariables #-} import Text.Groom import Prelude hiding ((.), id, foldl) import Control.Category ((.), id) import Control.Mon...
ducis/scraper-dsl-open-snapshot
scrapoo2.hs
gpl-2.0
3,157
18
20
590
1,193
618
575
94
3
{- | Module : $Header$ Description : Morphisms in Propositional logic Copyright : (c) Dominik Luecke, Uni Bremen 2007 License : GPLv2 or higher, see LICENSE.txt Maintainer : luecke@informatik.uni-bremen.de Stability : experimental Portability : portable Definition of morphisms for propositional l...
nevrenato/Hets_Fork
Propositional/Morphism.hs
gpl-2.0
5,453
0
23
1,400
1,421
744
677
102
8
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} module GeoLocation where import Data.Aeson import Data.Aeson.Types import Network.HTTP.Client import Network.HTTP.Client.TLS import Text.Regex.Posix import Data.List.Split import ...
frankhucek/WeatherApplication
src/GeoLocation.hs
gpl-3.0
3,040
0
24
732
802
416
386
59
2
import Network.Transport.TCP (createTransport, defaultTCPParameters) import Control.Distributed.Process import Control.Distributed.Process.Node main :: IO () main = do print "test1" Right t <- createTransport "127.0.0.1" "10501" defaultTCPParameters node <- newLocalNode t initRemoteTable return ()
adarqui/ToyBox
haskell/cloud-haskell/src/test1.hs
gpl-3.0
304
0
8
36
86
43
43
9
1
module Wiretap.Analysis.DataRace ( raceCandidates , sharedLocations , DataRace (..) ) where import Prelude hiding (reads) import Data.Function (on) import qualified Data.List as L import qualified Data.Map as M import qualified Dat...
ucla-pls/wiretap-tools
src/Wiretap/Analysis/DataRace.hs
gpl-3.0
1,708
0
13
507
524
298
226
51
1
{-# LANGUAGE NoImplicitPrelude #-} module Bamboo.Type.Theme where import Bamboo.Helper.PreludeEnv import Data.Default data ThemeConfig = ThemeConfig { name :: String , css :: [String] , js :: [String] } deriving (Show, Read) data ThemeConfigData = Name | Css | Js deriving (...
nfjinjing/bamboo
src/Bamboo/Type/Theme.hs
gpl-3.0
404
0
9
102
111
66
45
16
0
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances #-} module Config.Class where import Prelude hiding ((||)) import Helper.MaybeHelper((||)) import Data.Text (Text, pack, unpack) import Class.Castable(Castable(from)) import Data.List.Extra (lower) -- extra import D...
shinjiro-itagaki/shinjirecs
shinjirecs-api/src/Config/Class.hs
gpl-3.0
4,249
0
15
946
1,208
626
582
82
3
module XMonad.Hooks.DynamicLog.PrettyPrinter where import XMonad hiding (workspaces) import XMonad.Core hiding (workspaces) import qualified XMonad.StackSet as S import XMonad.Util.NamedWindows import XMonad.Hooks.UrgencyHook import XMonad.Hooks.DynamicLog.Status.DZen2.Universal import XMonad.Hooks.DynamicLog.Stat...
Fizzixnerd/xmonad-config
site-haskell/src/XMonad/Hooks/DynamicLog/PrettyPrinter.hs
gpl-3.0
532
0
5
49
112
78
34
14
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/WebApps/List.hs
mpl-2.0
4,614
0
18
1,122
706
411
295
105
1
<h3>Example 62 (categorical bars #3)</h3> <palette name="irispal" type="discrete"> "I. setosa" red "I. versicolor" green "I. virginica" blue </palette> <plot height=600 aspect=1 axis-x-label="Species" axis-y-label="Petal length"> <boxes x="[[iris.species]]" y="[[iris.petal_length]]" stroke="[[irispal(...
openbrainsrc/hRadian
examples/Example/defunct/Eg62.hs
mpl-2.0
4,839
1,233
19
387
3,825
1,756
2,069
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-youtube/gen/Network/Google/Resource/YouTube/PlayLists/Delete.hs
mpl-2.0
4,020
0
13
890
409
249
160
63
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-config/gen/Network/AWS/Config/PutConfigurationRecorder.hs
mpl-2.0
3,731
0
9
702
349
216
133
50
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AccountPermissions/List.hs
mpl-2.0
3,137
0
13
675
320
194
126
52
1
------------------------------------------------------------------- -- | -- Module : Data.Boolean.BF -- Copyright : (C) 2002-2005, 2009 University of New South Wales, (C) 2009-2011 Peter Gammie -- License : LGPL (see COPYING.LIB for details) ----------------------------------------------------------------...
m4lvin/hBDD
Data/Boolean/BF.hs
lgpl-2.1
1,797
2
10
451
352
214
138
-1
-1
{-# LANGUAGE StandaloneDeriving, GADTs, TypeFamilies, MultiParamTypeClasses, GeneralizedNewtypeDeriving, OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module NumberDataSource where import Data.Hashable import Haxl.Core import Data.IORef import Control.Monad (forM_) import Text.Printf import GraphQLHelpe...
dropbox/datagraph
src/NumberDataSource.hs
apache-2.0
2,007
0
14
307
548
280
268
44
1
-- http://www.codewars.com/kata/54c27a33fb7da0db0100040e module Codewars.Kata.Square where import Control.Arrow isSquare :: Integral n => n -> Bool isSquare = uncurry (==) . ((^2) . round . sqrt . fromIntegral &&& id)
Bodigrim/katas
src/haskell/7-Youre-a-square.hs
bsd-2-clause
219
0
11
30
66
38
28
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} module Ermine.Syntax.ModuleName ( ModuleName(ModuleName) , mkModuleName , mkModuleName_ , HasModuleName(..) ) where import Control.Applicative import Control.Lens import Crypto.Hash.MD5 as MD5 import Data.Binary import Data.Bytes.Serial impo...
ekmett/ermine
src/Ermine/Syntax/ModuleName.hs
bsd-2-clause
2,285
0
12
444
757
404
353
72
1
{-# LANGUAGE FlexibleContexts, TypeOperators, FlexibleInstances, ScopedTypeVariables #-} module Data.Persist.Interface ( -- * Operations on relationships addRelation , findAllRelated , findAllRelated' , findRelation , findRelation' -- * Operations on entities , find , update , findAll -...
chriseidhof/persist
src/Data/Persist/Interface.hs
bsd-3-clause
5,542
0
14
1,160
1,850
945
905
92
3
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} module Main whe...
cdepillabout/haskell-sqlitetest-error
Main.hs
bsd-3-clause
1,553
0
15
258
391
211
180
37
1
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE DataKinds #-} -- -- Peripheral.hs --- ADC peripheral driver for the STM32F4. -- -- Copyright (C) 2015, Galois, Inc. -- All Rights Reserved. -- module Ivory.BSP.STM32.Peripheral.ADC.Pe...
GaloisInc/ivory-tower-stm32
ivory-bsp-stm32/src/Ivory/BSP/STM32/Peripheral/ADC/Peripheral.hs
bsd-3-clause
2,875
0
12
688
727
384
343
71
1
{-# OPTIONS_GHC -fno-warn-orphans #-} {-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, FlexibleContexts, PolyKinds, TemplateHaskell #-} module Data.Profunctor.Product.Default ( module Data.Profunctor.Product.Default , module Data.Profunctor.Product.Default.Class ) where import Control.Applica...
karamaan/product-profunctors
Data/Profunctor/Product/Default.hs
bsd-3-clause
1,202
0
10
198
382
217
165
22
1
{-# LANGUAGE OverloadedStrings #-} module Waldo.StoryExample ( loadScriptGen ) where import Control.Monad import Data.ByteString.Char8 () import Data.Text () import Waldo.Stalk import Waldo.Script import Waldo.Story import Waldo.CityLoc loadScriptGen :: IO (PersonalData -> IO Script) loadScriptGen = do defau...
davean/waldo
Waldo/StoryExample.hs
bsd-3-clause
1,800
0
15
558
502
256
246
47
1
module FoldMapAllTheThings where import Data.Monoid -- | Implement toList, minimum and foldr using foldMap (4 kyu) -- | Link: https://biturl.io/FoldMap -- | My original solution myToList :: Foldable t => t a -> [a] myToList = foldMap (: []) newtype Min a = Min { getMin :: Maybe a } instance Ord a => Monoid (Mi...
Eugleo/Code-Wars
src/haskell-kata/FoldMapAllTheThings.hs
bsd-3-clause
707
0
11
169
318
166
152
17
1