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 : Pipes.KeyValueCsv.IO
Copyright : (c) Marcin Mrotek, 2015
License : BSD3
Maintainer : marcin.jan.mrotek@gmail.com
Stability : experimental
File input and output.
-}
{-# LANGUAGE
DataKinds
, FlexibleContexts
, PolyKinds
, RankNTypes
, TypeOperators
#-}
modul... | marcinmrotek/pipes-key-value-csv | src/Pipes/KeyValueCsv/IO.hs | bsd-3-clause | 1,627 | 0 | 16 | 477 | 391 | 223 | 168 | 47 | 1 |
{-# LANGUAGE
BangPatterns
, RecordWildCards
, TransformListComp
#-}
-- | DNS Message builder.
module Network.DNS.Encode.Builders (
putDNSMessage
, putDNSFlags
, putHeader
, putDomain
, putMailbox
, putResourceRecord
) where
import Control.Monad.State (State, modify, execState, gets)
import q... | kazu-yamamoto/dns | internal/Network/DNS/Encode/Builders.hs | bsd-3-clause | 12,654 | 0 | 18 | 4,512 | 3,380 | 1,694 | 1,686 | 268 | 24 |
{-# LANGUAGE FlexibleContexts #-}
module Language.Mojito.Syntax.SExpr where
import Text.ParserCombinators.Parsec hiding (State)
import Control.Monad.Except
----------------------------------------------------------------------
-- S-Expressions
----------------------------------------------------------------------
--... | noteed/mojito | Language/Mojito/Syntax/SExpr.hs | bsd-3-clause | 4,913 | 0 | 14 | 957 | 1,420 | 698 | 722 | 119 | 2 |
{-# LANGUAGE BangPatterns #-}
module Language.BCoPL.DataLevel.ReduceNatExp (
-- * Types
Judge(OnNat,ReduceTo)
-- * Deducers
, deduceOne
, deduceDetL
, deduceDetR
, deduceMulti
-- * Sessions
, sessionDetL
, sessionDetR
, sessionMultiL
, sessionMultiR
, sessionMulti
, sessionOne
, se... | nobsun/hs-bcopl | src/Language/BCoPL/DataLevel/ReduceNatExp.hs | bsd-3-clause | 10,418 | 0 | 26 | 4,012 | 3,529 | 1,808 | 1,721 | 211 | 16 |
module Run where
import Data.Maybe (fromMaybe)
import Network.Mail.Mime
import Pipes
import Pipes.Prelude as P
import Pipes.Safe
import System.Environment
import System.Exit.Compat
import System.IO
import Systemd.Journal
... | zalora/journal-mailer | src/Run.hs | bsd-3-clause | 1,117 | 0 | 16 | 299 | 300 | 152 | 148 | 31 | 2 |
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable, DeriveGeneric #-}
{-# OPTIONS_GHC -Wall #-}
import Control.Distributed.Process
import Control.Distributed.Process.Closure
import Control.Monad
import Text.Printf
import GHC.Generics (Generic)
import Data.Binary
import Data.Typeable
import DistribUtils
-- <<Message
da... | mono0926/ParallelConcurrentHaskell | distrib-ping/ping-tc.hs | bsd-3-clause | 1,280 | 31 | 8 | 286 | 347 | 196 | 151 | 38 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Auth where
import Data.ByteString (ByteString)
import qualified Data.ByteString as BS
import Data.ByteString.Base64 (decode, encode)
import Data.Maybe (isJust)
import qualified Data.Text as T
... | odi/tcl-reservation | src/Auth.hs | bsd-3-clause | 2,350 | 0 | 18 | 647 | 478 | 254 | 224 | -1 | -1 |
import System.Process (runProcess, waitForProcess)
import System.Environment (getArgs)
import System.Exit (ExitCode (ExitSuccess), exitWith)
import Control.Monad (unless, when, forM_)
import System.Directory
import Data.List (isSuffixOf, isPrefixOf)
import qualified Codec.Archive.Tar as Tar
import qualified Codec.Archi... | yesodweb/cabal-src | cabal-src-install.hs | bsd-3-clause | 3,544 | 0 | 21 | 982 | 1,259 | 630 | 629 | 88 | 3 |
-- Taken from GHC: compiler/utils/Encoding.hs
import Text.Encoding.Z (zDecodeString)
import System.Environment (getArgs)
main :: IO ()
main = do
args <- getArgs
putStrLn . unwords $ map zDecodeString args
| Peaker/ghczdecode | zdecode.hs | bsd-3-clause | 211 | 0 | 8 | 34 | 61 | 32 | 29 | 6 | 1 |
{-# LANGUAGE Rank2Types, TypeSynonymInstances, DeriveDataTypeable #-}
{- |
Module : Data.FileStore.Types
Copyright : Copyright (C) 2009 John MacFarlane
License : BSD 3
Maintainer : John MacFarlane <jgm@berkeley.edu>
Stability : alpha
Portability : GHC 6.10 required
Type definitions ... | amplify-education/filestore | Data/FileStore/Types.hs | bsd-3-clause | 7,665 | 0 | 15 | 2,578 | 1,087 | 651 | 436 | 145 | 1 |
module Main (main) where
import System.Process
import Language.Mecha
import Language.Mecha.Examples.CSG
main :: IO ()
main = do
putStrLn "Writing file csg.scad. Opening with OpenSCAD ..."
writeFile "csg.scad" $ openSCAD $ scaleAll 10 $ csg
readProcess "OpenSCAD" ["csg.scad"] ""
return ()
| tomahawkins/mecha | mains/MechaExamples.hs | bsd-3-clause | 302 | 0 | 10 | 53 | 89 | 45 | 44 | 10 | 1 |
{-# LANGUAGE PatternSynonyms #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.APPLE.VertexArrayRange
-- Copyright : (c) Sven Panne 2019
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Porta... | haskell-opengl/OpenGLRaw | src/Graphics/GL/APPLE/VertexArrayRange.hs | bsd-3-clause | 1,060 | 0 | 5 | 131 | 93 | 65 | 28 | 17 | 0 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveAnyClass #-}
module System.Physics where
import Control.Monad.State
import Data.ECS
import Data.Yaml
import GHC.Generics
import Control.Lens.Extra
import Physics.Bullet
import Linear.Extra
import Control... | lukexi/extensible-ecs | app/System/Physics.hs | bsd-3-clause | 2,350 | 0 | 23 | 512 | 552 | 278 | 274 | 49 | 2 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
Pattern-matching bindings (HsBinds and MonoBinds)
Handles @HsBinds@; those at the top level require different handling,
in that the @Rec@/@NonRec@/etc structure is thrown away (whereas at
lower levels it is preserved with... | sdiehl/ghc | compiler/deSugar/DsBinds.hs | bsd-3-clause | 54,392 | 0 | 20 | 17,634 | 7,650 | 4,014 | 3,636 | 549 | 7 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
module Main where
import System.Process (shell, createProcess, readProcess)
import System.Directory (getHomeDirectory, doesDirectoryExist, getCurrentDirectory, setCurrentDirectory)
import System.FilePath.Posix ((</>))
import System.IO.Unsafe (unsafePer... | davidrusu/mastery | app/Main.hs | bsd-3-clause | 5,205 | 0 | 18 | 1,634 | 1,460 | 782 | 678 | 104 | 3 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE Ty... | Garygunn94/DFS | TransactionServer/.stack-work/intero/intero12761-oC.hs | bsd-3-clause | 8,200 | 42 | 38 | 2,045 | 2,074 | 1,037 | 1,037 | 166 | 6 |
module Data.Typewriter.Data ( module Data.Typewriter.Data.List
, module Data.Typewriter.Data.Nat
) where
import Data.Typewriter.Data.List
import Data.Typewriter.Data.Nat
| isomorphism/typewriter | Data/Typewriter/Data.hs | bsd-3-clause | 227 | 0 | 5 | 71 | 39 | 28 | 11 | 4 | 0 |
module Text.Highlighter.Lexers.CoffeeScript (lexer) where
import Text.Regex.PCRE.Light
import Text.Highlighter.Types
lexer :: Lexer
lexer = Lexer
{ lName = "CoffeeScript"
, lAliases = ["coffee-script", "coffeescript"]
, lExtensions = [".coffee"]
, lMimetypes = ["text/coffeescript"]
, lStart = root... | chemist/highlighter | src/Text/Highlighter/Lexers/CoffeeScript.hs | bsd-3-clause | 2,984 | 0 | 11 | 408 | 671 | 345 | 326 | 43 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
module Web.XING.Calls.User
(
demoUser, demoUser'
, demoUsers, demoUsers'
, getUsers
) where
import Web.XING.Types
import Web.XING.API
import Data.Aeson (encode, decode, Value(..), object, (.... | JanAhrens/xing-api-haskell | lib/Web/XING/Calls/User.hs | bsd-3-clause | 8,056 | 0 | 16 | 2,562 | 1,847 | 1,044 | 803 | 161 | 2 |
------------------------------------------------------------------------------
-- | This is the main interface, the only file you should need to import for REPL
------------------------------------------------------------------------------
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}... | Soostone/hs-d3 | src/Graphics/HSD3/D3/Render.hs | bsd-3-clause | 2,474 | 0 | 13 | 571 | 397 | 220 | 177 | 41 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleContexts #-}
module Main where
import Data.Attoparsec.ByteString.Char8 (Parser)
import qualified Data.Attoparsec.ByteString.Char8 as A (parseOnly, manyTill, anyChar, string, endOfLine, eitherP, endOfInput, sepBy1, many1, digit, char)
import Data.ByteString.Char8... | JAnthelme/ovpn-utilities | app/Main.hs | bsd-3-clause | 14,867 | 0 | 23 | 4,344 | 3,783 | 1,992 | 1,791 | 265 | 4 |
module Eval where
import EvalAST
import qualified Data.Map.Strict as Map
import Data.List (find, intercalate)
import Control.Monad.State
noop :: Block
noop = Block Nothing NobodyCares EmptyBlock
----------
applyPrefixOperation :: PrefixOperator -> Value -> Value
applyPrefixOperation Not (BoolValue b) = BoolValue $ n... | cg5-/continue | src/Eval.hs | bsd-3-clause | 9,493 | 0 | 22 | 1,887 | 2,754 | 1,401 | 1,353 | 127 | 4 |
module Web.TED.Types
( Cue(..)
, Paragraph(..)
, Transcript(..)
, transcriptToText
) where
import Data.Aeson
import Data.Text (Text)
import qualified Data.Text as T
import RIO
data Cue = Cue
{ time :: Int
, text :: Text
} deriving (Generic, Show)
instance FromJSO... | rnons/ted2srt | backend/src/Web/TED/Types.hs | bsd-3-clause | 749 | 0 | 14 | 189 | 249 | 141 | 108 | 26 | 1 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
-}
{-# LANGUAGE CPP, TupleSections, ViewPatterns #-}
module TcValidity (
Rank, UserTypeCtxt(..), checkValidType, checkValidMonoType,
ContextKind(..), expectedKindInCtxt,
checkValidTheta, checkValidFamPats,
checkVal... | tjakway/ghcjvm | compiler/typecheck/TcValidity.hs | bsd-3-clause | 77,534 | 4 | 24 | 21,622 | 11,818 | 6,079 | 5,739 | 872 | 15 |
-- | Song format parser
module Vimus.Song.Format (
SongFormat(..)
, parser
-- * exported for testing
, FormatTree(..)
, format
, meta
, alternatives
, parse
) where
import Control.Applicative (Alternative(..), pure, liftA2)
import Data.Default (Default(..))
import Data.Foldable (asum)
... | haasn/vimus | src/Vimus/Song/Format.hs | mit | 3,978 | 0 | 19 | 1,055 | 1,708 | 885 | 823 | 100 | 10 |
{-# LANGUAGE OverloadedStrings #-}
module FuncTorrent.Peer
(Peer(..),
PeerState(..),
handShake,
msgLoop
) where
import Prelude hiding (lookup, concat, replicate, splitAt)
import Control.Applicative (liftA3)
import Control.Monad (replicateM, liftM, forever)
import Data.Binary (Binary(..), decode... | harshavardhana/functorrent | src/FuncTorrent/Peer.hs | gpl-3.0 | 5,794 | 0 | 17 | 2,140 | 1,538 | 773 | 765 | 135 | 2 |
-- Copyright 2017 Google Inc.
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in ... | robinp/haskell-indexer | kythe-schema/src/Language/Kythe/Schema/Raw/VName.hs | apache-2.0 | 1,244 | 0 | 9 | 259 | 92 | 64 | 28 | 19 | 0 |
{-# LANGUAGE NoImplicitPrelude
, DataKinds
, TypeOperators
, TypeFamilies
, ScopedTypeVariables
, FlexibleContexts
#-}
{-# OPTIONS_GHC -Wall -fwarn-tabs #-}
module Tests.Relationships (allTests) where
import Prelude ((.), id, ($), asTypeOf)
import Lang... | zachsully/hakaru | haskell/Tests/Relationships.hs | bsd-3-clause | 11,372 | 0 | 24 | 3,282 | 3,910 | 2,106 | 1,804 | 226 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE OverloadedStrings #-}
-----------------------------------------------------------------------------
--
-- Module : I... | cocreature/leksah | src/IDE/Pane/PackageFlags.hs | gpl-2.0 | 10,233 | 0 | 21 | 3,101 | 2,586 | 1,339 | 1,247 | 227 | 3 |
module Base.Renderable.VBox (vBox) where
import Data.Abelian
import Graphics.Qt
import Utils
import Base.Types
import Base.Renderable.Common ()
data VBox = VBox Int [RenderableInstance]
-- | Creates a VBox, that will at least display n items.
-- Displays as much as possible.
vBox :: Renderable r => Int -> [r]... | changlinli/nikki | src/Base/Renderable/VBox.hs | lgpl-3.0 | 1,576 | 0 | 17 | 472 | 524 | 266 | 258 | 32 | 1 |
--------------------------------------------------------------------------------
-- | Demultiplexing of frames into messages
{-# LANGUAGE DeriveDataTypeable, OverloadedStrings #-}
module Network.WebSockets.Hybi13.Demultiplex
( FrameType (..)
, Frame (..)
, DemultiplexState
, emptyDemultiplexState
, ... | zodiac/websockets | src/Network/WebSockets/Hybi13/Demultiplex.hs | bsd-3-clause | 4,612 | 0 | 20 | 1,049 | 757 | 424 | 333 | 83 | 9 |
{-# LANGUAGE OverloadedStrings #-}
module IntegrationTests where
import Control.Exception
import Foreign.Ptr
import Foreign.Storable
import Test.QuickCheck
import Thrift.Protocol.Binary
import Thrift.Protocol.Compact
import Thrift.Protocol.JSON
import Thrift.Protocol.SimpleJSON
import Thrift.Transport
import Interfa... | Orvid/fbthrift | thrift/lib/hs/tests/IntegrationTests.hs | apache-2.0 | 2,041 | 0 | 14 | 400 | 512 | 260 | 252 | 48 | 1 |
{-# OPTIONS_JHC -fno-prelude -fffi #-}
-----------------------------------------------------------------------------
-- |
-- Module : Foreign.C.Error
-- Copyright : (c) The FFI task force 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer : ffi@haskell.org
-- Stability ... | m-alvarez/jhc | lib/jhc/Foreign/C/Error.hs | mit | 20,685 | 85 | 11 | 5,218 | 1,557 | 888 | 669 | -1 | -1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE RecursiveDo #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE KindSignatures #-}
module Graphics.Oedel.Terminal.W... | dzamkov/Oedel | src/Graphics/Oedel/Terminal/Widget.hs | mit | 4,186 | 0 | 16 | 974 | 1,009 | 575 | 434 | 68 | 1 |
-- |
-- Module: Math.NumberTheory.Primes.Factorisation.Montgomery
-- Copyright: (c) 2011 Daniel Fischer
-- Licence: MIT
-- Maintainer: Daniel Fischer <daniel.is.fischer@googlemail.com>
--
-- Factorisation of 'Integer's by the elliptic curve algorithm after Montgomery.
-- The algorithm is explained at
-- <ht... | cartazio/arithmoi | Math/NumberTheory/Primes/Factorisation/Montgomery.hs | mit | 17,967 | 0 | 24 | 5,010 | 4,360 | 2,390 | 1,970 | 268 | 13 |
module Main where
allEven :: [Integer] -> [Integer]
allEven [] = []
allEven (h:t) = if even h then h:allEven(t) else allEven(t)
main = print(allEven [1,2,3,4,5,6,7])
| skywind3000/language | haskell/all_even.hs | mit | 193 | 0 | 8 | 53 | 108 | 61 | 47 | 5 | 2 |
{-|
Description : Nix-relevant interfaces to NaCl signatures.
-}
module System.Nix.Signature
( Signature
, NarSignature(..)
) where
import System.Nix.Internal.Signature
| shlevy/hnix-store | hnix-store-core/src/System/Nix/Signature.hs | mit | 176 | 0 | 5 | 26 | 27 | 19 | 8 | 4 | 0 |
{-# LANGUAGE OverloadedStrings #-}
module BackendSpec.GamingSpec.HelperSpec (main, spec) where
import Test.Hspec
import Test.QuickCheck
import Game.Helper
import Data.Maybe
import Debug.Trace
import Linear.V2
firstLocation = (Location (V2 1.0 1.0) (V2 1.0 0.0))
main :: IO()
main = hspec spec
spec :: Spec
spec = de... | bruno-cadorette/TheLambdaReactor | test/BackendSpec/GamingSpec/HelperSpec.hs | mit | 1,493 | 0 | 16 | 426 | 664 | 328 | 336 | 35 | 1 |
{-# LANGUAGE PackageImports #-}
import "frelm-packages" Application (develMain)
import Prelude (IO)
main :: IO ()
main = develMain
| rgrempel/frelm.org | app/devel.hs | mit | 132 | 0 | 6 | 19 | 34 | 20 | 14 | 5 | 1 |
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE GADTs #-}
module Vyom.Term.UnitSym where
import Data.Kind (Type)
import Vyom
import Util (safeRead)
class UnitSym r where
unit :: r h ()
instance UnitSym Run where
unit = rop0 ()
instance UnitSym Pretty where
unit = sop0 ()
instance UnitSym Expr where
unit = ... | ajnsit/vyom | src/Vyom/Term/UnitSym.hs | mit | 694 | 0 | 11 | 145 | 262 | 131 | 131 | 20 | 1 |
import Data.Time
import Data.Time.Calendar (Day)
import Data.Time.Clock (diffUTCTime)
import Plow.Extras.Crontab
import Plow.Extras.Time
import Test.QuickCheck.Property (ioProperty)
import Test.QuickCheck.Instances ()
im... | plow-technologies/plow-extras | plow-extras-time/test/Main.hs | mit | 5,114 | 0 | 15 | 1,258 | 1,334 | 715 | 619 | 98 | 1 |
module Redmine (initRedmine) where
import Control.Applicative
import Control.Concurrent (withMVar, MVar, forkIO,
threadDelay)
import Control.Exception (handle, IOException)
import Data.Aeson (eitherDeco... | k00mi/bckspc-bot | src/Redmine.hs | mit | 5,238 | 0 | 25 | 1,764 | 1,547 | 789 | 758 | 114 | 3 |
{-# OPTIONS_GHC -Wall #-}
{-# LANGUAGE RecordWildCards #-}
import qualified Control.Foldl as L
import Data.Functor.Identity
import Data.Maybe (mapMaybe)
import Data.Sampling.Types
import Numeric.MCMC.Metropolis (chain, chain')
import System.Random.MWC
import Test.Hspec
withinPercent :: Double -> Double -> Double -> B... | jtobin/mighty-metropolis | test/Spec.hs | mit | 4,204 | 0 | 17 | 948 | 1,518 | 776 | 742 | 117 | 2 |
{-# LANGUAGE NoMonomorphismRestriction, DeriveFunctor #-}
module ProjectEuler.Problem149
( problem
) where
import Control.Monad
import Control.Monad.ST
import Data.Int
import Petbox
import qualified Data.Vector.Unboxed as VU
import qualified Data.Vector.Unboxed.Mutable as VUM
import ProjectEuler.Types
problem :... | Javran/Project-Euler | src/ProjectEuler/Problem149.hs | mit | 4,357 | 0 | 19 | 1,035 | 1,076 | 549 | 527 | 73 | 1 |
{-# LANGUAGE ConstraintKinds, DataKinds, FlexibleContexts, FlexibleInstances,
MultiParamTypeClasses, OverlappingInstances, TypeFamilies,
UndecidableInstances #-}
{- |
Module : Control.Monad.Levels.ConstraintPassing
Description : Whether a transformer allows a constraint to pass thro... | ivan-m/monad-levels | Control/Monad/Levels/ConstraintPassing.hs | mit | 1,515 | 0 | 8 | 271 | 119 | 71 | 48 | -1 | -1 |
{-# LANGUAGE CPP #-}
module GHCJS.DOM.WorkerLocation (
#if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT)
module GHCJS.DOM.JSFFI.Generated.WorkerLocation
#else
#endif
) where
#if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT)
import GHCJS.DOM.JSFFI.Gen... | plow-technologies/ghcjs-dom | src/GHCJS/DOM/WorkerLocation.hs | mit | 355 | 0 | 5 | 33 | 33 | 26 | 7 | 4 | 0 |
-- The solution of exercise 1.1
-- Give the result printed by the interpreter in response to each express-
-- ion. Assume that the sequence is to be evaluated in the order in which
-- it is presented.
a = 3
b = a + 1
result = do { print 10;
print (5 + 3 + 4);
print (9 - 1);
p... | perryleo/sicp | ch1/sicpc1e01.hs | mit | 1,065 | 0 | 15 | 625 | 315 | 168 | 147 | 26 | 7 |
{- ============================================================================
| Copyright 2011 Matthew D. Steele <mdsteele@alum.mit.edu> |
| |
| This file is part of Fallback. |
... | mdsteele/fallback | src/Fallback/View/Editor.hs | gpl-3.0 | 10,528 | 0 | 29 | 3,094 | 2,893 | 1,481 | 1,412 | -1 | -1 |
module FAtypes
( BDFA(..)
, BNFA(..)
, TNFA(..)
, ETNFA(..)
, Auto
, emptyTNFA
, trinfo
, info
, sons
)
where
import Set
import FiniteMap
import Options
import TA
import Ids -- provides instance Show Id
-- import Stuff -- provides instances Show Set, Show FiniteMap
-- bottom up deterministic
data BDFA a = BD... | jwaldmann/rx | src/FAtypes.hs | gpl-3.0 | 1,858 | 52 | 12 | 415 | 637 | 348 | 289 | 56 | 1 |
module QHaskell.Environment.Map (Env,pattern Emp,pattern Ext,len,get) where
import QHaskell.MyPrelude
import qualified QHaskell.Nat.ADT as NA
type Env a b = [(a , b)]
pattern Emp = []
pattern Ext x xs = x : xs
len :: Env a b -> NA.Nat
len Emp = NA.Zro
len (Ext _ xs) = NA.Suc (len xs)
len _ = ... | shayan-najd/QHaskell | QHaskell/Environment/Map.hs | gpl-3.0 | 480 | 0 | 11 | 122 | 234 | 126 | 108 | -1 | -1 |
module ConfigSpec where
import Control.Monad (unless)
import qualified Data.ByteString.Char8 as Bytes
import Data.Map
import qualified Data.YAML as Yaml
import Hadolint.Config
import Hadolint.Rule as Rule
import Test.HUnit
import Test.Hspec
tests :: SpecWith ()
tests =
describe "Config" $ do
it "Parses config w... | lukasmartinelli/hadolint | test/ConfigSpec.hs | gpl-3.0 | 5,047 | 0 | 20 | 1,696 | 1,188 | 621 | 567 | -1 | -1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.DeploymentManager.Types
-- Copyright : (c) 2015-2016 B... | brendanhay/gogol | gogol-deploymentmanager/gen/Network/Google/DeploymentManager/Types.hs | mpl-2.0 | 8,422 | 0 | 7 | 2,099 | 958 | 659 | 299 | 257 | 1 |
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ViewPatterns #-}
-- Module : Gen.Syntax
-- Copyright : (c) 2015-2016 Brendan Hay
-- License : Mozilla Public License, v. 2.0.
-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
-- Stability : provisional
-- Portabi... | brendanhay/gogol | gen/src/Gen/Syntax.hs | mpl-2.0 | 22,588 | 0 | 21 | 7,573 | 9,681 | 4,756 | 4,925 | 495 | 19 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.Language.Types
-- Copyright : (c) 2015-2016 Brendan Ha... | brendanhay/gogol | gogol-language/gen/Network/Google/Language/Types.hs | mpl-2.0 | 6,164 | 0 | 7 | 1,559 | 710 | 498 | 212 | 174 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.DoubleClickBids.Types.Sum
-- Copyright : (c) 2015-2016... | brendanhay/gogol | gogol-doubleclick-bids/gen/Network/Google/DoubleClickBids/Types/Sum.hs | mpl-2.0 | 313,813 | 0 | 11 | 55,581 | 28,865 | 15,185 | 13,680 | 4,451 | 0 |
{-# LANGUAGE DeriveDataTypeable, UnicodeSyntax, OverloadedStrings,
FlexibleContexts, RankNTypes #-}
module Text.LogMerger.Logs.COM
(
comLogFormat
, comStartLogFormat
) where
import Pipes.Dissect as Diss
import Control.Applicative
import Control.Monad
import Data.Attoparsec.By... | k32/visualsgsn | src/Text/LogMerger/Logs/COM.hs | unlicense | 3,026 | 0 | 22 | 860 | 749 | 411 | 338 | 79 | 3 |
import Control.Concurrent
type Process a b = (a->b)->[b->IO()]->IO ()
data ProcessData a b = ProcessData (a->b) [b->IO()]
executeProcess::ProcessData a b -> a -> IO()
executeProcess (ProcessData f dependencies) a = mapM_ (forkIO . ($ (f a))) dependencies
myDependencies = [print, printDouble, printTriple, printQuad,... | Crazycolorz5/Haskell-Code | EventHandling.hs | unlicense | 520 | 0 | 10 | 83 | 233 | 124 | 109 | 13 | 1 |
{-# LANGUAGE MultiParamTypeClasses, TypeFamilies, TypeOperators #-}
module Object.Types where
import Prelude hiding ((.))
import Control.Applicative
import Control.Monad
class Action object action output where
(.) :: object -> action -> output
data a := b = a := b deriving (Show,Read,Eq)
infixl 8 .
infixl 9 := | yokto/Object | Object/Types.hs | apache-2.0 | 316 | 0 | 8 | 50 | 94 | 56 | 38 | 10 | 0 |
#!/usr/bin/env stack
{-
stack
--resolver lts-11.10
--install-ghc
runghc
--package base
--
-hide-all-packages
-}
-- Copyright 2018 Google LLC. 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.
-- Y... | polux/snippets | sl_cps_defunc.hs | apache-2.0 | 3,266 | 0 | 12 | 692 | 1,276 | 652 | 624 | 64 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
{-|
Module: HaskHOL.Core.Ext
Copyright: (c) Evan Austin 2015
LICENSE: BSD3
Maintainer: e.c.austin@gmail.com
Stability: unstable
Portability: unknown
This module exports HaskHOL's non-trivial extensions to the underlying HOL
system, i.e. the compile time ope... | ecaustin/haskhol-core | src/HaskHOL/Core/Ext.hs | bsd-2-clause | 2,374 | 0 | 5 | 492 | 103 | 75 | 28 | 12 | 0 |
{-# LANGUAGE TupleSections #-}
-- | Alignment and synchronization. Currently works only with positional tagsets.
module NLP.Concraft.Morphosyntax.Align
( align
, sync
) where
import Prelude hiding (Word)
import Control.Applicative ((<|>))
import Data.Maybe (fromJust)
import ... | kawu/concraft | src/NLP/Concraft/Morphosyntax/Align.hs | bsd-2-clause | 3,094 | 1 | 13 | 834 | 1,033 | 556 | 477 | 51 | 3 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ViewPatterns #-}
-- | Parsing a CSV file row-by-row.
module CSVParsing where
import Control.Condition
import Control.Except... | chrisdone/conditions | examples/CSV.hs | bsd-3-clause | 2,835 | 0 | 30 | 1,291 | 589 | 293 | 296 | 66 | 6 |
module TypeUtilsSpec (main, spec) where
import Test.Hspec
import TestUtils
import qualified GHC.SYB.Utils as SYB
import qualified GHC as GHC
import qualified GhcMonad as GHC
import qualified Name as GHC
import qualified RdrName as GHC
import qualified Module as GHC
... | mpickering/HaRe | test/TypeUtilsSpec.hs | bsd-3-clause | 205,994 | 0 | 40 | 50,576 | 39,274 | 19,587 | 19,687 | -1 | -1 |
{-# OPTIONS_GHC -XBangPatterns -fglasgow-exts -XUndecidableInstances #-}
-- | Ideals are represented as lists of tuples consisting of
-- a Poly and a Sugar.
module Yaiba.Ideal where
import Yaiba.Monomial
import Yaiba.Polynomial
import Yaiba.Sugar
import qualified Data.List as DL
import qualified Data.Vector as DV
impo... | jeremyong/Yaiba | Yaiba/Ideal.hs | bsd-3-clause | 6,757 | 0 | 20 | 3,146 | 1,773 | 914 | 859 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE BangPatterns #-}
module Main where
import Control.Applicative
import qualified Data.ByteString.Lazy as BS
import Data.Csv
import Data.List (nub, sort)
import qualified Data.Map as M
import Data.Text.Lazy ... | thsutton/fca | test/fca-test.hs | bsd-3-clause | 3,610 | 0 | 18 | 1,103 | 932 | 456 | 476 | 80 | 1 |
module Input where
import Graphics.UI.GLUT
import Data.IORef
import Control.Monad
import Game
-- | handle input from keyboard
input gameRef (Char 'j') Down = modifyIORef gameRef $ go (-1)
input gameRef (Char 'j') Up = modifyIORef gameRef $ go 0
input gameRef (Char 'k') Down = modifyIORef gameRef $ go (1)
input game... | flazz/tooHS | src/Input.hs | bsd-3-clause | 448 | 0 | 8 | 82 | 182 | 91 | 91 | 11 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
module Main where
import Vaultaire.Collector.Common.Process
import Vaultaire.Collector.Common.Types
import Control.Exception
import Control.Monad
import Control.Monad.Reader
import Contro... | anchor/vaultaire-collector-vaultaire-telemetry | src/Main.hs | bsd-3-clause | 2,877 | 0 | 15 | 858 | 787 | 421 | 366 | 66 | 2 |
{-# LANGUAGE CPP, BangPatterns #-}
module Language.Haskell.GhcMod.Find where
import Data.Function (on)
import Data.List (groupBy, sort)
import Data.Maybe (fromMaybe)
import qualified GHC as G
import Language.Haskell.GhcMod.Browse (browseAll)
import Language.Haskell.GhcMod.Monad
import Language.Haskell.GhcMod.Convert
... | darthdeus/ghc-mod-ng | Language/Haskell/GhcMod/Find.hs | bsd-3-clause | 1,686 | 0 | 14 | 279 | 412 | 234 | 178 | 29 | 1 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-| This module provides implementations of cryptographic utilities that only
work for GHC (as opposed to GHCJS)
-}
module Dhall.Crypto (
SHA256Digest(..)
, sha256DigestFromByteString
, sha256Hash
, toString
... | Gabriel439/Haskell-Dhall-Library | dhall/ghc-src/Dhall/Crypto.hs | bsd-3-clause | 1,477 | 0 | 10 | 285 | 251 | 148 | 103 | 26 | 1 |
import Data.Char (digitToInt)
solve input = maximum $ rec 12 digits where
digits = map digitToInt $ concat $ words input
rec 0 xs = xs
rec n xs = zipWith (*) xs $ rec (n - 1) (tail xs)
main = (print . solve) =<< readFile "input/p008_input.txt"
| foreverbell/project-euler-solutions | src/8.hs | bsd-3-clause | 258 | 0 | 10 | 62 | 117 | 59 | 58 | 6 | 2 |
-- 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/Ordinal/RO/Corpus.hs | bsd-3-clause | 1,686 | 0 | 9 | 691 | 261 | 159 | 102 | 48 | 1 |
-- Source: https://github.com/bsl/GLFW-b-demo
-- Adapted to move a basic object around the screen in 2D
{-# LANGUAGE TemplateHaskell #-}
module Main (main) where
--------------------------------------------------------------------------------
import Control.Concurrent.STM (TQueue, atomically, newTQueue... | cmahon/opengl-examples | executable/Move.hs | bsd-3-clause | 7,879 | 0 | 20 | 1,986 | 2,343 | 1,155 | 1,188 | 166 | 14 |
{-# LANGUAGE MultiParamTypeClasses #-}
-- | Vacuum world implementation, with agents
module AIMA.Agent.Vacuum where
import Prelude hiding (Left, Right)
import qualified Data.Map as M
import Data.Map (Map)
import AIMA.Agent.Core
--------------------------------
-- VacuumWorld implementation --
-----------------------... | tomsmalley/aima | src/AIMA/Agent/Vacuum.hs | bsd-3-clause | 3,641 | 0 | 13 | 1,053 | 1,262 | 679 | 583 | 63 | 1 |
module Data.IGraph.Basic
( vCount
, eCount
) where
import Data.IGraph.Internal
import Data.IGraph.Internal.Constants
import Data.IGraph.Types
import Foreign hiding (unsafePerformIO)
import Foreign.C
import System.IO.Unsafe (unsafePerformIO)
import Control.Monad (unless)
-- | 2. The basic interface
-- | 2.... | kaizhang/igraph | Data/IGraph/Basic.hs | bsd-3-clause | 862 | 0 | 7 | 153 | 197 | 111 | 86 | 20 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE BangPatterns #-}
{-|
Module : $Header$
CopyRight : (c) 8c6794b6
License : BSD3
Maintainer : 8c6794b6@gmail.com
Stability : unstable
Portability : non-portable
Simple adhoc ixset search indexer ... | 8c6794b6/ixfts | ixfts.hs | bsd-3-clause | 9,682 | 0 | 36 | 2,244 | 2,812 | 1,454 | 1,358 | 225 | 2 |
-- !!! hiding an entity T (where T is both a type and a dcon.)
module M where
import Mod124_A hiding (T)
--x :: T
x = T
| FranklinChen/Hugs | tests/static/mod125.hs | bsd-3-clause | 122 | 0 | 5 | 30 | 20 | 14 | 6 | 3 | 1 |
{-# LANGUAGE FlexibleContexts #-}
-- | Variation of "Futhark.CodeGen.ImpCode" that contains the notion
-- of a kernel invocation.
module Futhark.CodeGen.ImpCode.Kernels
( Program
, Function
, FunctionT (Function)
, Code
, KernelCode
, HostOp (..)
, KernelOp (..)
, CallKernel (..)
, MapKernel (..)
, ... | CulpaBS/wbBach | src/Futhark/CodeGen/ImpCode/Kernels.hs | bsd-3-clause | 6,354 | 0 | 21 | 2,012 | 1,684 | 873 | 811 | 149 | 3 |
{-# LANGUAGE OverloadedStrings #-}
module Trombone.Parse
( lines
, uri
, method
, parseRoutesFromFile
) where
import Control.Monad
import Data.Aeson ( decode, eitherDecode )
import Data.List ( foldl' )
import Data.List.Util... | johanneshilden/principle | Trombone/Parse.hs | bsd-3-clause | 12,724 | 0 | 17 | 3,642 | 3,614 | 1,787 | 1,827 | 299 | 4 |
import Distribution.Simple
import Distribution.Simple.InstallDirs
import Distribution.Simple.LocalBuildInfo
import Distribution.PackageDescription
import System
-- After Epic is built, we need a run time system.
-- FIXME: This is probably all done the wrong way, I don't really understand
-- Cabal properly...
buildL... | avsm/EpiVM | Setup.hs | bsd-3-clause | 1,215 | 0 | 12 | 332 | 229 | 117 | 112 | 19 | 1 |
module Pos.Core.Metrics.Constants (
cardanoNamespace
, withCardanoNamespace
) where
import Universum
cardanoNamespace :: Text
cardanoNamespace = "cardano"
withCardanoNamespace :: Text -> Text
withCardanoNamespace label = cardanoNamespace <> "." <> label
| input-output-hk/cardano-sl | core/src/Pos/Core/Metrics/Constants.hs | apache-2.0 | 317 | 0 | 6 | 92 | 54 | 32 | 22 | 8 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Control.Comonad.Density
-- Copyright : (C) 2008 Edward Kmett
-- License : BSD-style (see the file LICENSE)
--
-- Maintainer : Edward Kmett <ekmett@gmail.com>
-- Stability : experimental
-- Portability : no... | urska19/MFP---Samodejno-racunanje-dvosmernih-preslikav | Control/Comonad/Density.hs | apache-2.0 | 3,624 | 7 | 13 | 629 | 1,047 | 544 | 503 | -1 | -1 |
{-# LANGUAGE FlexibleContexts, TypeFamilies #-}
{-|
An implementation of the game Tic Tac Toe.
Try playing against the minimax algorithm by running in GHCi:
>>> playTicTacToe
Valid moves are the integers [0..8], where each integer names square of
the board, starting in the upper left and proceeding in the order tha... | pparkkin/Hagl | Hagl/Examples/TicTacToe.hs | bsd-3-clause | 2,797 | 0 | 12 | 680 | 755 | 408 | 347 | 49 | 2 |
module LintSpec where
import Language.Haskell.GhcMod
import Test.Hspec
import TestUtils
spec :: Spec
spec = do
describe "lint" $ do
it "can detect a redundant import" $ do
res <- runD $ lint "test/data/hlint.hs"
res `shouldBe` "test/data/hlint.hs:4:8: Error: Redundant do\NULFound:\... | cabrera/ghc-mod | test/LintSpec.hs | bsd-3-clause | 614 | 0 | 18 | 165 | 114 | 56 | 58 | 14 | 1 |
{-# LANGUAGE RankNTypes, NamedFieldPuns, RecordWildCards #-}
module Distribution.Server.Features.Distro (
DistroFeature(..),
DistroResource(..),
initDistroFeature
) where
import Distribution.Server.Framework
import Distribution.Server.Features.Core
import Distribution.Server.Features.Users
import Distr... | edsko/hackage-server | Distribution/Server/Features/Distro.hs | bsd-3-clause | 11,955 | 0 | 23 | 3,025 | 2,735 | 1,417 | 1,318 | 202 | 11 |
{-
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[PrelInfo]{The @PrelInfo@ interface to the compiler's prelude knowledge}
-}
{-# LANGUAGE CPP #-}
module PrelInfo (
wiredInIds, ghcPrimIds,
primOpRules, builtinRules,
ghcPrimExports,
knownKeyNames,
primOpId,
... | elieux/ghc | compiler/prelude/PrelInfo.hs | bsd-3-clause | 6,445 | 0 | 12 | 1,954 | 728 | 406 | 322 | 70 | 4 |
{- |
Module : $Header$
Description : automatic proofs in the development graph calculus
Copyright : (c) Jorina F. Gerken, Mossakowski, Luettich, Uni Bremen 2002-2006
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Christian.Maeder@dfki.de
Stability : provisional
Portability : non-portable(... | mariefarrell/Hets | Proofs/Automatic.hs | gpl-2.0 | 4,107 | 0 | 19 | 1,022 | 806 | 426 | 380 | 68 | 3 |
{-# LANGUAGE ScopedTypeVariables #-}
-- | Support for the LB (LambdaBot) monad
module LBState (
-- ** Functions to access the module's state
readMS, withMS, modifyMS, writeMS,
accessorMS,
-- ** Utility functions for modules that need state for each target.
GlobalPrivate(global),... | zeekay/lambdabot | LBState.hs | mit | 5,291 | 0 | 20 | 1,228 | 1,443 | 769 | 674 | 83 | 2 |
{-# LANGUAGE BangPatterns #-}
{-| External data loader.
This module holds the external data loading, and thus is the only one
depending (via the specialized Text\/Rapi\/Luxi modules) on the actual
libraries implementing the low-level protocols.
-}
{-
Copyright (C) 2009, 2010, 2011, 2012 Google Inc.
This program i... | vladimir-ipatov/ganeti | src/Ganeti/HTools/ExtLoader.hs | gpl-2.0 | 10,807 | 0 | 18 | 2,688 | 2,679 | 1,379 | 1,300 | 218 | 5 |
{-# LANGUAGE TypeFamilies #-}
-- Module : Data.UUID.Builder
-- Copyright : (c) 2009 Mark Lentczner
--
-- License : BSD-style
--
-- Maintainer : markl@glyphic.com
-- Stability : experimental
-- Portability : portable
--
-- This module provides a system that can call a function that takes
-- a sequence of ... | necrobious/uuid | Data/UUID/Builder.hs | bsd-3-clause | 2,808 | 0 | 10 | 689 | 495 | 288 | 207 | 40 | 0 |
module PackageTests.BuildDeps.TargetSpecificDeps3.Check where
import Test.Tasty.HUnit
import PackageTests.PackageTester
import System.FilePath
import Data.List
import qualified Control.Exception as E
import Text.Regex.Posix
suite :: FilePath -> Assertion
suite ghcPath = do
let spec = PackageSpec
{ di... | corngood/cabal | Cabal/tests/PackageTests/BuildDeps/TargetSpecificDeps3/Check.hs | bsd-3-clause | 1,016 | 0 | 15 | 259 | 223 | 118 | 105 | 24 | 1 |
module Cow where
import Bee
fish = honeyEater
| Numberartificial/workflow | snipets/src/Craft/Chapter15/Cow.hs | mit | 48 | 0 | 4 | 10 | 12 | 8 | 4 | 3 | 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="ur-PK">
<title>Call Graph</title>
<maps>
<homeID>callgraph</homeID>
<mapref location="m... | thc202/zap-extensions | addOns/callgraph/src/main/javahelp/help_ur_PK/helpset_ur_PK.hs | apache-2.0 | 961 | 77 | 66 | 156 | 407 | 206 | 201 | -1 | -1 |
{-# LANGUAGE TemplateHaskell #-}
module T4364 where
data Z
type N0 = $( [t| Z |] )
type N1 = $( [t| Z |] )
| urbanslug/ghc | testsuite/tests/th/T4364.hs | bsd-3-clause | 109 | 0 | 6 | 27 | 36 | 26 | 10 | -1 | -1 |
import Control.Concurrent
import GHC.Conc
import Data.List
import Data.Maybe
main = do
t1 <- forkIO (threadDelay 100000000)
m <- newEmptyMVar
t2 <- forkIO (takeMVar m)
t3 <- forkIO (let loop = do r <- tryTakeMVar m;
_ <- newEmptyMVar -- do some allocation :(
... | ghc-android/ghc | testsuite/tests/concurrent/should_run/conc070.hs | bsd-3-clause | 508 | 0 | 18 | 165 | 188 | 89 | 99 | 17 | 2 |
{- # LANGUAGE MonoLocalBinds # -}
module Main where
import T4809_IdentityT (IdentityT(..), XML, runIdentityT)
import T4809_XMLGenerator (XMLGenT(..), XMLGen(genElement), Child, EmbedAsChild(..), unXMLGenT)
import System.IO (BufferMode(..), hSetBuffering, stdout)
page :: XMLGenT (IdentityT IO) XML
page = genElement (N... | urbanslug/ghc | testsuite/tests/typecheck/should_run/T4809.hs | bsd-3-clause | 645 | 0 | 10 | 120 | 171 | 99 | 72 | 11 | 1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
module Shed.IndexServer.Postgresql where
import Control.Monad
import Data.Aeson.Types (Value (..))
import qualified Data.Map as M
import Data.Maybe ... | dbp/shed | src/Shed/IndexServer/Postgresql.hs | isc | 3,670 | 0 | 15 | 898 | 830 | 430 | 400 | 54 | 0 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Shed.Indexer where
import Control.Applicative ((<|>))
import Control.Logging (log')
import Control.Monad (msum, void, when)
import Data.Aeson ... | dbp/shed | src/Shed/Indexer.hs | isc | 1,288 | 0 | 15 | 413 | 343 | 189 | 154 | 35 | 2 |
{-# htermination insert :: Int -> [Int] -> [Int] #-}
import List
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/List_insert_5.hs | mit | 65 | 0 | 3 | 12 | 5 | 3 | 2 | 1 | 0 |
module Data.ReedSolomon.Backend (
Backend(..)
) where
import Data.Word (Word8)
import Control.Monad.ST (ST)
import Data.Vector.Storable as SV (Vector, MVector)
data Backend s = Backend { backendName :: String
, backendGalMulSlice :: Word8
... | NicolasT/reedsolomon | src/Data/ReedSolomon/Backend.hs | mit | 752 | 0 | 13 | 432 | 143 | 81 | 62 | 14 | 0 |
module DrvDiffMake where
import Derivation
import DrvDiff
import Data.List
makeDrvDiff :: Derivation -> Derivation -> DrvDiff
makeDrvDiff l r = uncurry DrvDiff $
(DrvPart, DrvPart)
`tuply` diffWith listDiff drvOutputs
`tuply` diffWith listDiff drvInputs
`tuply` diffWith listDiff drvSources
`tuply` d... | DavidEGrayson/drvdiff | src/DrvDiffMake.hs | mit | 881 | 0 | 13 | 197 | 403 | 219 | 184 | 23 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.