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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
-- This file is formatted with Ormolu
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
module Types
( Named (..),
NamedIcon,
IconInfo,
Icon (..),
SyntaxNode (..),
NodeName (..),
Port (..),
NameAndP... | rgleichman/glance | app/Types.hs | gpl-3.0 | 5,269 | 0 | 10 | 1,078 | 1,305 | 769 | 536 | 124 | 1 |
module Frame.Data
( Payload
, getPayload
, mkPayload
, putPayload
, endStreamF
, isEndStream
, paddedF
, isPadded
, getData
) where
import qualified Data.Binary.Get as Get
import qualified Data.Binary.Put as Put
import qualified Frame.Internal.Padding as Padding
import Control.Monad.Except(ExceptT)
import C... | authchir/SoSe17-FFP-haskell-http2-server | src/Frame/Data.hs | gpl-3.0 | 1,534 | 0 | 14 | 240 | 447 | 253 | 194 | -1 | -1 |
import System.IO
import Control.Monad
main = main' 0
main' counter = do
p <- hIsEOF stdin
-- to swap above line to IsEOF requires extra import
unless p $ do
x <- getLine
let newLength = length x
let ellipsis = if newLength > 50 then "..." else ""
-- display shows line count starting at 1
-- need to allow say ... | xpika/line-size | Main.hs | gpl-3.0 | 503 | 0 | 20 | 114 | 155 | 73 | 82 | 12 | 2 |
{-|
Module : Data.Map.KDMap
Description : KD map data structure for storing spike amplitudes.
Undocumented, will be replaced by kdt package.
Copyright : (c) 2015 Greg Hale, Shea Levy
License : BSD3
Maintainer : imalsogreg@gmail.com
Stability : experimental
Portability : GHC, Linux
-}
{-# LA... | imalsogreg/arte-ephys | tetrode-ephys/src/Data/Map/KDMap.hs | gpl-3.0 | 7,926 | 0 | 18 | 2,353 | 3,455 | 1,766 | 1,689 | 173 | 3 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
-- |
-- Module : Network.Google.CloudSearch
-- Copyright : (c) 2015-2016 Brendan Hay
-- License : Mozilla ... | brendanhay/gogol | gogol-cloudsearch/gen/Network/Google/CloudSearch.hs | mpl-2.0 | 35,762 | 0 | 47 | 7,597 | 3,865 | 2,782 | 1,083 | 926 | 0 |
{-# LANGUAGE TemplateHaskell, LambdaCase #-}
module Model.Identity.Types
( Identity(..)
, MonadHasIdentity
, extractFromIdentifiedSessOrDefault
, identityVerf
, identityAdmin
, identitySuperuser
) where
import qualified Data.ByteString as BS
import Has (Has(..), MonadHas)
import Model.Id.Types
import Mo... | databrary/databrary | src/Model/Identity/Types.hs | agpl-3.0 | 3,108 | 0 | 14 | 538 | 553 | 310 | 243 | -1 | -1 |
import Test.HUnit
import System.Exit
import Algebra.Graph ( Graph, vertexCount, empty, vertex, vertices, edge, edges, overlay
, edgeList)
import Data.List (nub)
import TopoGraph
import TopoList(assertTopoListEq)
oneV = vertex 0
oneE = edge 0 1
loop = edge 0 0
island = vertices [0, 1]
path2 = edges... | yjwen/hada | test/TestTopoGraph.hs | lgpl-3.0 | 7,473 | 0 | 13 | 2,254 | 2,516 | 1,396 | 1,120 | 152 | 2 |
{-# LANGUAGE GADTs #-}
module Network.Haskoin.Crypto.ExtendedKeys
( XPubKey(..)
, XPrvKey(..)
, ChainCode
, KeyIndex
, DerivationException(..)
, makeXPrvKey
, deriveXPubKey
, prvSubKey
, pubSubKey
, hardSubKey
, xPrvIsHard
, xPubIsHard
, xPrvChild
, xPubChild
, xPubID
, xPrvID
, xPubFP
, xPrvFP
, xPubAddr
, xPubExport
... | tphyahoo/haskoin | haskoin-core/Network/Haskoin/Crypto/ExtendedKeys.hs | unlicense | 25,150 | 0 | 14 | 6,016 | 6,281 | 3,309 | 2,972 | -1 | -1 |
{-#LANGUAGE DeriveDataTypeable#-}
module Data.P440.Domain.BNS where
import Data.P440.Domain.SimpleTypes
import Data.P440.Domain.ComplexTypes
import Data.P440.Domain.ComplexTypesZS (НаДатуИлиЗаПериод, СвБанкИлиСвУБР)
import Data.Typeable (Typeable)
import Data.Text (Text)
-- 2.11 Справка о наличии счетов
data Файл ... | Macil-dev/440P-old | src/Data/P440/Domain/BNS.hs | unlicense | 2,023 | 78 | 8 | 457 | 759 | 422 | 337 | 50 | 0 |
module Main where
import Criterion.Main
import Control.Lens
import Control.Monad.Trans.Class ( lift )
import Control.Monad.Trans.Either ( EitherT(..)
, runEitherT
, hoistEither )
import ... | mkiefel/trueskill | bench_app.hs | bsd-2-clause | 4,239 | 0 | 15 | 1,773 | 765 | 418 | 347 | 74 | 2 |
{-# LANGUAGE BangPatterns #-}
import Data.List
import Data.Maybe
data Mintree = Leaf !Integer !Integer
| Node !Integer !Integer !Integer !Mintree !Mintree deriving Show
tmin (Leaf m _) = m
tmin (Node m _ _ _ _) = m
buildtree xs = snd (buildtree' 0 (fromIntegral $ (length xs) - 1) xs)
buildtree' a b x... | pbl64k/HackerRank-Contests | 2014-02-07-FP/RangeMinimumQuery/rmq.accepted.hs | bsd-2-clause | 1,587 | 0 | 13 | 590 | 739 | 371 | 368 | 58 | 4 |
-- | fluid_log is not present because it is a vararg function
-- and ffi to them is deprecated:
--
-- \"Note that for a C function defined to accept a variable number of arguments,
-- all arguments beyond the explicitly typed arguments suffer argument promotion.
-- However, because C permits the calling convent... | projedi/fluidsynth-hs-complete | src/Sound/Fluidsynth/Log.hs | bsd-3-clause | 2,534 | 0 | 13 | 515 | 522 | 275 | 247 | 51 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
module High.Functor.Bifunctor where
import High.Functor.PFunctor (PFunctor)
import High.Functor.QFunctor (QFunctor)
data Bifunctor :: ((* -> *) -> (* -> *) -> *) -> ((* -> *) -> (* -> *) -> *) -... | Hexirp/untypeclass | src/High/Functor/Bifunctor.hs | bsd-3-clause | 553 | 0 | 13 | 125 | 206 | 119 | 87 | 12 | 0 |
import System.Nemesis
import System.Nemesis.Utils
import Prelude hiding ((-))
main = run nemesis
nemesis = do
clean
[ "**/*.hi"
, "**/*.o"
, "manifest"
]
desc "dist"
task "dist" - do
sh "cabal clean"
sh "cabal configure"
sh "cabal sdist"
desc "watch hs"
task "watch-hs" - do
... | nfjinjing/nemesis | Nemesis.hs | bsd-3-clause | 482 | 0 | 10 | 121 | 129 | 58 | 71 | 20 | 1 |
module Network.LambNyaa.Sink (
Sink (..), sink, sink_, printItem, seen, unseen
) where
import Data.Monoid
import Network.LambNyaa.Config
import Network.LambNyaa.Item
import Network.LambNyaa.Database
newtype Sink = Sink {unSink :: Config -> [Item] -> IO ()}
-- | Create a Sink from any IO action.
sink :: (Config ... | valderman/lambnyaa | Network/LambNyaa/Sink.hs | bsd-3-clause | 999 | 0 | 16 | 219 | 368 | 201 | 167 | 24 | 1 |
module TaskList
( dispatch
) where
import Euclid
import FastDegree
import GeneratePrimeNumber
import qualified RSA as R
import Factorization
import CustomCodes
dispatch :: String -> [String] -> IO ()
dispatch "-extend-euclid" params = case params of
... | GOGEN/rsa | app/TaskList.hs | bsd-3-clause | 3,545 | 0 | 15 | 1,842 | 650 | 328 | 322 | 55 | 8 |
divide :: Double -> Double -> Double
divide 0 b = b
divide a b = b / a
| YoshikuniJujo/funpaala | samples/07_polymorphic/divide0.hs | bsd-3-clause | 71 | 0 | 6 | 19 | 38 | 19 | 19 | 3 | 1 |
{-# OPTIONS -cpp #-}
-- OPTIONS required for ghc-6.4.x compat, and must appear first
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -cpp #-}
{-# OPTIONS_NHC98 -cpp #-}
{-# OPTIONS_JHC -fcpp #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.InstallSymlink... | IreneKnapp/Faction | faction/Distribution/Client/InstallSymlink.hs | bsd-3-clause | 10,568 | 0 | 10 | 2,844 | 170 | 105 | 65 | 142 | 4 |
module Day24 where
import Data.Function
import Data.List
partOne = product $ head $ sortOn product $ head $
groupBy ((==) `on` length) $
sortOn length $
filter (\xs -> genericSum xs == weightNeeded 3 && g xs 3) $ subsequences input
partTwo = product $ head $ sortOn product $ head $
groupB... | z0isch/advent-of-code | src/Day24.hs | bsd-3-clause | 822 | 0 | 12 | 199 | 328 | 165 | 163 | 17 | 1 |
{-# OPTIONS_GHC -w #-}
{-# OPTIONS_HADDOCK hide #-}
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Text.PrettyPrint.Leijen
-- Copyright : Daan Leijen (c) 2000, http://www.cs.uu.nl/~daan
-- License : BSD-style (see the file LICENSE)
--
--... | osa1/language-lua | src/Text/PrettyPrint/Leijen.hs | bsd-3-clause | 31,470 | 0 | 16 | 7,804 | 4,780 | 2,747 | 2,033 | 303 | 10 |
module Karamaan.Opaleye.Operators (operatorName) where
-- TODO vv I put this take 5 in here because the query strings were getting
-- too long and postgres was complaining that it was truncating them.
-- This is really just a temporary fix, because I'd like to keep the
-- possibility of long names but postprocess the ... | karamaan/karamaan-opaleye | Karamaan/Opaleye/Operators.hs | bsd-3-clause | 530 | 0 | 7 | 94 | 80 | 46 | 34 | 4 | 1 |
{- | This module provides the /Simplify RHS/ processor.
@
|- <simp(S#) / simp(W#) + W, Q, T#> :f
------------------------------------------
|- <S# / W# + W, Q, T#> :f
@
, where @simp(R#)@ removes @ri@ from right-hand sides @c_n(r_1,...,r_n)@ if no instance of @ri@ can be rewritten, ie. if
there is no o... | ComputationWithBoundedResources/tct-trs | src/Tct/Trs/Processor/DP/DPGraph/SimplifyRHS.hs | bsd-3-clause | 5,310 | 0 | 17 | 1,381 | 1,128 | 627 | 501 | -1 | -1 |
{- |
Module : Ptk.Journal
Description : `ptk journal` command tree for the puffy toolkit
Copyright : 2014, Peter Harpending
License : BSD3
Maintainer : Peter Harpending <pharpend2@gmail.com>
Stability : experimental
Portability : Linux
-}
module Ptk.Journal (jTree, journalTree, journalHelp) where... | pharpend/puffytools | ptk/Ptk/Journal.hs | bsd-3-clause | 1,424 | 0 | 7 | 423 | 198 | 116 | 82 | 27 | 1 |
module Ivory.BSP.STM32.Peripheral.UART
( module Ivory.BSP.STM32.Peripheral.UART.Peripheral
, module Ivory.BSP.STM32.Peripheral.UART.Regs
, module Ivory.BSP.STM32.Peripheral.UART.Types
) where
import Ivory.BSP.STM32.Peripheral.UART.Peripheral
import Ivory.BSP.STM32.Peripheral.UART.Regs
import Ivory.BSP.STM32.P... | GaloisInc/ivory-tower-stm32 | ivory-bsp-stm32/src/Ivory/BSP/STM32/Peripheral/UART.hs | bsd-3-clause | 342 | 0 | 5 | 30 | 68 | 53 | 15 | 7 | 0 |
module Main where
-- This is a Haskell translation of the official GLFW quick example
-- found at <http://www.glfw.org/docs/3.0/quick.html#quick_example>
-- using the GLFW-b library, version 1.x
-- I tried hard to keep the same structure so that it is simple
-- enough to go back and forth between the C version and th... | alpmestan/glfw-b-quick-example | Main.hs | bsd-3-clause | 3,002 | 0 | 16 | 715 | 839 | 406 | 433 | 57 | 2 |
module T where -- this shits me
import Sample
test_sanity = True | peteg/TBC | Sample/Tests/00_loadable.hs | bsd-3-clause | 64 | 0 | 4 | 11 | 13 | 9 | 4 | 3 | 1 |
module Graph where
import Control.Monad
import Control.Monad.State
import Index
import Verilog
import Data.Graph.Inductive
import Data.Graph.Inductive.Query.DFS
import Data.Graph.Inductive.Dot
import Data.Graph.Inductive.NodeMap
import Data.List
import Control.Arrow
import Debug.Trace
import System.Random
import quali... | wuerges/vlsi_verification | src/Graph.hs | bsd-3-clause | 7,727 | 0 | 14 | 1,984 | 2,401 | 1,235 | 1,166 | 176 | 8 |
{-# LANGUAGE OverloadedStrings, CPP #-}
module Main where
#ifndef TLS
import Control.Monad (when)
#endif
import Data.Version (showVersion)
import Network.Wai.Application.Classic hiding ((</>), (+++))
import System.Directory (getCurrentDirectory)
import System.Environment (getArgs, getEnvironment)
import System.Exit (... | mietek/mighttpd2 | src/Mighty.hs | bsd-3-clause | 3,290 | 0 | 16 | 866 | 868 | 432 | 436 | 78 | 3 |
{-# LANGUAGE OverloadedStrings #-}
module Webcrank.Internal.ETag where
import Control.Applicative
import Data.Attoparsec.ByteString.Char8 (parseOnly, string)
import Data.ByteString (ByteString)
import Webcrank.Internal.Parsers
import Webcrank.Internal.Types
-- | Compares two @ETag@s for equality, only considering t... | webcrank/webcrank.hs | src/Webcrank/Internal/ETag.hs | bsd-3-clause | 1,040 | 0 | 10 | 171 | 270 | 148 | 122 | 20 | 2 |
module System.TellMe where
import Control.Monad (void)
import Data.Default (Default(..))
import Graphics.UI.Gtk
data Position = Top | Bottom
deriving (Show, Eq)
data Config = Config { screenNumber :: Int
, monitorNumber :: Int
, barHeight :: Int
, barP... | izuk/tellme | src/System/TellMe.hs | bsd-3-clause | 2,067 | 0 | 15 | 732 | 580 | 288 | 292 | 56 | 2 |
-- | This module defines messages from player to debugger
module IMsg
(
IMsg(..),
AMF(..),
AMFValue(..),
amfUndecoratedName,
nextIMessage
)
where
import Data.Word (Word8, Word16, Word32)
import Data.ByteString (ByteString, pack)
import qualified Data.ByteString.Char8 as BSChar
import qualified Data.Iteratee as I
imp... | Yuras/hfd | src/IMsg.hs | bsd-3-clause | 10,504 | 0 | 16 | 2,276 | 3,538 | 1,753 | 1,785 | 266 | 22 |
-- Given N,M, this runs N copies of an M-deep pipeline1.
| rrnewton/Haskell-CnC | examples/empty_task_topologies/par_pipelines.hs | bsd-3-clause | 59 | 0 | 2 | 12 | 3 | 2 | 1 | 1 | 0 |
module Homework7.Tree where
import Data.Monoid
data Tree v a = Leaf v a | Branch v (Tree v a) (Tree v a)
tag :: Monoid v => Tree v a -> v
tag (Leaf _ _) = mempty
tag (Branch _ x y) = tag x <> tag y
branch :: Monoid v => Tree v a -> Tree v a -> Tree v a
branch x y = Branch (tag x <> tag y) x y
search :: Monoid v => ... | gabluc/CIS194-Solutions | src/Homework7/Tree.hs | bsd-3-clause | 561 | 0 | 13 | 178 | 353 | 170 | 183 | 16 | 2 |
{-# LANGUAGE TupleSections, OverloadedStrings #-}
module Himpress.Compile
(compile)
where
import Himpress.Transitions
import Data.Lenses (fetch)
import Data.Monoid
import Data.List (mapAccumL)
import Data.Text (pack)
import Data.Map (fromList)
import Text.Blaze (Html,toHtml)
-- Protoslides - ie. slides w... | matthewSorensen/himpress | Himpress/Compile.hs | bsd-3-clause | 2,685 | 0 | 12 | 795 | 842 | 471 | 371 | 43 | 4 |
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE OverloadedStrings #-}
module Pact.MockDb where
import Pact.Types.Runtime
import Data.Aeson
import Data.String
import Data.Default
import Pact.Interpreter
rc :: a -> Method e a
rc = const . return
newtype MockRead =
MockRead (forall k v . (IsString k,FromJSON v) =>
... | kadena-io/pact | src-ghc/Pact/MockDb.hs | bsd-3-clause | 2,063 | 0 | 13 | 438 | 759 | 413 | 346 | 53 | 1 |
{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE RankNTypes #-}
-- | Network-related logic that's mostly methods and dialogs between
-- nodes. Also see "Pos.Chain.Block.Network.Retrieval" for retrieval worker
-- loop logic.
module Pos.Network.Block.Logic
(
BlockNetLogicException (..)
,... | input-output-hk/pos-haskell-prototype | lib/src/Pos/Network/Block/Logic.hs | mit | 16,755 | 0 | 21 | 4,139 | 3,240 | 1,706 | 1,534 | -1 | -1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE DuplicateRecordFields #-}
module Language.LSP.Types.CodeLens where
import Data.Aeson
import Data.Aeson.TH
import Language.LSP.Types.Command
import Language.LSP.Types.Location
import Language.LSP.Types.Progress
import Language.LSP.Types.TextDocument
import Language.L... | alanz/haskell-lsp | lsp-types/src/Language/LSP/Types/CodeLens.hs | mit | 2,015 | 0 | 9 | 313 | 285 | 168 | 117 | 35 | 0 |
------------------------------------------------------------------------
-- |
-- Module : ALife.Realtra.GeneratePopulation
-- Copyright : (c) Amy de Buitléir 2012-2014
-- License : BSD-style
-- Maintainer : amy@nualeargais.ie
-- Stability : experimental
-- Portability : portable
--
-- ???
--
-------... | mhwombat/creatur-realtra.OLD | src/ALife/Realtra/GeneratePopulation.hs | bsd-3-clause | 2,239 | 0 | 12 | 368 | 516 | 283 | 233 | 45 | 1 |
module Network.AMQP.Protocol where
import Control.Monad
import Data.Binary
import Data.Binary.Get
import Data.Binary.Put
import qualified Data.ByteString.Lazy.Char8 as BL
import Network.AMQP.Types
import Network.AMQP.Generated
--True if a content (contentheader and possibly contentbody) will follow the method
hasCo... | bitemyapp/amqp | Network/AMQP/Protocol.hs | bsd-3-clause | 3,169 | 0 | 13 | 674 | 817 | 406 | 411 | 73 | 1 |
module Vectorise.Type.TyConDecl (
vectTyConDecls
) where
import GhcPrelude
import Vectorise.Type.Type
import Vectorise.Monad
import Vectorise.Env( GlobalEnv( global_fam_inst_env ) )
import BuildTyCl( TcMethInfo, buildClass, buildDataCon, newTyConRepName )
import OccName
import Class
import Type
import TyCon
import... | shlevy/ghc | compiler/vectorise/Vectorise/Type/TyConDecl.hs | bsd-3-clause | 9,526 | 1 | 15 | 3,237 | 1,762 | 920 | 842 | 153 | 1 |
import Util
import Timing
import Randomish
import System.Environment
import Control.Exception
import qualified TreeLookupVectorised as TD
import qualified Data.Array.Parallel.PArray as P
import qualified Data.Vector.Unboxed as V
main
= do args <- getArgs
case args of
... | mainland/dph | dph-lifted-vseg/examples/treeLookup/Main.hs | bsd-3-clause | 908 | 0 | 14 | 325 | 253 | 135 | 118 | 28 | 2 |
{-| Cluster rebalancer.
-}
{-
Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc.
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 your option) any later ... | dblia/nosql-ganeti | src/Ganeti/HTools/Program/Hbal.hs | gpl-2.0 | 15,326 | 0 | 19 | 4,316 | 3,695 | 1,858 | 1,837 | 308 | 4 |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="ms-MY">
<title>Getting started Guide</title>
<maps>
<homeID>top</homeID>
<mapref locat... | rnehra01/zap-extensions | src/org/zaproxy/zap/extension/gettingStarted/resources/help_ms_MY/helpset_ms_MY.hs | apache-2.0 | 967 | 79 | 66 | 158 | 411 | 208 | 203 | -1 | -1 |
{- System.Directory without its conflicting isSymbolicLink
-
- Copyright 2016 Joey Hess <id@joeyh.name>
-
- License: BSD-2-clause
-}
-- Disable warnings because only some versions of System.Directory export
-- isSymbolicLink.
{-# OPTIONS_GHC -fno-warn-tabs -w #-}
module Utility.SystemDirectory (
module System.D... | ArchiveTeam/glowing-computing-machine | src/Utility/SystemDirectory.hs | bsd-2-clause | 399 | 2 | 5 | 56 | 34 | 23 | 11 | 4 | 0 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE OverloadedStrings #-}
module StaticFiles where
import Yesod.Static
staticFiles "static"
| danse/haskellers | StaticFiles.hs | bsd-2-clause | 136 | 0 | 5 | 17 | 17 | 10 | 7 | 5 | 0 |
data TestType = Foo | Bar
hello :: String
hello = 'H':"ello World!"
-- ziguser = zig
zig :: [TestType]
zig = (Foo:zag)
zag :: [TestType]
zag = Bar:zig
main = print hello
| themattchan/tandoori | input/input-2.hs | bsd-3-clause | 197 | 0 | 6 | 60 | 71 | 41 | 30 | 8 | 1 |
module DependencyTest
( tests
)
where
import Test.HUnit
import Data.Graph.Inductive.Graph ( Graph(..) )
import Database.Schema.Migrations.Dependencies
import Common
tests :: [Test]
tests = depGraphTests ++ dependencyTests
type DepGraphTestCase = ([TestDependable], Either String (DependencyGraph TestDependab... | nathankot/dbmigrations | test/DependencyTest.hs | bsd-3-clause | 3,528 | 0 | 12 | 1,159 | 1,130 | 655 | 475 | 59 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
module T8455 where
ty = [t| 5 |]
| sdiehl/ghc | testsuite/tests/quotes/T8455.hs | bsd-3-clause | 105 | 0 | 4 | 18 | 15 | 12 | 3 | -1 | -1 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
Utilities for desugaring
This module exports some utility functions of no great interest.
-}
{-# LANGUAGE CPP #-}
-- | Utility functions for constructing Core syntax, principally for desugaring
module DsUtils (
... | tjakway/ghcjvm | compiler/deSugar/DsUtils.hs | bsd-3-clause | 35,951 | 0 | 19 | 10,432 | 5,338 | 2,780 | 2,558 | -1 | -1 |
{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE PolyKinds #-}
{... | sdiehl/ghc | testsuite/tests/dependent/should_compile/T14038.hs | bsd-3-clause | 2,379 | 22 | 20 | 691 | 1,000 | 575 | 425 | -1 | -1 |
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAG... | ezyang/ghc | testsuite/tests/typecheck/should_compile/T12734.hs | bsd-3-clause | 2,628 | 0 | 10 | 632 | 733 | 409 | 324 | -1 | -1 |
{-# LANGUAGE GADTs, RankNTypes #-}
-- Test pattern bindings, existentials, and higher rank
module T12427a where
data T where
T1 :: a -> ((forall b. [b]->[b]) -> Int) -> T
T2 :: ((forall b. [b]->[b]) -> Int) -> T
-- Inference
-- Worked in 7.10 (probably wrongly)
-- Failed in 8.0.1
-- Fails in 8.2 because v is po... | ezyang/ghc | testsuite/tests/typecheck/should_compile/T12427a.hs | bsd-3-clause | 976 | 0 | 13 | 225 | 250 | 144 | 106 | 13 | 1 |
-- -----------------------------------------------------------------------------
--
-- (c) The University of Glasgow 2012
--
-- Monadic streams
--
-- -----------------------------------------------------------------------------
{-# LANGUAGE CPP #-}
module Stream (
Stream(..), yield, liftIO,
collect, fromList,
... | urbanslug/ghc | compiler/utils/Stream.hs | bsd-3-clause | 3,608 | 0 | 18 | 905 | 1,022 | 526 | 496 | 56 | 2 |
-- Test grouping with both a using and a by clause
{-# OPTIONS_GHC -XMonadComprehensions -XTransformListComp #-}
module Main where
import Data.List(groupBy)
import GHC.Exts(the)
groupRuns :: Eq b => (a -> b) -> [a] -> [[a]]
groupRuns f = groupBy (\x y -> f x == f y)
main = putStrLn (show output)
where
output... | siddhanathan/ghc | testsuite/tests/deSugar/should_run/mc06.hs | bsd-3-clause | 464 | 0 | 11 | 132 | 183 | 103 | 80 | 11 | 1 |
{-# LANGUAGE PackageImports #-}
module Rocketfuel.Input (
keyIsPressed,
readMouse,
Click (..),
MouseStatus (..),
updateCommand
) where
import "GLFW-b" Graphics.UI.GLFW as GLFW
import Control.Monad
import Rocketfuel.Types
type Coords = (Integer, Integer)
data MouseStatus = Clicked | Released
data C... | Raveline/Rocketfuel | src/Rocketfuel/Input.hs | mit | 2,938 | 0 | 13 | 720 | 801 | 421 | 380 | 55 | 5 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeOperators #-}
module Impl.TVar1 where
import Control.Concurrent.STM
import Control.Monad.IO.Class
import Control.Monad.Trans.Either
import Data.HashMap.Strict (HashMap)
import qual... | AndrewRademacher/whimsy | src/Impl/TVar1.hs | mit | 2,001 | 0 | 17 | 632 | 556 | 276 | 280 | 53 | 3 |
module Main where
import Control.Monad (forever)
import Data.Char (toLower)
import Data.List (intersperse, nub)
import Data.Maybe (isJust)
import System.Exit (exitSuccess)
import System.Random (randomRIO)
main :: IO ()
main = do
word <- rand... | mikegehard/haskellBookExercises | hangman/src/Main.hs | mit | 3,624 | 0 | 14 | 1,050 | 1,103 | 547 | 556 | 105 | 3 |
module Main where
import Prelude hiding (catch)
import Control.Exception ( AsyncException(..), catch )
import Control.Monad.Error
import Data.Version
import Data.List
import System.IO
import System.Environment
import System.Directory (getHomeDirectory)
import System.FilePath ((</>))
import System.Console.Haskeline h... | hatappo/egison-tutorial | Main.hs | mit | 20,686 | 0 | 25 | 5,262 | 3,375 | 1,774 | 1,601 | 366 | 12 |
module ProgrammingInHaskell2.Chap05Spec (spec) where
import SpecHelper
import ProgrammingInHaskell2.Chap05
spec :: Spec
spec = do
describe "5.1" $ do
it "[x^2 | x <- [1..5]]" $ do
[x^2 | x <- [1..5]] `shouldBe` [1,4,9,16,25]
describe "5.2 Guards" $ do
it "factors" $ do
factors 15 `should... | akimichi/haskell-labo | test/ProgrammingInHaskell2/Chap05Spec.hs | mit | 1,031 | 0 | 17 | 253 | 526 | 295 | 231 | 27 | 1 |
{-# htermination addListToFM_C :: (b -> b -> b) -> FiniteMap (Ratio Int) b -> [((Ratio Int),b)] -> FiniteMap (Ratio Int) b #-}
import FiniteMap
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/FiniteMap_addListToFM_C_7.hs | mit | 144 | 0 | 3 | 25 | 5 | 3 | 2 | 1 | 0 |
module NES.Emulator.Debug where
import Data.Word (Word8, Word16)
import Data.Bits ((.|.))
import Debug.Trace (trace)
import Text.Printf (printf)
import NES.CPU(Flag(..))
import NES.Instruction
import NES.MonadEmulator
import NES.Emulator
import NES.EmulatorHelpers
emulateCycles :: MonadEmulator m => Int -> m ()
emul... | ksaveljev/hNES | NES/Emulator/Debug.hs | mit | 1,560 | 0 | 15 | 377 | 585 | 299 | 286 | 38 | 7 |
{-# LANGUAGE
TypeOperators
, MultiParamTypeClasses
, FlexibleInstances
, OverlappingInstances
, FlexibleContexts #-}
module Calculus.Expr where
{-
This module generalizes expressions.
-}
import Auxiliary.List
import Auxiliary.NameSource
import Data.Functor
import Control.Monad.State
-- Coproduct type definit... | wowofbob/calculus | Calculus/Expr.hs | mit | 3,924 | 4 | 11 | 1,092 | 1,078 | 563 | 515 | -1 | -1 |
module Zwerg.Data.HP
( HP
, adjustHP
, adjustMaxHP
) where
import Zwerg.Prelude
newtype HP = MkHP (Int, Int)
deriving stock Generic
deriving anyclass Binary
validHP :: (Int,Int) -> Bool
validHP (curHP, maxHP) = curHP >= 0 && curHP <= maxHP && maxHP > 0
instance ZWrapped HP (Int, Int) where
unwra... | zmeadows/zwerg | lib/Zwerg/Data/HP.hs | mit | 962 | 0 | 9 | 228 | 400 | 215 | 185 | -1 | -1 |
-- file: ch03/ListADT.hs
-- From chapter 3, http://book.realworldhaskell.org/read/defining-types-streamlining-functions.html
data List a = Cons a (List a)
| Nil
deriving (Show)
fromList (x:xs) = Cons x (fromList xs)
fromList [] = Nil
| Sgoettschkes/learning | haskell/RealWorldHaskell/ch03/ListADT.hs | mit | 244 | 0 | 8 | 41 | 67 | 36 | 31 | 5 | 1 |
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.SVGStringList
(js_clear, clear, js_initialize, initialize, js_getItem, getItem,
js_insertItemBefore, insertItemBefore, js_replaceItem, replaceItem,
js_removeItem, removeItem, js_appendItem, ... | plow-technologies/ghcjs-dom | src/GHCJS/DOM/JSFFI/Generated/SVGStringList.hs | mit | 5,018 | 64 | 11 | 862 | 1,109 | 617 | 492 | 85 | 1 |
{-# LANGUAGE FlexibleContexts, FlexibleInstances, MultiParamTypeClasses, TemplateHaskell, TupleSections, TypeFamilies, TypeSynonymInstances #-}
module SpaceWeather.FeaturePack where
import Control.Lens
import Control.Monad.Trans.Either
import Control.Monad.IO.Class
import qualified Data.Aeson.TH as Aeson
import qualif... | nushio3/UFCORIN | src/SpaceWeather/FeaturePack.hs | mit | 4,218 | 0 | 20 | 949 | 1,216 | 649 | 567 | 97 | 4 |
module TestTCP (
tests4
,tests6
) where
-- local imports
import Network.Transport.Sockets.TCP
import TransportTestSuite
-- external imports
import Test.Framework
-----------------------------------------------------------------------------
--------------------------------------------------------------------... | hargettp/courier | tests/TestTCP.hs | mit | 924 | 0 | 10 | 181 | 187 | 98 | 89 | 34 | 1 |
module ExLint.Types
( Block(..)
, Language(..)
, Example(..)
, CheckResult(..)
, Plugin(..)
) where
import Data.Monoid ((<>))
import Data.Text (Text)
import Text.Markdown.Block (Block(..))
data Language
= Haskell
| Unknown
deriving Show
data Example = Example
{ examplePlugin :... | pbrisbin/ex-lint | src/ExLint/Types.hs | mit | 740 | 0 | 10 | 199 | 215 | 132 | 83 | 29 | 0 |
{-# LANGUAGE OverloadedStrings #-}
import CheckConcreteSyntax hiding (main)
import CheckQuantityBehaviour hiding (main)
import CheckSkeletonParser hiding (main)
import CheckTranslationPhase hiding (main)
import Core.System
import Test.Hspec (Spec, hspec)
main :: IO ()
main = do
finally (hspec suite) (putStrLn ".")
... | oprdyn/technique | tests/TestSuite.hs | mit | 439 | 0 | 9 | 61 | 113 | 63 | 50 | 16 | 1 |
{-|
Module : Lambdajudge
Description : Easily host haskell based coding competitions using Lambdajudge library
Copyright : (c) Ankit Kumar, Venugopal, Safal 2015
License : MIT
Maintainer : ankitkumar.itbhu@gmail.com
Stability : experimental
Portability : POSIX
-}
{-# LANGUAGE OverloadedStrings #-}
{-# ... | venugangireddy/Lambdajudge | src/Lambdajudge.hs | mit | 3,627 | 0 | 19 | 840 | 878 | 456 | 422 | 68 | 4 |
-----------------------------------------------------------------------------
--
-- Module : Language.PureScript.CodeGen.Common
-- Copyright : (c) Phil Freeman 2013
-- License : MIT
--
-- Maintainer : Phil Freeman <paf31@cantab.net>
-- Stability : experimental
-- Portability :
--
-- |
-- Common code ... | bergmark/purescript | src/Language/PureScript/CodeGen/Common.hs | mit | 3,960 | 0 | 12 | 1,333 | 671 | 386 | 285 | 101 | 1 |
{-# LANGUAGE OverloadedStrings, TypeSynonymInstances, FlexibleInstances #-}
module Y2017.M10.D05.Exercise where
{--
Yesterday, I said: "Go out to the database, get some data, analyze it and chart
it." Well, that's all good if you can work on the problem when you have access
to the internet at large to retrieve your d... | geophf/1HaskellADay | exercises/HAD/Y2017/M10/D05/Exercise.hs | mit | 3,937 | 0 | 9 | 655 | 454 | 261 | 193 | 43 | 1 |
import FPPrac
merge [] ys = ys
merge xs [] = xs
merge (x:xs) (y:ys) | x <= y = x : merge xs (y:ys)
| otherwise = y : merge (x:xs) ys
mSort :: Ord a => [a] -> [a]
mSort [] = []
mSort [x] = [x]
mSort xs = let (as, bs) = splitAt (length xs `quot` 2) xs
in merge (mSort as) (mSort bs)
| tcoenraad/functioneel-programmeren | practica/serie2/10.merge-sort.hs | mit | 314 | 0 | 12 | 101 | 211 | 107 | 104 | 10 | 1 |
-- Atari 2600 6507 CPU --
module Cpu where
import Data.Word
import Data.Bits
import Data.Int
import Control.Monad.State.Strict
import Control.Applicative hiding ((<|>), many, optional, empty)
import qualified Data.Vector.Unboxed as VU
data CPU = CPU {
registers :: Registers,
memory :: Memory,
cycles :: ... | RossMeikleham/NesMonad | src/Cpu.hs | mit | 10,856 | 0 | 19 | 2,866 | 3,722 | 1,952 | 1,770 | 269 | 7 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-instancegroupconfig-cloudwatchalarmdefinition.html
module Stratosphere.ResourceProperties.EM... | frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/EMRInstanceGroupConfigCloudWatchAlarmDefinition.hs | mit | 8,289 | 0 | 13 | 573 | 904 | 512 | 392 | 67 | 1 |
module FVL.EF
( F.Result(..)
, Expr(..)
, showTranslation
, run
, ParseError
, parseRun
, parseFileRun
) where
import FVL.Algebra
import qualified FVL.FAST as FAST
import qualified FVL.F as F
import FVL.EFAST
import FVL.Parser
argument :: String -> [String] -> Bool
argument s [] = False
argument s (x:xs) = if x == s ... | burz/Feval | FVL/EF.hs | mit | 3,733 | 0 | 14 | 856 | 2,024 | 1,004 | 1,020 | 98 | 5 |
module Geometry (
sphereVolume,
sphereArea,
cubeVolume,
cubeArea,
cuboidVolume,
cuboidArea
) where
sphereVolume :: Float -> Float
sphereVolume radius = (4.0 / 3.0) * pi * (radius ^ 3)
sphereArea :: Float -> Float
sphereArea radius = 4 * pi * (radius ^ 2)
cubeVolume :: Float -> Float
cubeVolume side =... | afronski/playground-fp | books/learn-you-a-haskell-for-great-good/modules/Geometry.hs | mit | 718 | 0 | 10 | 155 | 272 | 142 | 130 | 21 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Main where
import Nanomsg
import Test.Framework.TH (defaultMainGenerator)
import Test.Framework.Providers.QuickCheck2 (testProperty)
import Test.QuickCheck
import Test.QuickCheck.Monadic
import Data.ByteS... | ivarnymoen/nanomsg-haskell | tests/Properties.hs | mit | 6,398 | 0 | 21 | 2,363 | 2,098 | 943 | 1,155 | 190 | 1 |
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
module Main (main) where
import qualified Graphics.UI.SDL as SDL
import qualified Graphics.UI.SDL.Image as Image
import Graphics.UI.SDL.Types
import Control.Monad.State hiding (state)
import Shared.Assets
import Shared.Drawing
import Shared.L... | Rydgel/haskellSDL2Examples | src/lesson17.hs | gpl-2.0 | 4,735 | 0 | 15 | 879 | 1,673 | 905 | 768 | 89 | 1 |
module Cryptography.ComputationalProblems.Abstract where
import Notes
import Functions.Basics.Macro
import Functions.Basics.Terms
import Logic.FirstOrderLogic.Macro
import Probability.Distributions.Macro
import Probability.ProbabilityMeasure.Macro
import ... | NorfairKing/the-notes | src/Cryptography/ComputationalProblems/Abstract.hs | gpl-2.0 | 10,349 | 0 | 23 | 3,108 | 3,764 | 1,959 | 1,805 | 177 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
module Handler.Loan where
import Import
import Handler.Home (loanForm
,displayInputForm
,initLoan
)
import Handler.Util (Loan (..)
,initErrors
,loanValidation
,anyEr... | bartoszw/yelca | Handler/Loan.hs | gpl-2.0 | 12,972 | 0 | 28 | 5,199 | 1,395 | 705 | 690 | -1 | -1 |
{- |
Module : $EmptyHeader$
Description : <optional short description entry>
Copyright : (c) <Authors or Affiliations>
License : GPLv2 or higher, see LICENSE.txt
Maintainer : <email>
Stability : unstable | experimental | provisional | stable | frozen
Portability : portable | non-portable (<reason>... | nevrenato/Hets_Fork | mini/Proof.hs | gpl-2.0 | 2,021 | 0 | 21 | 560 | 647 | 318 | 329 | 40 | 8 |
{---------------------------------------------------------------------}
{- Copyright 2015, 2016 Nathan Bloomfield -}
{- -}
{- This file is part of Feivel. -}
{- ... | nbloomf/feivel | src/Feivel/Grammar/Expr.hs | gpl-3.0 | 8,493 | 0 | 11 | 1,926 | 2,233 | 1,243 | 990 | 184 | 0 |
module Main where
import Development.Hake
import Development.Hake.FunSetRaw
import Variables
main = hake rules
rules = [
dflt [ "hello" ]
,
rule exeSffx objSffx $ \t s -> [ [cc, "-o", t] ++ s ]
,
rule objSffx cSffx $ \_ s -> [ [cc, "-c"] ++ s ]
,
task "clean" [ ["rm", "hello" ++ exeSffx, "hello" ++ objSffx]... | YoshikuniJujo/hake_haskell | examples/testHakefileIs/hakeMain.hs | gpl-3.0 | 326 | 0 | 10 | 75 | 135 | 78 | 57 | 10 | 1 |
import XMonad
main = xmonad $ def
{
borderWidth = 10,
terminal = "terminator",
normalBorderColor = "#ffffff",
focusedBorderColor = "#0000ee"
}
| wno-git/dotfiles | xmonad/.xmonad/xmonad.hs | gpl-3.0 | 184 | 0 | 7 | 62 | 39 | 24 | 15 | 6 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Util.Date (
PrettyDiffTime (..), NominalDiffTime, Rfc822Date (..)
, getDiffTime
) where
import Prelude
import Control.Monad
import Control.Monad.IO.Class
import Data.Time.Clock (
UTCTime (..), NominalDiffTime, getCurrentTime, diffUTCTime
)
import Data.... | RaphaelJ/getwebb.org | Util/Date.hs | gpl-3.0 | 894 | 0 | 7 | 146 | 185 | 115 | 70 | 17 | 1 |
{-# LANGUAGE TemplateHaskell, TypeFamilies, TypeSynonymInstances, FlexibleInstances, DeriveDataTypeable #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Web.Crew.User.DB where
import Control.Monad.Reader
import Control.Monad.State
import Data.Acid
import qualified Data.Map.Strict as M
imp... | schell/scottys-crew | Web/Crew/User/DB.hs | gpl-3.0 | 1,480 | 0 | 13 | 356 | 536 | 276 | 260 | 38 | 3 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
module Misc.HtmlSpec where
import Data.Text (Text)
import qualified Data.Text as Text
import Misc.Html
import SpecHelper
data Person = Person
{ nP :: String
, mP :: String
, oP :: String
}
spec :: Spec
spec... | inq/agitpunkt | spec/Misc/HtmlSpec.hs | agpl-3.0 | 4,491 | 0 | 18 | 1,897 | 823 | 439 | 384 | 100 | 1 |
{-# language FlexibleInstances, MultiParamTypeClasses, DeriveFunctor #-}
-- | state monad that can be caught
module Control.Monad.CatchState (
CatchState,
runCatchState,
) where
import Control.Monad.State.Class
import Control.Monad.IO.Class
import Control.Monad.CatchIO as CatchIO
import Control.Concurren... | nikki-and-the-robots/nikki | src/Control/Monad/CatchState.hs | lgpl-3.0 | 1,948 | 0 | 13 | 455 | 628 | 320 | 308 | 42 | 1 |
{-# LANGUAGE DeriveFunctor #-}
-- Non-monadic tree labeling:
import Control.Monad
data Tr a = Lf a | Br (Tr a) (Tr a)
deriving Show
tr1 = Br (Lf 'a') (Br (Br (Lf 'b') (Lf 'a')) (Lf 'd'))
type Lt a = (Tr (S, a))
type S = Int
label :: Tr a -> Lt a
label tr = snd (lab tr 0)
where
lab :: Tr a -> S ... | egaburov/funstuff | Haskell/monads/zenmonad/Mumble002.hs | apache-2.0 | 1,521 | 0 | 12 | 544 | 637 | 335 | 302 | 38 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Spark.Core.Internal.TypesFunctions(
isNullable,
iInnerStrictType,
columnType,
unsafeCastType,
intType,
arrayType,
compatibleTypes,
arrayType',
frameTypeFromCol,
colTypeFromFrame,
canNull,
structField,
structType,
... | krapsh/kraps-haskell | src/Spark/Core/Internal/TypesFunctions.hs | apache-2.0 | 8,712 | 1 | 17 | 1,567 | 2,392 | 1,270 | 1,122 | 167 | 4 |
module Step_3_2 where
import Text.Html
page = thehtml <<
[ header << (thetitle << "Output")
, body <<
[ h1 << "A to-do list:"
, thediv << toDoHtml
]
]
-- We've changed the type of toDoItems to include a Bool value to
-- indicate if they've been done.
toDoItems :: [(Bool, String)]... | mzero/barley | seed/Chapter3/Step_3_2.hs | apache-2.0 | 1,554 | 0 | 9 | 345 | 194 | 121 | 73 | 19 | 1 |
-- http://www.reddit.com/r/dailyprogrammer/comments/2z68di/20150316_challenge_206_easy_recurrence_relations/
module RecurrenceRelations where
type Operator = Integer -> Integer
type Expression = String
createExpression :: Integer -> [Operator] -> Integer
createExpression seed = foldl (\_ x -> x seed) seed
parse :: ... | fffej/haskellprojects | daily-programmer/17-03-2015/RecurrenceRelations.hs | bsd-2-clause | 766 | 0 | 8 | 119 | 261 | 141 | 120 | 15 | 1 |
module Rules.Cabal (cabalRules) where
import Base
import Data.Version
import Distribution.Package as DP
import Distribution.PackageDescription
import Distribution.PackageDescription.Parse
import Distribution.Verbosity
import Expression
import GHC
import Rules.Actions
import Settings
cabalRules :: Rules ()
cabalRules ... | quchen/shaking-up-ghc | src/Rules/Cabal.hs | bsd-3-clause | 2,669 | 0 | 26 | 800 | 707 | 348 | 359 | 51 | 2 |
module Prompt
(
promptData
) where
import System.IO
type ParseFuncType a = (String -> Maybe a)
promptData :: String -> ParseFuncType a -> String -> IO a
promptData sprompt parseFunc failstr = do
putStr sprompt
hFlush stdout
input <- getLine
let maybea = parseFunc input
case maybea of
Just somet... | monkeybits/rpgame | src/Prompt.hs | bsd-3-clause | 429 | 0 | 12 | 103 | 138 | 65 | 73 | 16 | 2 |
module Main where
import System.Exit
main = do
putStrLn "This test always passes!"
exitSuccess
| vollmerm/shallow-fission | tests/Test.hs | bsd-3-clause | 115 | 0 | 7 | 34 | 23 | 12 | 11 | 5 | 1 |
{-# LANGUAGE DeriveDataTypeable, PatternGuards #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Pass.L.Estimator
-- Copyright : (C) 2012-2013 Edward Kmett
-- License : BSD-style (see the file LICENSE)
--
-- Maintainer : Edward Kmett <ekmett@gmail.co... | ekmett/multipass | Data/Pass/L/Estimator.hs | bsd-3-clause | 4,644 | 0 | 21 | 968 | 1,562 | 850 | 712 | 73 | 5 |
-- {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
module C where
import Control.Monad.State.Strict
import Data.Data
import Data.Either
import Data.Typeable
import Data.String
import Data.ByteString.Char8 (ByteString,pack,unpack)
import qualified Data.ByteString... | grwlf/cake3 | app/UrEmbed/C.hs | bsd-3-clause | 4,494 | 0 | 17 | 1,047 | 1,359 | 668 | 691 | 109 | 2 |
module Validate.US where
import Data.Char
regionStrict :: String -> Bool
regionStrict reg = reg `elem` ["AL", "AK", "AZ", "AR", "CA", "CO", "CT", "DE", "DC", "FL", "GA", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "OH"... | jespino/haskell-validate | Validate/US.hs | bsd-3-clause | 555 | 0 | 6 | 98 | 232 | 146 | 86 | 8 | 1 |
module SortCheck.Forall (
MetaCtx(..),
checkForallVars
) where
import Control.Monad.Trans.State.Lazy
import Control.Monad.Except (throwError)
import Control.Monad.Trans.Class (lift)
import Control.Lens
import Data.Maybe (isJust)
import Control.Monad (when, unless)
import qualified Data.Set as Set
import AST
impo... | esengie/fpl-exploration-tool | src/specLang/SortCheck/Forall.hs | bsd-3-clause | 1,684 | 0 | 17 | 351 | 429 | 235 | 194 | 33 | 4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.