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 PatBindIn1 where main :: Int main = foo 3 foo :: Int -> Int foo x = (h + t) + (snd tup) where tup :: (Int, Int) h :: Int t :: Int tup@(h, t) = head $ (zip [1 .. 10] [3 .. 15]) tup :: (Int, Int) h :: Int t :: Int tup@(h, t) = head $ (zip [1 .. 10] [3 .. 15])
mpickering/HaRe
old/testing/demote/PatBindIn1AST.hs
bsd-3-clause
310
0
10
114
173
101
72
14
1
-- From comment:76 in Trac #9858 -- This exploit still works in GHC 7.10.1. -- By Shachaf Ben-Kiki, Ørjan Johansen and Nathan van Doorn {-# LANGUAGE Safe #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE ImpredicativeTypes #-} module T9858a where import Data.Typeable type E = (:~:) typ...
urbanslug/ghc
testsuite/tests/typecheck/should_fail/T9858a.hs
bsd-3-clause
733
19
9
182
268
146
122
-1
-1
module A (T,t) where data T = T t = T instance Eq T where t1 == t2 = True
hferreiro/replay
testsuite/tests/driver/recomp008/A1.hs
bsd-3-clause
79
0
6
25
43
24
19
5
1
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE DataKinds #-} module Control.Monad.Apiary.Filter.Capture ( path, fetch, fetch', a...
philopon/apiary
src/Control/Monad/Apiary/Filter/Capture.hs
mit
1,884
0
13
358
679
380
299
-1
-1
{-# htermination readsPrec :: Int -> String -> [(Int,String)] #-}
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Prelude_readsPrec_5.hs
mit
66
0
2
10
3
2
1
1
0
{-# htermination (mapM :: (b -> Maybe a) -> (List b) -> Maybe (List a)) #-} import qualified Prelude data MyBool = MyTrue | MyFalse data List a = Cons a (List a) | Nil data Maybe a = Nothing | Just a ; map :: (b -> a) -> (List b) -> (List a); map f Nil = Nil; map f (Cons x xs) = Cons (f x) (map f xs);...
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/mapM_1.hs
mit
783
0
9
208
375
198
177
19
1
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} module Kafka.IntegrationSpec where import Control.Concurrent.MVar (newEmptyMVar, putMVar, takeMVar) import Control.Monad (forM, forM_) import Control.Monad.Loops import Data.Either import Data.Map ...
haskell-works/kafka-client
tests-it/Kafka/IntegrationSpec.hs
mit
12,117
0
24
3,539
3,486
1,696
1,790
227
3
module Handler.AnalogOutSpec (spec) where import TestImport spec :: Spec spec = withApp $ do describe "getAnalogOutR" $ do error "Spec not implemented: getAnalogOutR"
aufheben/lambda-arduino
test/Handler/AnalogOutSpec.hs
mit
183
0
11
39
44
23
21
6
1
{-# htermination addToFM :: FiniteMap () b -> () -> b -> FiniteMap () b #-} import FiniteMap
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/FiniteMap_addToFM_2.hs
mit
94
0
3
19
5
3
2
1
0
-- ex3.1.hs swapTriple :: (a,b,c) -> (b,c,a) swapTriple (x,y,z) = (y,z,x) duplicate :: a -> (a, a) duplicate x = (x, x) nothing :: a -> Maybe a nothing _ = Nothing index :: [a] -> [ (Int, a) ] index [] = [] index [x] = [(0,x)] index (x:xs) = let indexed@((n,_):_) = index xs in (n+1,x):indexed maybeA...
hnfmr/beginning_haskell
ex3.1.hs
mit
352
0
12
87
239
136
103
13
1
module Proteome.Grep.Parse where import Chiasma.Data.Ident (generateIdent, identText) import Data.Attoparsec.Text (parseOnly) import qualified Data.Text as Text (strip, stripPrefix) import Ribosome.Menu.Data.MenuItem (MenuItem(MenuItem)) import Text.Parser.Char (anyChar, char, noneOf) import Text.Parser.Combinators (m...
tek/proteome
packages/proteome/lib/Proteome/Grep/Parse.hs
mit
1,558
0
13
314
507
271
236
40
2
module Language.Dash.VM.VMSpec where import Data.Word import Language.Dash.Asm.Assembler import Language.Dash.IR.Opcode import Language.Dash.IR.Data import Language.Dash.VM.DataEncoding import Language.Dash.VM.VM import Language.Dash.Limits import ...
arne-schroppe/dash
test/Language/Dash/VM/VMSpec.hs
mit
14,363
0
20
6,563
3,861
1,907
1,954
334
2
----------------------------------------------------------------------------- -- | -- Module : Reader.Parser -- License : MIT (see the LICENSE file) -- Maintainer : Felix Klein (klein@react.uni-saarland.de) -- -- Parsing module containing all neccessary parsers. -- -----------------------------------------...
reactive-systems/syfco
src/lib/Reader/Parser.hs
mit
2,459
0
12
519
619
358
261
63
4
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisanalytics-application-csvmappingparameters.html module Stratosphere.ResourceProperties.KinesisAnalytic...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/KinesisAnalyticsApplicationCSVMappingParameters.hs
mit
2,947
0
13
222
267
153
114
29
1
type Fname = String type Var = String data Program = Prog [Fundef] Exp deriving Show data Fundef = Fun String [String] Exp deriving Show data Exp = I Int | V Var | B Bool | Nil | Fname String | App Exp Exp deriving Show type Code = [Instn] data Instn = PUSH Int | PUSHINT Int | PUSHGLOBAL String | PUS...
sushantmahajan/programs
haskell/assign2.hs
cc0-1.0
3,308
0
14
857
1,551
828
723
83
1
module Flowskell.SchemeUtils where import Language.Scheme.Types import Data.Array extractFloat (Float n) = realToFrac n extractFloat (Number n) = realToFrac n extractFloat (Rational n) = realToFrac n makeFloatVector lst = Vector $ listArray (0, length lst - 1) (map Float lst)
lordi/flowskell
src/Flowskell/SchemeUtils.hs
gpl-2.0
279
0
9
41
106
54
52
7
1
{-# OPTIONS_GHC -O3 -optc-O3 #-} wheelList = [1, 7, 11, 13, 17, 19, 23, 29] wheel n=map (m+) wheelList where m=30*n candidates =concatMap wheel [1..] isPrime n=not.(any isDivicible)$ rootCandidates where rootCandidates =takeWhile (<=(ceiling.sqrt.fromIntegral$ n)) primes isDivicible x= n`mod`x==0 prim...
kumar0ed/euler
10.hs
gpl-2.0
429
1
12
70
195
109
86
10
1
module Tree where data Tree a = Tree a [Tree a] deriving (Show) instance Functor Tree where fmap fn (Tree x [])= Tree (fn x) [] fmap fn (Tree x ts) = Tree (fn x) (map (fmap fn) ts) makeTree :: t -> Tree t makeTree x = Tree x [] --Extend the tip of every branch grow :: (a -> [a]) -> Tree a -> Tre...
CharlesRandles/HaskellUtils
tree.hs
gpl-3.0
1,537
0
11
384
686
355
331
31
2
module DrawingTest where import Graphics.SpriteKit hiding (Path,Point) import Codec.Picture import LineGraphics import LineIntersect makeVectroLinePicture :: Colour -> LineVector -> Float -> Picture makeVectroLinePicture c lineWithVector t = [(c, linePath) , (c, circle)] where linePath = vectorLinePath...
Terry-Weymouth/haskell-line-intersect
LineIntersect.hsproj/DrawingTest.hs
gpl-3.0
977
0
8
194
268
152
116
23
1
{-# LANGUAGE OverloadedStrings #-} module Kevin.Util.Token ( getToken ) where import Control.Applicative import Control.Arrow import Crypto.Random.AESCtr (makeSystem) import qualified Data.ByteString.Char8 as B import qualified Data.ByteString.Lazy.Char8 as LB import ...
pikajude/kevin
src/Kevin/Util/Token.hs
gpl-3.0
3,544
0
20
1,134
987
520
467
73
2
-- Copyright (C) 2017 Red Hat, Inc. -- -- This library is free software; you can redistribute it and/or -- modify it under the terms of the GNU Lesser General Public -- License as published by the Free Software Foundation; either -- version 2.1 of the License, or (at your option) any later version. -- -- This library i...
dashea/bdcs
importer/tests/BDCS/RPM/SourcesSpec.hs
lgpl-2.1
1,265
0
14
214
200
120
80
14
1
-- {-# OPTIONS_GHC -fno-warn-unused-imports -fno-warn-unused-binds #-} import LLVM.General.AST import qualified LLVM.General.AST as AST import qualified LLVM.General.AST.IntegerPredicate as IP import LLVM.General.AST.Type (ptr) import LLVM.General.Module import LLVM.General.Context import Data.Traversable (for) impo...
scturtle/turtlelang
Main.hs
unlicense
5,889
0
18
1,351
2,176
1,040
1,136
150
1
{-# LANGUAGE BangPatterns #-} module Ylang.Primitive ( addBin, andBin, orBin, xorBin, notUnary, adds, ands, ors, xors, nots ) where import Ylang.Display import Ylang.Value type BinOp a = a -> a -> Either String a type Variadic a = [a] -> Either String a variadic :: BinOp Va...
VoQn/ylang
Ylang/Primitive.hs
apache-2.0
3,350
0
12
784
1,572
790
782
99
16
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE BangPatterns #-} module Lib.LiftedIO (print, putStrLn, newIORef, modifyIORef', readIORef, writeIORef, IOREF.IORef) where ------------------------------------------------------------------------------------...
kernelim/gitomail
src/Lib/LiftedIO.hs
apache-2.0
1,159
0
10
228
348
190
158
23
1
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Risk where import Control.Monad.Random import Control.Monad import Data.List (sort, foldr) import Data.Ratio ------------------------------------------------------------ -- Die values newtype DieValue = DV { unDV :: Int } deriving (Eq, Ord, Show, Num) first :: ...
parsonsmatt/cis194
hw12/Risk.hs
apache-2.0
1,882
0
17
458
655
346
309
44
3
{- Copyright 2016, Dominic Orchard, Andrew Rice, Mistral Contrastin, Matthew Danish 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 ...
dorchard/camfort
src/Camfort/Specification/Stencils/CheckBackend.hs
apache-2.0
5,966
0
15
1,379
1,534
818
716
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedLists #-} {-# LANGUAGE PartialTypeSignatures #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {-# OP...
Motions/motions
test/BasicSpec.hs
apache-2.0
13,670
0
25
4,485
3,798
1,870
1,928
267
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE TypeFamilies #-} module Web.Twitter.Conduit.Request ( HasParam, APIRequest (..), ) where import Data.Aeson import GHC.TypeLits (Symbol) import Network.HTTP.Client.MultipartFormData import qualified Network.H...
himura/twitter-conduit
src/Web/Twitter/Conduit/Request.hs
bsd-2-clause
3,255
0
11
675
544
313
231
37
0
{-# LANGUAGE FlexibleInstances #-} module Util.UnixDiff where import Data.Algorithm.Diff import qualified Data.Algorithm.DiffOutput as O import Language.Clojure.AST data GroupDiffAction = OMod LineRange LineRange | OIns LineRange Int | ODel LineRange Int deriving (Show) ...
nazrhom/vcs-clojure
src/Util/UnixDiff.hs
bsd-3-clause
1,872
0
9
379
725
382
343
41
1
{-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} module MVC.EventHandler where import Control.Lens import Control.Monad import Control.Monad.Reader (Mon...
cmahon/mvc-service
library/MVC/EventHandler.hs
bsd-3-clause
7,244
0
16
1,325
2,386
1,251
1,135
-1
-1
----------------------------------------------------------------------------- -- | -- Module : Main -- Description : Copies all files with the specified filename beginning -- from the first directory to the second directory -- Copyright : (c) Artem Tsushko, 2015 -- License : BSD3 -- Mainta...
artemtsushko/matching-files-copier
src/Main.hs
bsd-3-clause
2,799
0
19
648
455
233
222
41
2
module MultiVersion where import Data.List import qualified Data.Map as Map import Data.Version import Distribution.Simple.PackageIndex (allPackages) import Distribution.Package (PackageIdentifier(..), PackageName(..)) import Distribution.InstalledPackageInfo (InstalledPackageInfo(..)) import Config import Installed...
glguy/GhcPkgUtils
MultiVersion.hs
bsd-3-clause
990
0
22
184
346
191
155
29
1
{-# LANGUAGE OverloadedStrings #-} module Spec.Helpers where import Base import Models (true, false) import Util (toSqlKey) fromBool :: Bool -> TValueId fromBool True = true fromBool _ = false (==.) :: Int64 -> Bool -> Formula PropertyId (==.) p v = Atom (toSqlKey p) v (&&.) :: Formula a -> Formula a -> Formula ...
jamesdabbs/pi-base-2
test/Spec/Helpers.hs
bsd-3-clause
813
0
7
174
446
243
203
24
1
----------------------------------------------------------------------------- -- | -- Module : Distribution.Package -- Copyright : Isaac Jones 2003-2004 -- -- Maintainer : cabal-devel@haskell.org -- Portability : portable -- -- Defines a package identifier along with a parser and pretty printer for it. -- '...
dcreager/cabal
Distribution/Package.hs
bsd-3-clause
5,898
0
14
1,205
832
464
368
68
1
{-# LANGUAGE OverloadedStrings #-} module Data.IHO.S52.SVG.Renderer (renderVectorInstructions) where import Data.Text (Text) import Data.Monoid import Data.Either import Data.Map (Map) import qualified Data.Map as Map import Text.Blaze.Svg (Svg) import Text.Blaze.Internal ((!)) import qualified Text.Blaze.Internal ...
alios/iho-presentation
Data/IHO/S52/SVG/Renderer.hs
bsd-3-clause
7,278
0
20
1,850
2,421
1,271
1,150
179
3
{- PickSquare.hs (adapted from picksquare.c which is (c) Silicon Graphics, Inc.) Copyright (c) Sven Panne 2003 <sven_panne@yahoo.com> This file is part of HOpenGL and distributed under a BSD-style license See the file libraries/GLUT/LICENSE Use of multiple names and picking are demonstrated. A 3x3 grid ...
OS2World/DEV-UTIL-HUGS
demos/GLUT/examples/RedBook/PickSquare.hs
bsd-3-clause
4,192
0
19
1,069
1,147
568
579
79
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DataKinds #-} {- | Module : Text.Garnett.Completers.BashCompleter Copyright : Copyright (C) 2014 Julian K. Arni License : BSD3 Maintainer : Julian K. Arni <jkarni@gmail.com Stability : alpha Convert a GarnettFile to a bash completion script. -} module...
jkarni/Garnett
src/Text/Garnett/Completers/BashCompleter.hs
bsd-3-clause
3,256
0
19
741
634
327
307
-1
-1
{-# LANGUAGE MultiParamTypeClasses #-} module Data.Binary.Indexed where import Data.Binary import Data.Binary.Get import Data.Binary.Put import Data.ByteString.Lazy class HBinary phi h where hput :: phi ix -> h ix -> Put hget :: phi ix -> Get (h ix) hdecode :: HBinary phi h => phi ix -> ByteString -> h ix hdecod...
sebastiaanvisser/islay
src/Data/Binary/Indexed.hs
bsd-3-clause
438
0
10
86
170
86
84
13
1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveTraversable #-} module Rawr.Note where import GHC.Generics import Text.Printf import Data.Aeson import qualified Data.List as DL import Data.Maybe import qualified Data.ByteString.Lazy.Char8 as DB8 dat...
drhodes/jade2hdl
rawr/src/Rawr/Note.hs
bsd-3-clause
2,631
0
14
898
782
407
375
67
2
{-# OPTIONS_GHC -F -pgmF htfpp #-} module VectorTests.Vector3 where import Geometry.Space import Test.Framework import VectorTests.VectorGenerators () prop_vectorProductAnticommutativity :: Vector3 Double -> Vector3 Double -> Bool prop_vectorProductAnticommutativity a b = cross a b == neg (cross b a) p...
achirkin/fgeom
test/VectorTests/Vector3.hs
bsd-3-clause
600
0
9
99
164
81
83
11
1
module OTPSpec (main, spec) where import Test.Hspec main :: IO () main = hspec spec spec :: Spec spec = do describe "someFunction" $ do it "should work fine" $ do True `shouldBe` False
pbogdan/otp-auth
test/OTPSpec.hs
bsd-3-clause
200
0
13
49
74
39
35
9
1
---------------------------------------------------------------------------- -- | -- Module : H -- Copyright : (c) Sergey Vinokurov 2016 -- License : BSD3-style (see LICENSE) -- Maintainer : serg.foo@gmail.com -- Created : Sunday, 23 October 2016 ----------------------------------------------------...
sergv/tags-server
test-data/0007resolvable_import_cycle/H.hs
bsd-3-clause
459
0
6
82
50
33
17
5
0
{-# LANGUAGE OverloadedStrings #-} import Cataskell.Game import Cataskell.Serialize import Control.Monad.Random import Control.Monad.State import Control.Lens import System.Random import System.Environment (getArgs) import Control.Exception (assert) import Data.List (findIndex) import Data.Aeson import qualified Data.B...
corajr/cataskell
cataskell-example/Main.hs
bsd-3-clause
1,372
0
15
354
537
289
248
36
3
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} -- | Database schema versioning and Migration -- -- module NejlaCommon.Persistence.Migration ( sql , sqlFile ,...
nejla/nejla-common
src/NejlaCommon/Persistence/Migration.hs
bsd-3-clause
5,718
0
17
1,470
1,143
599
544
112
4
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} module Stack.Init ( initProject , InitOpts (..) ) where import Control.Exception (assert) import Control.Exception.En...
harendra-kumar/stack
src/Stack/Init.hs
bsd-3-clause
20,472
0
21
7,008
4,315
2,183
2,132
346
6
{-# LANGUAGE OverloadedStrings #-} module Dhall.Test.Schemas where import Data.Text (Text) import Dhall.Parser (Header (..)) import Prelude hiding (FilePath) import Test.Tasty (TestTree) import Turtle (FilePath) import qualified Data.Text as Text import qualified Data.Text.IO ...
Gabriel439/Haskell-Dhall-Library
dhall/tests/Dhall/Test/Schemas.hs
bsd-3-clause
2,250
0
15
525
547
303
244
45
1
{-| Module : Grammar.Size Description : Definition of the Size datatype. Copyright : (c) Davide Mancusi, 2017 License : BSD3 Maintainer : arekfu@gmail.com Stability : experimental Portability : POSIX This module exports the 'Size' data type. -} module Grammar.Size ( Size , mean ) where -- system import...
arekfu/grammar-haskell
src/Grammar/Size.hs
bsd-3-clause
603
0
10
143
134
75
59
9
1
{-# LANGUAGE OverloadedStrings, TemplateHaskell #-} module Web.Slack.Types.Topic where import Data.Aeson import Data.Text (Text) import Control.Applicative import Control.Lens.TH import Prelude type Purpose = Topic data Topic = Topic { _topicValue :: Text , _topicCreator :: Text , ...
madjar/slack-api
src/Web/Slack/Types/Topic.hs
mit
540
0
14
136
136
79
57
17
0
module Server where import Control.Exception (bracket, finally, handleJust, tryJust) import Control.Monad (guard) import Data.IORef (IORef, newIORef, readIORef, writeIORef) import GHC.IO.Exception (IOErrorType(ResourceVanished)) import Network (PortID(UnixSocket), Socket, accept, listenOn, sClose) import System.Direct...
pacak/hdevtools
src/Server.hs
mit
3,921
0
15
1,044
1,078
538
540
82
5
data A = A Int | B Float deriving (Koe)
roberth/uu-helium
test/parser/DerivingUnknownClass.hs
gpl-3.0
50
2
6
20
27
13
14
3
0
{-# 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-cloudfront/gen/Network/AWS/CloudFront/UpdateStreamingDistribution.hs
mpl-2.0
6,092
0
13
1,165
785
463
322
102
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="zh-CN"> <title>Form Handler | ZAP Extension</title> <maps> <homeID>top</homeID> <mapre...
veggiespam/zap-extensions
addOns/formhandler/src/main/javahelp/org/zaproxy/zap/extension/formhandler/resources/help_zh_CN/helpset_zh_CN.hs
apache-2.0
974
85
52
160
398
210
188
-1
-1
module Main (main) where import Network.Info main = do ns <- getNetworkInterfaces mapM (putStrLn . showInterface) ns showInterface :: NetworkInterface -> String showInterface n = name n ++ "\n" ++ "IPv4 Address: " ++ show (ipv4 n) ++ "\n" ++ "IPv6 Address: " ++ show (...
olorin/network-info
test/src/Main.hs
bsd-3-clause
397
0
15
129
128
64
64
10
1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE FlexibleContexts #-} #if __GLASGOW_HASKELL__ >= 706 {-# LANGUAGE PolyKinds #-} #endif ----------------------------------------------------------------------------- -- | -...
ddssff/lens
src/GHC/Generics/Lens.hs
bsd-3-clause
4,250
0
9
921
1,193
645
548
97
2
-- | compute the cyclic tetris graph -- corresponding to a (partial) PCP solution module PCP.Paths where import Autolib.Util.Splits import Autolib.NFA.Type import Autolib.NFA.Dot import Autolib.NFA.Compact import Autolib.Exp.Type import Autolib.Informed import Autolib.Schichten import Autolib.Util.Sort import Autolib...
Erdwolf/autotool-bonn
src/PCP/Paths.hs
gpl-2.0
8,442
50
20
2,726
3,467
1,824
1,643
-1
-1
-- | -- Module : React -- Copyright : (C) 2014-15 Joel Burget -- License : MIT -- Maintainer : Joel Burget <joelburget@gmail.com> -- Stability : experimental -- Portability : non-portable -- -- Usage: -- -- This tutorial assumes only a basic understanding of React, the DOM, and -- browser events. I ...
joelburget/react-haskell
src/React.hs
mit
2,455
0
5
644
201
153
48
35
0
module ListImplicitUsed where import Data.List foo = sort
serokell/importify
test/test-data/base@basic/30-ListImplicitUsed.hs
mit
70
0
4
20
14
9
5
3
1
-- | Data.Graph is sorely lacking in several ways, This just tries to fill in -- some holes and provide a more convinient interface {-# LANGUAGE RecursiveDo #-} module Util.Graph( Graph(), Util.Graph.components, Util.Graph.dff, Util.Graph.reachable, Util.Graph.scc, Util.Graph.topSort, cycli...
hvr/jhc
src/Util/Graph.hs
mit
9,869
9
25
2,665
4,290
2,226
2,064
-1
-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="sr-CS"> <title>Directory List v2.3 LC</title> <maps> <homeID>directorylistv2_3_lc</homeID> ...
thc202/zap-extensions
addOns/directorylistv2_3_lc/src/main/javahelp/help_sr_CS/helpset_sr_CS.hs
apache-2.0
984
78
66
158
414
210
204
-1
-1
{-| This modules defines the 'QueryArr' arrow, which is an arrow that represents selecting data from a database, and composing multiple queries together. -} module Opaleye.SQLite.QueryArr (QueryArr, Query) where import Opaleye.SQLite.Internal.QueryArr (QueryArr, Query)
bergmark/haskell-opaleye
opaleye-sqlite/src/Opaleye/SQLite/QueryArr.hs
bsd-3-clause
283
0
5
46
31
21
10
2
0
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE CPP, NoImplicitPrelude #-} ----------------------------------------------------------------------------- -- | -- Module : Text.Read.Lex -- Copyright : (c) The University of Glasgow 2002 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer...
mightymoose/liquidhaskell
benchmarks/base-4.5.1.0/Text/Read/Lex.hs
bsd-3-clause
17,364
153
22
5,629
4,678
2,428
2,250
388
44
{-# LANGUAGE CPP #-} module Examples.Hello where import Options.Applicative #if __GLASGOW_HASKELL__ <= 702 import Data.Monoid (<>) :: Monoid a => a -> a -> a (<>) = mappend #endif data Sample = Sample { hello :: String , quiet :: Bool } deriving Show sample :: Parser Sample sample = Sample <$> strOption ...
begriffs/optparse-applicative
tests/Examples/Hello.hs
bsd-3-clause
812
0
11
207
247
130
117
29
1
module PatternMatch7 where g = (\(y:ys) -> (case y of p | p == 45 -> 12 _ -> 52)) f x = (\(p:ps) -> (case p of l | x == 45 -> 12 _ -> 52))
kmate/HaRe
old/testing/foldDef/PatternMatch7_TokOut.hs
bsd-3-clause
205
0
14
104
105
56
49
7
2
{- - This should give CORRECT on the default problem 'hello'. - - @EXPECTED_RESULTS@: CORRECT -} import System.IO main = do putStr "Hello world!\n"
Lekssays/brackets
web/tests/test-hello.hs
gpl-3.0
153
0
7
29
18
9
9
2
1
module Main where main :: IO () main = putStrLn "This is foo from has-exe-foo-too"
AndreasPK/stack
test/integration/tests/1198-multiple-exes-with-same-name/files/has-exe-foo-too/app/Main.hs
bsd-3-clause
84
0
6
16
22
12
10
3
1
-- | -- Module: FizzWrapper -- Copyright: Copyright (C) 2016 Michael Litchard -- License: LGPL-3 -- Maintainer: Michael Litchard <michael@schmong.org> -- Stability: experimental -- Portability: portable -- Driver function module FizzWrapper (fizzWrapper) where import BasicPrelude import FizzBuzz ( fizzBuzzFib ) imp...
mlitchard/swiftfizz
src/FizzWrapper.hs
isc
716
0
9
148
87
54
33
11
1
{-# LANGUAGE CPP #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} #if !MIN_VERSION_base(4,8,0) {-# LANGUAGE DeriveDataTypeable #-} import Control.Applicative ((<$>), (<*>), (*>)) #endif import Control.DeepSeq import ...
fpco/store
bench/Bench.hs
mit
9,639
0
17
2,898
2,591
1,369
1,222
162
9
module Game.Render.Core.Error ( initLogging , logGL ) where import System.Log.Logger import Control.Monad import System.Log.Handler.Simple import System.Log.Handler (setFormatter) import System.Log.Formatter import qualified Graphics.Rendering.OpenGL as GL initLogging :: IO () initLogging = do h <- f...
mfpi/q-inqu
Game/Render/Core/Error.hs
mit
730
0
13
147
203
108
95
19
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE PackageImports #-} module Blocks where import Control.Concurrent.STM (TQueue, atomically, newTQueueIO, tryReadTQueue, writeTQueue) import Control.Applicative import Control.Monad import Control.Lens ((+~), (^.), contains) import Data.Foldable (fold...
bgaster/blocks
Blocks.hs
mit
26,497
1
29
8,506
8,000
4,471
3,529
481
8
module Game ( Game , Unfinished , Position , Coordinate , start , move , isFinished , bounds , openPositions , marks ) where import Game.Internal
amar47shah/NICTA-TicTacToe
src/Game.hs
mit
267
0
4
147
41
27
14
11
0
-- | -- Module : Main -- Description : -- Copyright : (c) Jonatan H Sundqvist, 2015 -- License : MIT -- Maintainer : Jonatan H Sundqvist -- Stability : experimental|stable -- Portability : POSIX (not sure) -- -- Created December 21 2015 -- TODO | - -- - -- SPEC | - -- - ---------------...
SwiftsNamesake/Elrond
app/Main.hs
mit
2,092
0
11
240
174
105
69
17
3
{-# LANGUAGE QuasiQuotes #-} module TestLedgerProcess (ledgerProcessSpec) where import Test.Hspec (Spec, describe, it, shouldReturn) import Data.String.Interpolate (i) import Data.String.Interpolate.Util (unindent) import Text.RE.Replace import Text.RE.TDFA.String import qualified Data.Expenses.Ledger.Process as L...
rgoulter/expenses-csv-utils
test/TestLedgerProcess.hs
mit
5,361
0
11
2,300
235
139
96
27
1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE...
mstksg/neural
src/Data/Neural/FeedForward.hs
mit
12,834
0
20
4,654
4,655
2,397
2,258
256
2
module Typing.Expr (i_expr) where import Typing.Constraint import Typing.Env import Typing.Substitution import Typing.Subtyping import Typing.TypeError import Typing.Types import Typing.Util import Absyn.Base import Absyn.Meta import qualified Absyn.Untyped as U import qualified Absyn.Typed as T import Util.Error im...
tadeuzagallo/verve-lang
src/Typing/Expr.hs
mit
10,404
0
20
2,825
4,022
1,987
2,035
248
9
{-# LANGUAGE Arrows #-} module Game.Client.Objects.Network where import FRP.Yampa as Yampa import FRP.Yampa.Geometry import Graphics.UI.SDL as SDL import Graphics.UI.SDL.Events as SDL.Events import Graphics.UI.SDL.Keysym as SDL.Keysym import Game.Shared.Types import Game.Shared.Networking import...
Mattiemus/LaneWars
Game/Client/Objects/Network.hs
mit
6,036
4
16
1,759
1,172
630
542
97
1
{-# LANGUAGE TemplateHaskell #-} module SoOSiM.Components.Thread.Types where import Control.Lens import Control.Concurrent.STM.TQueue import SoOSiM.Components.Common import SoOSiM.Components.ResourceDescriptor import SoOSiM.Components.SoOSApplicationGraph data ThreadState = Blocked | Waiting | Executing | Killed d...
christiaanb/SoOSiM-components
src/SoOSiM/Components/Thread/Types.hs
mit
1,994
0
12
484
330
202
128
35
0
------------------------------------------------------------------------------- -- | -- Module : System.Hardware.Arduino.SamplePrograms.SevenSegment -- Copyright : (c) Levent Erkok -- License : BSD3 -- Maintainer : erkokl@gmail.com -- Stability : experimental -- -- Control a single seven-segment disp...
aufheben/lambda-arduino
packages/hArduino-0.9/System/Hardware/Arduino/SamplePrograms/SevenSegment.hs
mit
3,812
0
13
934
374
213
161
32
2
module Graphics.Rendering.OpenGL.Extensions where import Data.List as List import Graphics.Rendering.OpenGL as OpenGL originFrustum :: Rational -> Rational -> Rational -> Rational -> IO() originFrustum = \width height near far -> do let x_radius = ((/) width 2) let y_radius = ((/) height 2) let bounds = [(...
stevedonnelly/haskell
code/Graphics/Rendering/OpenGL/Extensions.hs
mit
1,028
0
13
214
471
259
212
19
1
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- -- Module : IDE.Core.Data -- ...
ChrisLane/leksah
src/IDE/Core/Types.hs
gpl-2.0
24,398
0
15
6,873
5,340
3,143
2,197
519
3
-- OmegaGB Copyright 2007 Bit Connor -- This program is distributed under the terms of the GNU General Public License ----------------------------------------------------------------------------- -- | -- Module : GuiTest02 -- Copyright : (c) Bit Connor 2007 <bit@mutantlemon.com> -- License : GPL -- Mainta...
bitc/omegagb
src/GuiTest02.hs
gpl-2.0
5,550
0
23
1,363
1,087
525
562
100
3
import Distribution.Simple import Distribution.Simple.Setup(InstallFlags(..)) import Distribution.Simple.LocalBuildInfo (LocalBuildInfo(..)) import Distribution.PackageDescription (PackageDescription(..)) import System.Environment import System.FilePath.Posix import System.Directory import System.Process import System...
awgn/ass
Setup.hs
gpl-2.0
1,395
0
12
300
339
179
160
32
2
{-| Hledger.Cli re-exports the options, utilities and commands provided by the hledger command-line program. This module also aggregates the built-in unit tests defined throughout hledger and hledger-lib, and adds some more which are easier to define here. -} {-# LANGUAGE OverloadedStrings #-} module Hledger.Cli ( ...
mstksg/hledger
hledger/Hledger/Cli.hs
gpl-3.0
14,410
0
20
5,118
1,743
1,088
655
188
1
{- Copyright 2012-2015 Vidar Holen This file is part of ShellCheck. http://www.vidarholen.net/contents/shellcheck ShellCheck 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...
david-caro/shellcheck
ShellCheck/Interface.hs
gpl-3.0
3,073
0
12
653
616
363
253
56
2
-- grid is a game written in Haskell -- Copyright (C) 2018 karamellpelle@hotmail.com -- -- This file is part of grid. -- -- grid 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 Lice...
karamellpelle/grid
source/Game/Run/Scene/Plain/ShadeCorners.hs
gpl-3.0
8,013
8
20
2,584
2,915
1,504
1,411
144
1
{-# LANGUAGE OverloadedStrings #-} module Network.Plan9.Consts where import Data.Word import Data.Text (Text) import qualified Data.ByteString.Lazy as L {- -- * Qid - Server side data type for path tracking (<http://9p.cat-v.org> for details) , Qid(..) , emptyQid ...
frobnitzem/hack9p
src/Network/Plan9/Consts.hs
gpl-3.0
10,361
32
9
2,907
1,262
828
434
143
1
-- | Commad line interface helpers module VSim.Runtime.CLI where import Control.Applicative import Control.Monad import Control.Monad.Trans import Text.Printf import VSim.Runtime.Monad import VSim.Runtime.Waveform import VSim.Runtime.Time import VSim.Runtime.Ptr printWaveform :: (Show a) => Waveform a -...
grwlf/vsim
src_r/VSim/Runtime/CLI.hs
gpl-3.0
1,169
0
15
263
436
222
214
25
1
{- This is the bootstrapping compiler for the Bzo programming language. Copyright (C) 2020 Charles Rosenbauer 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 y...
charlesrosenbauer/Bzo-Compiler
src/Builtins.hs
gpl-3.0
6,924
0
6
1,510
1,317
676
641
166
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.Fonts.Types...
brendanhay/gogol
gogol-fonts/gen/Network/Google/Fonts/Types/Product.hs
mpl-2.0
6,267
0
19
1,656
1,359
790
569
146
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-genomics/gen/Network/Google/Resource/Genomics/Variants/Merge.hs
mpl-2.0
9,261
0
18
1,900
918
557
361
121
1
{-# LANGUAGE ExtendedDefaultRules #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StandaloneDeriving #-} {-# OPTIONS_GHC -fno-warn-type-defaults #-} -- Module ...
brendanhay/apteryx
apteryx-copy/Main.hs
mpl-2.0
5,050
0
19
1,686
1,176
604
572
125
4
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-people/gen/Network/Google/Resource/People/ContactGroups/Delete.hs
mpl-2.0
5,171
0
16
1,168
777
453
324
113
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
dysinger/amazonka
amazonka-kms/gen/Network/AWS/KMS/GetKeyRotationStatus.hs
mpl-2.0
4,035
0
9
801
446
272
174
56
1
{-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} import Yesod import Yesod.Core.Json import Data.ByteString.Lazy data HelloWorld = HelloWorld mkYesod "HelloWorld" [parseRoutes| /location LocUpdate POST |] instance Yes...
igraves/relay-server
cruft/yesodtest.hs
agpl-3.0
515
0
6
121
80
46
34
13
1
module Kata where findMissingLetter :: [Char] -> Char findMissingLetter (c1 : cs@(c2 : _)) |succ c1 == c2 = findMissingLetter cs |otherwise = succ c1 --
ice1000/OI-codes
codewars/1-100/find-the-missing-letter.hs
agpl-3.0
163
0
10
36
70
36
34
5
1
module ObjD.Link.Pointer ( linkPointerCall, linkPointerStatic )where import ObjD.Link.Struct import ObjD.Link.Env import ObjD.Link.DataType import ObjD.Link.Call import Ex.String import qualified ObjD.Struct as D linkPointerCall :: Env -> (D.Exp, Exp) -> D.Exp -> Maybe Exp linkPoin...
antonzherdev/objd
src/ObjD/Link/Pointer.hs
lgpl-3.0
1,512
12
12
267
658
350
308
23
2
#!/usr/bin/env runhaskell main = putStrLn "Hello World!"
pwittchen/learning-haskell
tasks/00_hello_world.hs
apache-2.0
57
0
5
7
10
5
5
1
1
{-# LANGUAGE TemplateHaskell #-} module Hack3.Lens where import Hack3 import Control.Lens makeLenses ''Env makeLenses ''Response
nfjinjing/hack3-lens
src/Hack3/Lens.hs
apache-2.0
133
0
6
19
31
16
15
6
0
{-# LANGUAGE CPP, TupleSections, BangPatterns, LambdaCase #-} {-# OPTIONS_GHC -Wwarn #-} ----------------------------------------------------------------------------- -- | -- Module : Haddock.Interface.Create -- Copyright : (c) Simon Marlow 2003-2006, -- David Waern 2006-2009, -- ...
mrBliss/haddock
haddock-api/src/Haddock/Interface/Create.hs
bsd-2-clause
36,249
0
31
9,953
10,698
5,453
5,245
584
17
import qualified Data.Sequence as Seq import LogicGrowsOnTrees (exploreTree) import LogicGrowsOnTrees.Examples.Queens (nqueensUsingBitsSolutions) main = print . exploreTree . fmap Seq.singleton . nqueensUsingBitsSolutions $ 5
gcross/LogicGrowsOnTrees
LogicGrowsOnTrees/tutorial/tutorial-2.hs
bsd-2-clause
226
0
9
23
54
31
23
4
1
{-# LANGUAGE MultiParamTypeClasses, TypeFamilies, GeneralizedNewtypeDeriving #-} {-# LANGUAGE TemplateHaskell #-} {-| All RPC calls are run within this monad. It encapsulates: * IO operations, * failures, * working with the daemon state. Code that is specific either to the configuration or the lock man...
ganeti-github-testing/ganeti-test-1
src/Ganeti/WConfd/Monad.hs
bsd-2-clause
14,252
0
19
3,094
2,352
1,247
1,105
-1
-1