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 Main where
import System.Exit (ExitCode(..), exitSuccess, exitWith)
import Control.Monad (unless, when)
import Idris.AbsSyntax
import Idris.CmdOptions
import Idris.Error
import Idris.Info.Show
import Idris.Main
import Idris.Options
import Idris.Package
import Util.System (setupBundledCC)
processShowOptions ... | uuhan/Idris-dev | main/Main.hs | bsd-3-clause | 2,861 | 0 | 18 | 661 | 901 | 451 | 450 | 64 | 4 |
{-# LANGUAGE PolyKinds #-}
module DepFail1 where
data Proxy k (a :: k) = P
z :: Proxy Bool
z = P
a :: Proxy Int Bool
a = P
| sdiehl/ghc | testsuite/tests/dependent/should_fail/DepFail1.hs | bsd-3-clause | 127 | 0 | 5 | 34 | 48 | 29 | 19 | 7 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Yesod.Form.I18n.Norwegian where
import Yesod.Form.Types (FormMessage (..))
import Data.Monoid (mappend)
import Data.Text (Text)
norwegianBokmålFormMessage :: FormMessage -> Text
norwegianBokmålFormMessage (MsgInvalidInteger t) = "Ugyldig antall: " `mappend` t
norwegianBokmålF... | meteficha/yesod | yesod-form/Yesod/Form/I18n/Norwegian.hs | mit | 1,671 | 2 | 7 | 171 | 356 | 195 | 161 | 24 | 1 |
-- !!! can't seek an AppendMode handle
import System.IO
import System.IO.Error
main = do
h <- openFile "hSeek004.out" AppendMode
tryIOError (hSeek h AbsoluteSeek 0) >>= print
| olsner/ghc | libraries/base/tests/IO/hSeek004.hs | bsd-3-clause | 181 | 0 | 10 | 32 | 50 | 25 | 25 | 5 | 1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeFamilies #-}
-------------------------------------------
-- |
-- Module : Web.Stripe.Customer
-- Copyright : (c) David Johnson, 2014
-- Maintainer : [email protected]... | dmjio/stripe | stripe-core/src/Web/Stripe/Customer.hs | mit | 6,489 | 0 | 8 | 1,860 | 1,034 | 634 | 400 | -1 | -1 |
{-# LANGUAGE RankNTypes #-}
-- Walking trees with coroutines.
-- Based on:
-- <http://okmij.org/ftp/continuations/ContExample.hs>
module Tree where
import Control.Delimited
-- Binary trees
data Tree a
= Leaf
| Node (Tree a) (Tree a) a
deriving (Show, Eq)
make_tree :: Int -> Tree Int
make_tree j = go j 1
w... | thoughtpolice/hs-asai | examples/Tree.hs | mit | 970 | 0 | 14 | 253 | 405 | 205 | 200 | 27 | 2 |
module Y2016.M06.D14.Exercise where
import Data.Matrix
{--
Okay, so now that you have solved what the determinant of a matrix is
(yesterday's exercise), today, let's solve what the inverse of a matrix is
and, with that, solve a system of equations.
There are multiple methods on how to invert a matrix. One approach ... | geophf/1HaskellADay | exercises/HAD/Y2016/M06/D14/Exercise.hs | mit | 1,311 | 0 | 9 | 302 | 155 | 90 | 65 | 9 | 1 |
module Standard where
import Data.Monoid
-- TODO: replace with more general version of myAnd that uses `Foldable` instead of []
-- See: https://hackage.haskell.org/package/base-4.9.0.0/docs/src/Data.Foldable.html#
myAnd :: [Bool] -> Bool
myAnd [] = True
myAnd (True : xs) = myAnd xs
myAnd (False : xs) = Fals... | JoshuaGross/haskell-learning-log | Code/Haskellbook/Standard.hs | mit | 2,176 | 0 | 9 | 475 | 924 | 499 | 425 | 56 | 1 |
import System.IO (openFile, hClose, IOMode(..))
import Options.Applicative
import Data.ByteString.Lazy (ByteString)
import Data.Binary (encode)
import Data.Digest.CRC32 (crc32)
import Control.Error (runScript, hoistEither, scriptIO)
import qualified Data.ByteString.Lazy as B
import Options
-- PNG header has fixed siz... | ksaveljev/super-size-png | src/Main.hs | mit | 4,536 | 0 | 15 | 970 | 872 | 462 | 410 | 62 | 2 |
module Command.UpdateIndex (
Options
, parserInfo
, run
) where
import Options.Applicative
import Text.Read (step, readPrec)
import qualified Blob
data CacheInfoParams = NoCacheInfoParams | CacheInfoParams Int Blob.Id FilePath
--instance Read CacheInfoParams where
-- readPrec = do
-- m <- step readPrec
... | danstiner/clod | src/Command/UpdateIndex.hs | mit | 1,830 | 0 | 12 | 414 | 254 | 146 | 108 | 31 | 1 |
module Prepare.Tanach.IndexParser where
import Prelude hiding (Word)
import Prepare.Xml.Parser (NodeParser, many, optional)
import qualified Prepare.Xml.Parser as Xml
import qualified Text.Megaparsec.Lexer as MP
import Prepare.Tanach.IndexModel
import Prepare.Tanach.TeiHeaderParser (teiHeader)
verseCount :: NodePars... | ancientlanguage/haskell-analysis | prepare/src/Prepare/Tanach/IndexParser.hs | mit | 1,277 | 0 | 13 | 205 | 367 | 194 | 173 | 38 | 1 |
-- | This module holds the base data types and functions to interact with
-- them. This is the lowest-level interface to interact with the datastore.
module Database.Hasqueue.Core.Value ( -- * Base Types
BucketID
, ValueID
... | nahiluhmot/hasqueue | src/Database/Hasqueue/Core/Value.hs | mit | 1,583 | 0 | 9 | 587 | 240 | 149 | 91 | 27 | 0 |
import Data.Array ((!), Array, bounds, listArray)
import Data.List (intercalate)
import System.Random
data Point = Point Double Double
chaosGame :: RandomGen g => g -> Int -> Array Int (Point -> Point) -> [Point]
chaosGame g n hutchinson = take n points
where
(x, g') = random g
(y, g'') = random g'
choi... | leios/algorithm-archive | contents/IFS/code/haskell/IFS.hs | mit | 890 | 0 | 16 | 255 | 390 | 200 | 190 | 23 | 1 |
module Unison.Util.Range where
import Unison.Lexer (Pos(..))
-- | True if `_x` contains `_y`
contains :: Range -> Range -> Bool
_x@(Range a b) `contains` _y@(Range c d) = a <= c && d <= b
overlaps :: Range -> Range -> Bool
overlaps (Range a b) (Range c d) = a < d && c < b
inRange :: Pos -> Range -> Bool
inRange p (... | unisonweb/platform | parser-typechecker/src/Unison/Util/Range.hs | mit | 823 | 0 | 11 | 173 | 392 | 208 | 184 | 18 | 2 |
module Typecrawl.Process (processSite) where
import Pipes
import qualified Pipes.Prelude as P
import Control.Monad (join)
import Typecrawl.Types
import Typecrawl.Scrapper
import Typecrawl.Exporter
-- | Starts the whole scrapping shenanigan.
-- This could be severely improved, most likely by
-- making scrapping more ... | Raveline/typecrawl | lib/Typecrawl/Process.hs | mit | 739 | 0 | 11 | 117 | 170 | 91 | 79 | 13 | 2 |
module Config(
Arch(..), showArch,
Program(..), Version,
defaultVersion, source, dest,
extractVersion
) where
import Data.List.Extra
import Development.Shake.FilePath
import Data.Char
data Arch = Arch32 | Arch64
showArch :: Arch -> String
showArch Arch32 = "i386"
showArch Arch64 = "x86_64"
data... | fpco/minghc | Config.hs | mit | 1,801 | 0 | 10 | 393 | 443 | 246 | 197 | 52 | 1 |
module Helpers.Heroku (herokuConf) where
import Prelude
import Data.ByteString (ByteString)
import Data.Text (Text)
import Data.Text.Encoding (encodeUtf8)
import Database.Persist.Postgresql (PostgresConf(..))
import Web.Heroku (dbConnParams)
import qualified Data.Text as T
herokuConf :: IO PostgresConf
herokuConf = ... | ackao/APRICoT | web/conference-management-system/Helpers/Heroku.hs | gpl-3.0 | 698 | 0 | 10 | 144 | 205 | 121 | 84 | 18 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module AboutResponse
(aboutResponse) where
import Text.Blaze ((!))
import qualified Text.Blaze.Html5 as H
import qualified Text.Blaze.Html5.Attributes as A
import Data.Text.Lazy (Text)
import Happstack.Server
import MasterTemplate
import Utilities (mdToHTML)
aboutResp... | arkon/courseography | hs/AboutResponse.hs | gpl-3.0 | 829 | 0 | 10 | 222 | 161 | 92 | 69 | 21 | 1 |
module Folsolver.Data.BinTree
( BinTree(..)
, empty, leaf, (<#), (#>)
, subtree, modRootValue
) where
import Folsolver.TPTP
import Text.PrettyPrint.HughesPJ as Pretty hiding (empty)
import qualified Text.PrettyPrint.HughesPJ as Pretty (empty)
import qualified Control.Arrow as Arrow (first)
data BinTree v
= BinN... | traeger/fol-solver | Folsolver/Data/BinTree.hs | gpl-3.0 | 2,084 | 0 | 14 | 469 | 763 | 409 | 354 | 42 | 1 |
import Control.Monad as M
import Control.Monad.IO.Class
import Data.Char
import Data.Conduit
import Data.Conduit.List as CL
import Data.List as L
import Data.Text.Lazy ... | XinhuaZhang/PetaVisionHaskell | Application/PVPAnalysis/PlotEnergy.hs | gpl-3.0 | 3,025 | 0 | 17 | 1,005 | 1,084 | 563 | 521 | 90 | 4 |
{-|
Module : Multilinear.Tensor
Description : Tensors constructors (finitely- or infinitely-dimensional)
Copyright : (c) Artur M. Brodzki, 2018
License : BSD3
Maintainer : [email protected]
Stability : experimental
Portability : Windows/POSIX
- This module provides convenient constructors that generate a... | ArturB/Multilinear | src/Multilinear/Tensor.hs | gpl-3.0 | 2,134 | 0 | 14 | 456 | 439 | 248 | 191 | 20 | 1 |
{-# LANGUAGE FlexibleContexts #-}
module Solver.BooleanTransitionInvariant
(checkBooleanTransitionInvariantSat
,checkBooleanTransitionInvariantWithSimpleCutSat)
where
import Data.SBV
import Data.List
import qualified Data.Map as M
import qualified Data.Set as S
import Util
import PetriNet
import Property
imp... | cryptica/slapnet | src/Solver/BooleanTransitionInvariant.hs | gpl-3.0 | 3,496 | 0 | 17 | 845 | 946 | 473 | 473 | 72 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/ChangeLogs/List.hs | mpl-2.0 | 7,940 | 0 | 23 | 1,978 | 1,230 | 707 | 523 | 165 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-shopping-content/gen/Network/Google/Resource/Content/ShippingSettings/Custombatch.hs | mpl-2.0 | 5,183 | 0 | 18 | 1,164 | 713 | 416 | 297 | 106 | 1 |
-- This file is part of purebred
-- Copyright (C) 2017-2019 Róman Joost and Fraser Tweedale
--
-- purebred is free software: you can redistribute it and/or modify
-- it under the terms of the GNU Affero General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at yo... | purebred-mua/purebred | test/TestMail.hs | agpl-3.0 | 3,229 | 0 | 13 | 597 | 673 | 380 | 293 | 62 | 1 |
{-# LANGUAGE RankNTypes, ImpredicativeTypes, OverloadedStrings #-}
module Network.IRC.Cast.Main where
import Data.Monoid
import Data.String
import Control.Concurrent (forkIO)
import Control.Concurrent.STM (atomically)
import Control.Concurrent.STM.TVar
import Network.IRC.Pipes
import Network.Simple.TCP
import Pip... | mbrock/ircast | lib/Network/IRC/Cast/Main.hs | agpl-3.0 | 1,922 | 0 | 16 | 401 | 645 | 344 | 301 | 52 | 1 |
module Betty.Pid ( writePidFile ) where
------------------------------------------------------------------------
--
-- Write process ID somewhere in the filesystem so that monitoring
-- apps can monitor. If "/opt/keter/var" is writable or can be
-- created, write betty.pid there; do not write anything otherwise.
--
-... | sajith/betty-web | Betty/Pid.hs | agpl-3.0 | 1,102 | 0 | 13 | 190 | 161 | 91 | 70 | 13 | 1 |
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Monad
import Data.List
import System.Directory
import System.FilePath
import Util
getAllUserDirs :: BuildMode -> IO [FilePath]
getAllUserDirs bm = listDirectoryWithPrefix $ projectRootDir bm
-- Project directories have n... | google/codeworld | codeworld-server/src/Migration.hs | apache-2.0 | 2,207 | 0 | 20 | 477 | 646 | 307 | 339 | 61 | 4 |
module Dis8.Disassemble where
import Common.Core
import Common.Instr
import Control.Applicative
import Data.Bits
import Data.List
import Data.Maybe
-- | Pretty-print a list of instructions starting at 0x200
showProg :: Program -> String
showProg p = showProg' 0x200 (genLabels $ parseInstrs p) p
where maxAddr = 0x... | jepugs/emul8 | src/Dis8/Disassemble.hs | apache-2.0 | 5,031 | 0 | 13 | 1,653 | 1,946 | 948 | 998 | 122 | 40 |
module Model where
import Prelude
import Yesod
import Data.Text (Text)
import Database.Persist.Quasi
import OAuthToken
share [mkPersist sqlSettings, mkMigrate "migrateAll"]
$(persistFileWith lowerCaseSettings "config/models")
| JanAhrens/yesod-oauth-demo | Model.hs | bsd-2-clause | 232 | 0 | 8 | 28 | 58 | 32 | 26 | -1 | -1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE OverloadedStrings #-}
module Main (main) where
import Bucketeer.Persistence (storeBucketManager,
restoreBuckets)
import Bucketeer.Timers (startBucketManager)
import Bucketeer.WebServer (BucketeerWeb(..), bucketeerServer)
import Control.Appl... | MichaelXavier/Bucketeer | Bucketeer/WebServer/Main.hs | bsd-2-clause | 6,488 | 0 | 13 | 2,640 | 1,276 | 712 | 564 | 119 | 1 |
-- | Utility functions to generate Primitives
module CLaSH.Primitives.Util where
import Data.Aeson (FromJSON, Result (..), fromJSON, json)
import qualified Data.Attoparsec.Lazy as L
import Data.ByteString.Lazy (ByteString)
import qualified Data.ByteString.Lazy as LZ
import qualifi... | christiaanb/clash-compiler | clash-lib/src/CLaSH/Primitives/Util.hs | bsd-2-clause | 1,971 | 0 | 18 | 673 | 397 | 215 | 182 | -1 | -1 |
----------------------------------------------------------------------------
-- |
-- Module : Language.Core.Interpreter.Libraries.GHC.Real
-- Copyright : (c) Carlos López-Camey, University of Freiburg
-- License : BSD-3
--
-- Maintainer : [email protected]
-- Stability : stable
--
--
-- Defines funct... | kmels/dart-haskell | src/Language/Core/Interpreter/Libraries/GHC/Real.hs | bsd-3-clause | 1,436 | 0 | 11 | 241 | 280 | 166 | 114 | 20 | 2 |
{-# LANGUAGE GADTs, NoMonoLocalBinds #-}
-- Norman likes local bindings
-- If this module lives on I'd like to get rid of the NoMonoLocalBinds
-- extension in due course
-- Todo: remove -fno-warn-warnings-deprecations
{-# OPTIONS_GHC -fno-warn-warnings-deprecations #-}
module CmmBuildInfoTables
( CAFSet, CAFEnv, ... | ekmett/ghc | compiler/cmm/CmmBuildInfoTables.hs | bsd-3-clause | 14,226 | 0 | 19 | 3,743 | 3,419 | 1,785 | 1,634 | 214 | 9 |
module PersistentPaint where
import Rumpus
import qualified Data.Sequence as Seq
maxBlots = 1000
-- This paintbrush is persistent, via
-- spawnPersistentEntity and sceneWatcherSaveEntity
start :: Start
start = do
initialPosition <- getPosition
setState (initialPosition, Seq.empty :: Seq EntityI... | lukexi/rumpus | pristine/Painting/PersistentPaint.hs | bsd-3-clause | 1,065 | 0 | 23 | 379 | 241 | 120 | 121 | 23 | 1 |
{-# LANGUAGE PatternSynonyms #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.ARB.TextureCubeMapArray
-- Copyright : (c) Sven Panne 2019
-- License : BSD3
--
-- Maintainer : Sven Panne <[email protected]>
-- Stability : stable
-- Port... | haskell-opengl/OpenGLRaw | src/Graphics/GL/ARB/TextureCubeMapArray.hs | bsd-3-clause | 970 | 0 | 5 | 115 | 77 | 54 | 23 | 13 | 0 |
{-|
Module : Grammar.CFG.Random
Description : Functions to randomly expand symbols and words according to a grammar.
Copyright : (c) Davide Mancusi, 2017
License : BSD3
Maintainer : [email protected]
Stability : experimental
Portability : POSIX
This module contains the relevant tools to sample random word... | arekfu/grammar-haskell | src/Grammar/CFG/Random.hs | bsd-3-clause | 8,040 | 0 | 18 | 2,298 | 1,614 | 828 | 786 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Config where
import Control.Lens ((&), (.~), (^.))
import Data.Yaml (ParseException, decodeFileEither)
import Filesystem.Path.CurrentOS (encodeString, fromText, parent, toText,
... | tpoulsen/generate-component | src/Config.hs | bsd-3-clause | 2,056 | 0 | 12 | 520 | 551 | 283 | 268 | 54 | 3 |
module Main where
import qualified Data.Map.Strict as M
import Data.Monoid
import Data.List (delete)
import Options.Applicative
import qualified Sound.MIDI.File.Load as L
import qualified Sound.MIDI.File.Save as S
import qualified Sound.MIDI.Message.Channel as CM
import qualified Sound.MIDI.Message.Channel.Voice as ... | jarmar/change-instrument | src/Main.hs | bsd-3-clause | 1,155 | 0 | 12 | 235 | 354 | 195 | 159 | 31 | 2 |
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, DeriveDataTypeable, OverlappingInstances, FlexibleContexts #-}
-- The Timber compiler <timber-lang.org>
--
-- Copyright 2008-2009 Johan Nordlander <[email protected]>
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or with... | mattias-lundell/timber-llvm | src/Common.hs | bsd-3-clause | 26,557 | 0 | 19 | 11,232 | 9,177 | 4,642 | 4,535 | 466 | 5 |
import qualified Data.ByteString.Lazy as BL
import Lib
main :: IO ()
main = do
putStrLn "read - this would fail with the output of relink1, but should work with the transformed pointers"
serialized <- BL.readFile "serialized_transformed"
print serialized
unserialized <- unwrapFromBinary serialized
putStrLn ... | michaxm/packman-exploration | app/NoTopLevelFunctions2.hs | bsd-3-clause | 341 | 0 | 9 | 58 | 72 | 34 | 38 | 9 | 1 |
{-# LANGUAGE JavaScriptFFI #-}
module Famous.Components.Origin where
import GHCJS.Types
import GHCJS.Foreign
import Famous.Core.Node
import Famous.Components.Position
data Origin_ a
type Origin a = Position (Origin_ a)
-- | Add a new Origin component to a node
foreign import javascript unsafe "new window.famous.co... | manyoo/ghcjs-famous | src/Famous/Components/Origin.hs | bsd-3-clause | 412 | 4 | 8 | 60 | 89 | 52 | 37 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Parts (
Version(..), Parsable(..), Random(..), CipherSuite(..),
HashAlgorithm(..), SignatureAlgorithm(..),
parseSignatureAlgorithm,
-- list1,
whole, ByteStringM, runByteStringM, evalByteStringM, headBS,
lenBodyToByteString, emptyBS,... | YoshikuniJujo/forest | subprojects/tls-analysis/client/Parts.hs | bsd-3-clause | 5,566 | 28 | 11 | 710 | 1,370 | 732 | 638 | 140 | 12 |
module Sim where
import qualified Dummy as D
import Message
import Node
import RoutingData
import Utils
import qualified Data.HashMap.Strict as HM
import qualified Data.Text as T
import Data.Time.Clock
import System.Random
idBits :: Int
idBits = 10
idRange ... | semaj/hademlia | src/Sim.hs | bsd-3-clause | 2,990 | 0 | 12 | 1,281 | 846 | 468 | 378 | 74 | 2 |
module Language.C.Syntax.BinaryInstances where
import Data.Binary
import Language.C.Syntax.AST
import Language.C.Syntax.Constants
import Language.C.Syntax.Ops
import Language.C.Syntax.ManualBinaryInstances
instance (Binary a) => Binary (Language.C.Syntax.AST.CTranslationUnit a) where
put (CTranslUnit a b) = put a >... | atomb/language-c-binary | Language/C/Syntax/BinaryInstances.hs | bsd-3-clause | 17,644 | 0 | 23 | 5,071 | 9,149 | 4,488 | 4,661 | 388 | 0 |
{-# LANGUAGE PatternSynonyms #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.NV.ViewportSwizzle
-- Copyright : (c) Sven Panne 2019
-- License : BSD3
--
-- Maintainer : Sven Panne <[email protected]>
-- Stability : stable
-- Portabili... | haskell-opengl/OpenGLRaw | src/Graphics/GL/NV/ViewportSwizzle.hs | bsd-3-clause | 1,196 | 0 | 5 | 145 | 112 | 76 | 36 | 20 | 0 |
module Main where
import Run
main :: IO ()
main = runMain
| nejla/auth-service | service/app/Main.hs | bsd-3-clause | 60 | 0 | 6 | 14 | 22 | 13 | 9 | 4 | 1 |
{-# LANGUAGE RankNTypes #-}
module Abstract.Interfaces.Stack.Push (
StackPush (..),
push,
pushBatch,
stackToPush
) where
import qualified Abstract.Interfaces.Stack as S
data StackPush m t = StackPush {
_sPush :: S.Stack m t
}
stackToPush :: S.Stack m t -> StackPush m t
stackToPush s = StackPush { _sPush = s ... | adarqui/Abstract-Interfaces | src/Abstract/Interfaces/Stack/Push.hs | bsd-3-clause | 533 | 0 | 10 | 111 | 220 | 121 | 99 | 15 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple
-- Copyright : Isaac Jones 2003-2005
--
-- Maintainer : [email protected]
-- Portability : portable
--
-- This is the command line front end to the Simple build system. When given
-- the ... | IreneKnapp/Faction | libfaction/Distribution/Simple.hs | bsd-3-clause | 28,933 | 0 | 17 | 7,685 | 5,346 | 2,740 | 2,606 | 446 | 8 |
-- 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.
{-# LANGUAGE GADTs #-}
{-# LANGUAGE NoRebindableSyntax #-}
{-# LANGUAGE OverloadedStrings #-}
module Duckling.Ti... | facebookincubator/duckling | Duckling/Time/GA/Rules.hs | bsd-3-clause | 16,978 | 0 | 19 | 4,614 | 4,899 | 2,692 | 2,207 | 552 | 2 |
{-# LANGUAGE ImplicitParams #-}
{-# LANGUAGE DoAndIfThenElse #-}
----------------------------------------------------------------------------
-- |
-- Module : Language.Core.Interpreter.Acknowledge
-- Copyright : (c) Carlos López-Camey, University of Freiburg
-- License : BSD-3
--
-- Maintainer : c.lope... | kmels/dart-haskell | src/Language/Core/Interpreter/Acknowledge.hs | bsd-3-clause | 4,932 | 0 | 12 | 948 | 1,010 | 527 | 483 | 60 | 2 |
{-# LANGUAGE PackageImports #-}
import "ouch-web" Application (getApplicationDev)
import Network.Wai.Handler.Warp
(runSettings, defaultSettings, settingsPort)
import Control.Concurrent (forkIO)
import System.Directory (doesFileExist, removeFile)
import System.Exit (exitSuccess)
import Control.Concurrent (threadDela... | mkrauskopf/ouch-web | devel.hs | bsd-3-clause | 709 | 0 | 10 | 123 | 186 | 101 | 85 | 23 | 2 |
module Doukaku.DiceTest (tests) where
import Distribution.TestSuite
import Doukaku.TestHelper
import qualified Doukaku.Dice as Dice
tests :: IO [Test]
tests = createTests $ newDoukakuTest {
tsvPath = "test/Doukaku/dice.tsv"
, solve = Dice.solve
}
| hiratara/doukaku-past-questions-advent-2013 | test/Doukaku/DiceTest.hs | bsd-3-clause | 255 | 0 | 8 | 39 | 65 | 40 | 25 | 8 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Network.Monitoring.Riemann (
module Network.Monitoring.Riemann.Types,
module Data.Int,
Client, makeClient,
sendEvent, sendEvent'
{-, sendEvent'-}
) where
import Network.Monitoring.Riemann.Types
import Data.Default
import Data.Int
imp... | telser/riemann-hs | src/Network/Monitoring/Riemann.hs | mit | 5,379 | 0 | 18 | 1,390 | 618 | 347 | 271 | 53 | 2 |
module Codec.Encryption.Historical.XOR.Analysis
( crack
, crack_key_length
)
where
-- Module to Analyse
import Codec.Encryption.Historical.XOR.Implementation
import Codec.Encryption.Historical.Utilities.Histogram
import Data.Ord
import Data.List
import Data.List.Split
import Control.Arrow
import qualified Data... | beni55/Historical-Cryptography | Codec/Encryption/Historical/XOR/Analysis.hs | mit | 1,672 | 0 | 12 | 373 | 535 | 289 | 246 | -1 | -1 |
module Command.TyProjection
( tyValue
, tyEither
, tyAddress
, tyPublicKey
, tyTxOut
, tyAddrStakeDistr
, tyFilePath
, tyInt
, tyWord
, tyWord32
, tyByte
, tySecond
, tyBool
, tyScriptVersion
, tyCoin
, tyCoi... | input-output-hk/pos-haskell-prototype | auxx/src/Command/TyProjection.hs | mit | 6,086 | 0 | 11 | 1,250 | 1,398 | 764 | 634 | -1 | -1 |
{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances, FlexibleInstances #-}
{- |
Module : $Header$
Description : Coding CSMOF into CASL
Copyright : (c) Daniel Calegari Universidad de la Republica, Uruguay 2013
License : GPLv2 or higher, see LICENSE.txt
Maintainer : [email protected]
Stability ... | mariefarrell/Hets | Comorphisms/CSMOF2CASL.hs | gpl-2.0 | 22,609 | 0 | 21 | 5,748 | 7,238 | 3,727 | 3,511 | 476 | 3 |
{-
Copyright (C) 2010-2015 Paul Rivier <paul*rivier#demotera*com> | tr '*#' '.@'
and John MacFarlane
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 Li... | alexvong1995/pandoc | src/Text/Pandoc/Readers/Textile.hs | gpl-2.0 | 22,245 | 0 | 17 | 5,345 | 5,793 | 2,950 | 2,843 | 424 | 4 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | romanb/amazonka | amazonka-opsworks/gen/Network/AWS/OpsWorks/StopStack.hs | mpl-2.0 | 3,029 | 0 | 9 | 667 | 360 | 221 | 139 | 48 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-type-defaults #-}
-- Module : Gen.Model
-- Copyright : (c) 2013-2015 Brendan Hay <[email protected]>
-- License : This Source Code Form is subject to the terms of
-- the Mozilla Public License, v. 2.0.
-- A copy ... | romanb/amazonka | gen/src/Gen/Model.hs | mpl-2.0 | 1,749 | 0 | 13 | 512 | 354 | 184 | 170 | 34 | 1 |
-- Unpack a tarball containing a Cabal package
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Distribution.Server.Packages.Unpack (
unpackPackage,
unpackPackageRaw,
) where
import qualified Codec.Archive.Tar as Tar
import qualified Codec.Archive.Tar.Entry as Tar
import qualified Codec.Archive.Tar.C... | haskell-infra/hackage-server | Distribution/Server/Packages/Unpack.hs | bsd-3-clause | 14,144 | 0 | 20 | 3,352 | 2,844 | 1,502 | 1,342 | 244 | 6 |
{-# OPTIONS_GHC -fglasgow-exts #-}
{-# OPTIONS_GHC -fno-spec-constr-count #-}
--
-- TODO:
-- permute operations, which are fairly important for this algorithm, are currently
-- all sequential
module QSortPar (qsortPar)
where
import Data.Array.Parallel.Unlifted.Distributed
import Data.Array.Parallel.Unlifted.Paral... | mainland/dph | icebox/examples/qsort/QSortPar.hs | bsd-3-clause | 1,777 | 0 | 11 | 394 | 485 | 259 | 226 | 36 | 2 |
module Language.Haskell.GhcMod.Debug (debugInfo, rootInfo) where
import Control.Applicative ((<$>))
import Data.List (intercalate)
import Data.Maybe (isJust, fromJust)
import Language.Haskell.GhcMod.Convert
import Language.Haskell.GhcMod.Monad
import Language.Haskell.GhcMod.Types
import Language.Haskell.GhcMod.Interna... | cabrera/ghc-mod | Language/Haskell/GhcMod/Debug.hs | bsd-3-clause | 1,569 | 0 | 15 | 342 | 364 | 195 | 169 | 29 | 2 |
import ChineseCheckers
import Table
import Test.QuickCheck
import Haste.Graphics.Canvas
newtype TableCoords = TableCoords (Table, Content, (Int,Int))
deriving (Show)
newtype OnlyPiece = OnlyPiece Content
deriving (Show)
newtype TableCoords2 = TableCoords2 (Table, Content, (Int,Int))
deriving ... | DATx02-16-14/Hastings | test/Tests.hs | bsd-3-clause | 2,636 | 0 | 13 | 711 | 871 | 450 | 421 | 58 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : CppIfdef
-- Copyright : 1999-2004 Malcolm Wallace
-- Licence : LGPL
--
-- Maintainer : Malcolm Wallace <[email protected]>
-- Stability : experimental
-- Portability : All
--
-- Perform a cpp.... | FranklinChen/hugs98-plus-Sep2006 | cpphs/Language/Preprocessor/Cpphs/CppIfdef.hs | bsd-3-clause | 8,470 | 25 | 20 | 2,726 | 2,947 | 1,484 | 1,463 | 181 | 27 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAG... | music-suite/music-score | src/Music/Score/Meta/Title.hs | bsd-3-clause | 4,776 | 0 | 13 | 1,258 | 882 | 507 | 375 | 74 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Language.Nix.Identifier ( Identifier(..), ident, quote, needsQuoting ) where
import Control.Lens
import Data.Char
import Data.Function ( on )
import Data.String
import Distribution.Nixpkgs.Util.PrettyPrinting ( Pretty(..), text )
import Text.Regex.Posix
-- | Identif... | spencerjanssen/cabal2nix | src/Language/Nix/Identifier.hs | bsd-3-clause | 2,554 | 0 | 10 | 457 | 350 | 213 | 137 | -1 | -1 |
{-# LANGUAGE OverloadedStrings, ExtendedDefaultRules #-}
module Queries.Coverage where
import Database.MongoDB
import Queries.Utils
import ActionRunner
queryCoverage :: Pipe -> IO [(String,[String])]
queryCoverage pipe = do
maybeDocs <- run pipe $ find (select [] "coverage")
{... | hendrysuwanda/101dev | tools/mongo2Tex/Queries/Coverage.hs | gpl-3.0 | 772 | 0 | 17 | 307 | 210 | 109 | 101 | 15 | 2 |
{-# LANGUAGE DeriveDataTypeable, TemplateHaskell,
FlexibleInstances, FlexibleContexts, MultiParamTypeClasses #-}
-- TypeOperators, TypeSynonymInstances, TypeFamilies
module Distribution.Server.Util.NameIndex where
import Data.Map (Map)
import Data.Typeable (Typeable)
import qualified Data.Map as Map
impo... | mpickering/hackage-server | Distribution/Server/Util/NameIndex.hs | bsd-3-clause | 4,508 | 0 | 14 | 954 | 1,289 | 681 | 608 | 78 | 3 |
<?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>Port Scan | ZAP Extension</title>
<maps>
<homeID>top</homeID>
<mapref l... | veggiespam/zap-extensions | addOns/zest/src/main/javahelp/org/zaproxy/zap/extension/zest/resources/help_hr_HR/helpset_hr_HR.hs | apache-2.0 | 971 | 85 | 52 | 160 | 398 | 210 | 188 | -1 | -1 |
module FunIn2 where
--The application of a function is replaced by the right-hand side of the definition,
--with actual parameters replacing formals.
--In this example, unfold 'addthree'.
--This example aims to test unfolding a function defintion.
main :: Int -> Int
main = \x -> case x of
1 -> 1 + ma... | mpickering/HaRe | old/testing/unfoldDef/FunIn2_TokOut.hs | bsd-3-clause | 424 | 0 | 12 | 115 | 101 | 56 | 45 | 7 | 2 |
import Test.Cabal.Prelude
import Data.Maybe
main = cabalTest $ do
withPackageDb $ do
withSandbox $ do
fails $ cabal "exec" ["my-executable"]
cabal "install" []
-- The library should not be available outside the sandbox
ghcPkg' "list" [] >>= assertOutputDoesNot... | mydaum/cabal | cabal-testsuite/PackageTests/Exec/sandbox-ghc-pkg.test.hs | bsd-3-clause | 506 | 0 | 16 | 156 | 100 | 48 | 52 | 10 | 1 |
module Foo where
-- TODO: return a civilized error message about the line number with the
-- problematic predicate application, instead of just a groan about safeZip
-- failing.
{-@ predicate Rng Lo V Hi = (Lo <= V && V < Hi) @-}
{-@ type NNN a b = {v:[(a, b)] | 0 <= 0} @-}
{-@ bog :: {v:Int | (Rng 0 10 11)} @-}
bo... | mightymoose/liquidhaskell | tests/todo/aliasError.hs | bsd-3-clause | 399 | 0 | 6 | 92 | 49 | 34 | 15 | 5 | 1 |
module IdIn2 where
{-To rename an identifier name, stop the cursor at any occurrence of the name,
then input the new name in the mini-buffer, after that, select the 'rename'
command from the 'Refactor' menu.-}
--Any value variable name declared in this module can be renamed.
--Rename local 'x' to 'x1'
x=5
fo... | kmate/HaRe | test/testdata/Renaming/IdIn2.hs | bsd-3-clause | 390 | 0 | 6 | 88 | 66 | 39 | 27 | 7 | 1 |
{-# LANGUAGE CPP #-}
import Control.Concurrent
import Control.Exception
import Foreign
import System.IO (hFlush,stdout)
#if __GLASGOW_HASKELL__ < 705
import Prelude hiding (catch)
#endif
-- !!! Try to get two threads into a knot depending on each other.
-- This should result in the main thread being sent a NonTermi... | lukexi/ghc | testsuite/tests/concurrent/should_run/conc034.hs | bsd-3-clause | 1,140 | 0 | 13 | 222 | 181 | 103 | 78 | 13 | 1 |
-- A second test for trac #3001, which segfaults when compiled by
-- GHC 6.10.1 and run with +RTS -hb. Most of the code is from the
-- binary 0.4.4 package.
{-# LANGUAGE CPP, FlexibleInstances, FlexibleContexts, MagicHash #-}
module Main (main) where
import Data.Monoid
import Data.ByteString.Internal (inlinePerfor... | urbanslug/ghc | testsuite/tests/profiling/should_run/T3001-2.hs | bsd-3-clause | 8,019 | 0 | 18 | 2,499 | 3,057 | 1,584 | 1,473 | 206 | 3 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -fno-warn-type-defaults #-}
module Data.CBar where
import Control.Lens hiding (to, each)
impor... | tonyday567/trade | src/Data/CBar.hs | mit | 6,865 | 0 | 23 | 2,634 | 2,198 | 1,152 | 1,046 | 206 | 6 |
module Proteome.Test.DiagTest where
import Hedgehog ((===))
import Path (Abs, Dir, Path, absdir, toFilePath)
import Ribosome.Api.Buffer (currentBufferContent)
import Ribosome.Test.Run (UnitTest)
import Proteome.Data.Env (Env)
import qualified Proteome.Data.Env as Env (configLog, mainProject)
import Proteome.Data.Proj... | tek/proteome | packages/test/test/Proteome/Test/DiagTest.hs | mit | 1,559 | 0 | 10 | 230 | 476 | 282 | 194 | -1 | -1 |
{-# LANGUAGE ForeignFunctionInterface, EmptyDataDecls #-}
import Foreign
import Foreign.C.Types
import System.IO.Unsafe
data CFoo
foreign import ccall unsafe "foo_c.h foo_ctor"
c_foo_ctor :: CInt -> IO (Ptr CFoo)
data Foo = Foo !(Ptr CFoo)
deriving (Eq, Ord, Show)
newFoo :: Int -> Either String Foo
newFoo x = u... | hnfmr/cpp-class-ffi | ffi.hs | mit | 1,026 | 1 | 14 | 249 | 365 | 178 | 187 | -1 | -1 |
-- https://www.fpcomplete.com/blog/2017/09/all-about-strictness
{-# LANGUAGE BangPatterns #-}
{-
Run with:
stack --resolver lts-8.6 ghc
--package conduit-combinators
--package deepseq
-- StrictnessPlayground.hs -O2
./StrictnessPlayground +RTS -s
-}
import Debug.Trace
import Control.DeepSeq (NFData, rnf, deepseq, for... | futtetennista/IntroductionToFunctionalProgramming | src/StrictnessPlayground.hs | mit | 4,098 | 2 | 13 | 1,067 | 1,381 | 708 | 673 | 113 | 2 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE DuplicateRecordFields #-}
module Language.LSP.Types.DocumentSymbol where
import Data.Aeson
import Data.Aeson.TH
import Data.Scientific
import Data.Text (Text)
import Lan... | wz1000/haskell-lsp | lsp-types/src/Language/LSP/Types/DocumentSymbol.hs | mit | 9,390 | 0 | 11 | 2,252 | 1,635 | 866 | 769 | 165 | 0 |
-- | Main module
module Main where
import Network.HTTP.Conduit
import System.Environment (getArgs)
import qualified Data.Text as T
import qualified Data.ByteString as BS
import qualified Data.ByteString.Lazy as L
import Control.Monad.IO.Class (liftIO)
import Text.Playlist
import Control.Concurrent
import Control.Monad... | DavidKlassen/haschup | src/Haschup.hs | mit | 1,135 | 0 | 16 | 260 | 312 | 163 | 149 | 28 | 2 |
-----------------------------------------------------------------------------
--
-- Module : TypeNum.Test.Int
-- Copyright :
-- License : MIT
--
-- Maintainer : -
-- Stability :
-- Portability :
--
-- |
--
-----------------------------------------------------------------------------
module TypeNum.Tes... | fehu/TypeNumerics | test/TypeNum/Test/Int.hs | mit | 5,791 | 106 | 30 | 2,035 | 2,569 | 1,344 | 1,225 | -1 | -1 |
{-# htermination (until :: (a -> MyBool) -> (a -> a) -> a -> a) #-}
import qualified Prelude
data MyBool = MyTrue | MyFalse
data List a = Cons a (List a) | Nil
until0 x p f MyTrue = x;
until0 x p f MyFalse = until p f (f x);
until :: (a -> MyBool) -> (a -> a) -> a -> a;
until p f x = until0 x p... | ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/until_1.hs | mit | 331 | 0 | 8 | 103 | 140 | 76 | 64 | 7 | 1 |
import System.Environment (getArgs)
interactWith function inputFile outputFile = do
input <- readFile inputFile
writeFile outputFile (function input)
main = mainWith myFunction
where mainWith function = do
args <- getArgs
case args of
[input, output] -> interactWith function inpu... | zhangjiji/real-world-haskell | ch4-interactWith.hs | mit | 418 | 1 | 11 | 111 | 114 | 54 | 60 | 11 | 2 |
module Main where
import Test.HUnit (runTestTT, Test(TestList))
import Tests.IRC.Commands (respondTest)
main :: IO ()
main = do
_ <- runTestTT $ TestList [respondTest]
return ()
| jdiez17/HaskellHawk | test/Main.hs | mit | 191 | 0 | 10 | 38 | 72 | 40 | 32 | 7 | 1 |
module Lexer where
import Text.Parsec.String (Parser)
import Text.Parsec.Language (emptyDef)
import qualified Text.Parsec.Token as Tok
lexer :: Tok.TokenParser ()
lexer = Tok.makeTokenParser style
where
ops = ["+","*","-","/",";",",","<"]
names = ["def","extern"]
style = emptyDef {
Tok.c... | TorosFanny/kaleidoscope | src/chapter3/Lexer.hs | mit | 722 | 0 | 8 | 172 | 217 | 124 | 93 | 21 | 1 |
{-# htermination max :: () -> () -> () #-}
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/Prelude_max_1.hs | mit | 43 | 0 | 2 | 10 | 3 | 2 | 1 | 1 | 0 |
module System.Random.PCG
(
mkPCGGen
, getPCGGen
, newPCGGen
, getPCGRandom
)
where
import System.CPUTime (getCPUTime)
import Data.Time.Clock.POSIX (getPOSIXTime)
import System.Random
import System.Random.PCG.Internal
import Data.IORef
import System.IO.Unsafe ( unsafePerformIO )
{-# NOINLINE globalGen... | wmarvel/haskellrogue | src/System/Random/PCG.hs | mit | 849 | 0 | 10 | 150 | 255 | 140 | 115 | 29 | 1 |
module Vacchi.Fractals.Types where
------------------------------------------
-- config types (used in config.hs)
------------------------------------------
data Fractal = Fractal {
fractal :: [IFS], -- IFS list
scaleFactor :: Float, -- scaling factor
iterations :: Int, -- number of iterations
offsetX :: ... | evacchi/chaosgame | src/Vacchi/Fractals/Types.hs | mit | 2,207 | 36 | 11 | 408 | 518 | 311 | 207 | 29 | 1 |
-- | Author : John Allard
-- | Date : Feb 5th 2016
-- | Class : CMPS 112 UCSC
-- | I worked alone, no partners to list.
-- | Homework #3 |--
import Data.Char
import Data.List
-- | 1. Suppose we have the following type of binary search trees with
-- keys of type k and values of type v:
data BST k v = Empty |
... | jhallard/WinterClasses16 | CS112/hw/hw3/hw3.hs | mit | 2,208 | 0 | 16 | 634 | 599 | 310 | 289 | 27 | 2 |
module HandBrake.Encode
( AudioTracks(..), Chapters(..), EncodeDetails, EncodeRequest, Numbering(..)
, Profile(..), SubtitleTracks( SubtitleTracks ), TwoPass(..)
, audioEncoder, audios, chapters, details, encodeArgs, encodeRequest
, encodeRequest1, input, name, numbering, options, outputDir, outputName
, pro... | sixears/handbrake | src/HandBrake/Encode.hs | mit | 24,206 | 127 | 21 | 7,633 | 5,708 | 3,213 | 2,495 | -1 | -1 |
module Audit.Options (
Opts(..),
fullOpts,
module Options.Applicative.Extra
) where
import Options.Applicative
import Options.Applicative.Extra
data Opts = Opts { cabalFile :: Maybe FilePath } deriving Show
opts :: Parser Opts
opts = Opts <$> optional (argument str ( metavar "FILE"
... | pikajude/cabal-audit | src/Audit/Options.hs | mit | 508 | 0 | 11 | 144 | 133 | 74 | 59 | 14 | 1 |
module Triangle (TriangleType(..), triangleType) where
data TriangleType = Equilateral
| Isosceles
| Scalene
| Illegal
| Degenerate
deriving (Eq, Show)
triangleType :: Float -> Float -> Float -> TriangleType
triangleType a b c
... | vaibhav276/exercism_haskell | triangle/src/Triangle.hs | mit | 713 | 0 | 14 | 321 | 289 | 150 | 139 | 16 | 1 |
main :: IO ()
main = do
contents <- getContents
putStrLn contents
let myLines = lines contents
mapM putStrLn myLines
mainloop myLines
return ()
mainloop :: [String] -> IO ()
mainloop contents@(x:xs) = do
words x
mapM putStrLn words
if xs == [] then
return ()
else
mainloop xs
| doylew/practice | haskell/readthenwrite.hs | mit | 315 | 0 | 10 | 88 | 137 | 62 | 75 | 15 | 2 |
{-# LANGUAGE BangPatterns, DataKinds, DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Hadoop.Protos.RpcHeaderProtos.RpcResponseHeaderProto.RpcErrorCodeProto (RpcErrorCodeProto(..)) where
import Prelude ((+), (/), (.))
import qualified Prelude as Prelu... | alexbiehl/hoop | hadoop-protos/src/Hadoop/Protos/RpcHeaderProtos/RpcResponseHeaderProto/RpcErrorCodeProto.hs | mit | 6,436 | 0 | 11 | 1,023 | 1,218 | 672 | 546 | 118 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ec2fleet-ondemandoptionsrequest.html
module Stratosphere.ResourceProperties.EC2EC2FleetOnDemandOptionsReq... | frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/EC2EC2FleetOnDemandOptionsRequest.hs | mit | 1,687 | 0 | 12 | 157 | 173 | 100 | 73 | 22 | 1 |
import Data.Set
data Pos = Pos Int Int deriving (Eq, Ord, Show)
data Mov = Mov Int Int deriving Show
add :: Pos -> Mov -> Pos
add (Pos a b) (Mov x y) = Pos (a Prelude.+ x) (b Prelude.+ y)
in_bounds :: Pos -> Bool
in_bounds (Pos x y) = (elem x [0..7]) && (elem y [0..7])
type Gen = Pos -> Set Pos
gen_horse :: Gen
gen... | candide-guevara/programming_challenges | haskell_learning/chess_movement.hs | gpl-2.0 | 1,493 | 0 | 13 | 340 | 855 | 437 | 418 | 29 | 1 |
-- Copyright (C) 2003 David Roundy
--
-- 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, or (at your option)
-- any later version.
--
-- This program is distributed in th... | DavidAlphaFox/darcs | src/Darcs/UI/Commands/Dist.hs | gpl-2.0 | 9,083 | 0 | 23 | 2,191 | 1,965 | 1,082 | 883 | 182 | 5 |
-- Copyright (c) 2015 Nicola Bonelli <[email protected]>
--
-- 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 version.
--
-- This ... | Mr-Click/PFQ | user/pfq-load/pfq-load.hs | gpl-2.0 | 11,484 | 0 | 23 | 3,011 | 3,354 | 1,752 | 1,602 | 227 | 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.