code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15
values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-# LANGUAGE OverloadedStrings #-}
module Utils
( login
, pingURL
, recordsTable
) where
import Control.Applicative
import Control.Exception
import Control.Lens
import qualified Data.Text as T
import Database.MySQL.Simple
import Network.W... | erochest/get-links | Utils.hs | apache-2.0 | 835 | 0 | 12 | 248 | 211 | 116 | 95 | 23 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE TemplateHaskell #-}
module BarthPar.Scrape.Types.Scrape where
import Control.DeepSeq
import Cont... | erochest/barth-scrape | src/BarthPar/Scrape/Types/Scrape.hs | apache-2.0 | 1,459 | 0 | 9 | 363 | 394 | 206 | 188 | 39 | 1 |
module PowerDivisibility.A019555Spec (main, spec) where
import Test.Hspec
import PowerDivisibility.A019555 (a019555)
main :: IO ()
main = hspec spec
spec :: Spec
spec = describe "A019555" $
it "correctly computes the first 20 elements" $
take 20 (map a019555 [1..]) `shouldBe` expectedValue where
expectedV... | peterokagey/haskellOEIS | test/PowerDivisibility/A019555Spec.hs | apache-2.0 | 377 | 0 | 10 | 59 | 160 | 95 | 65 | 10 | 1 |
{-# LANGUAGE FlexibleContexts, GADTs, DeriveDataTypeable #-}
module Propellor.Property.Chroot (
debootstrapped,
bootstrapped,
provisioned,
Chroot(..),
ChrootBootstrapper(..),
Debootstrapped(..),
ChrootTarball(..),
inChroot,
-- * Internal use
provisioned',
propagateChrootInfo,
propellChroot,
chain,
chroot... | np/propellor | src/Propellor/Property/Chroot.hs | bsd-2-clause | 8,768 | 98 | 17 | 1,576 | 2,519 | 1,299 | 1,220 | 172 | 4 |
-- Copyright (c) 2017-2018, Travis Bemann
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
--
-- o Redistributions of source code must retain the above copyright notice, this
-- list of con... | tabemann/botwars | src/Robots/Genetic/HunterKiller/Combat.hs | bsd-3-clause | 14,208 | 1 | 22 | 3,983 | 3,144 | 1,647 | 1,497 | 265 | 13 |
{-| Very simple IO module -- just the components that I actually need for
- String IO, and nothing more. (Prevents namespace conflict with ByteString
- IO elsewhere in the program).
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -}
module Messages
( (<<)
, stdin
, stdout
, s... | solidsnack/system-uuid | Messages.hs | bsd-3-clause | 526 | 0 | 4 | 181 | 39 | 27 | 12 | 8 | 1 |
{-# LANGUAGE PolyKinds #-}
module Data.IxFunctor.Extend where
import Data.IxFunctor
class IxFunctor w => IxExtend w where
iextend :: w i k a -> (w j k a -> b) -> w i j b
iduplicate :: IxExtend w => w i k a -> w i j (w j k a)
iduplicate w = iextend w id
(=>>>) :: IxExtend w => w i k a -> (w j k a -> b) -> w i j b... | kylcarte/ixfunctors | src/Data/IxFunctor/Extend.hs | bsd-3-clause | 690 | 0 | 12 | 199 | 434 | 224 | 210 | 19 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE Trustworthy #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Functor
-- Copyright : (c) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer : ... | spacekitteh/smcghc | libraries/base/Data/Functor.hs | bsd-3-clause | 1,055 | 0 | 8 | 237 | 206 | 128 | 78 | 21 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE StandaloneDeriving #-}
module Types where
import qualified Data.Map as Map
import Data.Data
import Data.Text
import GHC.Generics
import ... | roelvandijk/aeson | tests/Types.hs | bsd-3-clause | 2,439 | 1 | 11 | 686 | 755 | 421 | 334 | 62 | 1 |
{-# LANGUAGE FlexibleContexts #-}
-----------------------------------------------------------------------------
-- |
-- Module : Numeric.Neuron.Types
-- Copyright : (c) A. V. H. McPhail 2014
-- License : BSD3
--
-- Maintainer : haskell.vivian.mcphail <at> gmail <dot> com
-- Stability : provisional
--... | amcphail/hneuron | src/Numeric/Neuron/Types.hs | bsd-3-clause | 1,073 | 0 | 5 | 143 | 84 | 65 | 19 | 9 | 0 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
@DsMonad@: monadery used in desugaring
-}
{-# LANGUAGE FlexibleInstances, FlexibleContexts #-}
{-# OPTIONS_GHC -fno-warn-orphans #-} -- instance MonadThings is necessarily an orphan
module DsMonad (
DsM, mapM, m... | shlevy/ghc | compiler/deSugar/DsMonad.hs | bsd-3-clause | 30,097 | 11 | 16 | 8,472 | 5,326 | 2,847 | 2,479 | 445 | 3 |
-- Easy precompilation, using filesystem as the resource database.
--
-- Only saves the cipher texts. Thus, should behave similarly to
-- downloading resources from the network.
--
module Precompile
( precompile -- save resources to filesystem
, getRscDir, hctFile -- where to find the resources
) where
... | dmbarbour/awelon | hsrc_util/Precompile.hs | bsd-3-clause | 2,366 | 1 | 17 | 446 | 663 | 360 | 303 | -1 | -1 |
f [x] [y] = [x, y]
f (x:t) (y:p) = x : y : f t p
zipper = f
| eeue56/code-golf | zipper/zipper.hs | bsd-3-clause | 60 | 1 | 6 | 20 | 72 | 35 | 37 | 3 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveTraversable #-}
module CodeSearch.Query
( Query(..)
, TrigramQuery
) where
import Control.Applicative
import Control.Lens (Plated, Traversable, plate)
import ... | reinh/CodeSearch | src/CodeSearch/Query.hs | bsd-3-clause | 1,176 | 0 | 9 | 338 | 449 | 241 | 208 | 48 | 0 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE CPP #-}
module Network.SSH.Client.LibSSH2.Conduit
( CommandsHandle
, execCommand
, getReturnCode
, sourceChannel
, splitLines
) where
import Control.Concurrent.STM
import Control.Monad
import Control.Monad.IO.Class
import Control.... | qnikst/libssh2-conduit | Network/SSH/Client/LibSSH2/Conduit.hs | bsd-3-clause | 4,941 | 0 | 17 | 1,269 | 1,395 | 686 | 709 | 126 | 4 |
{-# LANGUAGE FlexibleInstances, UndecidableInstances,
OverlappingInstances, ScopedTypeVariables #-}
-- |
-- Module : Foreign.OpenCL.Bindings.Internal.Util
-- Copyright : (c) 2011, Martin Dybdal
-- License : BSD3
--
-- Maintainer : Martin Dybdal <dybber@dybber.dk>
-- Stability : experimental
... | HIPERFIT/hopencl | Foreign/OpenCL/Bindings/Internal/Util.hs | bsd-3-clause | 5,754 | 3 | 22 | 1,456 | 1,820 | 913 | 907 | 90 | 2 |
{-# LANGUAGE NamedFieldPuns #-}
{-# OPTIONS -fno-warn-missing-signatures #-}
module Utils.URI.Params(
updateUrlParam
,updateUrlParams
,uriParams
,deleteQueryKey
,editQuery
,formEncodeUrl
)where
import Control.Arrow
import Network.URI
import Data.List
import Data.Function
import Network.CGI
updateUrlParam ... | DavidAlphaFox/sblog | src/Utils/URI/Params.hs | bsd-3-clause | 1,220 | 0 | 12 | 197 | 438 | 250 | 188 | 31 | 1 |
{-# LANGUAGE UndecidableInstances #-}
-- | Twisted product of chain complexes of free Z-modules. The left
-- factor must be a coalgebra and the right an algebra. There is an
-- (unimplemented) extension to comodules and modules.
-- See Section 8.3 in https://arxiv.org/abs/1208.3816
-- Twisting cochains and power maps ... | mvr/at | src/Math/Algebra/ChainComplex/TwistedTensor.hs | bsd-3-clause | 3,031 | 0 | 12 | 518 | 1,032 | 543 | 489 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
-- | Features list.
module HL.View.Home.Whyhaskell (whyhaskell) where
import HL.View
-- | Whyhaskell section explains what's notable about Haskell as a
-- language.
whyhaskell :: View App ()
whyhaskell =
div_ [class_ "whyhaskell"]
(container_
(do
r... | haskell-lang/haskell-lang | src/HL/View/Home/Whyhaskell.hs | bsd-3-clause | 5,391 | 2 | 17 | 1,443 | 773 | 337 | 436 | 91 | 1 |
module Ditto.Cover where
import Ditto.Syntax
import Ditto.Monad
import Ditto.Match
import Ditto.Whnf
import Ditto.Sub
import Ditto.Funify
import Ditto.Throw
import Data.List
import Data.Maybe
import Control.Monad.Except
----------------------------------------------------------------------
split :: Tel -> Name -> TCM... | ditto/ditto | src/Ditto/Cover.hs | gpl-3.0 | 4,362 | 0 | 22 | 970 | 1,785 | 896 | 889 | -1 | -1 |
{-# LANGUAGE PackageImports #-}
module Propellor.Property.Cmd (
-- * Properties for running commands and scripts
cmdProperty,
cmdProperty',
cmdPropertyEnv,
Script,
scriptProperty,
userScriptProperty,
-- * Lower-level interface for running commands
CommandParam(..),
boolSystem,
boolSystemEnv,
safeSystem,
s... | sjfloat/propellor | src/Propellor/Property/Cmd.hs | bsd-2-clause | 2,115 | 26 | 11 | 343 | 514 | 284 | 230 | 41 | 1 |
{-# LANGUAGE QuasiQuotes, TemplateHaskell, TypeFamilies, OverloadedStrings,
GADTs, FlexibleContexts, MultiParamTypeClasses, GeneralizedNewtypeDeriving,
RankNTypes, NamedFieldPuns #-}
-- | Global sqlite database shared by all projects.
-- Warning: this is currently only accessible from __outsi... | mrkkrp/stack | src/Stack/Docker/GlobalDB.hs | bsd-3-clause | 5,143 | 0 | 17 | 1,302 | 1,049 | 560 | 489 | 82 | 2 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE FlexibleInstances #-}
module Tests.Instances
where
import Control.Applicative ((<$>), (<*>))
import Control.Exception (assert)
import Control.Monad (foldM, replicateM)
import Data.Bits (shiftL)
import Data.ByteString ... | hackern/halfs | test/src/Tests/Instances.hs | bsd-3-clause | 11,818 | 0 | 27 | 3,704 | 2,799 | 1,529 | 1,270 | 205 | 2 |
-- | Debug Options
module Graphics.QML.Debug (
setDebugLogLevel
) where
import Graphics.QML.Internal.BindCore
-- | Sets the global debug log level. At level zero, no logging information
-- will be printed. Higher levels will increase debug verbosity.
setDebugLogLevel :: Int -> IO ()
setDebugLogLevel = hsqmlSetDeb... | johntyree/HsQML | src/Graphics/QML/Debug.hs | bsd-3-clause | 331 | 0 | 7 | 51 | 41 | 26 | 15 | 5 | 1 |
{-# LANGUAGE DeriveGeneric #-}
-- | AI strategy abilities.
module Game.LambdaHack.Common.Ability
( Ability(..), Skills
, zeroSkills, unitSkills, addSkills, scaleSkills
, blockOnly, meleeAdjacent, meleeAndRanged, ignoreItems
) where
import Data.Binary
import qualified Data.EnumMap.Strict as EM
import Data.Hasha... | Concomitant/LambdaHack | Game/LambdaHack/Common/Ability.hs | bsd-3-clause | 1,858 | 0 | 8 | 320 | 494 | 282 | 212 | 49 | 1 |
{-# LANGUAGE Haskell2010 #-}
{-# LINE 1 "System/Directory/Internal/Prelude.hs" #-}
{-# LANGUAGE CPP #-}
-- |
-- Stability: unstable
-- Portability: portable
--
-- Internal modules are always subject to change from version to version.
module System.Directory.Intern... | phischu/fragnix | tests/packages/scotty/System.Directory.Internal.Prelude.hs | bsd-3-clause | 3,238 | 0 | 6 | 699 | 737 | 496 | 241 | 138 | 0 |
{- |
Module : $Header$
Description : Data types and functions for architectural diagrams
Copyright : (c) Maciek Makowski, Warsaw University 2004-2006
License : GPLv2 or higher, see LICENSE.txt
Maintainer : till@informatik.uni-bremen.de
Stability : provisional
Portability : non-portable (Logic)
... | nevrenato/HetsAlloy | Static/ArchDiagram.hs | gpl-2.0 | 27,361 | 0 | 25 | 9,446 | 5,360 | 2,817 | 2,543 | -1 | -1 |
module Shared.DrawingSimple where
import qualified Graphics.UI.SDL as SDL
import GHC.Word
import Foreign.C.String
import Foreign.C.Types
import Foreign.Ptr
import Shared.Lifecycle
type RenderOperation = Ptr SDL.Surface -> IO CInt
loadBitmap :: String -> IO (Either String (Ptr SDL.Surface))
loadBitmap path = do
s... | oldmanmike/haskellSDL2Examples | src/shared/drawingSimple.hs | gpl-2.0 | 1,085 | 0 | 13 | 166 | 337 | 170 | 167 | 20 | 2 |
{-# LANGUAGE CPP, DeriveDataTypeable, PolymorphicComponents,
DeriveGeneric, FlexibleInstances, DefaultSignatures,
ScopedTypeVariables, Rank2Types #-}
{-# LANGUAGE RoleAnnotations #-}
{-# OPTIONS_GHC -fno-warn-inline-rule-shadowing #-}
#if MIN_VERSION_base(4,8,0)
#define HAS_NATURAL
#endif
-... | siddhanathan/ghc | libraries/template-haskell/Language/Haskell/TH/Syntax.hs | bsd-3-clause | 58,585 | 0 | 20 | 17,036 | 9,863 | 5,402 | 4,461 | 711 | 9 |
{-# LANGUAGE ApplicativeDo #-}
f :: Maybe (Maybe Int) -> Maybe Int -> Maybe Int
f mgs mid = do
_ <- mid
(Just moi) <- mgs
pure (moi + 42)
main :: IO ()
main = print (f (Just Nothing) (Just 2))
| sdiehl/ghc | testsuite/tests/ado/T15344.hs | bsd-3-clause | 207 | 0 | 9 | 57 | 111 | 53 | 58 | 8 | 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="it-IT">
<title>Image Locaiton and Privacy Scanner | ZAP Extension</title>
<maps>
<homeID>top... | thc202/zap-extensions | addOns/imagelocationscanner/src/main/javahelp/org/zaproxy/zap/extension/imagelocationscanner/resources/help_it_IT/helpset_it_IT.hs | apache-2.0 | 995 | 83 | 52 | 162 | 402 | 212 | 190 | -1 | -1 |
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.Build.Macros
-- Copyright : Simon Marlow 2008
--
-- Maintainer : cabal-devel@haskell.org
-- Portability : portable
--
-- Generate cabal_macros.h - CPP macros for package version testing
--
-- W... | headprogrammingczar/cabal | Cabal/Distribution/Simple/Build/Macros.hs | bsd-3-clause | 3,895 | 0 | 14 | 659 | 696 | 389 | 307 | 58 | 2 |
levenshtein :: Eq a => [a] -> [a] -> Int
levenshtein [] t = length t
levenshtein s [] = length s
levenshtein (a:as) (b:bs) = minimum distances
where
distances = [deleteFromS, deleteFromT, deleteFromBoth]
deleteFromS = 1 + levenshtein as (b:bs)
deleteFromT = 1 + levenshtein (a:as) bs
... | mishin/Algorithm-Implementations | Levenshtein_distance/Haskell/jcla1/levenshtein.hs | mit | 714 | 4 | 12 | 202 | 295 | 157 | 138 | 16 | 1 |
module T12067a (MT(..), M) where
import Data.Functor.Identity
newtype MT m b = MT (m b)
type M b = MT Identity b
| olsner/ghc | testsuite/tests/typecheck/should_compile/T12067a.hs | bsd-3-clause | 115 | 0 | 7 | 24 | 50 | 32 | 18 | 4 | 0 |
module TH_spliceE5_prof_Lib where
import Language.Haskell.TH
expandVars :: [String] -> Q Exp
expandVars s = [| concat $(return (ListE (map f s))) |]
where
f x = VarE (mkName x)
| urbanslug/ghc | testsuite/tests/th/TH_spliceE5_prof_Lib.hs | bsd-3-clause | 187 | 0 | 9 | 39 | 55 | 31 | 24 | -1 | -1 |
-- |
-- Module : Tiler.hs
-- Description :
-- Copyright : (c) Jonatan H Sundqvist, 2015
-- License : MIT
-- Maintainer : Jonatan H Sundqvist
-- Stability : experimental|stable
-- Portability : POSIX (not sure)
--
-- Created July 9 2015
-- TODO | -
-- -
-- SPEC | -
-- -
module Tiler... | SwiftsNamesake/Leopardy | src/Tiler.hs | mit | 1,984 | 0 | 13 | 255 | 316 | 178 | 138 | 21 | 1 |
module Monoid4 where
import Data.Semigroup
import Test.QuickCheck
import SemiGroupAssociativeLaw
import MonoidLaws
import Test.HUnit
newtype BoolConj = BoolConj Bool deriving (Eq, Show)
instance Semigroup BoolConj where
BoolConj False <> _ = BoolConj False
_ <> x = x
instance Monoid BoolConj where
memp... | NickAger/LearningHaskell | HaskellProgrammingFromFirstPrinciples/Chapter15.hsproj/Monoid4.hs | mit | 1,081 | 0 | 11 | 191 | 300 | 159 | 141 | 25 | 1 |
{-# LANGUAGE PatternSynonyms #-}
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module JSDOM.Generated.AudioProcessingEvent
(getPlaybackTime, getInputBuffer, getOutputBuffer,
AudioProcessingEvent(..), gTypeAu... | ghcjs/jsaddle-dom | src/JSDOM/Generated/AudioProcessingEvent.hs | mit | 2,025 | 0 | 10 | 244 | 451 | 280 | 171 | 30 | 1 |
module Y2017.M04.D13.Solution where
import Control.Monad (guard)
-- below import available via 1HaskellADay git repository
import Data.QBit
{--
Another puzzler from the Mensa Genius Quiz-a-Day Book by Dr. Abbie Salny.
The following multiplication problem uses every digit from 0 to 9 exactly once
7 x x
... | geophf/1HaskellADay | exercises/HAD/Y2017/M04/D13/Solution.hs | mit | 3,038 | 0 | 18 | 795 | 504 | 278 | 226 | 26 | 2 |
module Chapter where
safeHead :: [x] -> Maybe x
safeHead (x:_) = Just x
safeHead [] = Nothing
suffixes :: [a] -> [[a]]
suffixes xs@(_:xs') = xs : suffixes xs'
suffixes [] = []
myFoldl :: (a -> b -> a) -> a -> [b] -> a
myFoldl f a xs = foldr (\c acc x -> acc (f x c)) id xs a
-- instance of Eq
data HolyCrap = Holy Do... | rockdragon/julia-programming | code/haskell/Chapter.hs | mit | 682 | 0 | 10 | 169 | 411 | 216 | 195 | 20 | 1 |
{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANG... | dmjio/stripe | stripe-core/src/Web/Stripe/StripeRequest.hs | mit | 18,392 | 0 | 16 | 4,594 | 4,728 | 2,715 | 2,013 | -1 | -1 |
import FPPrac
import Data.List
isort :: [Number] -> [Number]
isort x = foldl (flip insert) [] x
| tcoenraad/functioneel-programmeren | practica/serie2/9.insertion-sort.hs | mit | 98 | 0 | 7 | 19 | 47 | 25 | 22 | 4 | 1 |
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE EmptyDataDeriving #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE UndecidableSuperClasses #-}
{-# L... | zenhack/haskell-capnp | gen/lib/Capnp/Gen/Capnp/RpcTwoparty/New.hs | mit | 10,374 | 87 | 14 | 1,934 | 2,305 | 1,372 | 933 | -1 | -1 |
module Geometry
( sphereVolume
, sphereArea
, cubeVolume
, cubeArea
, cuboidArea
, cuboidVolume
) 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 = cuboidVolum... | feliposz/learning-stuff | haskell/Geometry.hs | mit | 838 | 0 | 9 | 184 | 271 | 142 | 129 | -1 | -1 |
module Feature.BinaryJwtSecretSpec where
-- {{{ Imports
import Test.Hspec
import Test.Hspec.Wai
import Network.HTTP.Types
import SpecHelper
import Network.Wai (Application)
import Protolude hiding (get)
-- }}}
spec :: SpecWith Application
spec = describe "server started with binary JWT secret" $
-- this test wil... | Skyfold/postgrest | test/Feature/BinaryJwtSecretSpec.hs | mit | 706 | 0 | 11 | 95 | 108 | 61 | 47 | 13 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Controllers.Users where
import Lucid
import Lucid.Html5
import Data.HVect
import Data.Text as T
import Web.Spock.Safe
import ... | folsen/haskell-startapp | src/Controllers/Users.hs | mit | 1,034 | 0 | 19 | 231 | 290 | 150 | 140 | 35 | 3 |
module DerpInterface where
import Text.Derp as Derp
import Lexer
-- Turns our internal representation of tokens into tokens for the Derp lib
derpTkns :: [Lexer.Tkn] -> [Derp.Token]
derpTkns [] = []
derpTkns (x:xs) = (derpTkn x) : derpTkns xs
derpTkn :: Lexer.Tkn -> Derp.Token
-- "Core" tokens
derpTkn (Newline) ... | hausdorff/pyli | src/DerpInterface.hs | mit | 1,300 | 0 | 7 | 365 | 460 | 229 | 231 | 27 | 1 |
module Feature.AsymmetricJwtSpec where
-- {{{ Imports
import Test.Hspec
import Test.Hspec.Wai
import Network.HTTP.Types
import SpecHelper
import Network.Wai (Application)
import Protolude
-- }}}
spec :: SpecWith Application
spec = describe "server started with asymmetric JWK" $
-- this test will stop working 999... | begriffs/postgrest | test/Feature/AsymmetricJwtSpec.hs | mit | 936 | 0 | 11 | 92 | 102 | 57 | 45 | 13 | 1 |
intersperse :: a -> [[a]] -> [a]
intersperse a [] = []
intersperse a (x:[]) = x
intersperse a (x:xs) = x ++ a:(intersperse a xs) | gscalzo/HaskellTheHardWay | ch03/Intersperse.hs | mit | 128 | 0 | 8 | 25 | 89 | 47 | 42 | 4 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotanalytics-dataset-action.html
module Stratosphere.ResourceProperties.IoTAnalyticsDatasetAction where
impo... | frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/IoTAnalyticsDatasetAction.hs | mit | 2,832 | 0 | 13 | 259 | 344 | 198 | 146 | 35 | 1 |
{-# LANGUAGE TupleSections #-}
module TypeChecker where
import Control.Applicative hiding (empty)
import Control.Monad
import Control.Monad.Except
import Control.Monad.Reader
import Data.Map (Map,(!),mapWithKey,assocs,filterWithKey,elems,keys
,intersection,intersectionWith,intersectionWithKey
... | mortberg/cubicaltt | TypeChecker.hs | mit | 18,733 | 0 | 31 | 5,658 | 7,527 | 3,665 | 3,862 | 432 | 24 |
{-# LANGUAGE TemplateHaskell #-}
{-| Unittests for the job queue functionality.
-}
{-
Copyright (C) 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 ... | ribag/ganeti-experiments | test/hs/Test/Ganeti/JQueue.hs | gpl-2.0 | 11,191 | 0 | 19 | 2,927 | 2,455 | 1,267 | 1,188 | 198 | 2 |
{- ============================================================================
| Copyright 2011 Matthew D. Steele <mdsteele@alum.mit.edu> |
| |
| This file is part of Fallback. |
... | mdsteele/fallback | src/Fallback/State/Item.hs | gpl-3.0 | 39,775 | 0 | 21 | 7,891 | 10,102 | 5,562 | 4,540 | 859 | 26 |
{-|
Horrible and hackish ... but damn useful. This can be used as a standalone
executable or a ghci script for interactive usage. It comes with a sample Puppet
site (that I hope will gets more realistic later).
When given a single argument, it will try to parse the given file, and will
print the parsed values :
> $ ... | bartavelle/puppetresources | Main.hs | gpl-3.0 | 13,300 | 0 | 20 | 3,156 | 2,749 | 1,413 | 1,336 | 170 | 7 |
------------------------------------------------------------------
-- |
-- Module : Gom.CodeGen.Common.Builtins
-- Copyright : (c) Paul Brauner 2009
-- (c) Emilie Balland 2009
-- (c) INRIA 2009
-- Licence : GPL (see COPYING)
--
-- Maintainer : paul.brauner@inria.fr
-- Stability ... | polux/hgom | src/Gom/CodeGen/Common/Builtins.hs | gpl-3.0 | 2,768 | 0 | 10 | 571 | 582 | 341 | 241 | 50 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Devices/List.hs | mpl-2.0 | 4,883 | 0 | 20 | 1,253 | 785 | 456 | 329 | 115 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-books/gen/Network/Google/Resource/Books/Layers/Get.hs | mpl-2.0 | 5,410 | 0 | 21 | 1,435 | 941 | 544 | 397 | 134 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-games-management/gen/Network/Google/Resource/GamesManagement/Events/ResetMultipleForAllPlayers.hs | mpl-2.0 | 3,829 | 0 | 13 | 787 | 319 | 197 | 122 | 55 | 1 |
-- | To parse the version map data hidden in cabal's local cache file,
-- located at "~/.cabal/packages/hackage.haskell.org/00-index.cache".
-- It looks like this, but much longer:
--
-- pref-ver: imagemagick >=0.0.2
-- pkg: imagemagick 0.0.1 b# 123041
-- pkg: imagemagick 0.0.2 b# 123078
-- pkg: ... | gelisam/cabal-rangefinder | src/VersionFile/Parser.hs | unlicense | 3,522 | 0 | 10 | 680 | 531 | 315 | 216 | 49 | 1 |
import System.Environment (getArgs)
import Control.Monad
import Network.Beanstalk
import Data.Aeson
import qualified Data.ByteString.Char8 as B
import qualified Data.ByteString.Lazy.Char8 as BSL
import qualified Data.Map as Map
import System.Random.Shuffle
import BridgeBuddy.Cards
import BridgeBuddy.OpeningBids
import... | derekmcloughlin/BridgeBuddyServer | populate_queue/populate_queue.hs | apache-2.0 | 1,723 | 0 | 16 | 526 | 525 | 296 | 229 | 50 | 2 |
module ParsimonyJSON(run,p_value) where
import Text.JSON.Types
import Parsimony
import Parsimony.Char
import Parsimony.Error
import Control.Monad
import Data.Char
import Numeric
run :: String -> JSValue
run txt = case parse p_value txt of
Left err -> error (show err)
... | yav/parsimony | examples/ParsimonyJSON.hs | bsd-2-clause | 2,916 | 0 | 18 | 1,235 | 903 | 465 | 438 | 65 | 2 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QGraphicsPathItem.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:36
Warning : this file is machine generated ... | keera-studios/hsQt | Qtc/Enums/Gui/QGraphicsPathItem.hs | bsd-2-clause | 2,439 | 0 | 18 | 511 | 578 | 292 | 286 | 49 | 1 |
module Text.XML.Conduit.Parse.Util where
import Control.Monad.Catch
import Control.Monad.IO.Class
import Data.Conduit
import Data.Conduit.Binary
import Data.XML.Types
import System.IO
import Text.XML.Stream.Parse
parseXmlFile :: (MonadThrow m, MonadIO m) => Handle -> (Sink Event m a) -> m a
parseXmlFile h iter = sour... | wavewave/conduit-util | src/Text/XML/Conduit/Parse/Util.hs | bsd-2-clause | 358 | 0 | 9 | 47 | 116 | 67 | 49 | 10 | 1 |
{-# LANGUAGE CPP #-}
#if !defined(TESTING) && __GLASGOW_HASKELL__ >= 703
{-# LANGUAGE Safe #-}
#endif
#include "containers.h"
-----------------------------------------------------------------------------
-- |
-- Module : Data.Map
-- Copyright : (c) Daan Leijen 2002
-- (c) Andriy Palamarchuk 20... | DavidAlphaFox/ghc | libraries/containers/Data/Map.hs | bsd-3-clause | 4,347 | 0 | 11 | 793 | 414 | 267 | 147 | 27 | 1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
-- | This module contains the functions related to @Error@ type,
-- in particular, to @tidyError@ using a solution, and @pprint@ errors.
-- TODO: move this into Tidy.
module Language.Haskell.Liquid.UX.Errors
( -- * Cleanup an Error
tidyError... | ssaavedra/liquidhaskell | src/Language/Haskell/Liquid/UX/Errors.hs | bsd-3-clause | 3,708 | 0 | 11 | 1,117 | 1,213 | 669 | 544 | 74 | 2 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE Rank2Types #-}
-- | Define utils for serializtion of protobuf message
module Data.Protobuf.Serialize.Protobuf (
-- * Data types
WireTag(..)
, putWithWireTag
-- * Getters
, skipUnknownField
... | Shimuuar/protobuf | Data/Protobuf/Serialize/Protobuf.hs | bsd-3-clause | 6,420 | 0 | 19 | 1,579 | 1,929 | 991 | 938 | 185 | 7 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ExtendedDefaultRules #-}
module Lucid.Foundation.Structure.Visibility where
import qualified Data.Text as T
show_for_small_only_ :: T.Text
show_for_small_only_ = " show-for-small-only "
show_for_medium_up_ :: T.Text
show_for_medium_up_ = " show-for-medium-up "
show_... | athanclark/lucid-foundation | src/Lucid/Foundation/Structure/Visibility.hs | bsd-3-clause | 3,308 | 0 | 5 | 386 | 498 | 294 | 204 | 84 | 1 |
{- |
Module : Data.FileStore.Git
Copyright : Copyright (C) 2009 John MacFarlane
License : BSD 3
Maintainer : John MacFarlane <jgm@berkeley.edu>
Stability : alpha
Portability : GHC 6.10 required
A versioned filestore implemented using git.
Normally this module should not be import... | amplify-education/filestore | Data/FileStore/Git.hs | bsd-3-clause | 18,494 | 0 | 19 | 4,730 | 4,774 | 2,459 | 2,315 | 315 | 5 |
module Swapchain
( createSwapchain
, threwSwapchainError
, recreateSwapchain
, allocSwapchainResources
) where
import Control.Monad ( unless )
import Control.Monad.Trans.Resource
import Data.Bits
import Data.Either ( isLeft )
import ... | expipiplus1/vulkan | examples/resize/Swapchain.hs | bsd-3-clause | 6,777 | 0 | 16 | 1,866 | 1,296 | 700 | 596 | -1 | -1 |
module OpenRTB.Types.Enum.VASTCompanionType where
import Control.Monad
import Data.Aeson
import Data.Scientific
-- | The following table lists the options to indicate markup types allowed for
-- video companion ads. This table is derived from IAB VAST 2.0+. Refer
-- to www.iab.net/vast/ for more information.
data... | ankhers/openRTB-hs | src/OpenRTB/Types/Enum/VASTCompanionType.hs | bsd-3-clause | 910 | 0 | 14 | 202 | 217 | 114 | 103 | 23 | 0 |
{-# LANGUAGE TemplateHaskell #-}
module HCProbe.EDSL.TH
(
generatePutters
) where
import Control.Applicative ((<$>))
import Control.Monad.Writer
import Data.Char
import Data.List.Split
import Data.Maybe
import Language.Haskell.TH
generatePutters :: Name -> Q [Dec]
generatePutters... | ARCCN/hcprobe | src/HCProbe/EDSL/TH.hs | bsd-3-clause | 2,409 | 0 | 27 | 824 | 640 | 327 | 313 | 48 | 4 |
{-# LANGUAGE PatternSynonyms #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.AMD.StencilOperationExtended
-- Copyright : (c) Sven Panne 2019
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
--... | haskell-opengl/OpenGLRaw | src/Graphics/GL/AMD/StencilOperationExtended.hs | bsd-3-clause | 862 | 0 | 5 | 113 | 72 | 52 | 20 | 12 | 0 |
-- |
-- Abstract Syntax Tree for the Common Intermediate Language.
-- Note; currently this is just a subset of CIL.
--
module Language.Cil.Syntax (
keywords
, DottedName
, AssemblyName
, TypeName
, GenParamName
, MethodName
, FieldName
, ParamName
, LocalName
, Version
, PublicKeyToken
, Offs... | bamboo/language-cil | src/Language/Cil/Syntax.hs | bsd-3-clause | 23,342 | 0 | 9 | 6,283 | 1,852 | 1,265 | 587 | 338 | 1 |
{-# LANGUAGE FlexibleInstances, FlexibleContexts, GeneralizedNewtypeDeriving #-}
module Data.SGF.Parse.Encodings (guessEncoding, decodeWordStringExplicit) where
import Control.Exception.Extensible
import Control.Monad.State
import Control.Applicative (Applicative(..))
import Control.Monad (liftM,ap)
import Control.Thr... | tonicebrian/sgf | Data/SGF/Parse/Encodings.hs | bsd-3-clause | 2,049 | 0 | 13 | 433 | 595 | 315 | 280 | 42 | 2 |
{-|
Module: Numeric.Morpheus.Utils
Description: Utility Functions
Copyright: (c) Alexander Ignatyev, 2017
License: BSD-3
Stability: experimental
Portability: POSIX
-}
module Numeric.Morpheus.Utils
(
morpheusLayout
)
where
import Foreign.C.Types
morpheusLayout :: CInt -> CInt -> CInt
morpheusLayout xCol cols = if ... | Alexander-Ignatyev/morpheus | hmatrix-morpheus/src/Numeric/Morpheus/Utils.hs | bsd-3-clause | 359 | 0 | 8 | 55 | 62 | 36 | 26 | 6 | 2 |
module X86_64 where
import Control.Monad.Trans.Writer
import Control.Monad.Trans.State
import Data.Word
import Data.Int
import Control.Monad.Trans.Class
-- Target machine
type Addr = Word32
data Prim = PInt Int64 | PReg Register
deriving Show
type Assemble = WriterT [Word8] (State Word8)
em... | faineance/minigen | src/X86_64.hs | bsd-3-clause | 3,582 | 0 | 9 | 1,353 | 1,131 | 647 | 484 | 103 | 8 |
module Genotype.Printer.Arlequin
( print
) where
import Control.Monad (forM_)
import Data.Text.IO (hPutStr)
import System.IO (Handle, hPutChar)
import qualified Data.Text as T
import qualified Data.Vector as V
import qualified Data.Vector.Mutable as VM
import Genotype.Comparison
import Genotype.Types
import Prel... | Jonplussed/genotype-parser | src/Genotype/Printer/Arlequin.hs | bsd-3-clause | 1,641 | 0 | 14 | 376 | 590 | 297 | 293 | 46 | 2 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RebindableSyntax #-}
module HistBot.Main where
import Control.Lens
import Finance.Exchange.AlfaDirect.Interactive
import Finance.Exchange.Serialization.Boxes
import Text.PrettyPrint.Boxes
-- import Finance.Exchan... | schernichkin/exchange | lab/HistBot/Main.hs | bsd-3-clause | 869 | 0 | 17 | 161 | 235 | 122 | 113 | 17 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TemplateHaskell #-}
#ifdef SafeHaskell
{-# LANGUAGE Trustworthy #-}
#endif
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Type.TH
( FromValue
, type_
, typeQ
, proxy
, proxyQ
, num
, string
)
where
-- base -----------... | duairc/symbols | types-th/src/Type/TH.hs | bsd-3-clause | 9,460 | 0 | 15 | 2,302 | 2,459 | 1,324 | 1,135 | 190 | 2 |
module Weave.Shared where
import Test.QuickCheck.Arbitrary
import Test.QuickCheck.Gen
import Control.Applicative
data DumbLang =
I Int
| B Bool
| Cond DumbLang DumbLang DumbLang
| Plus DumbLang DumbLang
deriving (Show, Eq)
instance Arbitrary DumbLang where
arbitrary =
oneof [I <$> arbitrary
... | crclark/functional-pearls | src/Weave/Shared.hs | bsd-3-clause | 444 | 0 | 10 | 106 | 120 | 68 | 52 | 16 | 0 |
--------------------------------------------------------------------------------
{-# LANGUAGE OverloadedStrings #-}
module NumberSix.Handlers.Resto
( handler
) where
--------------------------------------------------------------------------------
import Control.Monad (mzero)
import ... | itkovian/number-six | src/NumberSix/Handlers/Resto.hs | bsd-3-clause | 3,282 | 0 | 17 | 918 | 735 | 405 | 330 | 54 | 7 |
-- don't need this, and gets in my way really
-- when calling from Build.hs w/ -DInstallPiForall
-- #!/usr/bin/env runhaskell
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE CPP #-}
-- {-# OPTIONS_GHC -cpp -DInstallPiForall #-}
-- import Turtle
import Control.Monad
fileLines = tail [
undefined
... | reuleaux/pire | docs/gitignore.hs | bsd-3-clause | 1,447 | 1 | 11 | 775 | 179 | 115 | 64 | 49 | 1 |
module Main (main) where
import Control.Monad (unless)
import Data.List ((\\))
import System.Directory
import System.Exit
import System.FilePath (dropExtension)
import System.IO
import System.IO.Temp (withTempFile)
import System.Process
... | beni55/base-compat | check/TypeCheck.hs | mit | 1,412 | 0 | 16 | 441 | 389 | 202 | 187 | 38 | 2 |
import Data.Function
main = print $ trampoline ([] :: [Int])
| rahulmutt/ghcvm | tests/suite/trampoline/run/tramp01.hs | bsd-3-clause | 62 | 0 | 8 | 11 | 29 | 16 | 13 | 2 | 1 |
import Data.Matrix
import Data.Ratio
import Control.Applicative
import Data.Monoid (mconcat)
import Test.Tasty
import qualified Test.Tasty.QuickCheck as QC
import Test.QuickCheck
{- matrix package test set
This program uses QuickCheck to check that the matrix
functions of the matrix package are working properly.
W... | kenta2/matrix | test/Main.hs | bsd-3-clause | 5,306 | 0 | 21 | 1,508 | 2,132 | 1,083 | 1,049 | 101 | 1 |
{-# LANGUAGE CPP #-}
import Prelude hiding (read)
import Network.HTTP
import Network.Browser hiding (err)
import Network.URI
import qualified Data.ByteString.Lazy as BS
import Data.Version
import Data.Maybe (fromJust)
import Codec.Compression.BZip
import Codec.Archive.Tar
import System.Environment (getArgs)
import Syst... | akru/haste-compiler | src/haste-boot.hs | bsd-3-clause | 9,764 | 0 | 24 | 2,836 | 2,240 | 1,171 | 1,069 | 211 | 4 |
-- Data vault for metrics
--
-- Copyright © 2013-2014 Anchor Systems, Pty Ltd and Others
--
-- The code in this file, and the program it is a part of, is
-- made available to you by its authors as open source software:
-- you can redistribute it and/or modify it under the terms of
-- the 3-clause BSD licence.
--
-- | ... | anchor/marquise | lib/Marquise/IO.hs | bsd-3-clause | 497 | 0 | 4 | 85 | 52 | 38 | 14 | 5 | 0 |
import Control.Monad
import qualified Data.Judy as J
main = do
j <- J.new
forM_ [1..10000000] $ \n -> J.insert n n j
J.delete 100 j
v <- J.lookup 100 j
print v
| bsarah/Judynew | tests/examples/B.hs | bsd-3-clause | 181 | 0 | 10 | 53 | 87 | 42 | 45 | 8 | 1 |
-- (c) The University of Glasgow 2012
{-# LANGUAGE CPP, DataKinds, DeriveDataTypeable, GADTs, KindSignatures,
ScopedTypeVariables, StandaloneDeriving, RoleAnnotations #-}
-- | Module for coercion axioms, used to represent type family instances
-- and newtypes
module CoAxiom (
BranchFlag, Branched... | olsner/ghc | compiler/types/CoAxiom.hs | bsd-3-clause | 18,814 | 0 | 15 | 4,744 | 2,317 | 1,279 | 1,038 | 199 | 1 |
--------------------------------------------------------------------
-- |
-- Module : MediaWiki.API.Action.Login.Import
-- Description : Serializing Login requests.
-- Copyright : (c) Sigbjorn Finne, 2008
-- License : BSD3
--
-- Maintainer: Sigbjorn Finne <sof@forkIO.com>
-- Stability : provisional
-- Portab... | neobrain/neobot | mediawiki/MediaWiki/API/Action/Login/Import.hs | bsd-3-clause | 1,701 | 6 | 15 | 416 | 413 | 218 | 195 | 38 | 3 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE DataKinds #-}
module Main
where
import HLearn.Data.SpaceTree.CoverTree
import SubHask
import SubHask.Algebra.Container
import SubHask.Algebra.Vector
import SubHask.TemplateHaskell.Test
import Test.Framework (defaultMain, testGroup)... | mikeizbicki/HLearn | test/QuickCheck.hs | bsd-3-clause | 1,188 | 0 | 14 | 270 | 196 | 124 | 72 | 26 | 1 |
module C.Generate(
Annotate(..),
Structure(..),
(=*),
(&),
(*#),
(+#),
ToExpression(..),
ToStatement(..),
eq,
basicStructure,
anonStructType,
basicType,
basicGCType,
cast,
noAssign,
cif,
constant,
creturn,
dereference,
reference,
Draw(e... | hvr/jhc | src/C/Generate.hs | mit | 20,564 | 2 | 22 | 5,563 | 8,794 | 4,512 | 4,282 | -1 | -1 |
-- Name: Hello World!
-- Description: The standard hello world example for Eta.
main :: IO () -- Note that this line is optional. Written for clarity.
main = putStrLn "Hello World!"
| pparkkin/eta | examples/HelloWorld.hs | bsd-3-clause | 183 | 0 | 6 | 33 | 22 | 12 | 10 | 2 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.Reporting
-- Copyright : (c) David Waern 2008
-- License : BSD-like
--
-- Maintainer : david.waern@gmail.com
-- Stability : experimental
-- Portability : portable
--
-- Anonymous build ... | thomie/cabal | cabal-install/Distribution/Client/BuildReports/Storage.hs | bsd-3-clause | 6,120 | 0 | 19 | 1,712 | 1,369 | 758 | 611 | 110 | 4 |
module Renaming.C5 where
import Renaming.D5
instance SameOrNot Double where
isSame a b = a ==b
isNotSame a b = a /=b
myFringe:: Tree a -> [a]
myFringe (Leaf x ) = [x]
myFringe (Branch left right) = myFringe left
mySumSq = sumSquares
| kmate/HaRe | test/testdata/Renaming/C5.hs | bsd-3-clause | 251 | 0 | 7 | 60 | 103 | 54 | 49 | 9 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.CCompiler
-- Copyright : 2011, Dan Knapp
--
-- Maintainer : cabal-devel@haskell.org
-- Portability : portable
--
-- This simple package provides types and functions for interacting with
-- C co... | tolysz/prepare-ghcjs | spec-lts8/cabal/Cabal/Distribution/Simple/CCompiler.hs | bsd-3-clause | 4,949 | 0 | 11 | 1,133 | 648 | 360 | 288 | 58 | 17 |
module CommitComment where
import qualified Github.Repos.Commits as Github
import Data.Maybe (maybe)
main = do
possibleComment <- Github.commitCommentFor "thoughtbot" "paperclip" "669575"
case possibleComment of
(Left error) -> putStrLn $ "Error: " ++ (show error)
(Right comment) -> putStrLn $ formatCo... | mavenraven/github | samples/Repos/Commits/CommitComment.hs | bsd-3-clause | 782 | 0 | 14 | 129 | 239 | 124 | 115 | 17 | 2 |
{-# LANGUAGE TypeFamilies #-}
module ShouldCompile where
class Cls a where
type Fam a :: *
type Fam a = Maybe a
instance Cls Int where
-- Gets type family from default
inc :: (Fam a ~ Maybe Int) => a -> Fam a -> Fam a
inc _proxy (Just x) = Just (x + 1)
inc _proxy Nothing = Just 0
foo :: Maybe Int -> Ma... | siddhanathan/ghc | testsuite/tests/typecheck/should_compile/tc250.hs | bsd-3-clause | 357 | 0 | 8 | 92 | 146 | 75 | 71 | 11 | 1 |
-- !!! Testing EOF (and the clearing of it)
module Main(main) where
import System.IO
import System.Directory ( removeFile )
main :: IO ()
main = do
hdl <- openFile "hSeek002.hs" ReadMode
flg <- hIsEOF hdl
print flg
hSeek hdl SeekFromEnd 0
flg <- hIsEOF hdl
print flg
hSeek hdl SeekFromEnd (-1)
... | urbanslug/ghc | libraries/base/tests/IO/hSeek002.hs | bsd-3-clause | 480 | 0 | 9 | 128 | 184 | 81 | 103 | 21 | 1 |
{-# LANGUAGE RecursiveDo #-}
import Control.Monad.IO.Class
import qualified Data.Map as Map
import qualified GHCJS.DOM.JSFFI.Generated.HTMLInputElement as Input
import Reflex
import Reflex.Dom
placeholderName = "Click to edit the name"
main = mainWidget app
app = do
el "h1" $ text "Ed... | Ninju/reflex-dom-demos | edit-text-in-place/source.hs | mit | 2,438 | 0 | 20 | 580 | 780 | 393 | 387 | 42 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.