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 : $Header$ Description : Types for the Central GUI of Hets Copyright : (c) Jorina Freya Gerken, Till Mossakowski, Uni Bremen 2002-2006 License : GPLv2 or higher, see LICENSE.txt Maintainer : till@informatik.uni-bremen.de Stability : provisional Portability : non-portable (imports Logic...
mariefarrell/Hets
GUI/GraphTypes.hs
gpl-2.0
6,095
0
15
1,912
1,631
952
679
145
5
{-# LANGUAGE FlexibleContexts #-} {-| Implementation of functions specific to configuration management. -} {- Copyright (C) 2014 Google Inc. 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. Redist...
leshchevds/ganeti
src/Ganeti/WConfd/ConfigVerify.hs
bsd-2-clause
5,459
0
23
1,220
934
480
454
72
2
{-# OPTIONS_GHC -Wall -fno-warn-unused-do-bind #-} module Parse.Declaration where import Text.Parsec ( (<|>), (<?>), choice, digit, optionMaybe, string, try ) import qualified AST.Declaration as D import qualified Parse.Expression as Expr import Parse.Helpers as Help import qualified Parse.Type as Type declaration ...
laszlopandy/elm-compiler
src/Parse/Declaration.hs
bsd-3-clause
2,181
0
15
628
630
311
319
62
2
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeSynonymInstances #-} module IHaskell.Display.Widgets.Int.BoundedInt.BoundedIntText ( -- * The BoundedIntText Widget BoundedIntText, -- * Constructor mkBoundedIntText) where...
artuuge/IHaskell
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Int/BoundedInt/BoundedIntText.hs
mit
1,875
0
13
418
352
191
161
40
1
-- | "Real" Frontend to the static binary. module Main (main) where import Yi.Boot (yiDriver) import Yi.Config.Default (defaultConfig) main :: IO () main = yiDriver defaultConfig
atsukotakahashi/wi
src/executable/Main.hs
gpl-2.0
182
0
6
29
49
29
20
5
1
-- (c) The University of Glasgow, 1997-2006 {-# LANGUAGE BangPatterns, CPP, DeriveDataTypeable, MagicHash, UnboxedTuples #-} {-# OPTIONS_GHC -O -funbox-strict-fields #-} -- We always optimise this, otherwise performance of a non-optimised -- compiler is severely affected -- | -- There are two principal string types u...
forked-upstream-packages-for-ghcjs/ghc
compiler/utils/FastString.hs
bsd-3-clause
21,604
0
26
4,917
4,223
2,189
2,034
328
5
{-# OPTIONS_GHC -cpp #-} {-# OPTIONS -fglasgow-exts #-} {-# LANGUAGE MultiParamTypeClasses, OverlappingInstances, UndecidableInstances, FunctionalDependencies, NoMonomorphismRestriction #-} {-+ This module defines a number of classes that captures various forms of IO. This allows code to specify IO operations without ...
kmate/HaRe
old/tools/base/lib/AbstractIO.hs
bsd-3-clause
7,035
9
11
1,370
1,710
916
794
-1
-1
----------------------------------------------------------------------------- -- | -- Module : XMonad.Doc.Extending -- Copyright : (C) 2007 Andrea Rossato -- License : BSD3 -- -- Maintainer : andrea.rossato@unibz.it -- Stability : unstable -- Portability : portable -- -- This module documents the xm...
pjones/xmonad-test
vendor/xmonad-contrib/XMonad/Doc/Extending.hs
bsd-2-clause
50,033
0
3
9,658
99
96
3
2
0
module Layout.D5Simple where sumSquares (x:xs) = sq x + sumSquares xs where sq x = x ^pow pow = 2 sumSquares [] = 0
RefactoringTools/HaRe
test/testdata/Layout/D5Simple.hs
bsd-3-clause
133
0
7
41
60
31
29
5
1
{-# LANGUAGE NoImplicitPrelude, BangPatterns #-} ----------------------------------------------------------------------------- -- | -- Module : GHC.CString -- Copyright : (c) The University of Glasgow 2011 -- License : see libraries/ghc-prim/LICENSE -- -- Maintainer : cvs-ghc@haskell.org -- Stability ...
joelburget/haste-compiler
libraries/ghc-prim/GHC/CString.hs
bsd-3-clause
4,625
0
24
1,246
998
532
466
-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="hr-HR"> <title>Active Scan Rules | ZAP Extension</title> <maps> <homeID>top</homeID> <...
ccgreen13/zap-extensions
src/org/zaproxy/zap/extension/ascanrules/resources/help_hr_HR/helpset_hr_HR.hs
apache-2.0
979
80
66
161
417
211
206
-1
-1
module ShouldSucceed where class Eq' a where doubleeq :: a -> a -> Bool class (Eq' a) => Ord' a where lt :: a -> a -> Bool instance Eq' Int where doubleeq x y = True instance Ord' Int where lt x y = True f x y | lt x 1 = True | otherwise = False
urbanslug/ghc
testsuite/tests/typecheck/should_compile/tc054.hs
bsd-3-clause
261
0
8
74
123
61
62
11
1
module Main where import System.Environment (getArgs, getProgName) -- Available/possible sub-commands data Command = Help | Check deriving Show -- Parameters for each sub-command to parse and use as options data CommandParams = HelpParams { helpKeyword :: Maybe String } | CheckParams { inputData :: St...
fredmorcos/attic
projects/pet/archive/pet_haskell_1/Main.hs
isc
1,024
0
12
251
202
116
86
-1
-1
{-# Language TypeOperators, ScopedTypeVariables, FlexibleContexts, FlexibleInstances #-} module AutoBuilder (autoloadFromBuilder) where import qualified GI.Gtk as Gtk import qualified Data.Text as Text import GHC.Generics import Data.Coerce import Control.Exception data AutoloaderFailure...
glguy/CookieCalculator
gui/AutoBuilder.hs
isc
1,547
0
14
336
477
242
235
35
1
module UI where import Board import Data.List.Split import Data.List import Text.Regex.Posix import System.IO import System.Console.ANSI buildBoardString :: [[(Int , Symbol)]] -> String buildBoardString board = concat (map rowToString board) rowToString :: [(Int , Symbol)] -> String rowToString row = "|_" ++ (concat...
basilpocklington/haskell-TTT
src/UI.hs
mit
2,361
0
13
390
790
416
374
63
3
{-# LANGUAGE Arrows #-} module Game.Client.Objects.Towers 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/Towers.hs
mit
4,382
3
16
1,216
937
507
430
83
1
{-# LANGUAGE CPP #-} module GHCJS.DOM.URL ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.URL #else #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) import GHCJS.DOM.JSFFI.Generated.URL #else #endi...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/URL.hs
mit
322
0
5
33
33
26
7
4
0
{-# LANGUAGE RankNTypes #-} module CodeGen where import CodeGen.AST import CodeGen.Monad import CodeGen.BlockGen import Control.Monad.State import Control.Lens import LLVM.General.AST (Module, Named ((:=))) import qualified LLVM.General.AST as LLVM import qualified LLVM.General.AST.Global as LLVM import qualified LL...
LudvikGalois/CodeGen
src/CodeGen.hs
mit
2,970
0
21
479
1,108
581
527
-1
-1
{-# LANGUAGE RecordWildCards #-} module PostgREST.AppState ( AppState , getConfig , getDbStructure , getIsWorkerOn , getJsonDbS , getMainThreadId , getPgVersion , getPool , getTime , init , initWithPool , logWithZTime , putConfig , putDbStructure , putIsWorkerOn , putJsonDbS , putPgVe...
steve-chavez/postgrest
src/PostgREST/AppState.hs
mit
4,717
0
14
938
999
543
456
102
1
myShow :: (Show a) => a -> String myShow = show
tamasgal/haskell_exercises
Real_World_Haskell/ch06/Monomorphism.hs
mit
50
0
6
13
24
13
11
2
1
module Handler.NewUpload ( getNewUploadR , postNewUploadR ) where import Import import Control.Exception.Base (bracket) import Control.Monad.Trans.Resource (runResourceT) import Data.Conduit import Data.Conduit.Combinators (sinkHandle) import qualified Data.Text as Text import Data.Time.Clock (getCurrentTime) impo...
bholst/blog
Handler/NewUpload.hs
mit
3,459
0
38
1,077
962
475
487
83
10
{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE UndecidableInstances #-} module Betfair....
joe9/betfair-api
src/Betfair/APING/Requests/ListMarketCatalogue.hs
mit
3,278
0
12
848
642
380
262
75
1
{-# htermination (floatRadixFloat :: Float -> Integer) #-} import qualified Prelude data MyBool = MyTrue | MyFalse data List a = Cons a (List a) | Nil data Float = Float MyInt MyInt ; data Integer = Integer MyInt ; data MyInt = Pos Nat | Neg Nat ; data Nat = Succ Nat | Zero ; fromIntInteger :: MyInt -> In...
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/floatRadix_1.hs
mit
519
0
11
105
159
91
68
13
1
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE OverloadedStrings #-} module Unison.Names3 where import Unison.Prelude import Control.Lens (view, _4) import Data.List (sort) import Data.List.Extra (nubOrd) import Unison.HashQualified (HashQualified) import...
unisonweb/platform
unison-core/src/Unison/Names3.hs
mit
13,841
0
18
2,783
4,038
2,103
1,935
213
3
----------------------------------------------------------------------------- -- Copyright : (c) Hanzhong Xu, Meng Meng 2016, -- License : MIT License -- -- Maintainer : hanzh.xu@gmail.com -- Stability : experimental -- Portability : portable ---------------------------------------------------------------...
PseudoPower/AFSM
examples/SF/RPN.hs
mit
4,703
0
15
1,140
1,479
802
677
88
5
module Yage.Rendering ( module Mesh , module LinExport , module RenderSystem , module GLTypes ) where import Linear as LinExport hiding (lerp, slerp) import Yage.Rendering.Backend.RenderSystem as RenderSystem import Yage.Rende...
MaxDaten/yage-rendering
src/Yage/Rendering.hs
mit
426
0
5
163
65
48
17
9
0
{-# LANGUAGE BangPatterns #-} module Utils.Memo (memoList, memoTree, toList) where -- List Memoization -- Mutually recursive function that memoizes an operation by storing intermediate results in a list memoList :: (Integral a) => ((a -> a) -> a -> a) -> a -> a memoList f = memoList_f where memoList_f = (memo !!) ...
jchitel/ProjectEuler.hs
Problems/Utils/Memo.hs
mit
2,209
0
10
585
542
300
242
26
2
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE ViewPatterns #-} ---------------------------------------------------------------------- -- | -- Module: Licensor -- Description: -- -- -- ---------------------------------------------------------------------- module Licensor...
jpvillaisaza/licensor
src/Licensor.hs
mit
6,365
0
27
1,419
1,610
865
745
159
3
{-# OPTIONS_GHC -Wall -fwarn-tabs -Werror #-} ------------------------------------------------------------------------------- -- | -- Module : Graphics.Primitives.Flat -- Copyright : Copyright (c) 2014 Michael R. Shannon -- License : GPLv2 or Later -- Maintainer : mrshannon.aerospace@gmail.com -- Stabi...
mrshannon/trees
src/Graphics/Primitives/Flat.hs
gpl-2.0
4,862
0
16
1,664
1,511
774
737
83
1
module Main where import Check import qualified Numeric.Interval.Infinite as Iv import Control.Applicative import Data.Bits import Data.Ix import Data.Typeable import qualified Data.Text as Strict import Data.Word tenSeconds :: Int tenSeconds = 10000000 -...
RaminHAL9001/inf-interval
tests/Interval.hs
gpl-3.0
16,400
0
15
3,225
4,208
2,270
1,938
237
2
-- Copyright John F. Miller 2013-2017 {-# LANGUAGE OverloadedStrings, NamedFieldPuns #-} module Builtin.Class (classObject, classInit) where import Data.Maybe import Object import Object.Runtime import Scope (Scope(..),v,o, VariableContext( Local ), Value (..)) import Name import Err import Var import Data.Map.Stric...
antarestrader/sapphire
Builtin/Class.hs
gpl-3.0
2,523
0
11
618
503
278
225
56
1
module FragmentParserSpec (spec) where import Test.Hspec import Language.Mulang import Language.Mulang.Analyzer.Analysis hiding (spec) import Language.Mulang.Analyzer.FragmentParser import Language.Mulang.Transform.Normalizer spec :: Spec spec = do it "parses well ...
mumuki/mulang
spec/FragmentParserSpec.hs
gpl-3.0
1,774
0
16
356
457
227
230
29
1
module P25PwStrength where import Data.Char main :: IO () main = do putStr "Enter password: " p <- getLine case passwordStrength p of VeryWeak -> putStrLn $ "'" ++ p ++ "' is a very weak password. Loser" Weak -> putStrLn $ "'" ++ p ++ "' is a weak password. Lame" Average -> put...
ciderpunx/57-exercises-for-programmers
src/P25PwStrength.hs
gpl-3.0
1,776
0
12
550
494
253
241
39
5
{-# LANGUAGE DisambiguateRecordFields, TypeFamilies, OverloadedStrings, StandaloneDeriving, DeriveFunctor, DeriveFoldable, GeneralizedNewtypeDeriving #-} ------------------------------------------------------------------------------------- -- | -- Copyright : (c) Hans Hoglund 2012 -- License : BSD-style -- ...
hanshoglund/modulo
src/Language/Modulo/Parse.hs
gpl-3.0
11,393
0
58
2,828
2,952
1,525
1,427
266
3
{-# LANGUAGE ForeignFunctionInterface #-} module Sleep ( threadDelayMicroseconds ) where import Data.Word threadDelayMicroseconds :: Word32 -> IO () threadDelayMicroseconds = c_chThdSleepMilliseconds foreign import ccall "c_extern.h chThdSleepMilliseconds" c_chThdSleepMilliseconds :: Word32 -> IO ()
metasepi/chibios-arafura
demos/ARMCM4-STM32F303-DISCOVERY_hs/hs_src/Sleep.hs
gpl-3.0
307
0
8
38
55
31
24
7
1
module Foundation where import Database.Persist.MongoDB hiding (master) import Import.NoFoundation import Text.Hamlet (hamletFile) import Text.Jasmine (minifym) -- Used only when in "auth-dummy-login" setting is enabled. import Yesod.Auth.Dummy import Yesod.Auth.OpenId (authO...
uros-stegic/canx
server/canx-server/Foundation.hs
gpl-3.0
9,904
1
16
2,493
1,364
733
631
-1
-1
module Application.Caffe.ArgsParser where import Data.List as L import Data.Maybe import PetaVision.Data.Pooling import System.Console.GetOpt import Text.Parsec import Text.Parsec.String import Text.Read data Flag = PVPFile String ...
XinhuaZhang/PetaVisionHaskell
Application/Caffe/ArgsParser.hs
gpl-3.0
5,419
0
15
1,646
1,557
852
705
176
15
module QuranSpec.QRefRng ( qRefRngSpec ) where import Quran.Internal.QRefRng import Quran.QRefRng import Test.Hspec qRefRngSpec :: Spec qRefRngSpec = do -- SPECS FOR INTERNAL describe "chapterOffset" $ do it "should sum up the verses of all chapters till 'c'" $ foldr (&&) True $ map (\(c, success) ->...
oqc/hqt
QuranSpec/QRefRng.hs
gpl-3.0
2,126
0
17
662
609
322
287
40
1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} -- Module : Network.AWS.EC2.Types -- Copyright : (c) 2013 Brendan Hay <brendan.g.hay@gmail.com> -- License : This Source Code Form is subject to the terms of -- ...
brendanhay/amazonka-limited
src/Network/AWS/EC2/Types.hs
mpl-2.0
102,577
0
12
27,145
6,734
4,411
2,323
933
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-compute/gen/Network/Google/Resource/Compute/Instances/SetDeletionProtection.hs
mpl-2.0
5,543
0
19
1,243
630
374
256
99
1
{- ORMOLU_DISABLE -} -- Implicit CAD. Copyright (C) 2011, Christopher Olah (chris@colah.ca) -- Copyright (C) 2014 2015, Julia Longtin (julial@turinglace.com) -- Copyright (C) 2015 2016, Mike MacHenry (mike.machenry@gmail.com) -- Released under the GNU AGPLV3+, see LICENSE -- Allow us to use real types in the type cons...
colah/ImplicitCAD
Graphics/Implicit/Export.hs
agpl-3.0
4,549
0
12
818
977
540
437
57
1
{-# LANGUAGE DataKinds, DeriveFunctor, FlexibleInstances, GADTs, GeneralizedNewtypeDeriving, MultiParamTypeClasses, ScopedTypeVariables, StandaloneDeriving, TypeFamilies #-} module Math.Topology.KnotTh.Tangle.TangleDef ( Tangle , AsTangle(..) , Tangle' , Tangle0 , Tangle2 , Tangle4 , Tangle6...
mishun/tangles
src/Math/Topology/KnotTh/Tangle/TangleDef.hs
lgpl-3.0
49,917
745
32
20,972
14,652
7,730
6,922
-1
-1
module Type where import Language.Haskell.Her.HaLay import ListUtils import Data.Maybe (mapMaybe, isJust) import Data.List.Split (splitOn) import Text.ParserCombinators.Parsec (parse, manyTill, anyChar, try, string, manyTill) import Data.List (intersperse, isPrefixOf) import TokenUtils import Data.Char type Identi...
DarrenMowat/blackbox
src/Type.hs
unlicense
6,155
59
28
1,777
2,192
1,130
1,062
114
34
import Control.Monad (replicateM) import Data.List (foldl1') import qualified Data.Vector as V readData n = replicateM n readRow where readRow = fmap ((take n) . (map read) . words) getLine toVectors :: [[Integer]] -> [V.Vector Integer] toVectors = map V.fromList diagonalDiff n = let indices = take n...
itsbruce/hackerrank
alg/warmup/diagonalDiff.hs
unlicense
647
1
12
186
320
167
153
18
1
f :: Int -> String f = undefined g :: String -> Char g = undefined h :: Int -> Char h a = g (f a) data A data B data C q :: A -> B q = undefined w :: B -> C w = undefined e :: A -> C e a = w (q a) data X data Y data Z xz :: X -> Z xz = undefined yz :: Y -> Z yz = undefined xform :: (X, Y) -> (Z, Z) xform (...
dmvianna/haskellbook
src/Ch05Ex-types-2.hs
unlicense
597
0
9
184
411
203
208
-1
-1
class Borked a where bork :: a -> String instance Borked Int where bork = show instance Borked (Int, Int) where bork (a, b) = bork a ++ ", " ++ bork b instance (Borked a, Borked b) => Borked (a, b) where bork (a, b) = ">>" ++ bork a ++ " " ++ bork b ++ "<<"
EricYT/Haskell
src/real_haskell/chapter-6/Overlap.hs
apache-2.0
280
0
10
81
139
72
67
8
0
module Step ( step ) where -- 台阶有 N 阶, 每次 1-3 步,总共有多少种走法 step :: Int -> Int step 1 = 1 step 2 = 2 step 3 = 4 step n = step (n - 1) + step (n - 2) + step (n - 3)
EricYT/Haskell
src/step.hs
apache-2.0
194
0
9
48
89
47
42
7
1
import Data.List.Split (splitOn) import Data.Ix (inRange) data Direction = North | South | East | West getTurnAndDistance :: String -> (Char, Int) getTurnAndDistance (dir:distance) = (dir, read distance :: Int) updatePosition :: (Int, Int) -> Direction -> Int -> (Int, Int) updatePosition (x, y) Nor...
craigbilner/advent-of-code-2016
day-1.hs
apache-2.0
2,867
6
13
713
1,143
599
544
69
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ViewPatterns #-} module Main where import Control.Exception as E import Control.Lens import Data.Aeson.Lens import qualified Data.ByteString.Char8 as B import qualified Data.ByteString.Lazy.Char8 as BL import Data.List import Data.Maybe import Data.Monoid import qualifi...
relrod/traductor
src/Main.hs
bsd-2-clause
2,865
0
22
637
907
482
425
-1
-1
-- | -- Module : Prose.Segmentation.Words -- Copyright : (c) 2014–2015 Antonio Nikishaev -- -- License : BSD-style -- Maintainer : me@lelf.lu -- Stability : experimental -- -- {-# LANGUAGE TypeOperators, DeriveFunctor, FlexibleInstances #-} {-# LANGUAGE TupleSections #-} module Prose.Segmentation.Words ...
llelf/prose
Prose/Segmentation/Words.hs
bsd-3-clause
7,183
1
15
2,471
1,604
921
683
103
3
{-# LANGUAGE CPP #-} #if __GLASGOW_HASKELL__ >= 711 {-# LANGUAGE PatternSynonyms #-} #endif #ifndef MIN_VERSION_binary #define MIN_VERSION_binary(x, y, z) 0 #endif module Distribution.Compat.Binary ( decodeOrFailIO #if __GLASGOW_HASKELL__ >= 708 || MIN_VERSION_binary(0,7,0) , module Data.Binary #else ...
sopvop/cabal
Cabal/Distribution/Compat/Binary.hs
bsd-3-clause
1,374
0
12
229
166
100
66
22
1
{-# LANGUAGE ExistentialQuantification, ViewPatterns, OverloadedStrings, NoMonomorphismRestriction, ScopedTypeVariables #-} module RPC (Connection, Handler, newConnectionHandles, newConnectionCommand, registerMethodHandler, callMethod) where import qualified Data.Aeson as A import qualified Dat...
max630/json-exec
RPC.hs
bsd-3-clause
5,552
0
26
1,838
1,621
832
789
112
3
module Git ( gitExec , gitExec_ ) where import Control.Concurrent import Data.ByteString.Char8 (ByteString) import qualified Data.ByteString.Char8 as B import System.Exit import System.IO import System.Process ----------------------------------------------...
jystic/mothership
src/Git.hs
bsd-3-clause
2,242
0
13
577
580
303
277
50
2
{-# OPTIONS -cpp #-} ------------------------------------------------------------------ -- A primop-table mangling program -- ------------------------------------------------------------------ module Main where import Parser import Syntax import Data.Char import Data.List import Data.May...
christiaanb/ghc
utils/genprimopcode/Main.hs
bsd-3-clause
35,915
0
39
14,524
9,914
4,992
4,922
688
74
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} module BCalib.SV1 where import Control.Applicative (ZipList (..)) import Data.Map.Strict as M import GHC.Float import GHC.Generics hiding (to) import B...
cspollard/bcalib
src/BCalib/SV1.hs
bsd-3-clause
5,209
0
15
1,851
1,091
564
527
186
1
module Main where import Control.Monad.IO.Class (liftIO) import System.Environment (getArgs) import Ping.GenTypes import Vintage app :: Session () app = do msg <- send Ping liftIO $ putStrLn (show (msg :: Ping)) return () server :: Ping -> IO Pong server Ping = return Pong main :: IO () main = getArgs ...
luciferous/vintage
tests/Ping.hs
bsd-3-clause
497
0
11
113
179
93
86
17
3
-- Copyright (c) 2016-present, Facebook, Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. An additional grant -- of patent rights can be found in the PATENTS file in the same directory. {-# LANGUAGE Over...
rfranek/duckling
Duckling/Numeral/ES/Corpus.hs
bsd-3-clause
2,692
0
11
1,186
488
282
206
78
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoImplicitPrelude #-} -- | -- Module: $HEADER$ -- Description: TODO -- Copyright: (c) 2014 Peter Trsko -- License: BSD3 -- -- Maintainer: peter.trsko@gmail.com -- Stability: experimental -- Portability: DeriveDataGeneri...
trskop/skeletos
src/Skeletos/Type/Define.hs
bsd-3-clause
3,097
0
10
663
803
463
340
81
2
{-- --- Day 3: Perfectly Spherical Houses in a Vacuum --- Santa is delivering presents to an infinite two-dimensional grid of houses. He begins by delivering a present to the house at his starting location, and then an elf at the North Pole calls him via radio and tells him where to move next. Moves are always exactl...
hlmerscher/advent-of-code-2015
src/Day3.hs
bsd-3-clause
4,356
0
11
1,065
653
335
318
42
1
{-# LANGUAGE RecordWildCards #-} module SimpleAbstractor.Parser ( reservedNames, reservedOps, typeDecl, decl, binExpr, ctrlExpr ) where import Control.Applicative import Text.Parsec hiding ((<|>), many) import Text.Parsec.String import Text.Parsec.Expr import qualified Text.Parsec.Token as...
termite2/simple-abstractor
SimpleAbstractor/Parser.hs
bsd-3-clause
3,521
0
13
905
1,336
693
643
54
2
-- Reduces lambdas that are immediately applied. -- Evaluates `(\x -> f x) (g 3)` to `f (g 3)` module FunVM.Transformations.ReduceLambdaApplication ( transform , bindEval , typeEval , valBindEval , valEval , exprEval , groupEval , moduleEval ) where import Data.Function import Data.List import Data....
tomlokhorst/FunVM
src/FunVM/Transformations/ReduceLambdaApplication.hs
bsd-3-clause
3,156
0
15
942
1,351
690
661
72
2
import Data.Tree (Tree(..)) tree1 = Node 'a' []
YoshikuniJujo/funpaala
samples/24_adt_module/adtGoodImport1.hs
bsd-3-clause
49
0
6
9
27
15
12
2
1
{-# LANGUAGE OverloadedStrings #-} -- System grade imports -- import qualified Data.ByteString as B -- import qualified Data.ByteString.Builder as Bu -- import Data.ByteString.Char8 (pack) -- import qualified Data.ByteString.Lazy as BL import Data.Foldable (fi...
loadimpact/http2-test
hs-src/reh-mimic.hs
bsd-3-clause
4,321
0
18
1,359
777
411
366
78
2
module HaskellEditor.Gui.Components where import Graphics.UI.Gtk import HaskQuery import Control.Concurrent.STM import HaskellEditor.Types import HaskellEditor.Dynamic import HaskellEditor.Gui.Util mainWindowRef :: WidgetRef Window mainWindowRef = widgetReference "mainWindow" buttonBarRef :: WidgetRef HBox buttonB...
stevechy/haskellEditor
src/HaskellEditor/Gui/Components.hs
bsd-3-clause
3,104
0
17
679
844
392
452
64
2
module Intel.ArBB.Backend.Scalar where data BEScalar a = BEScalar {beScalarID :: Integer} -- for now, this is taken care of by specialized code in Backend.ArBB --class Scalar a where -- mkScalar :: BackendMonad m => a -> m (BEScalar a)
svenssonjoel/EmbArBB
Intel/ArBB/Backend/Scalar.hs
bsd-3-clause
252
0
8
55
27
19
8
2
0
{-# LANGUAGE RecordWildCards #-} import Control.Applicative import Control.Exception import Control.Monad import Control.Monad.Trans.Resource (runResourceT) import qualified Data.ByteString.Char8 as S8 import qualified Data.ByteString.Lazy.Char8 as L8 import Data.List import Data.Maybe import Distribution.PackageDescr...
sjakobi/stack
etc/scripts/release.hs
bsd-3-clause
27,543
0
25
7,757
6,147
3,143
3,004
586
7
{-Obsolete-} {-# LANGUAGE DeriveFunctor #-} module Andromeda.ControlEnvironment.Language where import qualified Data.Vector as V import qualified Data.Map as M import qualified Data.ByteString as BS import qualified Data.ByteString.Char8 as BS import Control.Monad.Free import Hardware.Scheme data Condition = Cond...
graninas/Andromeda
trash/Language.hs
bsd-3-clause
1,358
0
8
244
416
229
187
42
1
{-# LANGUAGE PatternGuards #-} {-# OPTIONS_GHC -fwarn-incomplete-patterns #-} module Idris.Delaborate (annName, bugaddr, delab, delab', delabMV, delabTy, delabTy', fancifyAnnots, pprintDelab, pprintDelabTy, pprintErr) where -- Convert core TT back into high level syntax, primarily for display -- purposes. import Util...
BartAdv/Idris-dev
src/Idris/Delaborate.hs
bsd-3-clause
27,468
0
23
9,228
11,057
5,490
5,567
508
46
module Cases.FullTypeInferenceTest where import Language.Haskell.Exts import Utils.ErrMsg import Main -- this module runs the full algorithm over a -- specified file. fulltitest1 = fulltitest test1 fulltitest2 = fulltitest test2 fulltitest3 = fulltitest test3 fulltitest f = do r <- parseFileWithEx...
rodrigogribeiro/mptc
test/Cases/FullTypeInferenceTest.hs
bsd-3-clause
603
0
8
102
91
49
42
14
1
{-| Module : Devel.Build Description : Attempts to compile the WAI application. Copyright : (c) 2015 Njagi Mwaniki License : MIT Maintainer : njagi@urbanslug.com Stability : experimental Portability : POSIX compile compiles the app to give: Either a list of source errors or an ide-backend session. -} mo...
urbanslug/yesod-devel
src/Devel/Types.hs
gpl-3.0
610
0
6
131
76
48
28
12
0
------------------------------------------------------------------------------- -- Efficient functional queue by means of two lists (used as stacks) -- -- Data Structures. Grado en Informática. UMA. -- Pepe Gallardo, 2012 ------------------------------------------------------------------------------- module Da...
Saeron/haskell
data.structures/haskell/DataStructures/Queue/TwoListsQueue.hs
apache-2.0
1,579
0
12
402
557
287
270
36
1
{-# LANGUAGE CPP #-} {-# LANGUAGE PackageImports #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} module Data.YamlSpec (main, spec) where import qualified Text.Libyaml as Y import qualified Data.ByteString.Char8 as B8 import Test.HUnit hiding (Test, path) ...
bitonic/yaml
test/Data/YamlSpec.hs
bsd-2-clause
17,426
400
21
4,184
4,619
2,495
2,124
380
4
{-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {-| Unittests for ganeti-htools. -} {- Copyright (C) 2009, 2010, 2011, 2012 Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions a...
ganeti/ganeti
test/hs/Test/Ganeti/Luxi.hs
bsd-2-clause
6,874
0
16
1,631
1,229
630
599
111
2
{-# LANGUAGE TupleSections, TemplateHaskell, CPP, UndecidableInstances, MultiParamTypeClasses, TypeFamilies, GeneralizedNewtypeDeriving, ImpredicativeTypes #-} {-| Functions of the metadata daemon exported for RPC -} {- Copyright (C) 2014 Google Inc. All rights reserved. Redistribution and use in source and...
mbakke/ganeti
src/Ganeti/Metad/ConfigCore.hs
bsd-2-clause
4,792
1
23
917
613
340
273
61
2
module Name.Id( Id(), IdMap(), IdNameT(), IdSet(), anonymous, va1,va2,va3,va4,va5, addBoundNamesIdMap, addBoundNamesIdSet, addNamesIdSet, idMapToIdSet, anonymousIds, sillyId, etherealIds, isEtherealId, isInvalidId, isEmptyId, idSetToIdMap, mapMaybe...
m-alvarez/jhc
src/Name/Id.hs
mit
9,606
0
17
2,381
2,501
1,328
1,173
-1
-1
{-# LANGUAGE MagicHash #-} {- | Module : $Header$ Description : the abstract syntax of shared ATerms and their lookup table Copyright : (c) Klaus Luettich, C. Maeder, Uni Bremen 2002-2006 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : provisional Portab...
keithodulaigh/Hets
atermlib/src/ATerm/AbstractSyntax.hs
gpl-2.0
4,334
0
16
1,000
1,520
792
728
109
8
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="fa-IR"> <title>Advanced SQLInjection Scanner</title> <maps> <homeID>sqliplugin</homeID> ...
thc202/zap-extensions
addOns/sqliplugin/src/main/javahelp/help_fa_IR/helpset_fa_IR.hs
apache-2.0
981
77
66
157
409
207
202
-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="id-ID"> <title>ToDo-List</title> <maps> <homeID>todo</homeID> <mapref location="map.jhm...
kingthorin/zap-extensions
addOns/todo/src/main/javahelp/help_id_ID/helpset_id_ID.hs
apache-2.0
955
77
67
155
408
207
201
-1
-1
{-# LANGUAGE PatternGuards #-} module Idris.Elab.Utils where import Idris.AbsSyntax import Idris.Error import Idris.DeepSeq import Idris.Delaborate import Idris.Docstrings import Idris.Output import Idris.Core.TT import Idris.Core.Elaborate hiding (Tactic(..)) import Idris.Core.Evaluate import Idris.Core.Typecheck i...
mrmonday/Idris-dev
src/Idris/Elab/Utils.hs
bsd-3-clause
13,576
3
20
4,832
5,089
2,551
2,538
253
13
{-# LANGUAGE TypeFamilies, DataKinds, PolyKinds, UndecidableInstances #-} module T6018failclosed where -- Id is injective... type family IdClosed a = result | result -> a where IdClosed a = a -- ...but despite that we disallow a call to Id type family IdProxyClosed (a :: *) = r | r -> a where IdProxyClosed a...
wxwxwwxxx/ghc
testsuite/tests/typecheck/should_fail/T6018failclosed.hs
bsd-3-clause
2,408
0
8
637
544
340
204
36
0
import Module (message) import Distribution.Simple main = putStrLn ("Setup.hs: " ++ message) >> defaultMain
mydaum/cabal
cabal-testsuite/PackageTests/BuildTargets/UseLocalPackageForSetup/pkg/Setup.hs
bsd-3-clause
109
0
8
15
33
18
15
3
1
-- !!! Infix decls w/ infix data constructors -- GHC used to barf on this... module ShouldCompile where infix 2 |-, |+ ps |- q:qs = undefined ps |+ p:q:qs = undefined
siddhanathan/ghc
testsuite/tests/parser/should_compile/read030.hs
bsd-3-clause
177
0
7
42
48
26
22
-1
-1
import Drawing import Geometry main = drawPicture myPicture myPicture points = coordinates & drawPoints [a,b] & drawLabels [a,b] ["A","B"] & drawSegment (a,b) & message ("length AB = "++ show (dist a b)) where [a,b] = [(25,10),(50,16)]
alphalambda/k12math
contrib/MHills/GeometryLessons/code/teacher/key_lesson3N2.hs
mit
268
0
11
68
127
70
57
10
1
module Rebase.Control.Monad.RWS.Class ( module Control.Monad.RWS.Class ) where import Control.Monad.RWS.Class
nikita-volkov/rebase
library/Rebase/Control/Monad/RWS/Class.hs
mit
113
0
5
12
26
19
7
4
0
module Ai ( DoTurn , doTurn ) where import Control.Applicative import Control.Monad (join) import Data.List ((\\)) import qualified Data.Map as M import Data.Maybe (mapMaybe) import qualified Data.Set as S import Data.Graph.AS...
ornicar/haskant
src/Ai.hs
mit
5,049
0
14
1,272
1,718
924
794
110
3
{-# LANGUAGE TemplateHaskell #-} module Ffs.Options where import Control.Lens import Control.Lens.TH import Data.Time.Calendar import Data.Text import Data.Time.LocalTime (TimeZone) import Network.URI import System.Log.Logger as Log import System.FilePath import Text.ParserCombinators.ReadPrec hiding (choice) import ...
tcsc/ffs
src/Ffs/Options.hs
mit
1,709
0
13
379
446
258
188
62
1
import Data.List.Split import Data.List import System.IO transposta :: [[a]] -> [[a]] transposta ([]:_) = [] transposta x = (map head x) : transposta (map tail x) maior [x,y,z] | (x>=y) && (x>=z) = x | (y>=x) && (y>=z) = y | otherwise = z argmax t = do let (x,y) = foldl (\ (x,i) (y,j) -> ...
folivetti/PI-UFABC
AULA_07/Haskell/Dieta.hs
mit
1,623
2
18
433
794
416
378
30
2
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-} module Parser.Ast where import GlobalAst (SourceRange(..), TSize(..), BinOp(..), UnOp(..), TerminatorType(..), Source, location, Inline(..)) import Data.Generics.Uniplate.Direct type SourceFile = SourceFileT String data SourceFileT v = SourceFile { typeDefi...
elegios/datalang
src/Parser/Ast.hs
mit
6,487
0
12
2,186
2,164
1,166
998
147
0
{-# LANGUAGE GADTs #-} data Eql a b where Refl :: Eql a a sym :: Eql a b -> Eql b a sym Refl = Refl cong :: Eql a b -> Eql (f a) (f b) cong Refl = Refl trans :: Eql a b -> Eql b c -> Eql a c trans Refl Refl = Refl cast :: Eql a b -> a -> b cast Refl = id
riwsky/wiwinwlh
src/equal.hs
mit
262
0
8
80
165
78
87
11
1
module Language.Haskell.GhcEdit where testAdder :: Int -> Int -> Int testAdder = (+)
HanStolpo/ghc-edit
Language/Haskell/GhcEdit.hs
mit
87
0
6
15
27
17
10
3
1
-- This is a demo of guards. -- Since July 21 2013. module Main where main = do return () comparison x y | x < y = "The first is less" | x > y = "The second is less" | otherwise = "They are equal"
fossilet/yaht
guards.hs
mit
232
1
10
82
59
30
29
-1
-1
{-# LANGUAGE OverloadedStrings #-} import Data.Monoid((<>)) import Control.Applicative import Data.Attoparsec.Text import Data.Text import qualified Data.Text.Lazy.Builder as B import qualified Data.Text.Lazy.Builder.Int as B import qualified Data.Text.Lazy.Builder.RealFloat as B data Person = Person { firstName :...
hnfmr/beginning_haskell
chapter10/parseClients.hs
mit
2,573
0
26
599
917
478
439
44
1
{-# LANGUAGE TypeOperators #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE FlexibleContexts #-} module Free where import Control.Monad ( ap ) import Control.Monad.Fix import Subtype data Free f r = Free (f (Free f r)) | Pure r instance Funct...
djeik/fuckdown2
src/Free.hs
mit
1,625
0
11
431
691
348
343
38
1
module Euler.E10 where import Euler.Lib (primes) euler10 :: Integer -> Integer euler10 n = sum $ takeWhile (<n) $ primes main :: IO () main = print $ euler10 2000000
D4r1/project-euler
Euler/E10.hs
mit
169
0
8
33
70
38
32
6
1
{-# LANGUAGE ScopedTypeVariables #-} module Pianola.Protocol.IO ( RunInIOError(..), Endpoint(..), runProtocol ) where import Prelude hiding (catch,(.)) import System.IO import qualified Data.Text as T import Network import Data.Functor.Compose import Data.Bifunctor import Control.Applicat...
danidiaz/pianola
src/Pianola/Protocol/IO.hs
mit
2,424
0
17
594
623
340
283
55
1
module ClaimsSpec (spec) where import Protolude import qualified Data.HashMap.Strict as M import Test.Hspec import Data.Aeson (Value (..), toJSON) import Data.Time.Clock import PostgresWebsockets.Claims secret :: ByteString secret = "reallyreallyreallyreallyverysafe"...
diogob/postgrest-ws
test/ClaimsSpec.hs
mit
3,021
0
18
537
553
290
263
47
1
-- construct complete binary tree -- and iscompletetree function data Tree a = Empty | Branch a (Tree a) (Tree a) deriving Show p63 :: Int -> Tree Char p63 n = p63' 1 where p63' x | x > n = Empty | otherwise = Branch 'x' (p63' (2*x)) (p63' (2*x+1)) -- iscompletetree p63' :: ...
yalpul/CENG242
H99/61-69/p63.hs
gpl-3.0
591
0
13
198
274
137
137
13
4
{-# LANGUAGE CPP #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Hledger.Web.Application ( withApp ,withDevelAppPort ) where import Data.Dynamic (Dynamic, toDyn) import...
Lainepress/hledger
hledger-web/Hledger/Web/Application.hs
gpl-3.0
2,494
0
15
543
480
263
217
45
1
{-# LANGUAGE QuasiQuotes #-} -- | Attoparsec example -- Data is created from a pdf with : pdftotex -layout -- After reading the data, we count identical entries -- Structure : -- ID NAME PLACE BOSS -- ID = a letter followed by 3 digits -- name = a set of characters up to a place -- place = search into a list of places...
alexDarcy/shelly-examples
stages/src/JobParser.hs
gpl-3.0
3,968
1
13
986
1,024
554
470
86
1
module TypeBug9 where infixl 6 <*!> infixl 7 <$!> type Parser symbol result = [symbol] -> [(result,[symbol])] (<*!>) :: Parser s (a -> b) -> Parser s a -> Parser s b (<$!>) :: (a -> b) -> Parser s a -> Parser s b (<*!>) = undefined (<$!>) = undefined many :: Parser s a -> Parser s [a] many = undefined chai...
Helium4Haskell/helium
test/typeerrors/Examples/TypeBug9.hs
gpl-3.0
492
0
10
134
259
143
116
14
1