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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-# OPTIONS_GHC -fno-warn-deprecations #-}
module Exception
(
module Control.Exception,
module Exception
)
where
import Control.Applicative as A
import Control.Exception
import Control.Monad.IO.Class
catchIO :: IO a -> (IOException -> IO a) -> IO a
catchIO = Control.Exception.catch
handleIO :: (I... | AlexanderPankiv/ghc | compiler/utils/Exception.hs | bsd-3-clause | 2,756 | 0 | 15 | 647 | 696 | 362 | 334 | 42 | 1 |
{-# LANGUAGE OverloadedStrings #-}
-- | Accepting arguments to be passed through to a sub-process.
module Options.Applicative.Args
(argsArgument
,argsOption
,parseArgsFromString)
where
import Data.Attoparsec.Args
import qualified Data.Attoparsec.Text as P
import qualified Data.Text as T
imp... | wskplho/stack | src/Options/Applicative/Args.hs | bsd-3-clause | 1,077 | 0 | 11 | 206 | 231 | 128 | 103 | 21 | 1 |
{-# LANGUAGE Unsafe #-}
{-# LANGUAGE NoImplicitPrelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Foreign
-- Copyright : (c) The FFI task force 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer : ffi@haskell.org
-... | beni55/haste-compiler | libraries/ghc-7.8/base/Foreign.hs | bsd-3-clause | 1,617 | 0 | 6 | 330 | 161 | 109 | 52 | 26 | 1 |
{-# LANGUAGE TemplateHaskell, DataKinds, PolyKinds, TypeFamilies #-}
module T9081 where
import Data.Proxy
$( [d|
class kproxy ~ 'KProxy => C (kproxy :: KProxy a) where
type TF (x :: a) :: Bool
|])
| urbanslug/ghc | testsuite/tests/th/T9081.hs | bsd-3-clause | 208 | 0 | 6 | 44 | 21 | 14 | 7 | 6 | 0 |
module Parser where
import Control.Applicative
type Loc a l = a -> l -> l
type Err l = ([String], l)
type Suc a l b = ([a], l, Loc a l, b)
type Ret a l b = Either (Err l) (Suc a l b)
type Pred a = a -> Bool
newtype Parser a l b = Parser ([a] -> l -> Loc a l -> Ret a l b)
parse :: Parser a l b -> [a] -> l -> ... | fredmorcos/attic | projects/pet/archive/pet_haskell_cli/cli/Parser.hs | isc | 2,367 | 0 | 16 | 675 | 1,395 | 735 | 660 | 57 | 3 |
*Main > :t cf
cf :: Functor f => (CardFacts -> f CardFacts) -> KB -> f KB
*Main > :t (^.)
(^.) :: s -> Getting a s a -> a
*Main > :t foo
foo :: KB
*Main > :t foo^.cf
foo^.cf :: CardFacts
-- view cf foo is exactly equal to foo^.cf
*Main > :t view
MonadReader s m => Getting a s a -> m a
-- this is legal
*Main ... | afcondon/cluedoHS | notes not executable.hs | mit | 4,584 | 72 | 24 | 579 | 2,719 | 1,553 | 1,166 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Text.Marquee.Parser.HTML (
info
, comment
, cdata
, special
, preFormated
, simpleTag
, tag
, ctag) where
import Control.Applicative
import Control.Monad
import Data.Char (isLetter, isDigit)
import Data.Text(Text())
import qualified Data.Text as T
import Dat... | DanielRS/marquee | src/Text/Marquee/Parser/HTML.hs | mit | 4,820 | 0 | 14 | 1,427 | 1,614 | 839 | 775 | 171 | 1 |
{-|
Module : Main
Description : Entry point for parsebnf
Copyright : (c) chop-lang, 2015
License : MIT
Maintainer : carterhinsley@gmail.com
-}
module Main where
import qualified CLI
import qualified EBNFParser as EBNF
main = do
argResults <- CLI.processArgs
ebnfFile <- CLI.ebnfFile . head $ argRes... | chop-lang/parsebnf | src/Main.hs | mit | 360 | 0 | 10 | 78 | 59 | 33 | 26 | 7 | 1 |
nwd :: Integer -> Integer -> Integer
nwd 0 y = abs y
nwd x 0 = abs x
nwd x y
| x < 0 = nwd (abs x) y
| y < 0 = nwd x (abs y)
| x > y = if (x-y) > y then nwd (x-y) y else nwd y (x-y)
| x == y = abs x
| x < y = nwd y x | RAFIRAF/HASKELL | nwd3euler.hs | mit | 226 | 1 | 9 | 81 | 200 | 93 | 107 | 9 | 2 |
module TreeSpec
( main
, spec
) where
import Data.Binary
import MLUtil
import Test.Hspec
{-
leaf :: LeafLabel b => String -> Tree a b
leaf = Leaf . C
node :: ArrowLabel a => String -> [Arrow a b] -> Tree a b
node = Node . L
-}
spec :: Spec
spec = do
{-
describe "enc... | rcook/mlutil | mlutil/spec/TreeSpec.hs | mit | 971 | 0 | 8 | 474 | 63 | 36 | 27 | 11 | 1 |
{-# LANGUAGE RankNTypes #-}
{-# OPTIONS_GHC -Wall #-}
module Generator where
import Control.Monad
import Control.Arrow (first)
import Control.Monad.Trans.Class
import Data.Void
data Generator o m r
= Yield (Generator o m r) o
| Done r
| M (m (Generator o m r))
| Check (Generator o m r) (Generator o m ... | snoyberg/nonterminating-pipes | src/Generator.hs | mit | 3,097 | 0 | 19 | 988 | 1,531 | 767 | 764 | 88 | 4 |
module Problem34 where
{--
Task description:
145 is a curious number, as 1! + 4! + 5! = 1 + 24 + 120 = 145.
Find the sum of all numbers which are equal to the sum of the factorial of their digits.
Note: as 1! = 1 and 2! = 2 are not sums they are not included.
--}
import Data.Set (Set)
import qualified Data.S... | runjak/projectEuler | src/Problem34.hs | mit | 1,198 | 0 | 14 | 330 | 337 | 175 | 162 | 28 | 1 |
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, BangPatterns #-}
module Control.OperationalTransformation.ClientServerTests
( tests
) where
import Control.OperationalTransformation
import Control.OperationalTransformation.Client
import qualified Control.OperationalTransformation.JSON ()
import qualified Co... | thomasjm/ot.hs | test/Control/OperationalTransformation/ClientServerTests.hs | mit | 6,709 | 0 | 22 | 1,880 | 1,757 | 922 | 835 | 135 | 18 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Web.Spock
import Web.Spock.Config
import Control.Monad.Trans
import Data.Aeson hiding (json)
import Data.Monoid ((<>))
import Data.Text (Text, pack)
import GHC.Generics
import Lib
import Data.IORef
data Transcript = Tr... | muchas/voice-dot | backend/app/Main.hs | mit | 1,675 | 0 | 16 | 401 | 491 | 255 | 236 | 45 | 1 |
{-# LANGUAGE BangPatterns, DataKinds, DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Hadoop.Protos.YarnServerCommonProtos.NodeActionProto (NodeActionProto(..)) where
import Prelude ((+), (/), (.))
import qualified Prelude as Prelude'
import qualified... | alexbiehl/hoop | hadoop-protos/src/Hadoop/Protos/YarnServerCommonProtos/NodeActionProto.hs | mit | 2,689 | 0 | 11 | 442 | 662 | 361 | 301 | 57 | 1 |
import Data.List.Split
import qualified Data.Map as Map
import qualified Data.Set as Set
import Data.Either
data Direction
= N
| E
| S
| W
deriving (Show, Ord, Eq)
turnMap =
Map.fromList $
[ ((dirs !! i, 'L'), dirs !! ((i - 1) `mod` 4))
| i <- [0 .. 3] ] ++
[ ((dirs !! i, 'R'), dirs !! ((i + 1) `mod... | lzlarryli/advent_of_code_2016 | day1/part2.hs | mit | 1,487 | 8 | 14 | 415 | 749 | 403 | 346 | 51 | 2 |
module Actions where
import Graphics.SpriteKit
import GameState
-- The bump used to lift Lambda on key press.
--
bumpAction :: LambdaNode -> TimeInterval -> LambdaNode
bumpAction sprite@Sprite{ nodePhysicsBody = Just body } _dt
= sprite
{ nodePhysicsBody
= Just body
{ bodyVelocity ... | mchakravarty/lazy-lambda | LazyLambda.hsproj/Actions.hs | mit | 853 | 0 | 13 | 225 | 217 | 123 | 94 | 18 | 2 |
{-# LANGUAGE KindSignatures #-}
module Graphics.Solidhs where
import Data.VectorSpace
type R = Float
type R3 = (R, R, R)
type R4 = (R, R, R, R)
type N = Int
type N3 = (Int, Int, Int)
data CSG = Union [CSG]
| Diff [CSG]
| Intersection [CSG]
| Sphere R R3 -- size, center
| C... | hacxman/solidhs | src/Graphics/Solidhs.hs | mit | 2,612 | 0 | 11 | 922 | 795 | 453 | 342 | 50 | 1 |
import Network.Wai.Handler.Warp (run)
import Landing.App (app)
import Landing.Cache (makeCache)
import System.Environment (getEnv)
import Control.Exception
getPort :: IO Int
getPort = (getEnv "PORT" >>= return . read) `catch` (\(SomeException _) -> return 3000)
main :: IO ()
main = do
_ <- getEnv "GITHUB_TOKEN"
p... | dennis84/landing-haskell | Main.hs | mit | 417 | 2 | 9 | 75 | 170 | 85 | 85 | 14 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
module Coinbase.Exchange.Types.Private where
import Control.Applicative
import ... | dimitri-xyz/coinbase | src/Coinbase/Exchange/Types/Private.hs | mit | 27,748 | 0 | 44 | 10,175 | 6,546 | 3,521 | 3,025 | 678 | 0 |
{-# htermination keysFM_LE :: FiniteMap Float b -> Float -> [Float] #-}
import FiniteMap
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/FiniteMap_keysFM_LE_6.hs | mit | 89 | 0 | 3 | 14 | 5 | 3 | 2 | 1 | 0 |
import Closure
import Permutation
main :: IO ()
main = mapM_ (putStrLn . showCycles) $ closure2A compose
$ map (transposition 1) [2..5]
| jwodder/groups | haskell/tests/symm.hs | mit | 138 | 3 | 8 | 24 | 64 | 30 | 34 | 5 | 1 |
{-# LANGUAGE DeriveDataTypeable, GeneralizedNewtypeDeriving, DeriveGeneric, ForeignFunctionInterface #-}
-- |
-- Module : Crypto.Saltine.Internal.AEAD.ChaCha20Poly1305
-- Copyright : (c) Max Amanshauser 2021
-- License : MIT
--
-- Maintainer : max@lambdalifting.org
-- Stability : experimental
-- Portabili... | tel/saltine | src/Crypto/Saltine/Internal/AEAD/ChaCha20Poly1305.hs | mit | 5,779 | 0 | 16 | 1,286 | 929 | 516 | 413 | 108 | 1 |
-- Copyright (c) 2015-16 Nicola Bonelli <nicola@pfq.io>
--
-- 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.
--
-- Thi... | pfq/PFQ | user/pfq-lang/src/Lang/FDescr.hs | gpl-2.0 | 999 | 0 | 10 | 181 | 105 | 64 | 41 | 7 | 1 |
{-# language TemplateHaskell #-}
{-# language OverloadedStrings #-}
{-# language QuasiQuotes #-}
{-# language TypeFamilies #-}
import Yesod
import Text.Blaze.Renderer.String (renderHtml)
import Text.Blaze
import Text.Blaze.Html4.Strict hiding (map)
import Network.Wai
data This = This
mkYesod "This" [parseRoutes|
/... | marcellussiegburg/autotool | shib/echo.hs | gpl-2.0 | 588 | 0 | 7 | 114 | 109 | 64 | 45 | 17 | 1 |
{-
This file is part of Fronsduk.
Fronsduk 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 3 of the License, or
(at your option) any later version.
Fronsduk is distributed in the hope that it will... | stevenremot/fronsduk | src/Assembler.hs | gpl-3.0 | 2,525 | 0 | 15 | 619 | 561 | 296 | 265 | 60 | 2 |
import Control.Monad.CryptoRandom (crandomRs)
import Crypto.Random.DRBG (CtrDRBG, newGenIO)
import Control.Monad (guard, liftM)
import Data.ByteString.Char8 hiding (map, putStrLn)
import Data.Maybe
import Data.Serialize
import Generator
import Network.Haskoin.Constants
import Network.Haskoin.Crypto
import Network.Hasko... | hudon/refraction-hs | demo-fairexchange.hs | gpl-3.0 | 5,046 | 0 | 14 | 1,060 | 994 | 522 | 472 | 84 | 1 |
module Language.Core.Test.TestSyntax(tests) where
import Language.Core.Syntax
import Test.HUnit
import qualified Language.Haskell.Exts as LHE
testEquality = [equalityTest (Free "var"),
equalityTest (Lambda "x" (Bound 0)),
equalityTest (Con "ConsTransformer" [Free "x", Con "NilTrans... | distillation/language-core | Language/Core/Test/TestSyntax.hs | gpl-3.0 | 24,222 | 0 | 25 | 5,808 | 13,369 | 6,918 | 6,451 | 228 | 1 |
module Reexport2(module Reexport2, module Reexport3) where
import Reexport3
q = 4
| Helium4Haskell/helium | test/correct/Reexport2.hs | gpl-3.0 | 84 | 0 | 4 | 13 | 22 | 15 | 7 | 3 | 1 |
-- Copyright 2016, 2017 Robin Raymond
--
-- This file is part of Purple Muon
--
-- Purple Muon 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 3 of the License, or
-- (at your option) an... | r-raymond/purple-muon | src/Client/Video/Sprite.hs | gpl-3.0 | 3,726 | 0 | 13 | 1,062 | 951 | 510 | 441 | -1 | -1 |
{-# OPTIONS_GHC -Wall #-}
-- {-# OPTIONS_GHC -fno-state-hack #-}
----------------------------------------------------------------------
-- |
-- Module : FRP.Reactive.Internal.IVar
-- Copyright : (c) Conal Elliott 2008
-- License : GNU AGPLv3 (see COPYING)
--
-- Maintainer : conal@conal.net
-- Stability... | ekmett/reactive | src/FRP/Reactive/Internal/IVar.hs | agpl-3.0 | 3,675 | 0 | 9 | 786 | 257 | 146 | 111 | 20 | 2 |
{- |
Module: Postmaster.Prelude
Copyright: (C) 2004-2019 Peter Simons
License: GNU AFFERO GPL v3 or later
Maintainer: simons@cryp.to
Stability: experimental
Portability: non-portable
-}
module Postmaster.Prelude
( module Control.Lens
, module Control.Monad.Extra
, module Control... | peti/postmaster | src/Postmaster/Prelude.hs | agpl-3.0 | 3,183 | 0 | 6 | 469 | 740 | 472 | 268 | 86 | 1 |
{-# OPTIONS -fno-warn-orphans #-}
-- |
-- Module: SwiftNav.SBP.Encoding
-- Copyright: Copyright (C) 2015 Swift Navigation, Inc.
-- License: LGPL-3
-- Maintainer: Mark Fine <dev@swiftnav.com>
-- Stability: experimental
-- Portability: portable
--
-- Encoding utilities.
module SwiftNav.SBP.Encoding where
... | swift-nav/libsbp | haskell/src/SwiftNav/SBP/Encoding.hs | lgpl-3.0 | 996 | 0 | 10 | 203 | 124 | 79 | 45 | 12 | 0 |
module ProductAbsorption where
import Product
import Products
-- left
pal :: (d -> a) -> (e -> b) -> (c -> d) -> (c -> e) -> c -> (a, b)
pal i j g h = Product.product i j . pair g h
-- right
par :: (d -> a) -> (e -> b) -> (c -> d) -> (c -> e) -> c -> (a, b)
par i j g h = pair (i .... | haroldcarr/learn-haskell-coq-ml-etc | haskell/book/2019-Program_Design_by_Calculation-Oliveira/2015-05-LambdaConf/ProductAbsorption.hs | unlicense | 453 | 0 | 10 | 154 | 248 | 139 | 109 | 10 | 1 |
module Lycopene.Database.Datapath
( tempDatapath
) where
tempDatapath :: FilePath
tempDatapath = ":memory:"
| utky/lycopene | src/Lycopene/Database/Datapath.hs | apache-2.0 | 144 | 0 | 4 | 48 | 22 | 14 | 8 | 4 | 1 |
-- Douglas Peucker using Shortest Distance
module Data.Geometry.Simplify.DouglasPeucker
( distance
, shortestDistance
, splitAtMaxDistance
, douglasPeucker
) where
import qualified Data.Geospatial as Geospatial
import qualified Data.Sequence as Sequence
import qualifi... | sitewisely/zellige | src/Data/Geometry/Simplify/DouglasPeucker.hs | apache-2.0 | 2,632 | 0 | 13 | 495 | 854 | 455 | 399 | 45 | 2 |
-----------------------------------------------------------------------------
-- Copyright 2019, Ideas project team. This file is distributed under the
-- terms of the Apache License 2.0. For more information, see the files
-- "LICENSE.txt" and "NOTICE.txt", which are included in the distribution.
-----------------... | ideas-edu/ideas | src/Ideas/Common/Traversal/Tests.hs | apache-2.0 | 5,940 | 0 | 15 | 1,764 | 1,784 | 921 | 863 | 108 | 1 |
{-# LANGUAGE TypeFamilies, FlexibleInstances, FlexibleContexts #-}
module HEP.Automation.MadGraph.Model.ZpH where
import Text.Printf
import Text.Parsec
import Control.Monad.Identity
import Text.StringTemplate
import Text.StringTemplate.Helpers
import HEP.Automation.MadGraph.Model
import HEP.Automation.MadGraph.Mod... | wavewave/madgraph-auto-model | src/HEP/Automation/MadGraph/Model/FQ8C1V.hs | bsd-2-clause | 1,934 | 0 | 19 | 578 | 611 | 322 | 289 | 46 | 1 |
{-# LANGUAGE BangPatterns, CPP, GeneralizedNewtypeDeriving #-}
-- |
-- Module : Data.Text.Foreign
-- Copyright : (c) 2009, 2010 Bryan O'Sullivan
--
-- License : BSD-style
-- Maintainer : bos@serpentine.com
-- Portability : GHC
--
-- Support for using 'Text' data with native code via the Haskell
-- foreign f... | bgamari/text | src/Data/Text/Foreign.hs | bsd-2-clause | 6,123 | 0 | 15 | 1,412 | 1,248 | 677 | 571 | 78 | 1 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TupleSections #-}
module Spec.Graph where
import Spec.Spec
import Spec.Bitmask
import Spec.Command as Command
import Spec.Constant as Constant
import Spec.Enum
import Spec.Type hiding ( AnInclude, ADefine, ABaseType, APlatformType
, ABitmaskType, ... | oldmanmike/vulkan | generate/src/Spec/Graph.hs | bsd-3-clause | 11,364 | 0 | 19 | 3,620 | 2,714 | 1,398 | 1,316 | 242 | 14 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
module Web.RTBBidder.Types.Request.User (User(..)) where
import qualified Data.Aeson as AESON
import Data.Aeson ((.=), (.:), (.:?), (.!=))
import qualified Data.Text as TX
import Web.RTBBidder.Types.Request.Data (Data(..))
import Web.RTBBidder.Type... | hiratara/hs-rtb-bidder | src/Web/RTBBidder/Types/Request/User.hs | bsd-3-clause | 1,372 | 0 | 12 | 304 | 447 | 252 | 195 | 42 | 0 |
{-# LANGUAGE DeriveDataTypeable, MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances, FlexibleContexts #-}
import XMonad
import XMonad.ManageHook
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Layout.NoBorders
import XMonad.Layout.Maximize
import XMonad.Util.Run (spawnPipe)
... | sgf-dma/sgf-xmonad-config | src/variants-xmonad.hs | bsd-3-clause | 13,146 | 2 | 16 | 3,769 | 1,664 | 909 | 755 | 135 | 2 |
{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE QuantifiedConstraints #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE UndecidableInstances #-}
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
module Data.Type.BitRecords.Builder.LazyByteStringBuilder
( BitBuilder,
execBitBuilder,
writeBits,
append... | sheyll/isobmff-builder | src/Data/Type/BitRecords/Builder/LazyByteStringBuilder.hs | bsd-3-clause | 5,430 | 0 | 21 | 1,247 | 1,049 | 543 | 506 | -1 | -1 |
--------------------------------------------------------------------------------
-- Copyright © 2011 National Institute of Aerospace / Galois, Inc.
--------------------------------------------------------------------------------
-- | Main import module for the front-end lanugage.
module Copilot.Library.Libraries (
... | seni/copilot-libraries | src/Copilot/Library/Libraries.hs | bsd-3-clause | 841 | 0 | 5 | 90 | 117 | 82 | 35 | 17 | 0 |
module Types where
import EmbeddedLootLanguage (BlockType, Category, Style)
-- abstract Syntax Tree
type CatName = String
type StyleName = String
type Source = String
newtype AST = AST [Expr]
data Expr = Def Definition
| GeneralRuleExpr RuleExpr
data Definition = ImportExpr FilePath AST
... | owestphal/PoE-FilterScript | src/haskell/Types.hs | bsd-3-clause | 2,585 | 0 | 11 | 664 | 991 | 525 | 466 | 62 | 1 |
{-# LANGUAGE BangPatterns, TemplateHaskell #-}
module App.Benchmarks where
import Criterion.Main as Crit
import Data.Maybe
import BoolExpr.BoolExpr as BE
import BoolExpr.Env as Env
import BoolExpr.ROBDD as ROBDD
runBenchmarks :: BoolExpr -> ROBDD -> (Env -> Bool) -> IO ()
runBenchmarks !expr !robdd !fn =
robdd `... | robrene/robdd-with-template-hs | app/App/Benchmarks.hs | bsd-3-clause | 1,194 | 0 | 12 | 336 | 458 | 239 | 219 | 24 | 2 |
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE Ove... | rohit507/mfd-experiments | app/Sealing.hs | bsd-3-clause | 43,463 | 0 | 18 | 11,659 | 10,579 | 5,686 | 4,893 | -1 | -1 |
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE RankNTypes #-}
{- |
Use this library to get an efficient, optimal, type-safe 'diff' and
'patch' function for your datatypes of choice b... | eelco/gdiff | src/Data/Generic/Diff.hs | bsd-3-clause | 22,149 | 0 | 18 | 6,678 | 6,829 | 3,431 | 3,398 | 308 | 4 |
{-# LANGUAGE CPP #-}
{- Copyright (c) 2008 David Roundy
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditi... | droundy/franchise | Distribution/Franchise/Env.hs | bsd-3-clause | 4,740 | 0 | 16 | 1,509 | 653 | 352 | 301 | 55 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Main where
import Database.Redis (connect, defaultConnectInfo, connectHost)
import TicTacToe
import Web.Scotty
import Network.HTTP.Types.Status
import Data.Maybe
import Control.Monad
import Control.Monad.IO.Class
import System.Environ... | vipo/TicTacToe | app/Main.hs | bsd-3-clause | 1,929 | 0 | 18 | 486 | 614 | 289 | 325 | 58 | 2 |
module Main where
import Control.Applicative
import Data.Array
import Data.List (maximumBy)
import Data.List.Extras.Argmax
import qualified Data.Map as M
import Data.Maybe
import Data.Ord
import System.Directory (... | vimster/part-of-speech-tagging | src/Main.hs | bsd-3-clause | 6,423 | 0 | 18 | 1,183 | 1,743 | 946 | 797 | 104 | 3 |
{-# LANGUAGE OverloadedStrings #-}
module Trombone.RoutePattern where
import Data.Text ( Text )
import qualified Data.Text as Text
-- | A string literal or a placeholder variable name.
data RouteSegment = Atom Text | Variable Text
deriving (Show, ... | johanneshilden/trombone | Trombone/RoutePattern.hs | bsd-3-clause | 1,534 | 0 | 12 | 423 | 415 | 218 | 197 | 26 | 3 |
import Data.Hashable
import Data.Text hiding (map)
import Data.Time.Clock
import Data.Typeable
import Database.Datalog
import Data.EDN
main = do
putStrLn "Hello World"
-- Datomic play
-- Schema
--
-- Each Datomic database has a schema that describes the set of
-- attributes that can be associated with entities... | alanz/hdedalus | src/main.hs | bsd-3-clause | 671 | 0 | 7 | 121 | 64 | 43 | 21 | 8 | 1 |
{-# LANGUAGE RankNTypes #-}
{-|
@pipes-tar@ is a library for the @pipes@-ecosystem that provides the ability
to read from tar files in constant memory, and write tar files using as much
memory as the largest file.
-}
module Pipes.Tar
( -- * Reading
-- $reading
parseTarEntries
, iterTarAr... | ocharles/pipes-tar | src/Pipes/Tar.hs | bsd-3-clause | 15,309 | 0 | 17 | 4,056 | 2,814 | 1,518 | 1,296 | 216 | 4 |
import Data.Bits (shiftL)
import Data.Word
import Data.Int
-- This magical #include brings in all the everybody-knows-these magic
-- constants unfortunately, we need to be *explicit* about which one
-- we want; if we just hope a -I... will get the right one, we could
-- be in trouble.
{-
Pull in the autoconf defines... | nomeata/ghc | includes/HaskellConstants.hs | bsd-3-clause | 4,893 | 0 | 7 | 715 | 564 | 358 | 206 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module AppSpec where
import Test.Hspec
import TestHelper
import Control.Applicative
import Network.Wai.Test (SResponse)
import Data.ByteString (ByteString)
import App
main :: IO ()
main = hspec spec
get :: ByteString -> IO SResponse
get path = app >>= getPath path
spec = do
d... | NorthParkSoftware/yournextgig-backend | test/AppSpec.hs | bsd-3-clause | 426 | 0 | 14 | 90 | 124 | 66 | 58 | 16 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module HipBot.Webhooks
( RoomLinks(..... | purefn/hipbot | src/HipBot/Webhooks.hs | bsd-3-clause | 5,050 | 0 | 15 | 975 | 1,333 | 750 | 583 | 138 | 2 |
module Main where
{-
This module is about configuring and launching a web server. It delegates
wiring resources to the Resources module.
-}
import Web.Scotty(scotty)
import Resources
main :: IO ()
main = scotty 8099 resources
| aztecrex/haskell-scotty-spike | app/Main.hs | bsd-3-clause | 230 | 0 | 6 | 40 | 38 | 22 | 16 | 5 | 1 |
{-|
Module : Idris.Elab.Term
Description : Code to elaborate terms.
Copyright :
License : BSD3
Maintainer : The Idris Community.
-}
{-# LANGUAGE LambdaCase, PatternGuards, ViewPatterns #-}
{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
module Idris.Elab.Term where
import Idris.AbsSyntax
import Idris.AbsSyn... | eklavya/Idris-dev | src/Idris/Elab/Term.hs | bsd-3-clause | 134,623 | 1,311 | 29 | 57,999 | 26,806 | 15,469 | 11,337 | 2,378 | 240 |
module Baum.Traverse where
-- $Id$
import Baum.Type
import Baum.Order
import Autolib.ToDoc
traverse :: Order -> Term a c -> [ c ]
traverse o = case o of
Pre -> preorder
In -> inorder
Post -> postorder
Level -> levelorder
announce :: Order -> Doc -> Doc
announce o d = hsep [ toDoc o <> text ... | Erdwolf/autotool-bonn | src/Baum/Traverse.hs | gpl-2.0 | 844 | 2 | 12 | 227 | 379 | 195 | 184 | 24 | 4 |
{-# LANGUAGE TupleSections #-}
-- | Test examples from RFC 6902 sections A.1 to A.16.
module Main where
import Control.Applicative
import Control.Exception
import Control.Monad
import Data.Aeson
import Data.Aeson.Diff
import qualified Data.ByteString as BS... | thsutton/aeson-diff | test/examples.hs | bsd-2-clause | 4,694 | 0 | 17 | 1,340 | 1,453 | 737 | 716 | 101 | 6 |
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE DeriveAnyClass #-}
-- | GZip compression
module Haskus.Format.Compression.GZip
( Member(..)
, Flag(..)
, Flags
, decompressGet
, decompress
)
where
import Data.Foldable (toList)
import qualified Haskus.Format.Compression.Algorithms.Deflate as D
import Haskus... | hsyl20/ViperVM | haskus-system/src/lib/Haskus/Format/Compression/GZip.hs | bsd-3-clause | 2,860 | 0 | 16 | 751 | 738 | 413 | 325 | 79 | 4 |
module Language.Haskell.Liquid.UX.Server (getType) where
-- import Control.Monad ((<<))
import Language.Haskell.Liquid.Types (Output(..))
import qualified Language.Haskell.Liquid.UX.ACSS as A
import Text.PrettyPrint.HughesPJ hiding (Mode)
import Language.Fixpoint.Utils.Files
... | abakst/liquidhaskell | src/Language/Haskell/Liquid/UX/Server.hs | bsd-3-clause | 2,030 | 0 | 13 | 395 | 538 | 287 | 251 | 36 | 3 |
module Test (testArm8, testArm11, testIntel7, testIntel8, testIntel9,
testTexasInstrument7, testTexasInstrument8) where
import System.FilePath
import Control.Monad
import Tuura.Encode
import Tuura.Code
import Tuura.Synthesis
import Tuura.TechnologyMapping
import Tuura.Graph
import Tuura.Library
testPath... | allegroCoder/scenco-1 | Test.hs | bsd-3-clause | 4,732 | 0 | 15 | 910 | 1,191 | 561 | 630 | 113 | 1 |
module Examples where
import UU.Parsing
import UU.Parsing.CharParser
a = pSym 'a'
b = pSym 'b'
c = pSym 'c'
test p inp = do result <- parseIO p inp
putStrLn (show result)
ta = test a "a"
tb = test b "a"
tc = test c "abc"
t3 = test (pToks "xyz" ) "xy"
t4 = test (pToks "xyz" ) "xz"
pChar = 'a' <..> ... | guillep19/uulib | src/UU/Parsing/Examples.hs | bsd-3-clause | 604 | 0 | 10 | 145 | 244 | 127 | 117 | 20 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Data.Ranged.Boundaries
-- Copyright : (c) Paul Johnson 2006
-- License : BSD-style
-- Maintainer : paul@cogito.org.uk
-- Stability : experimental
-- Portability : portable
--
------------------------------... | Teino1978-Corp/Teino1978-Corp-alex | src/Data/Ranged/Boundaries.hs | bsd-3-clause | 7,442 | 0 | 14 | 1,998 | 1,608 | 865 | 743 | 126 | 2 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
module Aws.ElasticTranscoder.Json.Types
( S3Object
, SNSTopic
, emptySNSTopic
, IAMRole
, JobId(..)
, PresetId(..)
, PageToken(..)
, JobSpec(..)
, Jo... | RayRacine/aws | Aws/ElasticTranscoder/Json/Types.hs | bsd-3-clause | 45,339 | 2 | 23 | 17,175 | 10,785 | 5,847 | 4,938 | 1,231 | 17 |
{-# OPTIONS_HADDOCK hide #-}
-- #hide
#if __GLASGOW_HASKELL__ >= 701
{-# LANGUAGE Safe #-}
#endif
module Text.XHtml.Frameset.Elements where
import Text.XHtml.Internals
-- * Extra elements in XHTML Frameset
frame :: Html -> Html
frame = tag "frame"
frameset :: Html -> Html
fr... | DavidAlphaFox/ghc | libraries/xhtml/Text/XHtml/Frameset/Elements.hs | bsd-3-clause | 431 | 0 | 5 | 135 | 71 | 43 | 28 | 9 | 1 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE NoImplicitPrelude, BangPatterns #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.IO.Device
-- Copyright : (c) The University of Glasgow, 1994-2008
-- License : see libraries/base/LICENSE
--
-- Maintainer : l... | sdiehl/ghc | libraries/base/GHC/IO/Device.hs | bsd-3-clause | 6,662 | 0 | 12 | 1,657 | 703 | 414 | 289 | 66 | 1 |
{-# LANGUAGE RecordWildCards #-}
module Main (main) where
import FastString
import Control.Concurrent
import Control.DeepSeq
import Control.Exception
import Control.Monad
import Data.ByteString (ByteString)
import Data.ByteString.Builder
import qualified Data.ByteString.Char8 as Char
import Data.ByteString.Lazy (toSt... | sdiehl/ghc | testsuite/tests/utils/should_run/T14854.hs | bsd-3-clause | 2,639 | 0 | 18 | 611 | 862 | 444 | 418 | 74 | 1 |
{-# LANGUAGE Arrows #-}
{-
******************************************************************************
* A F R P *
* *
* Module: Elevator *
* Pur... | ony/Yampa-core | examples/Elevator/Elevator.hs | bsd-3-clause | 4,145 | 6 | 24 | 1,495 | 482 | 290 | 192 | 45 | 1 |
module Graphics.UI.Gtk.Layout.BackgroundContainer where
import Control.Monad.Trans (liftIO)
import Data.IORef
import Graphics.UI.Gtk
import Graphics.UI.Gtk.Gdk.GC
import System.Glib.Types
data BackgroundContainer = BackgroundContainer EventBox (IORef (Maybe Pixbuf))
instance WidgetClass BackgroundContainer
instance ... | keera-studios/gtk-helpers | gtk3/src/Graphics/UI/Gtk/Layout/BackgroundContainer.hs | bsd-3-clause | 2,342 | 2 | 15 | 416 | 709 | 340 | 369 | 55 | 2 |
<?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="hu-HU">
<title>Simple Example Add-On</title>
<maps>
<homeID>top</homeID>
<mapref locati... | thc202/zap-extensions | addOns/simpleexample/src/main/javahelp/org/zaproxy/addon/simpleexample/resources/help_hu_HU/helpset_hu_HU.hs | apache-2.0 | 968 | 77 | 67 | 157 | 416 | 210 | 206 | -1 | -1 |
module C1
(fringe, myFringe, Tree(..), SameOrNot(..)) where
data Tree a = Leaf a | Branch (Tree a) (Tree a)
fringe :: (Tree a) -> [a]
fringe (Leaf x) = [x]
fringe (Branch left right)
= (fringe left) ++ (fringe right)
sumTree :: Num a => (Tree a) -> a
sumTree (Leaf x) = x
sumTree (Branch left right)
... | SAdams601/HaRe | old/testing/moveDefBtwMods/C1AST.hs | bsd-3-clause | 638 | 0 | 8 | 175 | 315 | 167 | 148 | 20 | 1 |
module B3 (myFringe) where
import D3 hiding (myFringe, sumSquares, fringe)
import D3 (fringe)
import C3 hiding ()
myFringe :: (Tree a) -> [a]
myFringe (Leaf x) = [x]
myFringe (Branch left right) = myFringe right
sumSquares ((x : xs)) = (x ^ 2) + (sumSquares xs)
sumSquares [] = 0
| SAdams601/HaRe | old/testing/moveDefBtwMods/B3_AstOut.hs | bsd-3-clause | 296 | 0 | 8 | 66 | 138 | 78 | 60 | 9 | 1 |
{-@ LIQUID "--no-termination" @-}
{-@ LIQUID "--short-names" @-}
module Foo () where
import Language.Haskell.Liquid.Prelude (liquidAssert)
import Data.IORef
{-@ data variance IO bivariant @-}
{-@ data variance IORef bivariant @-}
job :: IO ()
job = do
p <- newIORef (0 :: Int)
writeIORef p 10
v <- readIOR... | mightymoose/liquidhaskell | tests/neg/contra0.hs | bsd-3-clause | 361 | 0 | 10 | 73 | 99 | 53 | 46 | 9 | 1 |
type X = 1 + + 2
| sdiehl/ghc | testsuite/tests/parser/should_fail/typeops_C.hs | bsd-3-clause | 17 | 2 | 5 | 7 | 13 | 7 | 6 | -1 | -1 |
{-# LANGUAGE RecordWildCards #-}
module Queue where
import qualified Stack as Stack
-- | *Queue
data Queue a = Queue { queueFront :: Stack.Stack a
, queueBack :: Stack.Stack a
}
-- .end
-- | *empty
empty :: Queue a
empty = Queue { queueFront = Stack.empty
, que... | nomicflux/okasaki-visualization | src/Structures/hs/Queue.hs | mit | 1,995 | 0 | 11 | 517 | 745 | 404 | 341 | 44 | 3 |
module Examples.First where
import Test.HUnit hiding (test)
import Improb.Parser
import Improb.CodeGen
import Examples.Tests.Branching
import Examples.Tests.BranchingEuterpea
import Examples.Tests.Motif
import Examples.Tests.MotifEuterpea
import Examples.Tests.Duet
import Examples.Tests.DuetEuterpea
import Text.Par... | michaelbjames/improb | Examples/First.hs | mit | 1,930 | 0 | 10 | 325 | 422 | 220 | 202 | 43 | 2 |
module Main (main) where
import Data.Foldable (for_)
import Data.List (intercalate)
import Data.Ratio (denominator, numerator)
import System.Directory (createDirectoryIfMissing)
import System.Exit (exitFailure)
import System.IO (IOMode(WriteMode), hFlush, hPutStrLn,
stderr, stdout, withFile)
import Cr... | Rufflewind/wigner-symbols | src/TestMain.hs | mit | 4,308 | 11 | 33 | 1,039 | 1,331 | 725 | 606 | 101 | 2 |
{-# LANGUAGE GADTs #-}
module RecordGADT where
data Test where
Test :: Num t => {x :: t} -> Test
| vladfi1/hs-misc | RecordGADT.hs | mit | 101 | 0 | 7 | 24 | 30 | 19 | 11 | -1 | -1 |
-- Copyright 2017 Maximilian Huber <oss@maximilian-huber.de>
-- SPDX-License-Identifier: MIT
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
module XMonad.MyConfig.MyLogHookLayer
( getXMProcs
, applyMyLogHook
) where
import GHC.IO.Handle (Handle ())
import System.IO ( hPutStrLn )... | maximilianhuber/myconfig | xmonad/lib/XMonad/MyConfig/MyLogHookLayer.hs | mit | 3,037 | 3 | 14 | 1,146 | 812 | 437 | 375 | 64 | 13 |
import Text.Regex.PCRE
import Data.List
import Data.Char
main = do
input <- getContents
putStrLn . unlines
. map (show . decode)
. filter checkValid
. map parseInput
. lines
$ input
parseInput :: String -> (String, Int, String)
parseInput s = (name, read id, ... | lzlarryli/advent_of_code_2016 | day4/part2.hs | mit | 1,012 | 0 | 14 | 300 | 398 | 209 | 189 | 27 | 2 |
module FS where
import Data.ByteString (ByteString)
import Control.Exception
import System.Posix.Types
import BufferedStream
type EntryName = ByteString
type EntryDate = EpochTime
type EntrySize = FileOffset
data FileStats = FileStats (Maybe EntrySize) (Maybe EntryDate)
deriving (Show, Eq, Ord)
data Entry = Dir ... | ffwng/httpfs | src/FS.hs | mit | 877 | 0 | 13 | 146 | 286 | 157 | 129 | 23 | 1 |
import System.Exit (ExitCode(..), exitFailure, exitSuccess, exitWith)
import Scan (runScan)
import Options.Applicative
spec :: Parser FilePath
spec = strOption
(short 's'
<> long "spec"
<> metavar "SPEC"
<> help "Path to audit specification file")
o... | rjosephwright/saytshen-haskell | src/bin/saytshen.hs | mit | 737 | 0 | 10 | 240 | 212 | 109 | 103 | 19 | 2 |
{-|
Module: Flaw.Oil.Repo
Description: General repo functions.
License: MIT
-}
{-# LANGUAGE DeriveGeneric #-}
module Flaw.Oil.Repo
( RepoVersion(..)
, serverRepoVersion
, clientRepoVersion
, Manifest(..)
, protocolVersion
, defaultManifest
, openRepoDb
, Revision
, UserId
, Push(..)
, Pull(..)
... | quyse/flaw | flaw-oil/Flaw/Oil/Repo.hs | mit | 6,052 | 0 | 24 | 1,205 | 1,246 | 679 | 567 | 158 | 4 |
{-|
This module provides an API to render primitives and @'Sprite'@s within the
framework.
-}
module FRP.Spice.Internal.Graphics ( bindColor
, color4f
, color3f
, color4i
, col... | crockeo/spice | src/FRP/Spice/Internal/Graphics.hs | mit | 5,279 | 0 | 14 | 1,833 | 1,341 | 709 | 632 | 96 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Y2018.M07.D10.Exercise where
{--
So, yesterday we explored JSON structure
(EVERYTHING IS A MAP! ... EXCEPT WHAT ISN'T, BUT OKAY!)
Today we're going to explore TWO (much smaller) JSON structures and transform
one to another.
Because, like XML, JSON is all about transformati... | geophf/1HaskellADay | exercises/HAD/Y2018/M07/D10/Exercise.hs | mit | 2,255 | 0 | 9 | 442 | 288 | 173 | 115 | 27 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE RecordWildCards #-}
module Goolosh.SDL.Output where
import Control.Monad(Monad(..))
import System.IO
import Data.Maybe
import qualified Data.Conduit as C
import qualified SDL
import SDL(($=))
import qualified Linear as L
import Goolosh.Game.Output
import Goolosh.SDL.S... | LeviSchuck/Goolosh | src/Goolosh/SDL/Output.hs | mit | 917 | 0 | 13 | 201 | 232 | 131 | 101 | 29 | 2 |
module Language.Paradocs.Types( module Language.Paradocs.EscapeEnv
, module Language.Paradocs.File
, module Language.Paradocs.MacroEnv
, module Language.Paradocs.MonadStorage
, module Language.Paradoc... | pasberth/paradocs | Language/Paradocs/Types.hs | mit | 1,426 | 0 | 6 | 349 | 281 | 189 | 92 | 18 | 0 |
-- | Astronomical calculations
module Astro where
import System.IO
-- | Convert from degrees to radians
fromDegrees :: Floating a => a -> a
fromDegrees deg = deg * pi / 180
-- | Check whether a Gregorian year is a leap year
isLeapYear :: Integral a => a -> Bool
isLeapYear year
| year `mod` 400 == 0 = True
| ... | joshforisha/astro | Astro.hs | mit | 1,786 | 0 | 17 | 479 | 766 | 422 | 344 | 36 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving, OverloadedStrings #-}
-- | Utility code intended to simplify writing bindings to JSON APIs.
module Network.HTTP.API where
import Control.Applicative
import Control.Monad.Reader
import Control.Monad.Trans.Either
import Control.Monad.Trans.Resource
import Data.Aeson
import Data.By... | SaneApp/easy-api | src/Network/HTTP/API.hs | mit | 4,466 | 0 | 15 | 825 | 1,077 | 567 | 510 | 60 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Data.NGH.Formats.Gff
( readAnnotations
, genesAsIntervalMap
) where
import Data.NGH.Annotation
import qualified Data.ByteString as S
import qualified Data.ByteString.Lazy as L
import qualified Data.ByteString.Lazy.Char8 as L8
import qualified Data.IntervalMap.Fing... | luispedro/NGH | Data/NGH/Formats/Gff.hs | mit | 1,944 | 0 | 11 | 583 | 578 | 311 | 267 | 49 | 11 |
module Main where
import System.IO( hFlush, stdout )
import Data.List
import Data.Dynamic
import Data.Maybe
import qualified Data.Set as S
import qualified Data.Map as M
import Test.QuickCheck
import SAT hiding ( Lit )
import SAT.Unary
import SAT.Val
import SAT.Equal
type Var = (String,Type)
makeVars :: Type -> [Str... | koengit/turbospec | TurboSpec.hs | mit | 16,773 | 0 | 25 | 6,328 | 7,880 | 4,265 | 3,615 | 392 | 9 |
module ComponentModel.Parsers.ParserComponentModel
where
import BasicTypes
import ComponentModel.Parsers.AbsComponentModel
import ComponentModel.Parsers.SkelComponentModel
import ComponentModel.Parsers.ErrM
import ComponentModel.Parsers.LexComponentModel
import ComponentModel.Parsers.ParComponentModel
import qualif... | hephaestus-pl/hephaestus | willian/hephaestus-integrated/asset-base/component-model/src/ComponentModel/Parsers/ParserComponentModel.hs | mit | 1,021 | 0 | 14 | 136 | 333 | 173 | 160 | 23 | 1 |
module ArmstrongNumbers (armstrong) where
digits :: Integral x => x -> [x]
digits 0 = []
digits x = x `rem` 10 : digits (x `quot` 10)
armstrong :: Integral a => a -> Bool
armstrong n = n == sum (map (^ length ds) ds)
where
ds = digits n
| exercism/xhaskell | exercises/practice/armstrong-numbers/.meta/examples/success-standard/src/ArmstrongNumbers.hs | mit | 245 | 0 | 10 | 59 | 124 | 66 | 58 | 7 | 1 |
module Main where
import Network.UDP.HolePunch
main = chownat
| danoctavian/chownat | chownat-demo/ChownatDemo.hs | mit | 64 | 0 | 4 | 10 | 15 | 10 | 5 | 3 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE OverloadedLabels #-}
{-# LANGUAGE TypeApplications #-}
module Examples.Serialization.LowLevel.Write (main) where
import Data.Function ((&))
import Capnp.Gen.Addressbook.New
import qualified Capnp.New as C
import qualified Data.Text as T
main :: IO ()
main =
let Rig... | zenhack/haskell-capnp | examples/lib/Examples/Serialization/LowLevel/Write.hs | mit | 3,508 | 0 | 12 | 761 | 627 | 309 | 318 | 42 | 1 |
module LinearAlgebra.Main where
import Notes
import LinearAlgebra.InproductSpaces
import LinearAlgebra.VectorSpaces
linearAlgebra :: Note
linearAlgebra = chapter "Linear Algebra" $ do
vectorSpaces
inproductSpaces
| NorfairKing/the-notes | src/LinearAlgebra/Main.hs | gpl-2.0 | 254 | 0 | 7 | 62 | 42 | 23 | 19 | 8 | 1 |
main = do
putStr "Hey"
putStr "I'm"
putStrLn "Anand!"
| softwaremechanic/Miscellaneous | Haskell/9.hs | gpl-2.0 | 60 | 0 | 7 | 15 | 24 | 9 | 15 | 4 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.