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
-- Copyright (c) 2014 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
test/Tests/Control/Monad.hs
bsd-3-clause
1,732
0
7
289
76
60
16
5
1
-- | -- Module : Foundation.VFS.FilePath -- License : BSD-style -- Maintainer : foundation -- Stability : experimental -- Portability : portable -- -- # Opaque implementation for FilePath -- -- The underlying type of a FilePath is a `Foundation.ByteArray`. It is indeed like -- this because for some systems ...
vincenthz/hs-foundation
foundation/Foundation/VFS/FilePath.hs
bsd-3-clause
8,201
0
12
1,812
1,469
824
645
-1
-1
{-# LANGUAGE RecordWildCards, ViewPatterns #-} module Development.Bake.Pretty(ovenPretty, ovenPrettyMerge, Pretty(..)) where import Development.Bake.Core.Type import Data.List.Extra data Pretty a = Pretty String a deriving (Read,Show,Eq) instance Stringy a => Stringy (Pretty a) where stringyTo (Pretty a b) = a...
Pitometsu/bake
src/Development/Bake/Pretty.hs
bsd-3-clause
1,502
0
10
323
466
246
220
22
1
{-# LANGUAGE TupleSections, OverloadedStrings #-} module Handler.Home where import Import as I import Data.Time import Data.List as I (isPrefixOf) import Text.Blaze.Html (preEscapedToHtml) import Text.Blaze.Html.Renderer.String (renderHtml) import Yesod.Auth (requireAuthId) import Yesod.Auth.HashDB (setSaltAndPassword...
kobayashi1027/nomnichi-haskell
Handler/Home.hs
bsd-2-clause
4,641
0
16
1,278
1,474
767
707
106
4
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="ko-KR"> <title>Encode/Decode/Hash Add-on</title> <maps> <homeID>encoder</homeID> <mapre...
thc202/zap-extensions
addOns/encoder/src/main/javahelp/org/zaproxy/addon/encoder/resources/help_ko_KR/helpset_ko_KR.hs
apache-2.0
974
77
69
156
419
212
207
-1
-1
{- (c) The University of Glasgow 2006 (c) The AQUA Project, Glasgow University, 1994-1998 \section[UniqSet]{Specialised sets, for things with @Uniques@} Based on @UniqFMs@ (as you would expect). Basically, the things need to be in class @Uniquable@. -} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE DeriveD...
shlevy/ghc
compiler/utils/UniqSet.hs
bsd-3-clause
6,618
0
9
1,274
1,743
892
851
115
1
{-# OPTIONS_GHC -Wall #-} {-# Language TypeFamilies #-} {-# Language DeriveGeneric #-} module T8479 where import GHC.Generics import Data.Kind (Type) class Blah (a :: Type -> Type) where type F a :: Type -> Type data Foo (f :: Type -> Type) a = MkFoo ((F f) a) deriving Generic1
sdiehl/ghc
testsuite/tests/generics/T8479.hs
bsd-3-clause
285
0
10
56
88
53
35
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} ---------------------------------------------------------------------- -- | -- Module : XMonad.Actions.GroupNavigation -- Copyright : (c) nzeh@cs.dal.ca -- License : BSD3-style (see LICENSE) -- -- Maintainer : nzeh@cs.dal.ca -- Stability : unstable -- Portability : unp...
pjones/xmonad-test
vendor/xmonad-contrib/XMonad/Actions/GroupNavigation.hs
bsd-2-clause
8,762
0
17
2,082
1,556
830
726
90
3
module Distribution.Client.Dependency.Modular.Index where import Data.List as L import Data.Map as M import Prelude hiding (pi) import Distribution.Client.Dependency.Modular.Dependency import Distribution.Client.Dependency.Modular.Flag import Distribution.Client.Dependency.Modular.Package import Distribution.Client.D...
DavidAlphaFox/ghc
libraries/Cabal/cabal-install/Distribution/Client/Dependency/Modular/Index.hs
bsd-3-clause
1,304
0
13
198
308
189
119
16
1
module Test13 where f ((x : xs)) = x : xs g = f (1 : [1, 2])
kmate/HaRe
old/testing/refacFunDef/Test13_AstOut.hs
bsd-3-clause
64
0
8
21
47
27
20
3
1
-- |Simple vectorised constructors and projections. -- module Vectorise.Vect ( Vect, VVar, VExpr, VBind , vectorised , lifted , mapVect , vVarType , vNonRec , vRec , vVar , vType , vTick , vLet , vLams , vVarApps , vCaseDEFAULT ) where import CoreSyn import Type ( Type ) impor...
oldmanmike/ghc
compiler/vectorise/Vectorise/Vect.hs
bsd-3-clause
2,935
0
9
729
817
469
348
67
1
{-# LANGUAGE CPP #-} module X86.RegInfo ( mkVirtualReg, regDotColor ) where #include "nativeGen/NCG.h" #include "HsVersions.h" import Size import Reg import Outputable import Platform import Unique import UniqFM import X86.Regs mkVirtualReg :: Unique -> Size -> VirtualReg mkVirtualReg u size =...
forked-upstream-packages-for-ghcjs/ghc
compiler/nativeGen/X86/RegInfo.hs
bsd-3-clause
1,869
0
11
714
516
303
213
51
4
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE FlexibleInstances #-} {- With "hugs -98 +o test.hs" gives me: ERROR "test.hs":8 - Cannot justify constraints in instance member binding *** Expression : fromStr *** Type : FromStr [a] => String -> [a] *** Given context : From...
urbanslug/ghc
testsuite/tests/typecheck/should_compile/tc176.hs
bsd-3-clause
1,272
0
7
276
113
65
48
11
1
{-# LANGUAGE ExistentialQuantification, TemplateHaskell #-} module Light.Primitive ( Primitive, primitive, primitiveShape, primitiveMaterial , Material(..) ) where import Light.Shape import Light.Geometry.Transform data Material = Material deriving (Eq, Show, Read) data Primitive = Primitive { primitiveShape ...
jtdubs/Light
src/Light/Primitive.hs
mit
908
0
8
233
226
125
101
19
1
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.DelayNode (js_getDelayTime, getDelayTime, DelayNode, castToDelayNode, gTypeDelayNode) where import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fromInteg...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/JSFFI/Generated/DelayNode.hs
mit
1,351
6
11
156
377
238
139
23
1
-------------------------------------------------------------------------------- -- | -- | Module : Data -- | Copyright : (c) Vladimir Lopatin 2014 -- | License : BSD3 -- | -- | Maintainer : Vladimir Lopatin <madjestic13@gmail.com> -- | Stability : experimental -- | Portability : untested -- | -- | ...
ublubu/zombieapaperclypse
NGL/Shape.hs
mit
3,609
2
13
1,170
1,348
760
588
69
2
{-# LANGUAGE OverloadedStrings #-} -- | This module provides functionality to manipulate raw transaction. It -- automatically interprets transactions using the `bitcoin-tx` package, so -- you can work with actual 'Btc.Transaction' objects rather than their -- serialized format. module Network.Bitcoin.Api.Transa...
solatis/haskell-bitcoin-api
src/Network/Bitcoin/Api/Transaction.hs
mit
5,718
0
16
1,606
1,007
557
450
-1
-1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE NoMonomorphismRestriction #-} import Control.Lens import Control.Lens.TH data Record1 a = Record1 { _a :: Int , _b :: Maybe a } deriving Show data Record2 = Record2 { _c :: String , _d :: [Int] } deriving Show $(makeLenses ''Record1) $(makeLenses ''Record2) ...
riwsky/wiwinwlh
src/lens.hs
mit
1,357
0
11
397
360
215
145
42
1
module Euler.Problems.Euler012 ( euler012 ) where import Data.List (group) import Euler.Primes (primeFactors) euler012 :: () -> Int euler012 _ = fromIntegral $ head $ dropWhile ((<501) . divisors) $ drop 1 triangles where triangles = 1 : zipWith (+) triangles [2..] divisors = product . map ((+...
b52/projecteuler
src/Euler/Problems/Euler012.hs
mit
357
0
13
80
136
76
60
9
1
main = do line <- getLine if null line then return () else do putStrLn $ reverseWords line main reverseWords :: String -> String reverseWords = unwords . map reverse . words
fabriceleal/learn-you-a-haskell
09/infinite_input.hs
mit
228
0
11
86
70
33
37
9
2
module Util.Util where import Graphics.Rendering.OpenGL -- |'fib' returns given Fibonacci number fib :: Int -> Int fib = (!!) fibs -- |'fibs' is a list of Fibonacci numbers fibs :: [Int] fibs = 0 : 1 : zipWith (+) fibs (tail fibs) cube w = renderPrimitive Quads $ do vertex $ Vertex3 w w w vertex $ Vertex...
andrey013/mynd
src/Util/Util.hs
mit
1,595
0
16
444
891
441
450
46
1
module Rebase.Data.Profunctor.Adjunction ( module Data.Profunctor.Adjunction ) where import Data.Profunctor.Adjunction
nikita-volkov/rebase
library/Rebase/Data/Profunctor/Adjunction.hs
mit
122
0
5
12
23
16
7
4
0
{-# LANGUAGE RecordWildCards, DeriveGeneric #-} module Exp where import GHC.Generics import Language.Haskell.Exts.Annotated -- import Control.Monad import Control.Applicative import Control.Arrow import Text.PrettyPrint.GenericPretty import Data.List import Data.Char import Data.Maybe import Control.Conditional impo...
HanStolpo/ghc-edit
test/Exp.hs
mit
19,543
0
19
7,823
6,468
3,242
3,226
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TemplateHaskell #-} -- | Export the data source to various data formats. module DataAnalysis.Application.Handler.Export where import Blaze.ByteString.Builder -- import Data.Conduit import qualified Data.Conduit.List as C...
teuffy/min-var-ci
src/DataAnalysis/Application/Handler/Export.hs
mit
4,762
0
15
1,306
954
496
458
78
1
{-# LANGUAGE RecordWildCards, ParallelListComp #-} module Exec where import Data.Char import Data.List import Debug.Trace import TypesEtc import Sprockell -- ============================================================================================ -- execution functions for simulation purposes: exec, sim -- --...
Oboema/FP-GO1
Exec.hs
mit
6,509
42
14
1,392
996
558
438
62
1
module Network.Server ( module Network.Server.Common ) where import Network.Server.Common
harrisi/on-being-better
list-expansion/Haskell/course/projects/NetworkServer/haskell/src/Network/Server.hs
cc0-1.0
94
0
5
13
21
14
7
4
0
{- lat - tool to track alerts from LWN. - Copyright (C) 2010 Magnus Therning - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, version 3 of the License. - - This program is distributed i...
magthe/lat
src/Commands/Distro.hs
gpl-3.0
1,291
0
10
243
181
98
83
14
1
module Main where import Data.Char (isSpace) import Data.List (intersperse, break) import Text.Printf (printf) main :: IO () main = interact labels2vtt labels2vtt :: String -> String labels2vtt input = webVtt where webVtt = unlines $ "WEBVTT" : "" : cues cues = map (showVttCue . readLabel) labels label...
mkovacs/labels2vtt
src/main/Main.hs
gpl-3.0
1,164
0
11
261
489
271
218
30
1
{-| Module : Voogie.Parse.FOOL Description : Parser of FOOL formulas embedded in Boogie properties. Copyright : (c) Evgenii Kotelnikov, 2019 License : GPL-3 Maintainer : evgeny.kotelnikov@gmail.com Stability : provisional -} module Voogie.Parse.FOOL ( module Voogie.Parse, term, formula ) wher...
aztek/voogie
src/Voogie/Parse/FOOL.hs
gpl-3.0
1,902
0
11
438
560
307
253
49
1
{- TrigramCore_Test: Tests for the trigram generator. Copyright (C) 2009 Mark Buer This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at you...
zymbolic-creations/learningHaskell
trigram/TrigramCore_Test.hs
gpl-3.0
4,683
0
13
1,264
859
460
399
83
1
import Test.DocTest main :: IO () main = doctest ["src/Main.hs"]
romanofski/checkCalendar
tests/doctests.hs
gpl-3.0
66
0
6
11
27
14
13
3
1
module HsRegex (subRange, char, dot, endl, stl, spc, notSpc, wc, notWc, digit, notDigit, alnum, plus, star, pipe, range, notRange, qMark, wb, reGroup, var, mN, mLN, mN1N2, combine, (=~), RegexS) where import Control.Monad as C import Control.Monad.Loops...
cgroza/HsRegex
HsRegex.hs
gpl-3.0
8,686
0
19
2,403
3,079
1,597
1,482
175
5
-- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } func (x :+: xr) = x
lspitzner/brittany
data/Test416.hs
agpl-3.0
134
0
7
17
17
9
8
1
1
{----------------------------------------------------------------------------- A LIBRARY OF MONADIC PARSER COMBINATORS 29th July 1996 Graham Hutton Erik Meijer University of Nottingham University of Utrecht This Haskell 1.3...
Kludgy/polyparse-fork
src/Text/ParserCombinators/HuttonMeijerWallace.hs
lgpl-2.1
12,811
0
19
4,566
3,123
1,664
1,459
127
3
{-# LANGUAGE OverloadedStrings, CPP #-} module Model.ActionKey where import qualified Data.ByteString.Builder as BS import qualified Data.ByteString.Char8 as BS import qualified Database.PostgreSQL.Simple.FromRow as PG import qualified Database.PostgreSQL.Simple.FromField as PG import qualified Database.PostgreSQL.Si...
DataStewardshipPortal/ds-wizard
Model/ActionKey.hs
apache-2.0
1,229
0
15
210
316
187
129
29
0
module Main where import Control.Lens import Control.Monad import Data.Bits import qualified Data.ByteString.Lazy.Char8 as BL import Data.Bytes.Get import Data.List (intercalate) import System.Ext2 import System.Environment main :: IO () main = do args <- getArgs when (length args /= 1) $ error "Usage: ext2ch...
relrod/ext2
src/ext2checker.hs
bsd-2-clause
1,244
0
14
284
417
212
205
-1
-1
module Graphics.GL.Low.Classes where import Graphics.GL -- | OpenGL internal image formats. class InternalFormat a where internalFormat :: (Eq b, Num b) => proxy a -> b -- | The allowed attachment point for images with an internal format. class InternalFormat a => Attachable a where attachPoint :: (Eq b, Num b) ...
sgraf812/lowgl
Graphics/GL/Low/Classes.hs
bsd-2-clause
944
0
9
197
239
123
116
-1
-1
-- | Collection of utilities to make @wybor@ customization palatable -- -- Those are mostly thin wrappers over things in "System.Console.ANSI" from @ansi-terminal@ module Ansi ( reset , bold , regular , underlining , swap , unswap , fgcolor , bgcolor , Ansi.Underlining(..) , Ansi.ColorIntensity(..) ...
supki/wybor
src/Ansi.hs
bsd-2-clause
1,402
0
8
247
336
193
143
33
1
{-# LANGUAGE FlexibleContexts #-} module Horbits.UI.Camera.Control (setupMouseControl) where import Control.Lens import Control.Monad.Trans.State import Data.IORef import Graphics.UI.Gtk import Linear import Horbits.Data.Binding import Horbits.UI....
chwthewke/horbits
src/horbits/Horbits/UI/Camera/Control.hs
bsd-3-clause
3,179
1
15
900
1,091
552
539
62
3
module ETA.CodeGen.Utils where import ETA.Main.DynFlags import ETA.BasicTypes.Name import ETA.Types.TyCon import ETA.BasicTypes.Literal import Codec.JVM import Data.Char (ord) import Control.Arrow(first) import ETA.CodeGen.Name import ETA.CodeGen.Rts import ETA.Debug import Data.Text (Text) import Data.Text.Encoding (...
pparkkin/eta
compiler/ETA/CodeGen/Utils.hs
bsd-3-clause
3,217
0
13
695
980
518
462
62
2
{-# LANGUAGE DataKinds, GADTs, TypeFamilies, TypeOperators #-} module Text.Printf.Safe.Core (type (~>), Formatter, Printf(..), HList(..), printf, printf') where import Data.String (IsString (..)) -- | Variadic function types. type family (~>) as b where (~>) '[] a = a (~>) (x ': xs) a...
konn/safe-printf
src/Text/Printf/Safe/Core.hs
bsd-3-clause
1,341
1
11
396
576
313
263
-1
-1
module Cakefile where import Development.Cake3 import Development.Cake3.Ext.UrWeb import Cakefile_P main = writeMake (file "Makefile") $ do prebuild [cmd|urweb -version|] u <- uwlib (file "Script.urp") $ do ffi (file "Script.urs") include (file "Script.h") src (file "Script.c") pkgconfig "jansso...
grwlf/cake3
Example/UrWeb/Cakefile.hs
bsd-3-clause
698
0
14
166
247
109
138
-1
-1
-- | The issues API as described on <http://developer.github.com/v3/issues/>. module Github.Issues ( issue ,issue' ,issuesForRepo ,issuesForRepo' ,IssueLimitation(..) ,module Github.Data ) where import Github.Data import Github.Private import Data.List (intercalate) import Data.Time.Format (formatTime) import System....
erochest/github
Github/Issues.hs
bsd-3-clause
3,623
0
12
709
593
334
259
55
13
module Wigner.Complex ( Complex((:+)), ComplexValued(conjugate), ComplexNum(fromComplexRational)) where import Data.Ratio import Wigner.Texable data Complex a = a :+ a deriving (Show, Eq) class ComplexValued a where conjugate :: a -> a instance (Num a) => ComplexValued (Complex a) where conjugat...
fjarri/wigner
src/Wigner/Complex.hs
bsd-3-clause
1,348
0
13
428
665
347
318
40
0
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 Desugaring arrow commands -} {-# LANGUAGE CPP #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE ViewPatterns #-} {-# OPTIONS_GHC -Wno-incomplete-record-updates #-} module DsArrows ( dsProcExpr ) where #include "HsVersions...
sdiehl/ghc
compiler/deSugar/DsArrows.hs
bsd-3-clause
49,514
0
25
14,957
10,079
5,191
4,888
768
19
module Yawn.Test.BlackBox.ParserTest where import Test.HUnit import Yawn.Test.Common tests :: Test tests = TestList [ TestLabel "TestSimpleGet" testSimpleGet, TestLabel "TestSimplePost" testSimplePost, TestLabel "TestInvalidRequest" testInvalidRequest] testSimpleGet :: Test testSimpleGet = TestCase $ do resp...
ameingast/yawn
test/src/Yawn/Test/BlackBox/ParserTest.hs
bsd-3-clause
903
0
9
145
198
96
102
24
1
{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} module Test.SSH.Sender (sshSenderTests) where #if __GLASGOW_HASKELL__ < 710 import Control.Applicative #endif import Test.Tasty (TestTree, testGroup) ----------- -- Tests -- ----------- -- | TODO: tests. sshSenderTests :: TestTree sshSenderTests = testGroup ...
cdepillabout/ssh
test/Test/SSH/Sender.hs
bsd-3-clause
354
0
6
56
55
36
19
8
1
{-# LANGUAGE QuasiQuotes, TypeFamilies #-} import Text.Papillon import Data.Char import System.Environment main :: IO () main = do arg : _ <- getArgs case runError $ expr $ parse arg of Right (r, _) -> print r Left _ -> putStrLn "parse error" [papillon| op1 :: Int -> Int -> Int = '*' { (*) } / '/' { div...
YoshikuniJujo/papillon
examples/arith.hs
bsd-3-clause
659
0
11
180
98
50
48
11
2
{- (c) The AQUA Project, Glasgow University, 1993-1998 \section[Simplify]{The main module of the simplifier} -} {-# LANGUAGE CPP #-} module Simplify ( simplTopBinds, simplExpr, simplRules ) where #include "HsVersions.h" import DynFlags import SimplMonad import Type hiding ( substTy, substTyVar, extendTCvSubst...
gridaphobe/ghc
compiler/simplCore/Simplify.hs
bsd-3-clause
123,812
20
25
38,015
15,365
8,135
7,230
-1
-1
{- Module : Main Description : UI and top level game loop Module which handles UI and top level game loop. -} module Main( main , module Exported ) where import Pentago.Data.Matrix as Exported import Pentago.Data.Pentago as Exported hiding (Player) import Pentago.Data.Tree as Exported import Pentago.AI.MinMax a...
gregorias/Pentago
src/Main.hs
bsd-3-clause
6,757
0
15
1,416
1,654
839
815
188
5
-- | Module Parser transforms text files in a Tiles array (strongly typed). module Parser where import Hyrule import Data.Array import Text.Trifecta import Control.Applicative ((<|>)) data TerrainError = TerrainError data ObjectError = ObjectError parseTerrain :: AreaType -> Parser Terrain parseTerrain Overworld = ...
trxeste/wrk
haskell/TrabalhoIA/src/Parser.hs
bsd-3-clause
2,283
0
13
569
728
350
378
63
11
{-# LANGUAGE GADTs #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeSynonymInstances #-...
emwap/feldspar-language
src/Feldspar/Core/Frontend.hs
bsd-3-clause
12,977
0
22
2,861
2,797
1,547
1,250
-1
-1
module ETA.TypeCheck.TcForeign ( tcForeignImports , tcForeignExports -- Low-level exports for hooks , isForeignImport, isForeignExport , tcFImport --, tcFExport -- , tcForeignImports' , tcCheckFIType, checkJavaTarget, checkForeignArgs, checkForeignRes , normaliseFfiType , nonIOok, mustBeIO , checkSaf...
alexander-at-github/eta
compiler/ETA/TypeCheck/TcForeign.hs
bsd-3-clause
12,447
0
19
3,274
3,449
1,743
1,706
253
9
-- | News page controller. This page simply downloads from -- haskellnews.org which already has a pre-prepared page of news to -- display. module HL.C.News where import HL.C import HL.M.News import HL.V.News -- | News controller. getNewsR :: C Html getNewsR = do html <- io getHaskellNews blaze (newsV html)
chrisdone/hl
src/HL/C/News.hs
bsd-3-clause
318
0
9
60
63
36
27
8
1
-- A point is a point in the xy plane, represented by x and y coordinates -- E.g. (Point 0.0 0.0) is the origin, (Point (-1) (1)) is in the top left -- quadrant. data Point = Point Double Double deriving (Show, Eq) -- A line segment is a straight line of finite length, defined by its -- two end points. E.g. (Lin...
markstoehr/cs161
_site/fls/Lab2_flymake.hs
cc0-1.0
879
0
6
192
78
47
31
7
0
{-# LANGUAGE CPP #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveFunctor, DeriveFoldable, DeriveTraversable #-} ----------------------------------------------------------------------------- -- | -- Module : Distribution.Client.Targets -- Copyright : (c) Duncan Coutts 2011 -...
mydaum/cabal
cabal-install/Distribution/Client/Targets.hs
bsd-3-clause
31,363
0
21
8,451
5,370
2,801
2,569
512
12
{-# OPTIONS_GHC -fno-warn-missing-signatures #-} {-# LANGUAGE MultiParamTypeClasses, Rank2Types #-} ----------------------------------------------------------------------------- -- | -- Module : XMonad.Layout.Groups.Helpers -- Copyright : Quentin Moser <moserq@gmail.com> -- License : BSD-style (see LICEN...
f1u77y/xmonad-contrib
XMonad/Layout/Groups/Helpers.hs
bsd-3-clause
8,103
0
16
2,343
1,305
712
593
105
2
{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_HADDOCK hide #-} module Network.Xmpp.IM.Message where import Data.Default import Data.Function import Data.List import Data.Text (Text) import Data.XML.Pickle import Data.XML.Types import Network.Xmpp.Marshal import Network.Xmpp.Types data MessageBody = MessageBody { bo...
Philonous/pontarius-xmpp
source/Network/Xmpp/IM/Message.hs
bsd-3-clause
4,325
0
13
1,462
959
535
424
75
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ViewPatterns #-} -- | The web server. module Ircbrowse.Server where import Ircbrowse.Types import qualified Ircbrowse.Controllers as C import Snap.App import Snap.Http.Server hiding (Config) import Snap.Util.FileServe ...
plow-technologies/ircbrowse
src/Ircbrowse/Server.hs
bsd-3-clause
1,704
0
12
434
465
261
204
37
1
-- Module : Network.AWS.Data -- Copyright : (c) 2013-2015 Brendan Hay <brendan.g.hay@gmail.com> -- License : This Source Code Form is subject to the terms of -- the Mozilla Public License, v. 2.0. -- A copy of the MPL can be found in the LICENSE file or -- you can ob...
romanb/amazonka
core/src/Network/AWS/Data.hs
mpl-2.0
2,135
0
5
404
289
226
63
32
0
{---------------------------------------------------------------------------- Abstract syntax of JOOS, based on: David A. Watt. JOOS action semantics. Version 1, available from http://www.dcs.gla.ac.uk/~daw/publications/JOOS.ps, October 1997. Modifications: o StatFocus o StringLiterals ---------------...
forste/haReFork
StrategyLib-4.0-beta/examples/joos-padl02/Datatypes.hs
bsd-3-clause
3,590
50
8
1,129
722
410
312
78
0
{-# LANGUAGE OverloadedStrings #-} module Stack.Options (Command(..) ,benchOptsParser ,buildOptsParser ,configOptsParser ,dockerOptsParser ,dockerCleanupOptsParser ,dotOptsParser ,execOptsParser ,globalOptsParser ,initOptsParser ,newOptsParser ,logLevelOptsParser ,ab...
wskplho/stack
src/Stack/Options.hs
bsd-3-clause
21,355
0
28
8,236
3,825
1,907
1,918
486
9
{-# OPTIONS_GHC -fno-warn-missing-signatures #-} {-# LANGUAGE MultiParamTypeClasses, Rank2Types #-} ----------------------------------------------------------------------------- -- | -- Module : XMonad.Layout.Groups.Examples -- Copyright : Quentin Moser <moserq@gmail.com> -- License : BSD-style (see LICE...
MasseR/xmonadcontrib
XMonad/Layout/Groups/Examples.hs
bsd-3-clause
8,792
0
10
2,622
1,166
673
493
89
1
-- Example.hs -- Examples from HUnit user's guide -- -- For more examples, check out the tests directory. It contains unit tests -- for HUnit. module Main where import Test.HUnit foo :: Int -> (Int, Int) foo x = (1, x) partA :: Int -> IO (Int, Int) partA v = return (v+2, v+3) partB :: Int -> IO Bool partB v =...
Numberartificial/workflow
snipets/.stack-work/install/x86_64-osx/lts-8.12/8.0.2/share/x86_64-osx-ghc-8.0.2/HUnit-1.2.5.2/examples/Example.hs
mit
1,073
0
13
346
372
192
180
25
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="id-ID"> <title>OAST Support Add-on</title> <maps> <homeID>oast</homeID> <mapref locatio...
kingthorin/zap-extensions
addOns/oast/src/main/javahelp/org/zaproxy/addon/oast/resources/help_id_ID/helpset_id_ID.hs
apache-2.0
965
77
67
157
413
209
204
-1
-1
{-# LANGUAGE DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-} ----------------------------------------------------------------------------- -- | -- Module : XMonad.Actions.WorkspaceCursors -- Copyright : (c) 2009 Adam Vogt <vogt.adam@gmail.com> -- License : BSD -- -- Maintainer : Adam Vo...
adinapoli/xmonad-contrib
XMonad/Actions/WorkspaceCursors.hs
bsd-3-clause
8,231
0
13
1,701
2,250
1,192
1,058
106
1
module Grin.Lint( lintCheckGrin, typecheckGrin, transformGrin, dumpGrin ) where import Control.Exception import Control.Monad.Reader import Data.Monoid import System.IO import qualified Data.Set as Set import Doc.DocLike import Grin.Grin import Grin.Show import Options import Support.CanType impor...
m-alvarez/jhc
src/Grin/Lint.hs
mit
12,583
1
18
3,741
5,269
2,568
2,701
-1
-1
{-# LANGUAGE CPP #-} -------------------------------------------------------------------------------- -- | Deal with Cmm registers -- module LlvmCodeGen.Regs ( lmGlobalRegArg, lmGlobalRegVar, alwaysLive, stgTBAA, baseN, stackN, heapN, rxN, otherN, tbaa, getTBAA ) where #include "HsVersions.h" im...
tjakway/ghcjvm
compiler/llvmGen/LlvmCodeGen/Regs.hs
bsd-3-clause
5,550
0
11
1,633
1,447
741
706
94
44
{-# OPTIONS_GHC -w #-} {-# LANGUAGE FlexibleInstances, UndecidableInstances #-} module ShouldCompile where import Control.Monad.Reader instance Eq (a -> b) where _ == _ = error "whoops" instance Show (a -> b) where show = const "<fun>" -- This is the example from Trac #179 foo x = show (\_ -> True) -- ...
urbanslug/ghc
testsuite/tests/typecheck/should_compile/tc217.hs
bsd-3-clause
436
0
8
96
146
78
68
-1
-1
{-# LANGUAGE Trustworthy, Unsafe #-} -- | Basic test to see if Safe flags compiles module SafeFlags06 where f :: Int f = 1
urbanslug/ghc
testsuite/tests/safeHaskell/flags/SafeFlags06.hs
bsd-3-clause
126
0
4
27
16
11
5
4
1
{-# OPTIONS_GHC -fwarn-warnings-deprecations #-} -- Test deprecation of constructors and class ops module ShouldCompile where import Rn050_A instance Foo T where op x = x bop y = y foo = op C
urbanslug/ghc
testsuite/tests/rename/should_compile/rn050.hs
bsd-3-clause
202
0
6
43
41
23
18
7
1
{-# LANGUAGE OverloadedStrings #-} module Main (main) where import Control.Monad (mplus) import Data.Aeson import qualified Data.ByteString.Lazy as BSL import Data.Dynamic import Data.Map as M import System.Directory impor...
zeusdeux/heart.mudit.xyz
src/main.hs
isc
2,378
0
15
720
511
271
240
49
3
{- | This module works with recursive data structure with cycles. -} module Data.Generics.Rec ( universeRec ) where import Data.Generics import Control.Monad.State import Data.Set import System.Mem.StableName import System.IO.Unsafe type RecState a = StateT (Set Int) IO a goRec :: (Data v, Data r) => v -> RecSta...
lomeo/unirec
src/Data/Generics/Rec.hs
mit
1,167
0
14
342
286
158
128
22
3
{- | module: Main description: Querying the contents of OpenTheory packages license: MIT maintainer: Joe Leslie-Hurd <joe@gilith.com> stability: provisional portability: portable -} module Main ( main ) where import System.FilePath (isValid,takeDirectory,takeExtension) import qualified System.Environment as Environ...
gilith/hol
src/Main.hs
mit
3,999
0
21
820
783
398
385
71
6
data Vector = Vector { x :: Double, y :: Double } deriving (Eq, Ord, Show) instance Num Vector where p1 + p2 = Vector (x p1 + x p2) (y p1 + y p2) p1 - p2 = p1 + negate p2 p1 * p2 = Vector (x p1 * x p2) (y p1 * y p2) abs (Vector x y) = Vector (sqrt (x * x + y * y)) 0 negate (Vector x y) = Vector (-x...
0xd34df00d/hencil
src/Vector.hs
mit
507
0
14
159
351
174
177
11
1
{-# LANGUAGE RecordWildCards #-} module Hogldev.Pipeline ( Pipeline(..) , getTrans , PersProj(..) , Camera(..) ) where import Graphics.Rendering.OpenGL import Hogldev.Math3D import Hogldev.Utils import Hogldev.Camera data Pipeline = WPipeline { scaleInfo ...
triplepointfive/hogldev
common/Hogldev/Pipeline.hs
mit
2,783
0
11
772
676
358
318
74
1
{-# LANGUAGE ForeignFunctionInterface #-} {-# LANGUAGE JavaScriptFFI #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE EmptyDataDecls #-} module JavaScript.Web.Blob.Internal where import Data.Typeable import GHCJS.Types data BlobType = BlobTypeBlob ...
tavisrudd/ghcjs-base
JavaScript/Web/Blob/Internal.hs
mit
1,607
15
10
276
358
190
168
37
1
module Main where import Data.Bifunctor (first) import Data.Bits (testBit, unsafeShiftL) import Data.Bool (bool) import Data.Char (digitToInt) import Data.Foldable (foldl', traverse_) import Data.Function (on) import Data.List.NonEmpty (NonEmpty (..), fromList) readBits :: Str...
genos/online_problems
advent_of_code_2021/day16/Main.hs
mit
3,088
0
14
858
1,460
771
689
96
4
{-# LANGUAGE FlexibleContexts, Rank2Types, NoMonomorphismRestriction #-} module Game.World.Lens ( objectBoundary , Get , Set , Component(..) , writeProp , compUnit , getWires , addWire , addObject , moveObject , isCollidable , getCollisionFilters , setCollisionEvent...
mfpi/q-inqu
Game/World/Lens.hs
mit
9,726
0
16
1,799
2,647
1,406
1,241
-1
-1
{-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE ExplicitForAll #-} {-# LANGUAGE ScopedTypeVariables #-} -- | This module deals with Exception logging. module System.Wlog.Exception ( logException , catchLog ) where import Universum import System.Wlog.CanLog (WithLogger, WithLoggerIO, logE...
serokell/log-warper
src/System/Wlog/Exception.hs
mit
1,398
0
9
248
166
96
70
14
1
{-# LANGUAGE DatatypeContexts #-} module Ch13.Num where import qualified Data.List as L -------------------------------------------------- -- Symbolic/units manipulation -------------------------------------------------- data Op = Plus | Minus | Mul | Div | Pow deriving (Eq, Show, Ord) data SymbolicMan...
futtetennista/IntroductionToFunctionalProgramming
RWH/src/ch13/Num.hs
mit
6,719
0
12
2,145
2,818
1,382
1,436
264
9
-- Copyright (C) 2013 Jorge Aparicio main :: IO() main = print $ squaredSumOfIntegers - sumOfSquaredIntegers where integers = [1..100] :: [Int] sumOfIntegers = sum integers squaredSumOfIntegers = sumOfIntegers * sumOfIntegers squaredIntegers = zipWith (*) integers integers ...
japaric/eulermark
problems/0/0/6/006.hs
mit
366
0
7
90
82
45
37
9
1
{-# LANGUAGE RecursiveDo #-} -- needed for Earley module AST (Type (..), Expression (..), BindingType (..), Statement (..), Block (..), Argument (..), Function (..), AST, Error (..), parse, RenderName (..)) where import MyPrelude import qualified Text.Earley as E import qualified Pretty as P import qualified Token ...
glaebhoerl/stageless
src/AST.hs
mit
15,229
0
20
3,916
4,583
2,278
2,305
-1
-1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE UndecidableInstances #-} module DBTypes where import D...
wz1000/haskell-webapps
ServantPersistent/src/DBTypes.hs
mit
4,951
0
11
1,354
1,185
666
519
-1
-1
{-| Module : TTN.Model.Translation Description : Model code for Translation. Author : Sam van Herwaarden <samvherwaarden@protonmail.com> -} {-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings ...
samvher/translatethenews
app/TTN/Model/Translation.hs
mit
2,816
0
11
1,056
309
177
132
40
1
{-# LANGUAGE OverloadedStrings, QuasiQuotes #-} module Y2018.M04.D04.Solution where {-- So you have the data from the last two day's exercises, let's start storing those data into a PostgreSQL database. Today's exercise is to store just the authors. But there's a catch: you have to consider you're doing this as a da...
geophf/1HaskellADay
exercises/HAD/Y2018/M04/D04/Solution.hs
mit
3,329
0
18
566
513
299
214
41
2
module Rewriting.Abstract.ToDoc where import Rewriting.Abstract.Data import Autolib.ToDoc instance ToDoc Prop where toDoc p = case p of Or ps -> hsep $ punctuate (text " ||") $ map toDoc ps And ps -> hsep $ punctuate (text " &&")$ map toDoc ps Not p -> text "not" <+> toDoc p Prop...
marcellussiegburg/autotool
collection/src/Rewriting/Abstract/ToDoc.hs
gpl-2.0
1,164
0
14
442
386
183
203
28
0
module Scope where import Utils import Stack as Stack import qualified Data.Map as HashTable type HashTable = HashTable.Map String Int type Scope = (Stack (HashTable, Int, Bool), Int) empty :: Scope empty = (Stack.empty, 0) enscope :: Scope -> Bool -> Scope enscope (st, i) recursive = (Stack.push (HashTable.empty, ...
gangsterveggies/julia-pinheiro-compiler
Scope.hs
gpl-2.0
1,573
0
16
353
474
259
215
26
2
{-# LANGUAGE DeriveDataTypeable #-} module InnerEar.Exercises.Intervals1 (intervals1Exercise) where import Reflex import Reflex.Dom import Sound.MusicW import Data.Map import Text.JSON import Text.JSON.Generic import InnerEar.Exercises.MultipleChoice import InnerEar.Types.ExerciseId import InnerEar.Types.Exercise ...
d0kt0r0/InnerEar
src/InnerEar/Exercises/Intervals1.hs
gpl-3.0
3,230
0
14
524
1,005
523
482
72
1
module Graph where import Data.List (find) import Control.Monad (liftM) import Relation import Set newtype Id = Id Int deriving (Enum, Show, Eq, Ord) data State a = State Id a deriving (Show) type StartingStateId = Id type AcceptingStateId = Id data Graph a b = Graph [State a] (Relation Id Id b)...
mkm/sokoban
src/Graph.hs
gpl-3.0
3,457
0
16
782
1,375
704
671
68
4
{-# LANGUAGE TemplateHaskell #-} module Lamdu.Calc.Term.Utils ( Composite(..), tags, rest , case_ , recExtend ) where import qualified Control.Lens as Lens import Hyper.Syntax.Row (RowExtend(..)) import Lamdu.Calc.Term (Val) import qualified Lamdu.Calc.Term as V import qualified La...
lamdu/lamdu
src/Lamdu/Calc/Term/Utils.hs
gpl-3.0
1,278
0
12
370
444
233
211
-1
-1
{-# LANGUAGE OverloadedStrings #-} import Pipes.Csv (HasHeader(..), decode, decodeByName) import Pipes.ByteString (stdin, ByteString) import Data.Csv ((.:), FromNamedRecord(..), Record) import Pipes import Control.Applicative import System.Environment (getArgs) data Person = Person String Int deriving (...
adarqui/ToyBox
haskell/gonzalez/pipes/Pipes.CSV/src/stdinToStdout.hs
gpl-3.0
1,077
0
13
224
338
181
157
28
3
module Model where import Yesod import Data.Text (Text) import Database.Persist.Quasi import Data.Typeable (Typeable) import Data.Time (UTCTime) import Prelude -- You can define all of your database entities in the entities file. -- You can find more information on persistent and how to declare entities -- at: -- htt...
DasAsozialeNetzwerk/r0z
Model.hs
gpl-3.0
469
0
8
62
79
46
33
-1
-1
{-| Module : Lipid.Parsers.UnknownSn.GlycerolipidSpec Description : Copyright : Michael Thomas License : GPL-3 Maintainer : Michael Thomas <Michaelt293@gmail.com> Stability : Experimental -} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TypeApplications #-} module Lipid.Parsers.UnknownSn.GlycerolipidSpec whe...
Michaelt293/Lipid-Haskell
test/Lipid/Parsers/UnknownSn/GlycerolipidSpec.hs
gpl-3.0
2,844
0
17
438
493
275
218
41
1
module Graphics.Forensics.Analyser.LocalCFA where import GHC.Float import Graphics.Forensics.Algorithms.Convolve import Graphics.Forensics.Algorithms.Fragmentize import Graphics.Forensics.Analyser import Graphics.Forensics.Color import Graphics.Forensics.Image import Graphics.Forensics.Report import Data.Array.Repa ...
Purview/purview
src/Graphics/Forensics/Analyser/LocalCFA.hs
gpl-3.0
4,588
0
15
1,064
1,153
629
524
-1
-1
module PulseLambda.Parser ( tokenStreamToAst , OpPrec(..) , PrecDirection(..) , standardOps ) where import PulseLambda.Location import PulseLambda.Error import PulseLambda.TokenStream import PulseLambda.Ast import Data.Int import Data.Word import Data.Maybe data OpPrec = OpPrec { getOperator :: String , getFu...
brunoczim/PulseLambda
PulseLambda/Parser.hs
gpl-3.0
26,661
0
22
8,246
7,191
3,659
3,532
454
19
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-analytics/gen/Network/Google/Resource/Analytics/Management/UnSampledReports/Get.hs
mpl-2.0
4,980
0
19
1,184
550
326
224
97
1
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE KindSignatures #-} module Crypto.OPVault.Types ( module Crypto.OPVault.Types , module Common ) where import Crypto.OPVault.Types.Base64 as Common import Crypto.OPVault.Types.Common a...
bitemyapp/opvault
src/Crypto/OPVault/Types.hs
mpl-2.0
1,098
0
7
176
280
169
111
26
1
-- | Path robots are: -- platform robots -- patrol robots module Sorts.Robots.PathRobots where import Base import qualified Sorts.Robots.PathRobots.PatrolRobot as PatrolRobot import qualified Sorts.Robots.PathRobots.Platform as Platform -- * loading sorts :: [IO (Maybe Sort_)] sorts = (Just...
nikki-and-the-robots/nikki
src/Sorts/Robots/PathRobots.hs
lgpl-3.0
383
0
9
81
84
54
30
9
1
-- HVamp - A Vamp host for Haskell -- -- Copyright (C) 2014-2016 Richard Lewis, Goldsmiths' College -- Author: Richard Lewis <richard.lewis@gold.ac.uk> -- This file is part of HVamp -- HVamp is free software: you can redistribute it and/or modify it -- under the terms of the GNU Lesser General Public License as -- pu...
TransformingMusicology/HVamp
src/HVamp.hs
lgpl-3.0
6,315
0
17
1,244
1,773
891
882
113
4