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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
main = do
putStrLn "Qual ano? "
line <- getLine
let ano = read line :: Int
let bis = ((ano `rem` 400) == 0) || ((ano `rem` 4) == 0) && ((ano `rem` 100) /= 0)
putStrLn $ show bis
| folivetti/PI-UFABC | AULA_02/Haskell/AnoBissexto.hs | mit | 215 | 0 | 15 | 78 | 109 | 57 | 52 | 6 | 1 |
{-# LANGUAGE PackageImports, BangPatterns, QuasiQuotes, PatternGuards,
MagicHash, ScopedTypeVariables, TypeFamilies #-}
module Stencils.Gradient
(
gradientX
, gradientY
, gradientMagOrient
) where
import Data.Word
import Control.Monad
import Data.Array.Repa
import Data.Array.Repa.Stencil
import D... | eklinkhammer/robot-vision | src/Stencils/Gradient.hs | mit | 3,438 | 0 | 16 | 1,458 | 694 | 383 | 311 | 77 | 9 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# OPTIONS_GHC -fno-warn-missing-fields #-}
module Text.Hamlet
( -- * Plain HTML
Html
, shamlet
, shamletFile
, xshamlet
, xshamletFile
-- * Hamlet
, HtmlUrl
... | psibi/shakespeare | Text/Hamlet.hs | mit | 23,430 | 0 | 20 | 5,892 | 6,990 | 3,649 | 3,341 | 476 | 14 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE UnicodeSyntax #-}
-- | Get response from Request and retrieve data from it
module Network.StackExchange.Response
( -- * Schedule request
SEException(..), askSE
-- * Is... | supki/libstackexchange | src/Network/StackExchange/Response.hs | mit | 1,752 | 0 | 14 | 354 | 487 | 268 | 219 | 40 | 2 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE DeriveFunctor #-}
module FVL.EFAST
( Expr(..)
) where
import FVL.Algebra
data Expr a
= CInt Integer
| CBool Bool
| CVar String
| Add a a
| Sub a a
| Mul a a
| Div a a
| Mod a a
| And a a
| Or a a
| Not a
| Equal a a... | burz/Feval | FVL/EFAST.hs | mit | 2,730 | 0 | 15 | 1,015 | 1,518 | 776 | 742 | 78 | 2 |
{-
-- Solver.hs
-- Currently a useless file, but I need a filler
-}
main = putStrLn "I'm a useless file!"
| DrSLDR/loop-solver | Solver.hs | mit | 107 | 0 | 5 | 22 | 10 | 5 | 5 | 1 | 1 |
module Network.SimpleServer.Examples.ChatClient(main, run) where
import Network
import System.Environment
import Control.Concurrent
import Control.Concurrent.MVar
import Control.Concurrent.Thread.Delay
import Control.Monad
import System.IO
import Data.Char
-- Attempts to connect to a host on a specified port
-- If suc... | jcollard/simple-server | Network/SimpleServer/Examples/ChatClient.hs | gpl-3.0 | 2,349 | 0 | 13 | 539 | 559 | 285 | 274 | 46 | 4 |
module Data.Stream where
-- A very simple stream.
| ucla-pls/wiretap-tools | src/Data/Stream.hs | gpl-3.0 | 51 | 0 | 3 | 9 | 7 | 5 | 2 | 1 | 0 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE Rank2Types #-}
module Repo.Monad
( RepoInfo(repoRootDir, repoStateDir, repoSnapshotsDir)
, runRepo
, Repo
) where
import Control.Applicative ((<$>))
import Control.Ex... | aartamonau/repo-bisect | src/Repo/Monad.hs | gpl-3.0 | 2,758 | 0 | 17 | 880 | 648 | 348 | 300 | 64 | 2 |
module Main where
import Ema (assembleFile, loadFile)
import ErrorHandling (AssemblyState(..), AssemblyStateT(..))
import qualified Data.ByteString as ByteString (writeFile)
import System (getArgs)
import System.Exit (exitFailure)
main = do args <- getArgs
if length args /= 2 then usage
else a... | adamsmasher/EMA | Main.hs | gpl-3.0 | 1,010 | 0 | 17 | 277 | 301 | 153 | 148 | 25 | 3 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-sqladmin/gen/Network/Google/Resource/SQL/Tiers/List.hs | mpl-2.0 | 2,831 | 0 | 13 | 672 | 308 | 190 | 118 | 50 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-translate/gen/Network/Google/Resource/Language/Translations/Translate.hs | mpl-2.0 | 5,519 | 0 | 19 | 1,384 | 864 | 501 | 363 | 125 | 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/FloodlightConfigurations/List.hs | mpl-2.0 | 3,806 | 0 | 14 | 826 | 431 | 255 | 176 | 66 | 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/Sites/Insert.hs | mpl-2.0 | 3,015 | 0 | 14 | 715 | 406 | 242 | 164 | 61 | 1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
module Core.Response where
import qualified Core.Http as Http
import Data.ByteString (ByteString)
import qualified Data.ByteString as BS
import qualified Data.ByteString.UTF8 as UTF8
import Data.Text ... | inq/agitpunkt | src/Core/Response.hs | agpl-3.0 | 2,055 | 0 | 10 | 406 | 537 | 298 | 239 | 43 | 1 |
--------------------------------------------------------------------------------
-- See end of this file for licence information.
--------------------------------------------------------------------------------
-- |
-- Module : Rules
-- Copyright : (c) 2003, Graham Klyne, 2009 Vasili I Galchin, 2011, 2012 D... | DougBurke/swish | src/Swish/RDF/BuiltIn/Rules.hs | lgpl-2.1 | 5,553 | 0 | 10 | 894 | 556 | 349 | 207 | 57 | 1 |
module Main (
main
) where
import Control.Applicative ((<$>))
import Control.Concurrent
import Control.Concurrent.Chan
import Control.Exception.Base (bracket)
import qualified Data.ByteString.Char8 as B8
import qualified Data.Map as M
import Network
import System.Environment
import System.FilePath
import S... | nionita/chessNet | Client.hs | lgpl-3.0 | 2,146 | 0 | 13 | 620 | 712 | 367 | 345 | 52 | 2 |
{-# LANGUAGE FlexibleInstances #-}
module Lycopene.Core.Scalar where
import Data.Aeson (ToJSON, FromJSON, toJSON, parseJSON)
import Data.Aeson.Types (typeMismatch, Value(..), Parser)
import Data.Time (UTCTime(..), Day)
import Data.UUID (UUID, toString)
import Data.Time... | utky/lycopene | src/Lycopene/Core/Scalar.hs | apache-2.0 | 1,126 | 0 | 8 | 287 | 216 | 134 | 82 | 21 | 1 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE FlexibleContexts, FlexibleInstances, LambdaCase, MultiParamTypeClasses #-}
{-# LANGUAGE MultiWayIf, OverloadedStrings, PatternGuards, ScopedTypeVariables, TypeSynonymInstances #-}
{-# LANGUAGE RankNTypes, NoMonomorphismRestriction #-}
{- |
The Forth interpreter.
-}
m... | hth313/hthforth | src/Language/Forth/Interpreter.hs | bsd-2-clause | 40,672 | 23 | 25 | 12,190 | 13,518 | 6,732 | 6,786 | -1 | -1 |
module Data.RandSet (
RandSet, empty, Data.RandSet.null, add,
findByWeight, randomChoice
) where
import System.Random
data RandSet w v = Nil | Branch w v Int (RandSet w v) (RandSet w v)
deriving (Eq)
empty :: RandSet w v
... | jameseb7/markov | Data/RandSet.hs | bsd-2-clause | 3,115 | 0 | 11 | 1,240 | 1,479 | 743 | 736 | 70 | 1 |
{-# LANGUAGE TypeFamilies, StandaloneDeriving, RecordWildCards #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Xournal.BBox
-- Copyright : (c) 2011, 2012 Ian-Woo Kim
--
-- License : BSD3
-- Maintainer : Ian-Woo Kim <ianwookim@gmail.com>
-- Stability ... | wavewave/xournal-types | src/Data/Xournal/BBox.hs | bsd-2-clause | 5,950 | 0 | 13 | 1,468 | 2,206 | 1,203 | 1,003 | 122 | 5 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveFunctor #-}
-- | Parsing the NKJP morphosyntax layer.
module Text.NKJP.Morphosyntax
(
-- * Data types
Para (..)
, Sent (..)
, Seg (..)
, Lex (..)
, chosen
-- * Parsing
, parseMorph
, readMorph
, re... | kawu/nkjp | src/Text/NKJP/Morphosyntax.hs | bsd-2-clause | 6,670 | 0 | 18 | 1,672 | 1,529 | 873 | 656 | -1 | -1 |
module LambdaCore.Utils where
import LambdaCore.Data
import Control.Monad.Trans.Except
import Control.Monad.Trans.State
newtype FreshCounter = FreshCounter { getFreshCounter :: Int }
initFreshCounter :: FreshCounter
initFreshCounter = initFreshCounterAt 0
initFreshCounterAt :: Int -> FreshCounter
initFreshCounterAt... | elben/lambda-core | src/LambdaCore/Utils.hs | bsd-3-clause | 1,078 | 0 | 11 | 209 | 453 | 229 | 224 | 21 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Y2018.Day12 (answer1, answer2) where
import Control.Monad
import Data.Maybe
import Data.Bool
import Data.List
import Text.Megaparsec
import Text.Megaparsec.Char
import Text.Megaparsec.Char.Lexer
import qualified Data.Vector as V
import Data.Vector ((!), (!?))
import qualifi... | geekingfrog/advent-of-code | src/Y2018/Day12.hs | bsd-3-clause | 2,913 | 0 | 14 | 649 | 1,196 | 634 | 562 | 91 | 2 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE FlexibleInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Main where
import qualified Ivory.Language as L
import Ivory.La... | Hodapp87/ivory | ivory-quickcheck/test/Test.hs | bsd-3-clause | 7,962 | 0 | 20 | 2,239 | 3,232 | 1,642 | 1,590 | 222 | 1 |
-- !!! (n+k) constant pattern test
-- (broke desugarer in Nov2002 release, as reported by
-- Thomas Hallgren.)
module M where
v = let (x+10) = 12 in x
| FranklinChen/Hugs | tests/static/pat1.hs | bsd-3-clause | 153 | 1 | 12 | 31 | 33 | 18 | 15 | -1 | -1 |
module Problem99 where
import Data.List
import Data.List.Split
import Data.Ord
main :: IO ()
main =
readFile "txt/99.txt"
>>= print
. fst
. maximumBy (comparing snd)
. zip [1 ..]
. map ((\[a, b] -> b * log a) . map read . wordsBy (== ','))
. lines
| adityagupta1089/Project-Euler-Haskell | src/problems/Problem99.hs | bsd-3-clause | 312 | 0 | 14 | 111 | 123 | 66 | 57 | 13 | 1 |
module Lib where
import qualified Lexer
import qualified Parser | rjeli/luatalk | src/Lib.hs | bsd-3-clause | 66 | 0 | 3 | 11 | 12 | 9 | 3 | 3 | 0 |
module Problem9 where
--
-- Problem 9: Special Pythagorean triplet
--
-- A Pythagorean triplet is a set of three natural numbers, a < b < c, for which,
--
-- a^2 + b^2 = c^2
--
-- For example, 3^2 + 4^2 = 9 + 16 = 25 = 5^2.
--
-- There exists exactly one Pythagorean triplet for which a + b + c = 1000.
-- Find the prod... | c0deaddict/project-euler | src/Part1/Problem9.hs | bsd-3-clause | 476 | 0 | 12 | 133 | 114 | 66 | 48 | 8 | 1 |
{-# LANGUAGE TypeFamilies #-}
{- |
Copyright : 2007 Eric Kidd
License : BSD3
Stability : experimental
Portability : non-portable (type families)
The 'MaybeT' monad. See
<http://www.haskell.org/haskellwiki/New_monads/MaybeT> for more widely-used
version. Our 'Functor' instance and our implementation of '... | bmillwood/MaybeT-monads-tf | Control/Monad/Maybe.hs | bsd-3-clause | 2,726 | 0 | 11 | 486 | 126 | 75 | 51 | 10 | 0 |
module Paths_intership1 (
version,
getBinDir, getLibDir, getDataDir, getLibexecDir,
getDataFileName, getSysconfDir
) where
import qualified Control.Exception as Exception
import Data.Version (Version(..))
import System.Environment (getEnv)
import Prelude
catchIO :: IO a -> (Exception.IOException -> IO a... | module/internship1 | .stack-work/dist/2672c1f3/build/autogen/Paths_intership1.hs | bsd-3-clause | 1,563 | 0 | 10 | 177 | 362 | 206 | 156 | 28 | 1 |
{-|
Copyright : (c) Dave Laing, 2017
License : BSD3
Maintainer : dave.laing.80@gmail.com
Stability : experimental
Portability : non-portable
-}
module Fragment.KiBase (
module X
) where
import Fragment.KiBase.Ast as X
import Fragment.KiBase.Helpers as X
| dalaing/type-systems | src/Fragment/KiBase.hs | bsd-3-clause | 270 | 0 | 4 | 51 | 29 | 21 | 8 | 4 | 0 |
{-#LANGUAGE RecordWildCards #-}
{-# LANGUAGE LambdaCase #-}
module FileServer where
import Network hiding (accept, sClose)
import Network.Socket hiding (send, recv, sendTo, recvFrom, Broadcast)
import Network.Socket.ByteString
import Data.ByteString.Char8 (pack, unpack)
import System.Environment
import System.IO
imp... | Garygunn94/DFS | .stack-work/intero/intero40798XSn.hs | bsd-3-clause | 7,477 | 194 | 17 | 1,889 | 1,942 | 1,001 | 941 | 140 | 6 |
module Claim (C.headerName, assert) where
import Control.Lens
import Data.ByteString (ByteString)
import qualified Network.HTTP.AuthProxy.Claim as C
import Text.Email.Validate (EmailAddress)
import qualified Config
assert :: Config.T -> EmailAddress -> IO ByteString
assert = C.assert . view Config.proxyKey
| ktvoelker/auth-proxy | src/Claim.hs | bsd-3-clause | 313 | 0 | 7 | 40 | 88 | 53 | 35 | 8 | 1 |
--
-- A very simple example application using System.MIDI.
-- It's a basic MIDI monitor: prints all the incoming messages.
--
module Main where
import Control.Monad
import Control.Concurrent
import System.MIDI
-- the essence
mythread conn = do
events <- getEvents conn
mapM_ print events
(threadDelay 5000)
... | sixohsix/hmidi | examples/monitor.hs | bsd-3-clause | 1,391 | 0 | 22 | 369 | 460 | 215 | 245 | 41 | 5 |
{-# LANGUAGE CPP, BangPatterns, ViewPatterns, FlexibleInstances #-}
module Data.TrieMap.RadixTrie.Alternate () where
import Data.TrieMap.RadixTrie.Base
#define V(f) f (VVector) (k)
#define U(f) f (PVector) (Word)
#define EDGE(args) (!(eView -> Edge args))
instance TrieKey k => Alternatable (TrieMap (VVector k)) wher... | lowasser/TrieMap | Data/TrieMap/RadixTrie/Alternate.hs | bsd-3-clause | 993 | 5 | 12 | 191 | 356 | 185 | 171 | -1 | -1 |
module Lambda.DataType.PatternMatch where
import DeepControl.Applicative
import DeepControl.Monad
import Lambda.DataType.Common
import qualified Lambda.DataType.Type as Ty
import qualified Util.LISP as L
import Prelude hiding (concat)
import Data.List (intersperse)
import Data.Foldable
-----------------------------... | ocean0yohsuke/Simply-Typed-Lambda | src/Lambda/DataType/PatternMatch.hs | bsd-3-clause | 2,388 | 0 | 11 | 925 | 936 | 471 | 465 | 63 | 1 |
{-# LANGUAGE ForeignFunctionInterface, JavaScriptFFI #-}
module JavaScript.Array
( JSArray
, MutableJSArray
, create
, length
, lengthIO
, null
, fromList
, fromListIO
, toList
, toListIO
, index, (!)
, read
, write
, append
, push
, pop
, unshift
... | ghcjs/ghcjs-base | JavaScript/Array.hs | mit | 2,343 | 0 | 6 | 608 | 194 | 127 | 67 | 39 | 1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE OverloadedStrings #-}
module Yesod.Core.Content
( -- * Content
Content (..)
, emptyContent
, ToContent (..)
... | geraldus/yesod | yesod-core/src/Yesod/Core/Content.hs | mit | 10,650 | 0 | 10 | 1,800 | 2,475 | 1,336 | 1,139 | 228 | 2 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE InstanceSigs #-}
{-# OPTIONS_HADDOCK show-extensions #-}
-- |
-- Module : Yi.Fuzzy
-- License : GPL-2
-- Maintainer : yi-devel@googlegroups.com
-- Stabili... | noughtmare/yi | yi-fuzzy-open/src/Yi/Fuzzy.hs | gpl-2.0 | 8,773 | 0 | 16 | 1,806 | 2,662 | 1,379 | 1,283 | 210 | 4 |
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Main
-- Copyright : (c) 2013-2015 Brendan Hay
-- License : Mozilla Public License, v. 2.0.
-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
-- Stability : auto-generated
-- Portability : non-portable (GHC extensions)
--
module Main (main)... | fmapfmapfmap/amazonka | amazonka-config/test/Main.hs | mpl-2.0 | 531 | 0 | 8 | 103 | 76 | 47 | 29 | 9 | 1 |
-- This Source Code Form is subject to the terms of the Mozilla Public
-- This Source Code Form is subject to the terms of the Mozilla Public
-- License, v. 2.0. If a copy of the MPL was not distributed with this
-- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-- License, v. 2.0. If a copy of the MPL was ... | tel/haskell-maia | maia-aeson/src/Maia/Aeson.hs | mpl-2.0 | 17,206 | 145 | 31 | 6,817 | 4,805 | 2,452 | 2,353 | 371 | 20 |
import System.Process
import System.IO
import Control.Exception
import Control.Concurrent
import Data.List
-- Test control-C delegation (#2301)
main :: IO ()
main = do
hSetBuffering stdout LineBuffering
putStrLn "===================== test 1"
-- shell kills itself with SIGINT,
-- delegation off, exit code (... | DavidAlphaFox/ghc | libraries/process/tests/process011.hs | bsd-3-clause | 2,647 | 0 | 14 | 757 | 580 | 296 | 284 | 49 | 2 |
{-# LANGUAGE Haskell98 #-}
{-# LINE 1 "Data/Text/Internal/Unsafe/Shift.hs" #-}
{-# LANGUAGE MagicHash #-}
-- |
-- Module : Data.Text.Internal.Unsafe.Shift
-- Copyright : (c) Bryan O'Sullivan 2009
--
-- License : BSD-style
-- Maintainer : bos@serpentine.com
-- Stability : experimental
-- Portability : GHC... | phischu/fragnix | tests/packages/scotty/Data.Text.Internal.Unsafe.Shift.hs | bsd-3-clause | 2,141 | 0 | 10 | 464 | 412 | 236 | 176 | 31 | 0 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Example where
import Data.Monoid ((<>))
import Data.Text (Text, pack)
import Development.HgRev.TH (defFormat, hgRevStateTH, jsonFormat)
import Options.Applicative (Parser, ParserIn... | dmjio/hgrev | Example.hs | mit | 988 | 0 | 13 | 296 | 260 | 142 | 118 | 25 | 1 |
{-# LANGUAGE CPP, NoImplicitPrelude #-}
module Text.Read.Compat (
-- * The 'Read' class
Read(..),
ReadS,
-- * Haskell 2010 functions
reads,
read,
readParen,
lex,
-- * New parsing functions
module Text.ParserCombinators.ReadPrec,
L.Lexeme(..),
lexP,
parens,
readListDefault,
... | beni55/base-compat | src/Text/Read/Compat.hs | mit | 1,325 | 0 | 10 | 318 | 286 | 164 | 122 | 35 | 3 |
module Program.Array.Declare where
import Program.Array.Value
import Autolib.TES.Identifier
import Autolib.Reader
import Autolib.ToDoc
| florianpilz/autotool | src/Program/Array/Declare.hs | gpl-2.0 | 139 | 0 | 4 | 15 | 29 | 19 | 10 | 5 | 0 |
{-# LANGUAGE DeriveDataTypeable, DeriveGeneric #-}
{-
Copyright (C) 2006-2015 John MacFarlane <jgm@berkeley.edu>
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
(a... | poxu/pandoc | src/Text/Pandoc/Error.hs | gpl-2.0 | 2,295 | 0 | 16 | 534 | 308 | 169 | 139 | 29 | 2 |
foo = qux (\f -> h f >>= g)
| mpickering/hlint-refactor | tests/examples/Default108.hs | bsd-3-clause | 28 | 0 | 9 | 9 | 24 | 12 | 12 | 1 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_HADDOCK show-extensions #-}
-- |
-- Module : Yi.Keymap.Vim.Ex.Commands.BufferDelete
-- License : GPL-2
--
-- :reg[isters] ex command to list yanked texts.
module Yi.Keymap.Vim.Ex.Commands.Registers (printRegisters, parse) where
import Control.Applica... | noughtmare/yi | yi-keymap-vim/src/Yi/Keymap/Vim/Ex/Commands/Registers.hs | gpl-2.0 | 2,918 | 0 | 21 | 985 | 714 | 405 | 309 | 46 | 1 |
module Test18 where
f [x] = [x] ++ [x]
g = f [1, 1]
| mpickering/HaRe | old/testing/refacFunDef/Test18_AstOut.hs | bsd-3-clause | 55 | 0 | 6 | 17 | 39 | 23 | 16 | 3 | 1 |
{-# LANGUAGE TypeFamilies #-}
module T15149B where
import T15149A
data instance An Int = AnInt {an :: Int} deriving Show
| sdiehl/ghc | testsuite/tests/rename/should_compile/T15149B.hs | bsd-3-clause | 121 | 0 | 8 | 20 | 31 | 19 | 12 | 4 | 0 |
module L1 where
--Any type/data constructor name declared in this module can be renamed.
--Any type variable can be renamed.
--Rename type Constructor 'BTree' to 'MyBTree'
data BTree a = Empty | T a (BTree a) (BTree a)
deriving Show
buildtree :: Ord a => [a] -> (BTree a)
buildtree [] = Empty
buildt... | SAdams601/HaRe | old/testing/unfoldAsPatterns/L1.hs | bsd-3-clause | 1,057 | 0 | 16 | 471 | 338 | 174 | 164 | 23 | 3 |
data R = R { i :: Double, c :: Char } deriving Show
data S = S Double Char deriving Show
-- RecDecl
r1 :: R
r1 = R { i = 1, c = 'a' }
-- RecDecl with fields out of order
r2 :: R
r2 = R { c = 'b', i = 2 }
-- Partial RecDecl (Produces GHC warning)
r' :: R
r' = R { c = 'b' }
-- Regular application
r3 :: R
r3 = R 3 'c'... | seereason/ghcjs | test/fay/recDecl.hs | mit | 829 | 0 | 11 | 240 | 338 | 185 | 153 | 31 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Homework.Week10.Assignment where
import Control.Monad.Random
------------------------------------------------------------
-- Die values
newtype DieValue = DV { unDV :: Int }
deriving (Eq, Ord, Show, Num)
first :: (a -> b) -> (a, c) -> (b, c)
first f (a, c) = (f... | laser/cis-194-winter-2016 | src/Homework/Week10/Assignment.hs | mit | 1,030 | 0 | 11 | 182 | 305 | 174 | 131 | 22 | 1 |
module Main where
import System.Environment
import qualified Data.Text.IO as T
import Control.Monad ((>=>))
import Data.Aeson (decode)
import Payback.Types
import Payback (computeDebts, debtsToCSV)
import Payback.Parse (parsePaylog)
import Text.Megaparsec
main :: IO ()
main = parse parsePaylog "stdin" <$> T.getConten... | lambdax-x/payback | app/Main.hs | mit | 488 | 0 | 9 | 76 | 151 | 85 | 66 | 14 | 2 |
{-# language
ConstraintKinds
, CPP
#-}
module Data.Set.Interface(
Interface(..)
, dietInterface
, setInterface
, intSetInterface
, wordBitSetInterface
#ifdef BITSET
, bitSetInterface
#endif
) where
import qualified Data.Set as ST
import qualified Data.IntSet as IS
import qualified Data.Set.Diet as DI
imp... | adubovik/data-set | tests/Data/Set/Interface.hs | mit | 3,503 | 0 | 11 | 1,076 | 954 | 589 | 365 | 93 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module ConsoleChess.Board where
import qualified Data.Map as M
import Data.List
import Data.Bits (xor)
import Control.Lens
repr :: M.Map PieceType (Char, Char)
repr = M.fromList $ [(King, ('♔','♚')),
(Queen, ('♕','♛')),
(Rook, ('♖','♜'))... | RomainGehrig/ConsoleChess | src/ConsoleChess/Board.hs | mit | 2,260 | 0 | 17 | 696 | 870 | 488 | 382 | 49 | 2 |
module Handler.Project where
import Import
import Data.Time.Clock()
import Yesod.Bootstrap()
getProjectR :: ProjectId -> Handler Html
getProjectR projectId = defaultLayout $ selectPage projectId
selectPage :: ProjectId -> Widget
selectPage projectId = do
project <- handlerToWidget $ runDB $ get404 projectId
ren... | Lewerow/SlightlyBetter | Handler/Project.hs | mit | 1,021 | 0 | 16 | 184 | 296 | 145 | 151 | 27 | 1 |
module CFDI.Types.RelatedCfdis where
import CFDI.Chainable
import CFDI.Types.RelatedCfdi
import CFDI.Types.RelationshipType
import CFDI.XmlNode
data RelatedCfdis = RelatedCfdis
{ related :: [RelatedCfdi]
, relationshipType :: RelationshipType
} deriving (Eq, Show)
instance Chainable RelatedCfdis where... | yusent/cfdis | src/CFDI/Types/RelatedCfdis.hs | mit | 786 | 0 | 12 | 157 | 206 | 108 | 98 | 22 | 0 |
module Jaml.Generator.Node
( nodeToJS
) where
import Jaml.Types
import Jaml.Util (joinStrs)
import Jaml.Generator.Util (bite, escSingles)
import Jaml.Generator.Attribute (attrToJS, attrValStr)
nodeToJS :: String -> Node -> String
nodeToJS _ (TemplateTag classAttrs (Attr ("id", [Literal id])) kvs) =
className ++ ... | marklar/jaml | Jaml/Generator/Node.hs | mit | 1,781 | 0 | 14 | 560 | 564 | 291 | 273 | 32 | 8 |
module GraphDB.Util.IOQueue
(
IOQueue,
start,
perform,
performAsync,
finish,
)
where
import GraphDB.Util.Prelude
import qualified Control.Concurrent.Async as Async
data IOQueue = IOQueue {
perform :: forall r. IO r -> IO r,
performAsync :: IO () -> IO (),
finish :: IO ()
}
start ::... | nikita-volkov/graph-db | library/GraphDB/Util/IOQueue.hs | mit | 1,295 | 0 | 26 | 428 | 426 | 206 | 220 | -1 | -1 |
module Types(
BefungeState(..),
Operation(..),
Direction(..),
Point(..),
Torus(..),
Zipper(..),
Zipper2D(..),
mvRight, mvLeft,
mv2D, mv,
mkZipper, mkEmptyZipper,
mkZipperBounded, mkZipper2DBounded,
mvPointTorus,
Mode(..),
moveTo, moveTo',
getFocus, getFocus',
setFocus, setFocus',
charT... | 5outh/BeFun | src/Types.hs | mit | 7,287 | 0 | 14 | 2,732 | 2,774 | 1,524 | 1,250 | 186 | 29 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE BangPatterns #-}
-- |
-- Module : Internal.HaskellDocument
-- Copyright : (c) 2013 Montez Fitzpatrick
-- License : MIT
-- Maintainer : Montez Fitzpatrick <montezf@gmail.com>
-- Portability : non-portable
--
-- 'HaskellDocume... | m15k/hs-xml-alchemy | lib/Internal/HaskellDocument.hs | mit | 5,091 | 0 | 9 | 1,134 | 1,090 | 629 | 461 | 90 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
import Development.Placeholders
import Network.HaskellNet.IMAP
import Network.HaskellNet.IMAP.SSL
import Network.HaskellNet.SMTP
import Network.HaskellNet.SMTP.SSL
import Network.HaskellNet.SSL
import Network.HaskellNet.Auth (AuthType(LOGIN))
imp... | alexanderkyte/wuffie | Transport.hs | mit | 3,349 | 43 | 11 | 720 | 844 | 447 | 397 | -1 | -1 |
{-# LANGUAGE Arrows #-}
module Game.Client.Objects.Minions where
import FRP.Yampa as Yampa
import FRP.Yampa.Geometry
import Graphics.UI.SDL as SDL
import Graphics.UI.SDL.Events as SDL.Events
import Graphics.UI.SDL.Keysym as SDL.Keysym
import Game.Shared.Types
import Game.Shared.Networking
import... | Mattiemus/LaneWars | Game/Client/Objects/Minions.hs | mit | 3,248 | 2 | 16 | 863 | 708 | 387 | 321 | 63 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-|
Module : Main
Description : Simple matrix routing API.
Copyright : Travis Whitaker 2015
License : MIT
Maintainer : twhitak@its.jnj.com
Stability : Provisional
Portability : POSIX
-}
module Main where
import Control.Monad (liftM2)
import Data.Word (Word8)
import D... | MadSciGuys/MRoute | Main.hs | mit | 5,322 | 0 | 27 | 1,413 | 1,586 | 876 | 710 | 83 | 5 |
module BlocVoting.Tally.Transfer where
import qualified Data.ByteString as BS
import BlocVoting.Tally.Voter
data Transfer = Transfer {
fromVoter :: Voter
, afterTime :: Integer
, newAddress :: BS.ByteString
}
deriving (Show, Eq)
| XertroV/blocvoting | src/BlocVoting/Tally/Transfer.hs | mit | 242 | 0 | 9 | 43 | 61 | 39 | 22 | 8 | 0 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
-- | Raw terminal handling.
module Terminal.Terminal
( withRawTerminalMode
, getTerminalSize )
where
import Control.Monad
import Control.Monad.Catch
import Control.Monad.IO.Class
import qualified Data.ByteString as B
import Data.Data
import qua... | Noeda/adeonbot | terminal-emulator/src/Terminal/Terminal.hs | mit | 2,128 | 0 | 30 | 532 | 619 | 315 | 304 | 51 | 2 |
module TestAction where
import Control.Applicative
import Control.Lens hiding (each)
import Control.Monad
import Data.Default
import MVC.Extended
import qualified Pipes.Prelude as Pipes
import Test.Tasty.Hspec
testsAction :: IO (SpecWith())
testsAction =
... | tonyday567/mvc-extended | test/TestAction.hs | mit | 1,581 | 0 | 18 | 393 | 530 | 284 | 246 | 54 | 1 |
module SumRecursively where
-- https://www.codewars.com/kata/get-list-sum-recursively
sumR :: [Int] -> Int
sumR [] = 0
sumR (x:xs) = x + sumR xs | cojoj/Codewars | Haskell/Codewars.hsproj/SumRecursively.hs | mit | 154 | 0 | 7 | 30 | 49 | 27 | 22 | 4 | 1 |
{-# LANGUAGE CPP #-}
module GHCJS.DOM.HTMLDetailsElement (
#if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT)
module GHCJS.DOM.JSFFI.Generated.HTMLDetailsElement
#else
module Graphics.UI.Gtk.WebKit.DOM.HTMLDetailsElement
#endif
) where
#if (defined(ghcjs_HOST_OS) && defined(USE_JAV... | plow-technologies/ghcjs-dom | src/GHCJS/DOM/HTMLDetailsElement.hs | mit | 475 | 0 | 5 | 39 | 33 | 26 | 7 | 4 | 0 |
import System.Environment (getArgs)
import Data.ByteString.Char8 (ByteString)
import qualified Data.ByteString.Char8 as B
import Control.Monad.Par
import Control.DeepSeq
data IList a = Nil | Cons a (IVar (IList a))
type Stream a = IVar (IList a)
instance NFData a => NFData (IList a) where
rnf Nil = ()
rnf (Cons ... | y-kamiya/parallel-concurrent-haskell | src/RsaPipe/Main.hs | gpl-2.0 | 2,947 | 24 | 15 | 829 | 1,457 | 696 | 761 | 94 | 6 |
{-# LANGUAGE RecordWildCards, DeriveDataTypeable, GeneralizedNewtypeDeriving, OverloadedStrings, UnicodeSyntax #-}
module URL.Common
(
act,
activeLine,
bsPack,
ident,
lexeme,
pr,
nu,
whitespace
) where
import qualified Data.ByteString as BS (conca... | xruzzz/axt-links-saver-haskell | src/URL/Common.hs | gpl-2.0 | 1,499 | 0 | 10 | 321 | 497 | 288 | 209 | 38 | 1 |
{-# LANGUAGE RecordWildCards #-}
module MarXup.LineUp (Tok(..),lineup,mkSpaces) where
import Data.List
import Data.Foldable
import Control.Monad (when)
import Data.Monoid
import Data.Maybe (catMaybes)
import MarXup.Tex
data Tok = Tok {
startCol :: Int,
endCol :: Int,
preSpace :: Float, -- max amount of space w... | jyp/MarXup | MarXup/LineUp.hs | gpl-2.0 | 3,483 | 0 | 20 | 953 | 1,230 | 655 | 575 | 73 | 5 |
module Euler.SpiralNumber where
-- Starting with the number 1 and moving to the right in a clockwise direction a 5 by 5 spiral is formed as follows:
-- 21 22 23 24 25
-- 20 7 8 9 10
-- 19 6 1 2 11
-- 18 5 4 3 12
-- 17 16 15 14 13
-- It can be verified that the sum of the numbers on the diagonals is 101.
-- W... | ardumont/haskell-lab | src/Euler/SpiralNumber.hs | gpl-2.0 | 696 | 0 | 10 | 173 | 165 | 93 | 72 | 7 | 1 |
{- | Module : $Header$
- Description : Centralizes the various logics under a default class
- Copyright : (c) Georgel Calin & Lutz Schroeder, DFKI Lab Bremen
- License : GPLv2 or higher, see LICENSE.txt
- Maintainer : g.calin@jacobs-university.de
- Stability : provisional
- Portability : non-po... | nevrenato/Hets_Fork | GMP/versioning/gmp-0.0.1/GMP/ModalLogic.hs | gpl-2.0 | 2,358 | 0 | 16 | 552 | 527 | 284 | 243 | -1 | -1 |
-----------------------------------------------------------------------------
--
-- Module : App.Hash
-- Copyright :
-- License : AllRightsReserved
--
-- Maintainer :
-- Stability :
-- Portability :
--
-- |
--
-----------------------------------------------------------------------------
module App.Hash... | triplepointfive/hegine | src/App/Hash.hs | gpl-2.0 | 833 | 0 | 11 | 152 | 224 | 129 | 95 | 15 | 2 |
module Make where
import Development.Shake
import Development.Shake.Command
import Development.Shake.FilePath
import Development.Shake.Util
-- Makefile for installing pipeline and setting it up
--
--
--bin = "/media/People/michael.panciera/myconda/bin"
block bin = shakeArgs shakeOptions{shakeFiles="_build"} $ do
... | averagehat/Pathogen.hs | src/Install.hs | gpl-2.0 | 1,460 | 0 | 16 | 287 | 431 | 214 | 217 | 32 | 1 |
module NLP.GenI.Test.General where
import Control.Applicative ( (<$>), (<*>) )
import Control.Monad ( liftM2 )
import Data.Char
import Data.FullList
import Data.List ( nub, isPrefixOf )
import GHC.Exts ( IsString(..) )
import Data.Maybe (isJust)
import qualified Data.Text as T
import qualified Data.Map as Map
import T... | kowey/GenI | geni-test/NLP/GenI/Test/General.hs | gpl-2.0 | 1,360 | 0 | 8 | 166 | 240 | 153 | 87 | 23 | 1 |
module PGIP.GraphQL.Resolver.DGraph (resolve) where
import PGIP.GraphQL.Resolver.ToResult
import PGIP.GraphQL.Result as GraphQLResult
import PGIP.GraphQL.Result.DGraph as GraphQLResultDGraph
import PGIP.GraphQL.Result.DocumentLink as GraphQLResultDocumentLink
import PGIP.GraphQL.Result.OMSSimple as GraphQLResultOMSSi... | spechub/Hets | PGIP/GraphQL/Resolver/DGraph.hs | gpl-2.0 | 3,673 | 0 | 23 | 799 | 865 | 446 | 419 | 72 | 5 |
class X a where
f :: a -> Int
f _ = 7
class (X a, Eq a) => Mixed a
instance X Int
instance Mixed Int
g :: Mixed a => a -> Bool
g x = f x == 7
main = g 3 | Helium4Haskell/helium | test/typeClasses/ClassInstance16.hs | gpl-3.0 | 167 | 1 | 8 | 60 | 119 | 52 | 67 | -1 | -1 |
-- It is safe to add the following for this module
{-# LANGUAGE UndecidableInstances #-}
module QHaskell.Magic where
import QHaskell.MyPrelude hiding (lookup)
import QHaskell.Singleton
import QHaskell.Nat.ADT hiding (add)
import qualified QHaskell.Type.GADT as TG
import QHaskell.Environment.Typed
import qualified QHa... | shayan-najd/QHaskell | QHaskell/Magic.hs | gpl-3.0 | 6,754 | 0 | 14 | 2,297 | 3,001 | 1,540 | 1,461 | -1 | -1 |
-- examine: interactively view a file
module Main where
import System.Environment (getArgs)
import System.Exit (exitSuccess, exitFailure)
import STH.Lib
(reportErrorMsgs, readDecimalNat, getLines,
chunksOf, makeZipperList, zlFocus, zlNext,
zlPrev, putStrLns, putOutOfBand)
main :: IO ()
main = do
args <- ge... | nbloomf/st-haskell | src/STH/Examine/Main.hs | gpl-3.0 | 1,701 | 0 | 21 | 534 | 493 | 242 | 251 | 53 | 12 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE MultiParamTypeClasses #-}
-- | Test for the combinators in the Data.VPlan.Combinators module
module Combinators where
import Control.Lens
import Data.VPlan
import Instances ()
import Test... | bennofs/vplan | tests/Combinators.hs | gpl-3.0 | 2,357 | 0 | 16 | 578 | 892 | 459 | 433 | -1 | -1 |
{-
This is the bootstrapping compiler for the Bzo programming language.
Copyright (C) 2020 Charles Rosenbauer
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 3 of the License, or
(at y... | charlesrosenbauer/Bzo-Compiler | src/Compiler.hs | gpl-3.0 | 3,133 | 0 | 19 | 658 | 818 | 424 | 394 | 49 | 3 |
module Routing (
astar,
dijkstra,
astar',
dijkstra'
) where
import qualified Data.Heap as H
import qualified Data.Map as M
import Data.Monoid ((<>))
import Control.Monad.State
astar' :: (Ord n) =>
(n -> Integer) ->
(n -> Bool) ->
(n -> [(Integer,s,n)]) ->
[n] ->
[([s],n,Integer)]
astar' h g b s = f... | quickdudley/sokosolve | Routing.hs | gpl-3.0 | 1,446 | 0 | 26 | 426 | 888 | 500 | 388 | 49 | 4 |
{-# LANGUAGE Rank2Types, NoMonomorphismRestriction, ScopedTypeVariables #-}
module Database.Design.Ampersand.Test.TestScripts (getTestScripts,testAmpersandScripts) where
import Data.List(sort,isInfixOf)
import Data.Char(toUpper)
import System.FilePath ((</>),takeExtension)
import Control.Monad (filterM, forM_, foldM,w... | DanielSchiavini/ampersand | src/Database/Design/Ampersand/Test/TestScripts.hs | gpl-3.0 | 12,665 | 0 | 18 | 3,196 | 2,452 | 1,305 | 1,147 | 243 | 4 |
module FAkeepcons
( keepconsBDFA
, keepconsTNFA -- does usefulTNFA
, keepconsTNFA' -- does not do usefulTNFA
, keepconsETNFA
)
where
import Set
import FiniteMap
import Stuff
import Options
import TA
import FAtypes
import Ids
import FAuseful
---------------------------------------------------------------------... | jwaldmann/rx | src/FAkeepcons.hs | gpl-3.0 | 1,812 | 50 | 13 | 378 | 583 | 320 | 263 | 43 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-storage/gen/Network/Google/Resource/Storage/Buckets/Insert.hs | mpl-2.0 | 5,683 | 0 | 18 | 1,304 | 797 | 465 | 332 | 121 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-android-publisher/gen/Network/Google/Resource/AndroidPublisher/Edits/APKListings/Patch.hs | mpl-2.0 | 5,379 | 0 | 19 | 1,257 | 646 | 382 | 264 | 104 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-dns/gen/Network/Google/Resource/DNS/ManagedZones/Patch.hs | mpl-2.0 | 6,123 | 0 | 21 | 1,518 | 947 | 550 | 397 | 140 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.CivicInfo.T... | rueshyna/gogol | gogol-civicinfo/gen/Network/Google/CivicInfo/Types/Product.hs | mpl-2.0 | 98,364 | 0 | 41 | 25,527 | 18,801 | 10,836 | 7,965 | 2,115 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-bigtableadmin/gen/Network/Google/Resource/BigtableAdmin/Projects/Instances/Tables/DropRowRange.hs | mpl-2.0 | 6,387 | 0 | 16 | 1,351 | 796 | 468 | 328 | 123 | 1 |
module Model.Role
( Role (..)
, presentationRoles
, roleLabel
, roleAbbrev
, roleField
) where
import Import
roleLabel :: Role -> Text
roleLabel TeamMember = "Team Member"
roleLabel Moderator = "Moderator"
roleLabel Admin = "Admin"
roleAbbrev :: Role -> Text
roleAbbrev TeamMember = "T"
... | Happy0/snowdrift | Model/Role.hs | agpl-3.0 | 622 | 0 | 8 | 126 | 186 | 103 | 83 | -1 | -1 |
module Random where
import Data.Vector as V hiding ((++))
type GenState = (Int, Int)
gen :: Int -> Int -> Int -> Int -> GenState -> GenState
gen a b c m (x1, x2) = let x3 = (a*x1 + b*x2 + c) `mod` m
in x3 `seq` (x2, x3)
period :: (Eq a) => (a -> a) -> a -> (Int, a)
period f x0 = z `seq` (go... | SeTSeR/HaskellRandom | src/Random.hs | lgpl-3.0 | 1,804 | 0 | 16 | 706 | 1,062 | 558 | 504 | -1 | -1 |
module Arith4 where
roundTrip :: (Show a, Read b) => a -> b
roundTrip = (read :: a -> Int) . show
main = do
print (roundTrip 4)
print (id 4)
| aniketd/learn.haskell | haskellbook/arith4.hs | unlicense | 152 | 0 | 9 | 42 | 76 | 40 | 36 | 6 | 1 |
module P6 where
{-
6 Problem 6
(*) Find out whether a list is a palindrome. A palindrome can be read forward or backward; e.g. (x a m a x).
Example in Haskell:
*Main> isPalindrome [1,2,3]
False
*Main> isPalindrome "madamimadam"
True
*Mai... | nikolaspapirniywork/99_problems | haskell/src/P6.hs | apache-2.0 | 1,690 | 0 | 11 | 657 | 414 | 228 | 186 | 22 | 2 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
module Main (main) where
import ClassyPrelude hiding ( FilePath
, getArgs
, fromList )
import Control.Concurrent (forkIO)
import Control.Concurrent.Async ( wa... | MichaelXavier/vigilance | src/Utils/Vigilance/Main.hs | bsd-2-clause | 8,190 | 0 | 14 | 3,487 | 1,620 | 828 | 792 | 148 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-|
Module : Lang.Cortho.Prelude
Description : Cortho prelude
Copyright : (c) Benjamin F Jones, 2016
License : BSD-3
Maintainer : benjaminfjones@gmail.com
Stability : experimental
Portability : POSIX
A very minimal prelude for Cortho. We include the SKI combinators and... | benjaminfjones/cortho | src/Lang/Cortho/Prelude.hs | bsd-2-clause | 1,192 | 0 | 13 | 363 | 307 | 177 | 130 | 18 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.