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
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-elasticache/gen/Network/AWS/ElastiCache/DeleteSnapshot.hs
mpl-2.0
3,543
0
9
748
423
259
164
53
1
module Test.Utils where import Test.HUnit import HN.Intermediate import Debug.Trace xtrace a b = trace (a ++ " = " ++ show b) b ci int = Constant $ ConstInt int sv name int = Definition name [] $ In $ ci int st testName expected actual = testName ~: expected ~=? actual stt t2f = map (\(n, e, def) -> n ~: e ~=? t2f ...
kayuri/HNC
Test/Utils.hs
lgpl-3.0
325
0
9
70
152
78
74
9
1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GHCForeignImportPrim #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE UnboxedTuples #-} {-# LANGUAGE UnliftedFFITypes #-} {-# LANGUAGE RebindableSyntax #-} {-# LANGUAGE NegativeLiterals #-} ...
olsner/ghc
libraries/integer-gmp/src/GHC/Integer/Type.hs
bsd-3-clause
75,712
14
19
18,480
22,071
11,070
11,001
-1
-1
-- |A convenience module exporting everything in this library. module Graphics.Vty.Widgets.All ( module Graphics.Vty.Widgets.EventLoop , module Graphics.Vty.Widgets.Core , module Graphics.Vty.Widgets.Box , module Graphics.Vty.Widgets.List , module Graphics.Vty.Widgets.Borders , module Graphics.V...
KommuSoft/vty-ui
src/Graphics/Vty/Widgets/All.hs
bsd-3-clause
2,028
0
5
243
386
283
103
51
0
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} module Aws.ElasticTranscoder.Commands.GetPipeline ( GetPipeline(..) , GetPipelineResponse(..) ) where import Aws.Cor...
cdornan/aws-elastic-transcoder
Aws/ElasticTranscoder/Commands/GetPipeline.hs
bsd-3-clause
1,921
0
12
648
341
196
145
43
0
{-# LANGUAGE OverloadedStrings #-} import Routes import Web.Scotty import Database.PostgreSQL.Simple import Data.Pool(Pool, createPool, withResource) newConn :: IO Connection newConn = connect defaultConnectInfo { connectDatabase = "postgres", connectPassword = "iamadminpostgres", ...
OurPrInstH/InstH
app/Main.hs
bsd-3-clause
546
12
9
155
142
79
63
16
1
{-| Module : Idris.Completion Description : Support for command-line completion at the REPL and in the prover. Copyright : License : BSD3 Maintainer : The Idris Community. -} module Idris.Completion (replCompletion, proverCompletion) where import Idris.Core.Evaluate (ctxtAlist) import Idris.Core.TT import...
tpsinnem/Idris-dev
src/Idris/Completion.hs
bsd-3-clause
8,477
0
16
2,408
2,296
1,211
1,085
133
16
module AI.SVM.Common where import Data.Char import System.Random.MWC import Control.Applicative import Control.Monad import System.Directory import Control.Exception -- * Utilities randomName = withSystemRandom $ \gen -> map chr <$> replicateM 16 (uniformR (97,122::Int) gen) ...
openbrainsrc/Simple-SVM
AI/SVM/Common.hs
bsd-3-clause
745
0
14
253
188
100
88
17
1
{-+ Knot-tying definitions for the base+property syntax to Stratego translation. -} module Prop2Stratego where import BaseStruct2Stratego(transP,transD,transE,showId) import PropStruct2Stratego(transPD,transPA,transPP) import PropSyntax --hiding (D,P,E) -- recursive base+prop syntax import PrettyPrint import SpecialNa...
forste/haReFork
tools/Phugs/Prop2Stratego.hs
bsd-3-clause
1,028
0
7
188
286
150
136
23
1
{-# LANGUAGE TypeSynonymInstances, MultiParamTypeClasses, DeriveDataTypeable, PatternGuards #-} ----------------------------------------------------------------------------- -- | -- Module : XMonad.Layout.Monitor -- Copyright : (c) Roman Cheplyaka -- License : BSD-style (see LICENSE) -- -- Maintainer : ...
markus1189/xmonad-contrib-710
XMonad/Layout/Monitor.hs
bsd-3-clause
6,244
0
15
1,483
992
560
432
67
2
{-# LANGUAGE PatternGuards, OverloadedStrings #-} {- Copyright (C) 2014 Jesse Rosenthal <jrosenthal@jhu.edu> 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 2 of the License, or (at y...
gbataille/pandoc
src/Text/Pandoc/Readers/Docx.hs
gpl-2.0
20,401
0
17
5,120
5,830
2,974
2,856
401
7
{-# LANGUAGE RankNTypes #-} module ShouldFail where bar :: Num (forall a. a) => Int -> Int bar = error "urk"
shlevy/ghc
testsuite/tests/typecheck/should_fail/tcfail196.hs
bsd-3-clause
112
0
8
24
37
21
16
-1
-1
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeFamilies #-} -- | This module provides various simple ways to query and manipulate -- fundamental Futhark terms, such as types and values. The intent is to -- keep ...
diku-dk/futhark
src/Futhark/IR/Prop.hs
isc
9,490
0
18
2,085
2,909
1,528
1,381
194
41
{-# LANGUAGE BangPatterns #-} module Stage.Boundary (setBoundary) where import Model import Data.Array.Repa as R import Control.Monad import Debug.Trace import Config import FieldElt -- | Apply boundary conditions to a velocity field. setBoundary :: Config -> VelocityField -> IO VelocityField setBoun...
gscalzo/HaskellTheHardWay
gloss-try/gloss-master/gloss-examples/raster/Fluid/src-repa/Stage/Boundary.hs
mit
3,628
0
12
1,121
1,231
649
582
77
5
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TypeFamilies #-} module Widgets.Tabs.Services ( panelServices ) where import Reflex.Dom import Commons import Widgets.Generation -- TODO: Add functionality to Panel Services panelServices :: ( Refle...
achirkin/qua-view
src/Widgets/Tabs/Services.hs
mit
1,424
0
14
594
170
95
75
24
1
{-| Special Data Types used in the Game |-} module Types where -------------------------------------------------- import qualified Data.Set as S import Prelude hiding (Either (..)) import Coord -------------------------------------------------- {- Environment -} data Level = Level { lRank :: I...
stuhacking/Sokoban
src/Types.hs
mit
1,695
0
10
748
347
209
138
38
4
module Main where import Dib import Dib.Builders.C import Dib.Target import Data.Maybe import Data.Monoid import qualified Data.List as L import qualified Data.Text as T data Configuration = Configuration { platform :: T.Text, buildType :: T.Text, exeExt :: T.Text, soExt :: T.Text, sanitizerFlags :: T.Text,...
blajzer/laminaFS
dib.hs
mit
3,781
0
13
623
1,073
579
494
76
3
module Huffman (encode, decode) where import qualified LHeap as L import qualified Data.Map as M type Code = [Char] data HT = Node Int HT HT | Leaf Char Int deriving (Show) instance Eq HT where (==) h1 h2 = frequency h1 == frequency h2 instance Ord HT where compare h1 h2 = compare (frequency h1) (freq...
NMouad21/HaskellSamples
Huffman.hs
mit
1,723
0
12
417
874
469
405
38
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} module Main where import qualified Data.ByteString.Char8 as Char import Data.FileEmbed import Database.PostgreSQL.Simple import Drifter.PostgreSQL import Drifter.Types import System.Environment...
ClassyCoding/constellation-server
drift/Main.hs
mit
766
0
11
217
174
90
84
20
2
{-# LANGUAGE RecordWildCards #-} module GradientAscentDemo (runGradientAscentDemos) where import Ch05LogisticRegression.GradientAscent import Control.Monad import DataFiles import qualified Data.Vector.Storable as VS import qualified Data.Vector.Unboxed as VU import MLUtil impo...
rcook/mlutil
ch05-logistic-regression/src/GradientAscentDemo.hs
mit
6,712
0
19
1,855
1,930
1,006
924
140
2
-- Master of Files -- http://www.codewars.com/kata/574bd867d277832448000adf module Codewars.Kata.Files (isAudio, isImage) where import Control.Arrow ((&&&)) import Data.Char (isLetter) import System.FilePath.Posix (takeExtension, takeBaseName) f exts = uncurry (&&) . ( uncurry (&&) . (all isLetter &&& not . null) . ...
gafiatulin/codewars
src/6 kyu/Files.hs
mit
529
0
14
76
175
105
70
-1
-1
{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE UndecidableInstances #-} {-# OPTIONS_GHC -fno-warn-warnings-deprecations #-} -- | -- Module : Control.Monad.Prompt.Class -- Descrip...
mstksg/prompt
src/Control/Monad/Prompt/Class.hs
mit
4,487
0
9
1,004
1,032
581
451
65
1
module UtilityTree( weightAllocation, budgetAllocation, resolveAllocation, quantityAllocation, buildUtilityTree, UtilityTree, MultiplicatorTree) where import qualified Data.Edison.Assoc.StandardMap as E import Libaddutil.BinTree import qualified Utility as U import Types import MarketTypes weightAll...
anttisalonen/economics
src/UtilityTree.hs
mit
3,236
0
13
854
1,034
553
481
66
3
module Problem59 where {-- Task description: Each character on a computer is assigned a unique code and the preferred standard is ASCII (American Standard Code for Information Interchange). For example, uppercase A = 65, asterisk (*) = 42, and lowercase k = 107. A modern encryption method is to take a text file...
runjak/projectEuler
src/Problem59.hs
mit
4,057
0
12
880
891
467
424
75
2
module STG.AST where -- The following is the definition of the STG language. type Var = String data Program = Program [Binding] deriving (Show, Eq) data Binding = Binding Var Lambda deriving (Show, Eq) data Lambda = Lambda [Var] UpdateFlag [Var] Expr deriving (Show, Eq) data UpdateFlag = U | N deriving (Show, Eq)...
tcsavage/lazy-compiler
src/STG/AST.hs
mit
2,193
0
19
499
989
532
457
44
1
{-# LANGUAGE PatternSynonyms #-} -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module JSDOM.Generated.RTCDTMFToneChangeEvent (newRTCDTMFToneChangeEvent, getTone, RTCDTMFToneChangeEvent(..), gTypeRTCDTMFToneC...
ghcjs/jsaddle-dom
src/JSDOM/Generated/RTCDTMFToneChangeEvent.hs
mit
1,917
0
10
320
432
268
164
32
1
module Plotly.REST ( createPlot , updatePlot ) where import Data.Aeson (ToJSON, decode', toJSON) import Control.Lens import Control.Monad (void) import Network.Wreq import qualified Data.Text as Text import Plotly.JSON createPlot :: String -> Registration -> IO (Maybe RegistryEntry) createPlot host reg = do ...
kosmoskatten/plotly-hs
plotly-hs-lib/src/Plotly/REST.hs
mit
578
0
13
109
221
116
105
17
1
module LinkedList ( LinkedList , datum , fromList , isNil , new , next , nil , reverseLinkedList , toList ) where data LinkedList a = Node { datum :: a, next :: LinkedList a } | NullNode fromList :: [a] -> LinkedList a fromList [] = NullNode fromList xs = N...
vaibhav276/exercism_haskell
simple-linked-list/src/LinkedList.hs
mit
711
0
9
200
264
142
122
27
1
{-# LANGUAGE ScopedTypeVariables #-} module Main where import System.IO.Strict (hGetContents) import System.IO hiding (hGetContents) import Database.HDBC import Database.HDBC.Sqlite3 import Text.Parsec.Prim (runPT, ParsecT, (<|>), try) import Text.Parsec.Char ...
erithion/duo-memo
doc/drafts/CreateSqlTables.hs
mit
1,972
0
15
648
543
284
259
41
2
-- Checks if a string is an integer of the regular expression (*, +) format in parenthesis: ((-)*(0123456789)+). module IsInteger where isInteger :: String -> Bool isInteger [] = False isInteger potentialInteger@(potentialSign : potentialRemainingDigits) | potentialSign == '-' = isInteger' potentialRemainingDigit...
pascal-knodel/haskell-craft
Examples/· Recursion/· Primitive Recursion/Lists/IsInteger.hs
mit
741
0
9
135
130
72
58
10
2
module Paths_Life ( version, getBinDir, getLibDir, getDataDir, getLibexecDir, getDataFileName ) where import qualified Control.Exception as Exception import Data.Version (Version(..)) import System.Environment (getEnv) catchIO :: IO a -> (Exception.IOException -> IO a) -> IO a catchIO = Exception.catch ...
asolanki/cs1501-final
dist/build/autogen/Paths_Life.hs
gpl-2.0
1,222
0
10
164
329
188
141
25
1
import Logfile import System.Environment dumpLogfile :: Logfile -> LogfilePtr -> IO () dumpLogfile lf ptr = case nextRecord lf ptr of Nothing -> return () Just (rec, nextPtr) -> (putStrLn $ show rec) >> dumpLogfile lf nextPtr main :: IO () main = do args <- getArgs case args of ...
sos22/ppres
ppres/driver/DumpLogfile.hs
gpl-2.0
498
0
13
158
162
79
83
14
2
-- SrcRegActList.hs -- -- Author: Yoshikuni Jujo <PAF01143@nifty.ne.jp> -- -- This file is part of regexpr library -- -- regexpr 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 3 of the...
YoshikuniJujo/regexpr
Hidden/SrcRegActList.hs
gpl-3.0
4,880
4
14
1,874
1,210
722
488
82
1
module QHaskell.Expression.Utils.TemplateHaskell ((===),unQ,stripNameSpace,trmEql) where import Prelude import QHaskell.ErrorMonad import Language.Haskell.TH.Syntax hiding (unQ) (===) :: Name -> Name -> Bool n1 === n2 = stripNameSpace n1 == stripNameSpace n2 unQ :: Q a -> a unQ = frmRgt. runQ stripNameSpace :: ...
shayan-najd/QHaskell
QHaskell/Expression/Utils/TemplateHaskell.hs
gpl-3.0
1,432
0
14
449
437
228
209
36
1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} -- | Provides parser for @$HOME/.netrc@ files -- -- The implemented grammar is approximately: -- -- > NETRC := (WS|<comment>)* (ENTRY...
hvr/netrc
src/Network/NetRc.hs
gpl-3.0
9,959
0
18
2,762
2,264
1,218
1,046
177
5
-- | Settings are centralized, as much as possible, into this file. This -- includes database connection settings, static file locations, etc. -- In addition, you can configure a number of different aspects of Yesod -- by overriding methods in the Yesod typeclass. That instance is -- declared in the Foundation.hs file....
Drezil/neat
Settings.hs
gpl-3.0
5,368
0
12
1,438
705
405
300
-1
-1
module Hed where import System.IO import System.Environment import StringUtil import FileMan import Data.Char (toUpper) import Data.Maybe import Control.Exception {- the structure of the document is - [[privious lines]] and these are reversed - [the current line] but this will be only one string - [[the lin...
joshuaunderwood7/beeHive
Hed.hs
gpl-3.0
6,656
4
24
1,844
2,449
1,216
1,233
141
9
{-# LANGUAGE BangPatterns #-} ---------------------------------------------------------------------------------- -- | -- Module : Tct.Method.Bounds.Violations -- Copyright : (c) Martin Avanzini <martin.avanzini@uibk.ac.at>, -- Georg Moser <georg.moser@uibk.ac.at>, -- Andreas Sc...
mzini/TcT
source/Tct/Method/Bounds/Violations.hs
gpl-3.0
2,709
0
14
758
575
308
267
32
5
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Deployments/Update.hs
mpl-2.0
5,818
0
19
1,417
701
416
285
111
1
-- -- Copyright 2017-2018 Azad Bolour -- Licensed under GNU Affero General Public License v3.0 - -- https://github.com/azadbolour/boardgame/blob/master/LICENSE.md -- {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE DisambiguateRecordFields #-} module BoardGame.Server.Service.GamePersisterJsonBridge ( mkBridge ) whe...
azadbolour/boardgame
haskell-server/src/BoardGame/Server/Service/GamePersisterJsonBridge.hs
agpl-3.0
3,933
3
12
484
968
536
432
70
1
{-# LANGUAGE BangPatterns, FlexibleContexts, FlexibleInstances , ParallelListComp, TypeFamilies, TypeOperators #-} {-# OPTIONS_GHC -fno-warn-orphans #-} -- | Contains functions to compute and manipulate histograms as well as some -- images transformations which are histogram-based. -- -- Every polymorphic f...
TomMD/friday
src/Vision/Histogram.hs
lgpl-3.0
17,942
1
15
4,447
3,575
1,874
1,701
242
3
module Function.TypeFooler where -- External Imports import Language.Haskell.Her.HaLay import Data.List.Split (splitOn) import Data.List (intercalate, elem, isSuffixOf, intersperse) import Text.ParserCombinators.Parsec (parse, manyTill, anyChar, try, string, manyTill) import Debug.Trace (trace) import System.IO -- P...
DarrenMowat/blackbox
src/Function/TypeFooler.hs
unlicense
7,854
0
27
2,239
2,152
1,100
1,052
136
16
{-# LANGUAGE TypeFamilies #-} -- 3.1 Type-directed memoization -------------------------------- class Memo a where data Table a :: * -> * toTable :: (a -> w) -> Table a w fromTable :: Table a w -> (a -> w) instance Memo Bool where data Table Bool w = TBool w w toTable f = TBool (f True) (f False) fromTab...
egaburov/funstuff
Haskell/fun-with-types/memo.hs
apache-2.0
4,477
0
16
1,171
2,256
1,159
1,097
104
4
-- Input/Output (aka De-/serialization) for expressions {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE RankNTypes #-} module IO where import Data.Generics import Data.Tree import DataBase import DataExtension {- Let's serialize. In fact, let's "treealize". It should be noted that such conversion, expre...
egaburov/funstuff
Haskell/tytag/xproblem_src/samples/expressions/Haskell/OpenDatatype2/IO.hs
apache-2.0
3,906
0
11
846
565
294
271
33
1
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} -- | Frame source module Haskus.System.Linux.Graphics.FrameSource ( -- * Frame source FrameSource(..) , addFrameSource , removeFrameSource , dirtyFrameSource -- * Pixel source , PixelSource(.....
hsyl20/ViperVM
haskus-system/src/lib/Haskus/System/Linux/Graphics/FrameSource.hs
bsd-3-clause
3,117
0
18
744
833
459
374
67
3
-- | Server operations for items. module Game.LambdaHack.Server.ItemM ( registerItem, moveStashIfNeeded, randomResetTimeout, embedItemOnPos , prepareItemKind, rollItemAspect, rollAndRegisterItem , placeItemsInDungeon, embedItemsInDungeon, mapActorCStore_ #ifdef EXPOSE_INTERNAL -- * Internal operations , onl...
LambdaHack/LambdaHack
engine-src/Game/LambdaHack/Server/ItemM.hs
bsd-3-clause
13,557
12
29
3,573
3,678
1,842
1,836
-1
-1
{-#LANGUAGE OverloadedStrings#-} {- Project name: Chromosome Min Zhang Date: Oct 13, 2015 Version: v.0.1.0 README: Annotate genes on sex chromosome -} import qualified Data.Text as T import qualified Data.Text.IO as TextIO import qualified Data.Char as C import Control.Applicative import qualified Data.List as L impo...
Min-/fourseq
src/utils/Chromosome.hs
bsd-3-clause
1,533
0
13
276
414
231
183
39
2
{- Problem 12 What is the value of the first triangle number to have over five hundred divisors? Result 76576500 0.74 s -} module Problem12 (solution) where import Data.List import Data.Numbers.Primes solution = head [triangle n | n <- [1..], triangleD n > ...
quchen/HaskellEuler
src/Problem12.hs
bsd-3-clause
1,194
0
13
423
207
114
93
10
1
module Main ( main ) where import Control.Monad (forM_) import Data.Maybe (listToMaybe) import System.Directory ( canonicalizePath, getCurrentDirectory , makeRelativeToCurrentDirectory ) import System.Environment (getArgs) import System.FilePath ((</>)) import D...
jaspervdj/dir-metadata
src/Main.hs
bsd-3-clause
2,335
0
17
801
913
462
451
72
9
{-# language CPP #-} -- No documentation found for Chapter "EnvironmentBlendMode" module OpenXR.Core10.Enums.EnvironmentBlendMode (EnvironmentBlendMode( ENVIRONMENT_BLEND_MODE_OPAQUE , ENVIRONMENT_BLEND_MODE_ADDITIVE ...
expipiplus1/vulkan
openxr/src/OpenXR/Core10/Enums/EnvironmentBlendMode.hs
bsd-3-clause
4,057
1
10
924
340
213
127
-1
-1
{-# LANGUAGE NamedFieldPuns #-} module Text.Mediawiki.ParseTree where import ClassyPrelude import Data.Text (strip) import Data.Tree.NTree.TypeDefs (NTree(..)) import Text.XML.HXT.DOM.QualifiedName (QName) import Text.XML.HXT.DOM.TypeDefs (XmlTree, XmlTrees, XNode(..)) import Text.XML.HXT.PathFinder (hasLocalName, Loc...
greenrd/wpfixcites
src/Text/Mediawiki/ParseTree.hs
bsd-3-clause
3,343
0
15
874
1,178
613
565
65
1
module Main where import Utils.TigerUtils main :: IO () main = do runFile
lialan/TigerCompiler
app/Main.hs
bsd-3-clause
78
0
6
17
27
15
12
5
1
{-# LANGUAGE PatternSynonyms #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.HP.TextureLighting -- Copyright : (c) Sven Panne 2019 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portabili...
haskell-opengl/OpenGLRaw
src/Graphics/GL/HP/TextureLighting.hs
bsd-3-clause
739
0
5
99
57
42
15
9
0
{-# LANGUAGE OverloadedStrings #-} module Day7 ( day7 , day7' ) where import Control.Applicative import Data.Attoparsec.Text import Data.Either import Data.List import qualified Data.Text as T import Shared.String import Shared.List {...
Rydgel/advent-of-code-2016
src/Day7.hs
bsd-3-clause
1,535
0
14
406
652
349
303
36
2
module Paths_wordfreq ( version, getBinDir, getLibDir, getDataDir, getLibexecDir, getDataFileName ) where import qualified Control.Exception as Exception import Data.Version (Version(..)) import System.Environment (getEnv) catchIO :: IO a -> (Exception.IOException -> IO a) -> IO a catchIO = Exception.cat...
dmjio/wordfreq
dist/build/autogen/Paths_wordfreq.hs
bsd-3-clause
1,226
0
10
164
329
188
141
25
1
module Omnisharp.Utils (toPascelCase) where import Data.Char toPascelCase :: String -> String toPascelCase [] = [] toPascelCase (x : xs) = toUpper x : xs
alistair/omnisharp-hs
src/Omnisharp/Utils.hs
bsd-3-clause
157
0
7
27
59
32
27
5
1
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE BangPatterns #-} ----------------------------------------------------------------------------- -- | -- Module : Distribution.Compat.Graph -- C...
kolmodin/cabal
Cabal/Distribution/Compat/Graph.hs
bsd-3-clause
12,109
0
13
2,780
2,858
1,553
1,305
180
2
{-# LANGUAGE RecordWildCards #-} module HPack.Cache (Cache, newCache, addElem) where import qualified Data.Map as M import qualified Data.List as L -- | Keep a cache of elements of a maximum size. When the maximum is -- exceeded, indicate which elements should be deleted. data Cache a = Cache { maxSize :...
markflorisson/hpack
src/HPack/Cache.hs
bsd-3-clause
1,218
0
10
346
290
163
127
21
2
module Language.NyFl.Term ( -- * Data types Term (..) ) where -- | Term data Term a = Int Int | Bool Bool | Var a | Op (Term a) (Term a) | Fn a (Term a) | Ap (Term a) (Term a) deriving (Eq, Show)
nobsun/nyfl
src/Language/NyFl/Term.hs
bsd-3-clause
276
0
8
126
100
58
42
9
0
----------------------------------------------------------------------------- -- | -- Module : Data.OrgMode.Parse.Attoparsec.Time -- Copyright : © 2014 Parnell Springmeyer -- License : All Rights Reserved -- Maintainer : Parnell Springmeyer <parnell@digitalmentat.com> -- Stability : stable -- -- Pars...
nushio3/orgmode-parse
src/Data/OrgMode/Parse/Attoparsec/Time.hs
bsd-3-clause
9,107
0
18
2,549
1,882
1,037
845
145
5
{-# LANGUAGE RecordWildCards #-} module JSONLog ( jsonLogs , parseLogP , IndexedJLTimedEvent (..) , runParseLogs ) where import Data.Attoparsec.Text (Parser, parseOnly, takeTill) import Pipes import Pipes.ByteString (fromHandle) import Pipes.Interleave (inte...
input-output-hk/pos-haskell-prototype
tools/post-mortem/src/JSONLog.hs
mit
2,064
0
14
577
588
322
266
53
2
{-| Copyright : (c) 2015 Javran Cheng License : MIT Maintainer : Javran.C@gmail.com Stability : unstable Portability : non-portable (requires X11) Compiling-related functions -} module XMonad.Util.EntryHelper.Compile ( defaultCompile , defaultPostCompile , postCompileCheckLog , compileUsi...
Javran/xmonad-entryhelper
src/XMonad/Util/EntryHelper/Compile.hs
mit
5,320
0
15
1,231
766
411
355
76
2
-- | Maintainer: Jelmer Vernooij <jelmer@jelmer.uk> -- module Propellor.Property.Munin ( hostListFragment, hostListFragment', nodePort, nodeInstalled, nodeRestarted, nodeConfPath, masterInstalled, masterRestarted, masterConfPath, ) where import Propellor import qualified Propellor.Property.Apt as Apt import q...
ArchiveTeam/glowing-computing-machine
src/Propellor/Property/Munin.hs
bsd-2-clause
1,735
20
17
266
428
241
187
37
1
----------------------------------------------------------------------------- -- | -- Module : Distribution.ModuleName -- Copyright : Duncan Coutts 2008 -- -- Maintainer : cabal-devel@haskell.org -- Portability : portable -- -- Data type for Haskell module names. {- All rights reserved. Redistribution and...
IreneKnapp/Faction
libfaction/Distribution/ModuleName.hs
bsd-3-clause
4,332
0
14
919
601
332
269
53
2
foo x = case (odd x) of True -> "Odd" False -> "Even"
mpickering/ghc-exactprint
tests/examples/ghc710/B.hs
bsd-3-clause
80
0
7
39
31
15
16
3
2
module Settings.Packages.IntegerGmp (integerGmpPackageArgs) where import Base import Expression import Oracles.Setting import Rules.Gmp -- TODO: Is this needed? -- ifeq "$(GMP_PREFER_FRAMEWORK)" "YES" -- libraries/integer-gmp_CONFIGURE_OPTS += --with-gmp-framework-preferred -- endif integerGmpPackageArgs :: Args inte...
bgamari/shaking-up-ghc
src/Settings/Packages/IntegerGmp.hs
bsd-3-clause
864
0
16
198
177
90
87
17
1
module Aws.Sqs.Core where import Aws.Core import Aws.S3.Core (LocationConstraint, locationUsClassic, locationUsWest, locationUsWest2, locationApSouthEast, locationApNorthEast, locationEu) import qualified Blaze.ByteString.Builder as Blaze import qualified Blaze.ByteString.B...
fpco/aws
Aws/Sqs/Core.hs
bsd-3-clause
13,954
0
16
3,532
2,724
1,504
1,220
-1
-1
module Strings.Reverse.Data where import Autolib.Size import Autolib.ToDoc data Exp a = Reverse ( Exp a ) | Plus ( Exp a ) ( Exp a ) | Empty | Item a instance ToDoc a => ToDoc ( Exp a ) where toDoc x = case x of Reverse y -> parens (toDoc y) <> text "^R" Plus y z ...
Erdwolf/autotool-bonn
src/Strings/Reverse/Data.hs
gpl-2.0
1,659
0
17
558
841
423
418
47
4
module RnHsDoc ( rnHsDoc, rnLHsDoc, rnMbLHsDoc ) where import GhcPrelude import TcRnTypes import HsSyn import SrcLoc rnMbLHsDoc :: Maybe LHsDocString -> RnM (Maybe LHsDocString) rnMbLHsDoc mb_doc = case mb_doc of Just doc -> do doc' <- rnLHsDoc doc return (Just doc') Nothing -> return Nothing rnLHsDoc...
ezyang/ghc
compiler/rename/RnHsDoc.hs
bsd-3-clause
520
0
12
102
187
92
95
17
2
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE ScopedT...
green-haskell/ghc
libraries/base/Data/Typeable/Internal.hs
bsd-3-clause
16,938
0
15
3,690
3,622
2,027
1,595
-1
-1
{-# LANGUAGE ExistentialQuantification, DeriveDataTypeable #-} ----------------------------------------------------------------------------- -- | -- Module : Language.C.Data.Error -- Copyright : (c) 2008 Benedikt Huber, Manuel M. T. Chakravarty -- License : BSD-style -- Maintainer : benedikt.huber@gmail...
vincenthz/language-c
src/Language/C/Data/Error.hs
bsd-3-clause
6,254
0
15
1,410
1,314
724
590
94
3
{-# Language FlexibleInstances #-} {-# Language TypeSynonymInstances #-} module Pretty ( ppconstraint, ppconstraints, ppdecl, ppenv, ppexpr, ppscheme, ppsubst, ppsignature, pptype ) where import Env import Type import Syntax import Infer import Text.PrettyPrint import qualified Data.Map as Map par...
yupferris/write-you-a-haskell
chapter7/poly_constraints/src/Pretty.hs
mit
3,106
0
15
782
1,479
738
741
90
1
module B5(myFringe,sumSquares)where import D5 hiding (sumSquares, fringe,myFringe) import D5 (fringe) import C5 hiding () myFringe:: Tree a -> [a] myFringe (Leaf x ) = [x] myFringe (Branch left right) = myFringe right sumSquares (x:xs)= x^2 + sumSquares xs sumSquares [] =0
kmate/HaRe
old/testing/moveDefBtwMods/B5_TokOut.hs
bsd-3-clause
284
0
7
51
129
72
57
9
1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} module T16183 where import Data.Kind $([d| type F1 = (Maybe :: Type -> Type) Int type F2 = (Int :: Type) -> (Int :: Type) type family F3 a where F3 (a :: Type) = Int newtype F4 = MkF4 (Int :: Type) |])
sdiehl/ghc
testsuite/tests/th/T16183.hs
bsd-3-clause
293
0
6
80
22
15
7
-1
-1
-- In this example, add data constructor 'Leaf' to the export list. module C4(Tree(Leaf)) where data Tree a = Leaf a | Branch (Tree a) (Tree a) sumTree:: (Num a) => Tree a -> a sumTree (Leaf x ) = x sumTree (Branch left right) = sumTree left + sumTree right myFringe:: Tree a -> [a] myFringe (Leaf x ) = [x] myFr...
kmate/HaRe
old/testing/addToExport/C4_TokOut.hs
bsd-3-clause
530
0
8
132
226
118
108
16
1
module PFE_HTML where import Prelude hiding(putStrLn,writeFile) --import Maybe(fromJust) import Control.Monad(when,unless) --import HsName(ModuleName(Module)) --import ScopeModule(scopeModule) import ConvRefsTypes(simplifyRefsTypes') import HLex2html(hlex2html') import HsLexerPass1(line,column) -- hmm import PFE0(fi...
kmate/HaRe
old/tools/pfe/PFE_HTML.hs
bsd-3-clause
1,736
21
15
269
344
219
125
35
1
import Test.Cabal.Prelude main = cabalTest $ do fails $ cabal "new-build" ["q"]
mydaum/cabal
cabal-testsuite/PackageTests/NewBuild/T3978/cabal.test.hs
bsd-3-clause
84
0
10
16
31
16
15
3
1
module Exp where import Control.Monad import Parser -- import lecture18.example02 data Exp = Lit Int | Exp :+: Exp | Exp :*: Exp deriving (Eq, Show) evalExp :: Exp -> Int evalExp (Lit n) = n evalExp ( e :+: f) = evalExp e + evalExp f evalExp ( e :*: f) = evalExp e * evalExp f parseE...
abhishekkr/tutorials_as_code
talks-articles/languages-n-runtimes/haskell/PhilipWadler-UniversityOfEdinburgh-2011/lecture18.example02.hs
mit
1,391
0
11
733
301
163
138
30
1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE InstanceSigs #-} module Logic ( Logic(..), bFunctionMap) where import Data.Map as M hiding (map, foldl, (!)) import Data.Maybe import Data.Monoid import Data.List hiding (and) import Data.Array import Data.Char import Cat import Re...
b1g3ar5/Spreadsheet
Logic.hs
mit
1,986
0
13
645
939
490
449
63
1
{-# LANGUAGE OverloadedStrings #-} -- This examples requires you to: cabal install cookie -- and: cabal install blaze-html module Sessions where import Control.Applicative ((<$>)) import qualified Data.Binary.Builder as B import qualified Data.ByteString as BS import qualified Data.ByteStrin...
hw-hello-world/okta-signin-widget
haskell-scotty/app/Sessions.hs
mit
1,048
0
9
214
251
146
105
20
1
module Y2018.M11.D21.Exercise where {-- From @fermatslibrary https://twitter.com/fermatslibrary/status/1061619809669074946 "A curious identity involving π and e:" 1 / (π² + 1) + 1 / (4π² + 1) + 1 / (9π² + 1) + 1 / (16π² + 1) + ... = 1 / (e² - 1) How many terms do you have to go out for that equation to be accurat...
geophf/1HaskellADay
exercises/HAD/Y2018/M11/D21/Exercise.hs
mit
494
0
5
101
27
17
10
3
1
module Universe.Camera ( ) where data Camera coordSys d = Camera coordSys (Maybe (d, d))
fehu/hgt
core-universe/src/Universe/Camera.hs
mit
95
0
9
21
34
21
13
2
0
{-# LANGUAGE TypeFamilies, FlexibleContexts #-} {-# LANGUAGE DeriveFunctor, DeriveFoldable, DeriveTraversable, DeriveDataTypeable, UndecidableInstances #-} {-# LANGUAGE TupleSections #-} module Data.Map.Vector (MapVector(..)) where import Prelude hiding (foldr) import Data.Foldable import Data.Traversable import Data....
conklech/vector-space-map
src/Data/Map/Vector.hs
mit
4,757
0
10
1,035
1,139
616
523
54
0
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE OverloadedStrings #-} module LLVM.Pretty ( ppllvm, ) where import Prelude hiding ((<$>)) import GHC.Word import LLVM.Typed imp...
vjoki/llvm-hs-pretty
src/LLVM/Pretty.hs
mit
17,601
0
20
4,755
6,161
3,085
3,076
394
5
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE MagicHash #-} module Shapes.Linear.ValueInfos where import GHC.Prim import GHC.Types (Double(..)) import Shapes.Linear.Template (ValueInfo(..)) doubleInfo :: ValueInfo doubleInfo = ValueInfo { _valueN = ''Double# , _valueWrap = 'D# ...
ublubu/shapes
shapes-math/src/Shapes/Linear/ValueInfos.hs
mit
871
0
7
408
175
126
49
21
1
main = do putStrLn "Entre com x e y: " line <- getLine let x = read line line <- getLine let y = read line putStrLn $ "Média = " ++ show ( (x+y)/2 )
folivetti/PI-UFABC
AULA_01/Haskell/Media.hs
mit
193
0
12
79
78
35
43
7
1
{-# LANGUAGE OverloadedStrings #-} module Main where import Database.PostgreSQL.Simple.Util (withTransactionRolledBack) import Test.Hspec (around_, hspec) import AppContext (getContext, getDbConn) import qualified IndexControllerSpec import qualified OAuthLoginSpec import qualified Proj...
robertjlooby/scotty-story-board
test/Spec.hs
mit
872
0
11
176
176
93
83
24
1
{-# LANGUAGE ForeignFunctionInterface, EmptyDataDecls #-} module MegaHAL.CBits where import Foreign.Ptr import Foreign.C.Types import Foreign.C.String -- Context data MHStruct type MHContext = Ptr MHStruct -- Initialisation -- -- CONTEXT *megahal_initialize(char *errorfilename, char *statusfilename, char *dir); fore...
pharaun/MegaHAL
src/MegaHAL/CBits.hs
gpl-2.0
1,471
0
10
227
182
110
72
-1
-1
module Algorithms where import Geometry import Chemistry import Data.List -- Warping Atoms bondRepulsion :: [Vector] -> [Vector] -> Int -> [Vector] bondRepulsion _ [] _ = [] bondRepulsion _ free 0 = free bondRepulsion fixed free n = bondRepulsion fixed (map (repel (fixed ++ free)) free) (n - 1) where...
herngyi/hmol
Algorithms.hs
gpl-3.0
1,493
4
19
476
724
386
338
30
6
-- Haskell Music Player, client for the MPD (Music Player Daemon) -- Copyright (C) 2011 Ivan Vitjuk <v@iv.id.au> -- 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 Licen...
ivitjuk/Haskell-Music-Player
src/Playlist.hs
gpl-3.0
3,936
0
18
900
990
495
495
79
2
{-# LANGUAGE DeriveDataTypeable#-} module Events where import Text.Parsec hiding (Error) import qualified PupEventsServer as Server import System.Environment import qualified Data.Time.Clock as Time import qualified Data.Time.Calendar as Cal import qualified Text.JSON.Parsec as JSONP import qualified Text.JSON import ...
RocketPuppy/PupCollide
Events/Events.hs
gpl-3.0
9,975
0
14
2,217
1,004
645
359
73
2
{-| Module : Interface.AST Description : Defines the abstract syntax tree used in syntax analysis. This is already simplified from the parse tree. Copyright : 2014, Jonas Cleve 2015, Tay Phuong Ho 2016, Philip Schmiel License : GPL-3 -} module Interface...
Potregon/while
src/Interface/AST.hs
gpl-3.0
8,298
0
11
3,022
2,052
1,093
959
145
26
{-# LANGUAGE DeriveFunctor #-} module TagFS.File ( File(..), FSTree(..), makeFSTrees ) where import Prelude hiding (filter) import qualified Prelude as P import Data.List hiding (filter) import Data.Function import Data.Ord import Data.Maybe import Control.Arrow -- | A file of the real file system. newtype File = ...
ffwng/tagfs
TagFS/File.hs
gpl-3.0
1,183
10
17
249
600
326
274
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-iam/gen/Network/AWS/IAM/Types.hs
mpl-2.0
86,686
0
28
22,551
14,933
8,488
6,445
-1
-1
module System.Delta.FRPUtils where import Control.Concurrent import Control.Monad import FRP.Sodium data Ticker a = Ticker{ tickerInterval :: Int , tickerEvent :: Event a , tickerTerminate :: IO () } periodical :: Int -- ^ Milliseconds ...
kryoxide/delta
src/main/delta/System/Delta/FRPUtils.hs
lgpl-3.0
565
0
12
197
165
87
78
16
1
{- Copyright 2020 The CodeWorld Authors. 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 applicab...
google/codeworld
codeworld-compiler/test/testcases/accidentalPatternGuard/source.hs
apache-2.0
689
0
11
133
65
32
33
3
1
module ToiletPaper.A260112Spec (main, spec) where import Test.Hspec import ToiletPaper.A260112 (a260112) main :: IO () main = hspec spec spec :: Spec spec = describe "A260112" $ it "correctly computes the first 20 elements" $ take 20 (map a260112 [0..]) `shouldBe` expectedValue where expectedValue = [0,1,...
peterokagey/haskellOEIS
test/ToiletPaper/A260112Spec.hs
apache-2.0
357
0
10
59
160
95
65
10
1
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {- Copyright 2017 The CodeWorld Authors. 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://ww...
parvmor/codeworld
codeworld-server/src/Main.hs
apache-2.0
5,052
0
20
1,289
1,136
563
573
116
2
<?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="da-DK"> <title>HTTPS Info Add-on</title> <maps> <homeID>httpsinfo</homeID> <mapref loca...
secdec/zap-extensions
addOns/httpsInfo/src/main/javahelp/org/zaproxy/zap/extension/httpsinfo/resources/help_da_DK/helpset_da_DK.hs
apache-2.0
968
77
67
157
413
209
204
-1
-1
module SandboxPath where import Data.Maybe import Data.Traversable (traverse) import Control.Applicative ((<$>)) import System.Directory import System.FilePath import Data.List import Data.Char -- From ghc-mod mightExist :: FilePath -> IO (Maybe FilePath) mightExist f = do exists <- doesFileExist f return $ if...
nfjinjing/halive
exec/SandboxPath.hs
bsd-2-clause
1,093
0
11
192
266
142
124
23
2